Edge detection with DIC pattern.
显示 更早的评论
Need some help/advice with an edge detection method. I am looking at edge of cylinderical sample that contains a DIC pattern. I have tried some various basic stuff like the edge() and hough transformation, but I either have all of the DIC pattern showing in the edge image, or the edge of the sample is incomplete and no good.
anyone have any experience with this and could point me in the right direction please?
采纳的回答
更多回答(1 个)
Kaustab Pal
2024-8-19
To effectively detect edges in noisy images, it's important to undertake several pre-processing steps before applying an edge-detection algorithm. If your image contains significant noise, you can mitigate this by smoothing the image with a Gaussian filter, followed by a histogram equalization operation. This will yield a more refined image. You can then apply an edge detection algorithm.
Here's a code example illustrating the process:
BW = rgb2gray(X); % converting the image X to grayscale
B = imgaussfilt(BW,5); % applying a gaussian filter with standard deviation of 5 to the image
BW = histeq(B); % performing histogram equilization
BW1 = edge(BW,'canny'); % applying edge detector
imshow(BW1)
Feel free to experiment with the Gaussian filter's standard deviation and the choice of edge detection algorithm to optimize your results.
You can expect the final output to resemble the image shown below:

Please refer to the links below for the official documentation on the different functions:
Edge Detection: https://www.mathworks.com/help/images/ref/edge.html
2-D Gaussian filtering of images: https://www.mathworks.com/help/images/ref/imgaussfilt.html
Histogram equalization: https://www.mathworks.com/help/images/histogram-equalization.html
Hope this helps.
2 个评论
Tom Lancaster
2024-8-19
Umar
2024-8-19
Hi @Tom Lancaster,
As for your concern, increasing the Gaussian filter's standard deviation may indeed erode the boundaries of your cylinder, so it is advisable to use a moderate value to maintain the integrity of the dimensions you are interested in.
类别
在 帮助中心 和 File Exchange 中查找有关 Object Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



