How to find the point where most lines intersect in a binary image?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aon
el 14 de Sept. de 2018
Comentada: Felix Onofrei sunt
el 13 de Mayo de 2020
In a multi-line binary image with different slopes and center points. How do you find the coordinate where most lines intersect? (it should be close where the red arrow points)

Thanks in advance
5 comentarios
jonas
el 15 de Sept. de 2018
Yep, see the latest comment on the answer for two methods. Id try hist3 first
Respuesta aceptada
jonas
el 14 de Sept. de 2018
Editada: jonas
el 15 de Sept. de 2018
A good solution would be to identify each line by e.g. Hough transform, determine each intersection (e.g. InterX ) and then find the cluster with the highest density of intersections using e.g hist3.
In this case, it seems the point of interest is also the point with the highest density of white pixels, so you could apply some smoothing filter and then find the highest value in the matrix. Here's an example using a very simple 10x10 pixel average.
w=ones(10,10);
A=conv2(I,w/numel(w),'same')
imagesc(A)
colormap(gca,'jet')

5 comentarios
Felix Onofrei sunt
el 13 de Mayo de 2020
Aon, could you tell me how did you use the interX function to get the intersection of every line, not only two? I am trying to use this function for geographical track lines. Basically i want the same thing, and then to find the cluster. Thanks in advance!
Más respuestas (1)
Image Analyst
el 15 de Sept. de 2018
Have you considered dbscan?
MATLAB Code for it:
2 comentarios
Image Analyst
el 16 de Sept. de 2018
Alternatively you could threshold the blurred image and use regionprops to find the weighted centroid of the region.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

