Cleaning images and creating description files - OpenCV with Python for Image and Video Analysis 19

Channel:
Subscribers:
1,410,000
Published on ● Video Link: https://www.youtube.com/watch?v=t0HOVLK30xQ



Duration: 12:07
87,145 views
506


Simple enough, this script will visit the links, grab the URLs, and proceed to visit them. From here, we grab the image, convert to grayscale, resize it, then save it. We use a simple counter for naming the images. Go ahead and run it. As you can probably see, there are a lot of missing pictures and such. That's okay. More problematic is some of these error pictures. Basically all white with some text that says they are no longer available, rather than serving and HTTP error. Now, we have a couple choices. We can just ignore this, or fix it. Hey, it's an image without a watch, so whatever right? Sure, you could take that opinion, but if you use this pulling method for positive then this is definitely a problem. You could manually delete them... or we can just use our new Image Analysis knowledge to detect these silly images and remove them!

I went ahead and made a new directory, calling it "uglies." Within that directory, I have click and dragged all ugly image versions (just one of each). There's only one major offender that I found with the negatives, so I just have one. Let's write a script to find all instances of this image and delete it.

Text-based tutorial and sample code: https://pythonprogramming.net/haar-cascade-object-detection-python-opencv-tutorial/

Digital Ocean Server: https://www.digitalocean.com/?refcode=d1c4c6e66979

https://pythonprogramming.net
https://twitter.com/sentdex
https://www.facebook.com/pythonprogramming.net/
https://plus.google.com/+sentdex




Other Videos By sentdex


2016-01-21Jinja Templating - Django Web Development with Python 3
2016-01-20Creating App - Django Web Development with Python 2
2016-01-19Introduction - Django Web Development with Python 1
2016-01-17UPDATE and DELETE - SQLite3 with Python 3 part 5
2016-01-17Graph from database table example - SQLite3 with Python 3 part 4
2016-01-17Read from (SELECT) Database table - SQLite3 with Python 3 part 3
2016-01-17Inserting variables to database table - SQLite3 with Python 3 part 2
2016-01-17Creating a database, table, and inserting - SQLite3 with Python 3 part 1
2016-01-11Haar Cascade for image & video object classification - OpenCV w/ Python for Image Video Analysis 21
2016-01-11Training Haar cascade object detection - OpenCV with Python for Image and Video Analysis 20
2016-01-11Cleaning images and creating description files - OpenCV with Python for Image and Video Analysis 19
2016-01-11Gathering Images for Haar Cascade - OpenCV with Python for Image and Video Analysis 18
2016-01-11Making your own Haar Cascade Intro - OpenCV with Python for Image and Video Analysis 17
2016-01-10Haar Cascade Object Detection Face & Eye - OpenCV with Python for Image and Video Analysis 16
2016-01-09MOG Background Reduction - OpenCV with Python for Image and Video Analysis 15
2016-01-08Feature Matching (Homography) Brute Force - OpenCV with Python for Image and Video Analysis 14
2016-01-07Corner Detection - OpenCV with Python for Image and Video Analysis 13
2016-01-04GrabCut Foreground Extraction - OpenCV with Python for Image and Video Analysis 12
2016-01-02Template Matching - OpenCV with Python for Image and Video Analysis 11
2015-12-31Edge Detection and Gradients - OpenCV with Python for Image and Video Analysis 10
2015-12-29Morphological Transformations - OpenCV with Python for Image and Video Analysis 9



Tags:
Python (Programming Language)
OpenCV (Software)
Image Analysis (Field Of Study)
object detection
Tutorial
Haar
Haar feature
Haar cascade