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

14 views (last 30 days)
Rami Babayew on 3 Dec 2022
Commented: Rami Babayew on 11 Jan 2023 at 15:45
For example:

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 CommentsShowHide 1 older comment
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.

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:
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.

Image Analyst on 8 Dec 2022
Attached code is a start.
##### 1 CommentShowHide None
Rami Babayew on 9 Dec 2022
thanks! ill try it soon :-)

Rami Babayew on 11 Jan 2023 at 10:13
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
##### 2 CommentsShowHide 1 older comment
Rami Babayew on 11 Jan 2023 at 15:45
THANK YOU

### Categories

Find more on Deep Learning with Images in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!