Need help in edge detection, finding its coordinates and calibrating it with a scale for further measurements.

2 Ansichten (letzte 30 Tage)
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.

Antworten (2)

Yash Ubale
Yash Ubale am 12 Nov. 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 Kommentare
HARIKRISHNAN u
HARIKRISHNAN u am 13 Nov. 2018
Thanks yash! That was helpful.
now i am stuck up with a new problem. After the edge detection there are a few unwanted objects in the image which i need to remove. I am looking for a way to mask some part of edge detected alone and make the rest of the pixel values to black (0). can anyone help on this?
Yash Ubale
Yash Ubale am 13 Nov. 2018
Can I see the output of your edge detection? Also, I would like to know what are you wanting to filter out.

Melden Sie sich an, um zu kommentieren.


HARIKRISHNAN u
HARIKRISHNAN u am 13 Nov. 2018
sure !
Here it is ...
I want the data inside the marked area as it is and need to conver the rest of area to black pixels.
Untitled.jpg
  1 Kommentar
Yash Ubale
Yash Ubale am 13 Nov. 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.
Also, you can try different morphological operations on the image that you have obtained.
You must choose appropriate structuring element.
Clustering could be thought of as one of the means to achieve it.
Hole filling can be done which could fill holes in the components.
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by