From the course: OpenCV for Python Developers
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Adaptive thresholding
From the course: OpenCV for Python Developers
Adaptive thresholding
- [Instructor] While simple thresholding is a powerful algorithm, it has its limits. Such as when there's uneven lighting in an image. This is where adaptive thresholding comes to the rescue. This is a technique that can increase the versatility of image thresholding operations. Instead of taking a simple global value as a threshold comparison, adaptive thresholding will look in its local neighborhood of the image to determine whether a relative threshold is met and this way it is possible to counteract issues such as uneven lighting. To try this out, we're going to open up the chapter three module three file and start off by importing our sudoku image, typing img = cv2.imread, we'll read in sudoku.png and then again, we're going to signify a 0 saying that we want a black and white image. You'll find this is very customary that we only work with black and white images when doing segmentation. Next, we can go ahead and see…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Segmentation and binary images1m 38s
-
(Locked)
Simple thresholding6m 34s
-
(Locked)
Adaptive thresholding4m 38s
-
(Locked)
Skin detection6m 31s
-
(Locked)
Introduction to contours1m 38s
-
(Locked)
Contour object detection6m 56s
-
(Locked)
Area, perimeter, center, and curvature8m 19s
-
(Locked)
Canny edge detection8m 1s
-
(Locked)
Object detection overview1m 59s
-
(Locked)
Challenge: Assign object ID and attributes50s
-
(Locked)
Solution: Assign object ID and attributes10m 5s
-
-
-