finding dense location and define centeriod of the each dense location

2 visualizaciones (últimos 30 días)
I have attached .mat file and below zoomed figure of one section , I would like to find the centeriod of the dense location.
Since I have huge data around 400000 * 2, i am not able to use DBSCAN.
can you please do help me out with the loaded data ?
  7 comentarios
darova
darova el 16 de Abr. de 2020
Can i ask why do you need so many centroids? What are you doing further with them
SatyaPrakash Gupta
SatyaPrakash Gupta el 16 de Abr. de 2020
Editada: SatyaPrakash Gupta el 16 de Abr. de 2020
@darova :
Yes at the end i need to connect those line to each centriod where i am stuck now.
please find the attached data where i have found the centriods.
do you have any idea how can we connect them ?
or
how to further separate the data which below to left side and right side ?

Iniciar sesión para comentar.

Respuesta aceptada

darova
darova el 16 de Abr. de 2020
Here is simple but coarse (maybe not precise method)
Fill matrix Connect pixels Thin line Remove 'spur'
Results (green point - rounded orinal data)
I suppose you want to order those points now (connect them)
  4 comentarios
SatyaPrakash Gupta
SatyaPrakash Gupta el 17 de Abr. de 2020
Editada: SatyaPrakash Gupta el 17 de Abr. de 2020
Sorry this trick did not helped me, now i have a data separated with left and right , is it possible to connect a single line on left and single line on right side .
The line should break if the distance is more than 10m moving forward and start again with a new line for distance smaller than 10m
darova
darova el 17 de Abr. de 2020
I don't understand the question. This is your data:
Can you make a simple sketch of the result you expect?

Iniciar sesión para comentar.

Más respuestas (2)

Image Analyst
Image Analyst el 17 de Abr. de 2020
Editada: Image Analyst el 17 de Abr. de 2020
Looks like you already have an answer that you've accepted, however one way to approach it is to use fitPolynomialRANSAC() - it's in the Computer Vision Toolbox, if you have it. You can use this function twice. The first time it will get the first curve (one of them, not sure which one though). Then remove those points close to the first curve, and run it again to get the second curve and points close to it. fitPolynomialRANSAC() will return the polynomial coefficients of the curve and the indexes of the data points that are close to that curve.
Also see RANSAC in Wikipedia if you're not familiar with the RANSAC concept.
  2 comentarios
SatyaPrakash Gupta
SatyaPrakash Gupta el 17 de Abr. de 2020
sorry i do not have computer vision toolbox , how can i implement in matlab lab without this toolbox ?
Image Analyst
Image Analyst el 17 de Abr. de 2020
Well, don't bother. You already have an answer that you've accepted that works.

Iniciar sesión para comentar.


SatyaPrakash Gupta
SatyaPrakash Gupta el 17 de Abr. de 2020
yes , let me explain you in details.
load leftRightCoord.mat
scatter(leftRightCoord.left(:,1),leftRightCoord.left(:,2)) %% this will plot the xy coordinates appearing on the left side
hold on
scatter(leftRightCoord.right(:,1),leftRightCoord.right(:,2)) %% this will plot xy coordinates apearing on the right side
please find the figure for above explaination.
Now expected as below:
the right xy coordinates(blue color) should be coonected to next line asn similarly for left coordinates.
If the distance between xy coordinates are more than 10meters, then stop continue drawing the same line
else , continue drawing , like the below figure attached.
  5 comentarios
darova
darova el 17 de Abr. de 2020
I can't, sorry. Your question is too difficult for me
I did my best. That is all i can
SatyaPrakash Gupta
SatyaPrakash Gupta el 17 de Abr. de 2020
No problem, thank you very much for your support.
you have provided me the link for all the clustering methods , that has helped me a lot

Iniciar sesión para comentar.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by