Clearly Identifying circular regions on a chip in a noisy environment
Show older comments
Hey everyone
As the summary suggests, I have been working with chip images in hopes of clearly identifying the circles via pre-processing so that I can binarize the image and use regionprops on them afterwards. I haven't had much success and any help would be much appreciated. I have shared some photos that I am working with that should help!
My current algorithm is very slow but also not very good at identification.
4 Comments
Image Analyst
on 17 Jun 2024
Is it the small dark spots in the rectangular array that you want to "identify"? What does "identify" mean to you? Do you just want the location of the centroids of them or do you also want other attributes, like area, perimeter, diameter, etc. There is going to be some sort of cutoff because the spots gradually fade into non-existence so you're going to have to make some kind of judgment call as to what is a spot and what is noise or just part of the background.
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
Bera
on 17 Jun 2024
Bera
on 17 Jun 2024
Bera
on 18 Jun 2024
Answers (1)
Balavignesh
on 17 Jun 2024
Hi Bera,
It is my understanding that you would like to identify circular regions on a chip. It can be challenging, especially in a noisy environment. The key to improving both the speed and accuracy of your algorithm lies in effectively preprocessing the images to enhance the features of interest and suppress the noise.
- Noise Reduction: You could start with noise reduction to make the subsequent steps more effective. Gaussian blur or median filtering can be effective, depending on the type of noise present in your images. Gaussian blur helps in smoothing the image and is effective for Gaussian noise, whereas the Median Filter is effective for salt-and-pepper noise.
imgFiltered = imgaussfilt(originalImage, sigma);
imgFiltered = medfilt2(originalImage, [kernelSize kernelSize]);
- Edge Detection: After noise reduction, use edge detection to outline the boundaries of the circles. The Canny edge detector is commonly used for this purpose due to its robustness.
edges = edge(imgFiltered, 'Canny');
- With the edges detected, apply the Circular Hough Transform to identify circles in the image. MATLAB's 'imfindcircles' function is based on the Hough Transform and is particularly suited for this task. The 'ObjectPolarity' parameter should be set according to whether the circles are brighter or darker than the surrounding pixels.
[centers, radii] = imfindcircles(edges, [minRadius maxRadius], 'ObjectPolarity','bright', 'Sensitivity',0.9);
- Once you have the circles identified and their parameters (centres and radii), you can create a binary mask of the detected circles to isolate them from the rest of the image. Then, use 'regionprops' to analyze their properties
Fine-tuning the preprocessing steps and the parameters of the algorithms can significantly impact both the speed and accuracy of your circle detection.
Kindly have a look at the following documentation links to have more information on:
- Gaussian Blur: https://www.mathworks.com/help/images/ref/imgaussfilt.html
- Median Filters: https://www.mathworks.com/help/images/ref/medfilt2.html
- Edge Detection: https://www.mathworks.com/help/images/ref/edge.html
Hope that helps!
Balavignesh
1 Comment
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!