Latest YouTube Video
Saturday, January 6, 2018
'Recovery groups aren't anonymous'
from Google Alert - anonymous http://ift.tt/2m3b5kP
via IFTTT
[FD] Wickr Inc - App Clock & Message Deletion Glitch P2 - Bug Bounty
Source: Gmail -> IFTTT-> Blogger
Addicts warned: Facebook groups are not anonymous | American Tower Corporation
from Google Alert - anonymous http://ift.tt/2m6rru6
via IFTTT
Anonymous - Liebig soep - 1950s
from Google Alert - anonymous http://ift.tt/2AyDMvi
via IFTTT
Accounts Assistant
from Google Alert - anonymous http://ift.tt/2COqbGp
via IFTTT
Finance Analyst
from Google Alert - anonymous http://ift.tt/2AxnCT4
via IFTTT
Format Manuscript/Mixed Material
from Google Alert - anonymous http://ift.tt/2CwlOvc
via IFTTT
Friday, January 5, 2018
How to join anonymous
from Google Alert - anonymous http://ift.tt/2EcnhqT
via IFTTT
Anonymous Tips
from Google Alert - anonymous http://ift.tt/2CL5OsK
via IFTTT
I have a new follower on Twitter
Matthew Lamons
CEO - https://t.co/5sAGUheIFb - AI to simplify how we set see and share life work and play. AI Evangelist, Tech & Society Futurist, SciFi Fan.
https://t.co/Dk1jI2O7HX
Following: 15413 - Followers: 15818
January 05, 2018 at 02:37PM via Twitter http://twitter.com/mlamons1
PTCMART Comic Face Mask Anonymous White Gift Set - Of 10 Pcs
from Google Alert - anonymous http://ift.tt/2CUsDrn
via IFTTT
[FD] ESA-2018-001: EMC Avamar Server, NetWorker Virtual Edition and Integrated Data Protection Appliance Multiple Security Vulnerabilities
Source: Gmail -> IFTTT-> Blogger
[FD] RCE in DuoLingo’s TinyCards App for Android [CVE-2017-16905]
Source: Gmail -> IFTTT-> Blogger
[FD] SSD Advisory – Livebox Fibra (Orange Router) Multiple Vulnerabilities
Source: Gmail -> IFTTT-> Blogger
Ravens considering drafting QB to develop behind Joe Flacco - Jamison Hensley (ESPN)
via IFTTT
ISS Daily Summary Report – 1/4/2018
from ISS On-Orbit Status Report http://ift.tt/2EcCU1Q
via IFTTT
Critical Unpatched Flaws Disclosed In Western Digital 'My Cloud' Storage Devices
from The Hacker News http://ift.tt/2AvH2aU
via IFTTT
Management couple in Edwyn Ralph, Bromyard (HR7) | Anonymous
from Google Alert - anonymous http://ift.tt/2EZ2IPY
via IFTTT
[Guide] How to Protect Your Devices Against Meltdown and Spectre Attacks
from The Hacker News http://ift.tt/2CLfIuY
via IFTTT
GOLD in Geostationary Orbit
from NASA's Scientific Visualization Studio: Most Recent Items http://ift.tt/2qtvtkA
via IFTTT
Carina over Lake Ballard
Thursday, January 4, 2018
Config XML file not found in View of Teasers for Anonymous
from Google Alert - anonymous http://ift.tt/2CI6iQW
via IFTTT
8th St.'s surf is Good
8th St. Summary
Surf: head high + to 3 ft overhead
Maximum: 2.448m (8.03ft)
Minimum: 1.836m (6.02ft)
Maryland-Delaware Summary
from Surfline http://ift.tt/1kVmigH
via IFTTT
Putting together the Q&A for our Anonymous Player Parting Thoughts - Do you have a question?
from Google Alert - anonymous http://ift.tt/2qkpZIS
via IFTTT
Head Chef
from Google Alert - anonymous http://ift.tt/2lXXTyu
via IFTTT
free BTC opinioni. BTC generator by anonymous
from Google Alert - anonymous http://ift.tt/2CBOqGG
via IFTTT
Care Manager
from Google Alert - anonymous http://ift.tt/2CGfVQp
via IFTTT
8th St.'s surf is Good
8th St. Summary
Surf: head high + to 3 ft overhead
Maximum: 2.448m (8.03ft)
Minimum: 1.836m (6.02ft)
Maryland-Delaware Summary
from Surfline http://ift.tt/1kVmigH
via IFTTT
Anonymous Crime Tips
from Google Alert - anonymous http://ift.tt/2Cs64cH
via IFTTT
Ravens: OC Marty Mornhinweg will return, John Harbaugh announces; No. 27 offense in NFL this season (ESPN)
via IFTTT
ISS Daily Summary Report – 1/3/2018
from ISS On-Orbit Status Report http://ift.tt/2CF73KS
via IFTTT
Anonymous Listener Who Found Backpack Full of Cash
from Google Alert - anonymous http://ift.tt/2CSe33T
via IFTTT
Hundreds of GPS Location Tracking Services Leaving User Data Open to Hackers
from The Hacker News http://ift.tt/2E4Troo
via IFTTT
Overeaters Anonymous – Jade
from Google Alert - anonymous http://ift.tt/2E6qgBp
via IFTTT
Evolving Systems Anonymous Helpline
from Google Alert - anonymous http://ift.tt/2EWY4Cf
via IFTTT
Facilities District Manager
from Google Alert - anonymous http://ift.tt/2E6GDh1
via IFTTT
tensorflow/tensorflow
from Google Alert - anonymous http://ift.tt/2E2MaoQ
via IFTTT
(04/01/2018) ⑿ Bitcoin mining sites free : Bitcoin generator by anonymous
from Google Alert - anonymous http://ift.tt/2lSW4mp
via IFTTT
M1: The Incredible Expanding Crab
Wednesday, January 3, 2018
⑷ best way to get anonymous BTC
from Google Alert - anonymous http://ift.tt/2CD4k4i
via IFTTT
Senior Credit Controller
from Google Alert - anonymous http://ift.tt/2AiVy5P
via IFTTT
PA to Finance Director
from Google Alert - anonymous http://ift.tt/2CCFEt1
via IFTTT
Anonymous user 5157f0
from Google Alert - anonymous http://ift.tt/2EQ7jUD
via IFTTT
Cafe manager in South East London (SE24) | Anonymous Recruiter
from Google Alert - anonymous http://ift.tt/2E2eI1Q
via IFTTT
Alcoholics Anonymous Meeting
from Google Alert - anonymous http://ift.tt/2CCPiuA
via IFTTT
I have a new follower on Twitter
❋
I'm just tweeting my feelings, my thoughts and what I want. I love following people too.
Philippines
Following: 18806 - Followers: 19838
January 03, 2018 at 07:51PM via Twitter http://twitter.com/Bookslest
Alison B (Century Meeting, 2017)
from Google Alert - anonymous http://ift.tt/2CysX26
via IFTTT
Stampers Anonymous Scribble Woodland Tim Holtz Cling Stamps, 7" x 8.5"
from Google Alert - anonymous http://ift.tt/2E0jFYU
via IFTTT
Huge Flaw Found in Intel Processors; Patch Could Hit 5-30% CPU Performance
from The Hacker News http://ift.tt/2E08H5R
via IFTTT
Anonymous - m4m
from Google Alert - anonymous http://ift.tt/2qiS3MP
via IFTTT
ISS Daily Summary Report – 1/29/2018
from ISS On-Orbit Status Report http://ift.tt/2qkMBsV
via IFTTT
ISS Daily Summary Report – 12/29/2017
from ISS On-Orbit Status Report http://ift.tt/2lONVi4
via IFTTT
I have a new follower on Twitter
Bundl
We build startups with corporations, from the ground up 🚀 #corporateventure #entrepreneur
Antwerp, Belgium
https://t.co/N5TYyNpftH
Following: 4254 - Followers: 4421
January 03, 2018 at 06:46AM via Twitter http://twitter.com/Bundl
Alcoholics Anonymous
from Google Alert - anonymous http://ift.tt/2DVzfFo
via IFTTT
I have a new follower on Twitter
Katy Pollard
Proud Yorkshire lass and founder of Listening Pig: helping small businesses get high profile media coverage. HuffPost blogger https://t.co/KE3ry125YJ
Leeds, England
https://t.co/5FKfHXsWoq
Following: 8456 - Followers: 10189
January 03, 2018 at 04:21AM via Twitter http://twitter.com/listeningpig
I have a new follower on Twitter
Bruce Martin Nigro
Doctor of Podiatric Medicine, Serial Entrepreneur, Family Comes First, Winelover, Weekend Athlete, Hack Golfer, Traded my Bucket-List for a Liv.-List !
Florida's Space Coast
https://t.co/g5hvKl4weM
Following: 7021 - Followers: 8140
January 03, 2018 at 04:21AM via Twitter http://twitter.com/BruceMNigro
Jan 20: South Korea's Reported Date to Ban Anonymous Crypto Trading
from Google Alert - anonymous http://ift.tt/2DWh5TU
via IFTTT
Re: [FD] "." (period) in file extension(s) in windows
Source: Gmail -> IFTTT-> Blogger
[FD] ChromeOS Doesn’t Always Use SSL During Startup [CVE-2017-15397]
Source: Gmail -> IFTTT-> Blogger
The Helix Nebula from CFHT
Tuesday, January 2, 2018
Anonymous
from Google Alert - anonymous http://ift.tt/2CuyEhL
via IFTTT
Anonymous user 8eb8c1
from Google Alert - anonymous http://ift.tt/2lIwbWi
via IFTTT
mlp/ - Anonymous in Equestria: Memorial Edition
from Google Alert - anonymous http://ift.tt/2CGUwDe
via IFTTT
Anonymous: Inside The Meeting
from Google Alert - anonymous http://ift.tt/2Cd9r7e
via IFTTT
Anonymous user bb325f
from Google Alert - anonymous http://ift.tt/2CGoNSL
via IFTTT
Anonymous - Chef
from Google Alert - anonymous http://ift.tt/2lFCo5s
via IFTTT
Disable Anonymous users from seeing qlik menu
from Google Alert - anonymous http://ift.tt/2qaWGIJ
via IFTTT
Anonymous 119982
from Google Alert - anonymous http://ift.tt/2lFn09k
via IFTTT
Anonymous bands/musicians
from Google Alert - anonymous http://ift.tt/2qcOoA3
via IFTTT
Anonymous Feminist Street Artist Bambi Isn't Backing Down
from Google Alert - anonymous http://ift.tt/2lHV0Sf
via IFTTT
Critical Flaw Reported In phpMyAdmin Lets Attackers Damage Databases
from The Hacker News http://ift.tt/2CdeUL8
via IFTTT
Drafter in Knott Mill, Manchester (M1) | Anonymous
from Google Alert - anonymous http://ift.tt/2DTb5uX
via IFTTT
Chef de Partie
from Google Alert - anonymous http://ift.tt/2CDUNqw
via IFTTT
Flaw In Major Browsers Allows 3rd-Party Scripts to Steal Your Saved Passwords
from The Hacker News http://ift.tt/2CDxXzi
via IFTTT
Unpatched Apple macOS 0-Day Kernel Exploit Disclosed, Allows Root Access
from The Hacker News http://ift.tt/2A3MW2M
via IFTTT
Unexpected X Rays from Perseus Galaxy Cluster
Monday, January 1, 2018
12 de Julio
from Google Alert - anonymous http://ift.tt/2EuFMI4
via IFTTT
Anonymous, French, 17th century
from Google Alert - anonymous http://ift.tt/2Eq7Koq
via IFTTT
Anonymous users do not see the gpx graphics
from Google Alert - anonymous http://ift.tt/2DJ998k
via IFTTT
I have a new follower on Twitter
Onur YUKSEKTEPELI
Owner and Chief Technology Solutions Architect at Nephocraft. Entrepreneur, Technology Enthusiast, Speaker, Writer, Microsoft MVP
Istanbul
https://t.co/TWZuCrcljF
Following: 6578 - Followers: 7245
January 01, 2018 at 01:26PM via Twitter http://twitter.com/oyuksektepeli
Anonymous Radio 24/7 Live. A new radio station in your area!
from Google Alert - anonymous http://ift.tt/2lwYebn
via IFTTT
Ravens LB C.J. Mosley confirms DC Dean Pees is retiring (ESPN)
via IFTTT
Taking screenshots with OpenCV and Python
Happy New Year!
It’s now officially 2018…which also means that PyImageSearch is (almost) four years old!
I published the very first blog post on Monday, January 12th 2014. Since then over 230 posts have been published, along with two books and a full-fledged course.
At the beginning of every New Year I take some quiet time to reflect.
I grab my notebook + a couple pens (leaving my laptop and phone at home; no distractions) and head to the local cafe in my neighborhood. I then sit there and reflect on the past year and ask myself the following questions:
- What went well and gave me life?
- What went poorly and sucked life from me?
- How can I double-down on the positive, life-giving aspects?
- How can I get the negative aspects off my plate (or at least minimize their impact on my life)?
These four questions (and my thoughts on them) ultimately shape the upcoming year.
But most of all, the past four years running PyImageSearch has always been at the top of my list for “life-giving”.
Thank you for making PyImageSearch possible. Running this blog is truly the best part of my day.
Without you PyImageSearch would not be possible.
And in honor of that, today I am going to answer a question I received from Shelby, a PyImageSearch reader:
Hi Adrian, I’ve been reading PyImageSearch for the past couple of years. One topic I’m curious about is taking screenshots with OpenCV. Is this possible?
I’d like to build an app that can automatically control the user’s screen and it requires screenshots. But I’m not sure how to go about it.
Shelby’s question is a great one.
Building a computer vision system to automatically control or analyze what is on a user’s screen is a great project.
Once we have the screenshot we can identify elements on a screen using template matching, keypoint matching, or local invariant descriptors.
The problem is actually obtaining the screenshot in the first place.
We call this data acquisition — and in some cases, acquiring the data is actually harder than
applying the computer vision or machine learning itself.
To learn how to take screenshots with OpenCV and Python, just keep reading.
Looking for the source code to this post?
Jump right to the downloads section.
Taking screenshots with OpenCV and Python
Today’s blog post is broken down into two sections.
In the first section, we’ll learn how to install the PyAutoGUI library. This library is responsible for actually capturing our screenshots to disk or directly to memory.
From there we’ll learn how to use PyAutoGUI and OpenCV together to obtain our screenshots.
Installing PyAutoGUI for screenshots
You can find instructions for installing PyAutoGUI in their install documentation; however, as a matter of completeness, I have included the instructions below.
I highly recommend that you install the PyAutoGUI into your Python virtual environment for computer vision (as we have done for all other install tutorials here on PyImageSearch).
Discussing virtual environments in detail is beyond the scope of this blog post; however, I encourage you to set up an environment for computer vision (including OpenCV and other tools) by following the installation instructions for your system available here.
macOS
Installing PyAutoGUI for macOS is very straightforward. As stated above, you’ll want to be sure you’re “inside” your virtual environment prior to executing the following pip commands:
$ workon your_virtualenv $ pip install pillow imutils $ pip install pyobjc-core $ pip install pyobjc $ pip install pyautogui
Ubuntu or Raspbian
To install PyAutoGUI for Ubuntu (or Raspbian), you’ll need to make use of both Aptitude and pip. Again, before the pip commands, be sure that you’re working on your Python virtual environment:
$ sudo apt-get install scrot $ sudo apt-get install python-tk python-dev $ sudo apt-get install python3-tk python3-dev $ workon your_virtualenv $ pip install pillow imutils $ pip install python3_xlib python-xlib $ pip install pyautogui
Screenshots and screen captures with OpenCV and Python
Now that PyAutoGUI is installed, let’s take our first screenshot with OpenCV and Python.
Open up a new file, name it
take_screenshot.py, and insert the following code:
# import the necessary packages import numpy as np import pyautogui import imutils import cv2
On Lines 2-5 we’re importing our required packages, notably
pyautogui.
From there we’ll take a screenshot via two different methods.
In the first method, we take the screenshot and store it in memory for immediate use:
# take a screenshot of the screen and store it in memory, then # convert the PIL/Pillow image to an OpenCV compatible NumPy array # and finally write the image to disk image = pyautogui.screenshot() image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) cv2.imwrite("in_memory_to_disk.png", image)
Line 10 shows that we’re grabbing a screenshot with
pyautogui.screenshotand storing it as
image(again, this image is stored in memory it is not saved to disk).
Easy, huh?
Not so fast!
PyAutoGUI actually stores the image as a PIL/Pillow image, so we need to perform an additional step before the image can be used with OpenCV.
On Line 11 we convert the image to a NumPy array and swap the color channels from RGB ordering (what PIL/Pillow uses) to BGR (what OpenCV expects). That’s all that’s required for making our screenshot image OpenCV-compatible.
From here the sky is the limit with what you can do. You could detect buttons displayed on the screen or even determine the coordinates of where the mouse is on the screen.
We won’t do either of those tasks today. Instead, let’s just write the image to disk with
cv2.imwriteto ensure the process worked correctly (Line 12).
The second method (where we write the screenshot to disk) is even easier:
# this time take a screenshot directly to disk pyautogui.screenshot("straight_to_disk.png")
As shown, this one-liner writes the image straight to disk. Enough said.
We could stop there, but for a sanity check, let’s make sure that OpenCV can also open + display the screenshot:
# we can then load our screenshot from disk in OpenCV format image = cv2.imread("straight_to_disk.png") cv2.imshow("Screenshot", imutils.resize(image, width=600)) cv2.waitKey(0)
Here, we read the image from disk. Then we resize and display it on the screen until a key is pressed.
That’s it!
As you can tell, PyAutoGui is dead simple thanks to the hard work of Al Sweigart.
Let’s see if it worked.
To test this script, open up a terminal and execute the following command:
$ python take_screenshot.py
And here’s our desktop screenshot shown within our desktop…proving that the screenshot was taken and displayed:
Notice how in the terminal the Python script is running (implying that the screenshot is currently being taken).
After the script exits, I have two new files in my working directory:
in_memory_to_disk.pngand
straight_to_disk.png.
Let’s list contents of the directory:
$ ls -al total 18760 drwxr-xr-x@ 5 adrian staff 160 Jan 01 10:04 . drwxr-xr-x@ 8 adrian staff 256 Jan 01 20:38 .. -rw-r--r--@ 1 adrian staff 4348537 Jan 01 09:59 in_memory_to_disk.png -rw-r--r--@ 1 adrian staff 5248098 Jan 01 09:59 straight_to_disk.png -rw-r--r--@ 1 adrian staff 703 Jan 01 09:59 take_screenshot.py
As you can see, I’ve got my
take_screenshot.pyscript and both screenshot PNG images
Now that we have our screenshot in OpenCV format, we can apply any “standard” computer vision or image processing operation that we wish, including edge detection, template matching, keypoint matching, object detection, etc.
In a future blog post, I’ll be demonstrating how to detect elements on a screen followed by controlling the entire GUI from the PyAutoGUI library based on what our computer vision algorithms detect.
Stay tuned for this post in early 2018!
Summary
In today’s blog post we learned how to take screenshots using OpenCV, Python, and the PyAutoGUI library.
Using PyAutoGUI we can easily capture screenshots directly to disk or to memory, which we can then convert to OpenCV/NumPy format.
Screenshots are an important first step when creating computer vision software that can automatically control GUI operations on the screen, including automatically moving the mouse, clicking the mouse, and registering keyboard events.
In future blog posts, we’ll learn how we can automatically control our entire computer via computer vision and the PyAutoGUI.
To be notified when future blog posts are published here on PyImageSearch, just enter your email address in the form below!
Downloads:
The post Taking screenshots with OpenCV and Python appeared first on PyImageSearch.
from PyImageSearch http://ift.tt/2CzGQtA
via IFTTT
Forever 21 Confirms Security Breach Exposed Customer Credit Card Details
from The Hacker News http://ift.tt/2lyT8KX
via IFTTT
Sunday, December 31, 2017
▶ Terrell Suggs says loss to Bengals most devastating defeat in Ravens career; "It's like a bad dream" (ESPN)
via IFTTT
Anonymous That Dude
from Google Alert - anonymous http://ift.tt/2C3hpzC
via IFTTT
anonymous openings
from Google Alert - anonymous http://ift.tt/2q34vjO
via IFTTT
📋 Ravens: WRs Breshad Perriman and Jeremy Maclin among 7 inactives vs. Bengals (ESPN)
via IFTTT
bitcoin anonymous
from Google Alert - anonymous http://ift.tt/2DG0UK7
via IFTTT
Anonymous user bab653
from Google Alert - anonymous http://ift.tt/2CuXv1K
via IFTTT
Make matches anonymous until the match ends
from Google Alert - anonymous http://ift.tt/2lqkBPy
via IFTTT
To Fly Free in Space
Ravens: DC Dean Pees plans to retire after season - Adam Schefter (ESPN)
via IFTTT