I have the binary image below which I want to use Hough Transform to detect the line in the middle. However, it cannot detect it. How can I smooth the image so the line is more easily detectable for the hough function? Thank you

 Respuesta aceptada

Matt J
Matt J el 22 de Abr. de 2023
Editada: Matt J el 22 de Abr. de 2023
load BWImage;
BW=(1-entropyfilt(BW,ones([11,5])));
BW=imclose(BW,ones([11,1]));
BW=bwareaopen(BW>0.2,20);
imshow(BW,[])

7 comentarios

ijsonvjksrefdsb
ijsonvjksrefdsb el 22 de Abr. de 2023
It worked well with the hough function, thank you!
Image Analyst
Image Analyst el 22 de Abr. de 2023
But why do you think you still need the hough function after this? If you want you can just use aspect ratio or bwareafilt to extract the tall, narrow blob. What are you going to do with it, once you have the blob of interest isolated?
ijsonvjksrefdsb
ijsonvjksrefdsb el 24 de Abr. de 2023
@Image Analyst I'm sorry for the late reply, I'm trying to recreate a research paper on the automatic detection of solar radio bursts which uses radon transformation.
Image Analyst
Image Analyst el 24 de Abr. de 2023
OK, thanks for the context. But still, why do you need Hough? Most of the blobs are line-like so, depending on the sensitivity hough may find them all, or find none, or find blobs other than the one you want. I don't know what the paper did but I think the problem in the binary image -- almost everything is connected leading me to think that there were better ways to segment the image than whatever you did.
Matt J
Matt J el 24 de Abr. de 2023
The morphological operations in my answer may not always seal the breaks in the line of the interest. The FillGap option of houghlines would probably be a good way to hedge against this, as opposed to purely region-based analysis.
ijsonvjksrefdsb
ijsonvjksrefdsb el 25 de Abr. de 2023
@Image Analyst They used radon on the binary images to get the max and min values for a background subtraction, I attached the paper here, I only followed what they instructed in pages 3-4 for the binary images, then about radon in page 5.
ijsonvjksrefdsb
ijsonvjksrefdsb el 25 de Abr. de 2023
@Matt J I see, I'll check it out, thanks a lot!

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 22 de Abr. de 2023

Comentada:

el 25 de Abr. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by