Binary images are a key component of many image-processing algorithms. After creating a binary image from the source, you can do a lot when it comes to image processing. This video also demonstrates the use and application of the dilate and erode functions as an additional filtering technique.
- [Instructor] With an understanding of segmentation…and the importance of binary images,…let's take a look at performing our own simple thresholding.…First, we will load in a black and white image.…To do this, we'll type bw = cv2.imread,…and then we'll use detect…_…blob….png,…and then,…we are going to pass in a value of 0 explicitly.…This will tell OpenCV to load it in…as a black and white image.…Next, let's get the height as well as the width…by typing height comma width from the image…= bw….shape…0:2 to indicate we only want the…first two values from the shape.…
Finally, let's go ahead and show this image…using cv2.imshow…Original…black white, end quote,…and then pass in the bw variable.…Now the goal is to ample…a straightforward thresholding method…to extract the objects from an image.…We can do that by assigning all the objects…a value of 1 and everything else a value of 0.…To begin, we will initialize our binary variable…by typing binary…=…np….zeros…and then in parentheses we'll pass in, inside of brackets,…the height and width of our image,…
AuthorPatrick W. Crawford
- Installing and configuring OpenCV
- Data types and structures
- Image types
- Manipulating pixels
- Scaling and rotating images
- Using video inputs
- Creating custom interfaces
- Object detection
- Face and feature detection
- Template matching
Skill Level Intermediate
Python: Programming Efficientlywith Michele Vallisneri2h 15m Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
1. Install and Configure OpenCV
2. Basic Image Operations
3. Object Detection
4. Face and Feature Detection
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.