How to detect cluster of radial lines which are generated from same point ?

7 views (last 30 days)
For example:

Answers (4)

John D'Errico
John D'Errico on 4 Dec 2022
  1. Surely there is a tool you can find in image processing to search for lines. Use it. Find all lines in the image.
  2. For EACH dark line found, compute the parameters of that line. You can use various tools to find the line coefficients in the form a*x + b*y = c. Do that for EVERY line.
  3. Consider every pair of lines found. Compute the intersection of each pair of lines. Store that intersection point in an array.
  4. Use a clustering tool on the intersections as found.
All of this should be quite doable.
  2 Comments
Rami Babayew
Rami Babayew on 5 Dec 2022
Hi John,
Thank you For you answer. In the example shown only a poor cluster with less then 50 traces, in the original authentic pics there are more then 500 traces. I’m assuming the way you’ve recommended to solve the problem will be a bit heavy for processing.
I’m trying to understand if there’s an option to define specific ROI with a filter for this kind of shape. What do you Think?
Have a great day 🙂
John D'Errico
John D'Errico on 8 Dec 2022
I think some problems are larger than others, and will require more CPU than others. But in fact, I recall that code to find lines in an image is not too difficult. Given each line, it is now trivial to compute the parameters of that line. (Be careful about the vertical lines!) So very little work there.
Finally, my idea was t ocompute the intersection points of pairs of lines. Even doing that for 500 lines, where you need to find the intersection now of 500*499 pairs of lines is still trivial for a computer. So I fail to see the problem. Just write the code efficiently. No, don't use the symbolic toolbox to find those intersection points. Good code would still be blazingly fast here.

Sign in to comment.


Image Analyst
Image Analyst on 5 Dec 2022
Not sure what you want to find out since "detect" is so vague and unspecific. Please be specific. Like do you want a length distribution, or the point where all the lines seem to emanate from? How many clusters per image are there? Always 2, one on the left half and one on the right half? Or can there be multiple clusters per image?
Have you tried thresholding and then calling regionprops?
In the meantime, see my Image Processing Tutorial in my File Exchange:
If you have any more questions, then reply back with specific questions, description of what you want to measure, and 2 or 3 more images so we can see how the images vary. But do so after you read this:
  5 Comments
Rami Babayew
Rami Babayew on 17 Dec 2022
ok, ill try that. Is it posible in the exmaple code you gave me to find the interception point of the lines by using 'regionprops' with 'centorind'?
Image Analyst
Image Analyst on 18 Dec 2022
I don't think the code applies anymore since you don't always have isolated lines. Sometimes you have spiky disks instead of a collection of well separated lines.

Sign in to comment.


Image Analyst
Image Analyst on 8 Dec 2022
Attached code is a start.

Rami Babayew
Rami Babayew on 11 Jan 2023
hi, can you help me to merge each cluster to 1 ROI?
i would like to crop every single ROI with cluster and analyze it specifically.
thanks, best regards
rami

Community Treasure Hunt

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

Start Hunting!