Need help in edge detection, finding its coordinates and calibrating it with a scale for further measurements.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193659/image.jpeg)
0 comentarios
Respuestas (2)
Yash Ubale
el 12 de Nov. de 2018
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 comentarios
Yash Ubale
el 13 de Nov. de 2018
Can I see the output of your edge detection? Also, I would like to know what are you wanting to filter out.
HARIKRISHNAN u
el 13 de Nov. de 2018
1 comentario
Yash Ubale
el 13 de Nov. de 2018
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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!