Lecture 9-1
Lecture 9-1
• These kernels are convolved with the image to compute the second
derivative, with the result emphasizing areas where the pixel intensity
changes rapidly.
• Detects edges in all directions and can emphasize finer details.
• Very sensitive to noise; requires smoothing before application in noisy
images.
Region-Based Segmentation
• Segments an image into regions with similar properties, typically by
grouping connected pixels with similar intensity values or colors.
• Global Thresholding
• Adaptive Thresholding
Global Thresholding
How Global Thresholding Works:
Choose a Threshold Value, T:
• The threshold T can be selected manually based on the image histogram or determined
automatically.
• Pixels with intensity values greater than or equal to T are assigned to the foreground
(often set to white), while pixels below T are assigned to the background (often set to
black).
Selecting an Optimal Threshold:
• Manual Selection: View the image histogram and select a threshold based on
intensity peaks.
• Automated Methods: Methods like Otsu’s algorithm can find an optimal
threshold automatically by maximizing the variance between the two pixel
classes.
Pros and Cons
Pros
• Simple and efficient to implement, especially suitable for images with uniform lighting.
• Works well when there is a significant contrast between object and background.
Cons
• Less effective if the image has uneven lighting or shadows, as the single threshold may
not separate regions accurately.
• May require multiple trials to manually select a suitable threshold.
Adaptive Thresholding
Define the Neighborhood:
• A small region, or window, around each pixel (e.g., 5×5, 11×11 pixels) is selected as the local
neighborhood.
Calculate the Local Threshold:
• Within each neighborhood, a local threshold is calculated, typically as the mean or weighted
mean intensity value of the pixels in that region.
• Some methods also use the median or combine the mean with the standard deviation to
calculate a robust threshold for each neighborhood.
• Pros
• Handles images with non-uniform lighting effectively.
• Helps retain fine details in varying lighting conditions, especially for textured or complex images.
• Cons
• Computationally more intensive due to the need to calculate thresholds for multiple
neighborhoods.
• May be sensitive to noise in images if the neighborhood is too small.
Introduction to Region Growing
• Definition: Region growing is a technique used in image segmentation
where neighboring pixels with similar attributes (such as color or
intensity) are grouped together to form a region.
• Step 4: Repeat: Continue the splitting process for all subregions until
the regions are homogeneous enough or meet a defined threshold.
Challenges in Region Splitting
• Over-Splitting: If the threshold is too strict, the image may be divided
into too many small regions, losing meaningful structures.