Need help in edge detection, finding its coordinates and calibrating it with a scale for further measurements.
2 次查看(过去 30 天)
显示 更早的评论
I have an image of a curved slit as in below image(left). I need to detect the edge of the slit and find its coordinates (a scale is provided in the image). I tried binarizing the image(right) using "imbinarize". What should be done to detect the edge, export it coordinates for further measurements/ processing? Any help is appreciated! PS: I am new to Matlab.
0 个评论
回答(2 个)
Yash Ubale
2018-11-12
Hello,
You can visit the link mentioned below for further information.
You can get the vertical and horizontal gradients as numerical arrays at every pixel of the image along with the output image which contains the edges.
2 个评论
Yash Ubale
2018-11-13
Can I see the output of your edge detection? Also, I would like to know what are you wanting to filter out.
HARIKRISHNAN u
2018-11-13
1 个评论
Yash Ubale
2018-11-13
I would recommend you to try different parameters in edge detection to get better results. Once you get better results, follow the link mentioned below.
Connect dots - https://www.mathworks.com/matlabcentral/answers/271753-how-can-i-connect-the-white-dots-in-a-binary-image-like-this
Also, you can try different morphological operations on the image that you have obtained.
Morphological Operations - https://www.mathworks.com/help/images/morphological-filtering.html
You must choose appropriate structuring element.
Structuring elements - https://www.mathworks.com/help/images/ref/strel.html
Clustering could be thought of as one of the means to achieve it.
K-means Clustering - https://www.mathworks.com/help/stats/kmeans.html
Hole filling can be done which could fill holes in the components.
Hole filling - https://www.mathworks.com/help/images/ref/imfill.html
You need to come up with your own algorithm which could be a combination of all the above, since the shape that you want to obtain is not generic. I could only suggest you some techniques which can be useful in your case.
One example algorithm could be, first find the connected edges and then find connected components in the binary image and whichever connected component is the largest is your required object.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!