Edge detection of OCT image

4 次查看(过去 30 天)
Hina Ismail
Hina Ismail 2020-6-23
Hi all,
I have 800 images and I would like to detect top edges of all the images.
Top edge is the edge which I mentioned in Test1.png as an example( I used paint). I also mentioned in Test1.png the area under the line should be fill with the red color. And Test.png is the original png file.
I would appreciate if somebody with help me with that.
Thanks in advance.
Regards,
Hina

回答(1 个)

Naman Kaushik
Naman Kaushik 2023-6-22
Hi Hina,
As per my understanding, you want to detect the edges on your images and colour the portion below them.
To detect the edge, you can use the “edge” function in MATLAB, in which you can specify which “method” you would like to use for the edge detection along with the “direction” in which you wish to detect edges.
You can use the “sobel” method with “horizontal” direction or change them as per your requirement (whichever gives the best results) and then get the coordinates of these detected edges and then plot them. Since you wish to colour the area below the graph you can use the “area” function in MATLAB.
For more information on the above-mentioned functions, you can refer to the following documentation:
For “edge” function:
For “area” function:
In case you face issues finding the coordinates of the edge you can refer to this answer:

Community Treasure Hunt

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

Start Hunting!

Translated by