finding dense location and define centeriod of the each dense location

2 次查看(过去 30 天)
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 个评论
darova
darova 2020-4-16
Can i ask why do you need so many centroids? What are you doing further with them
SatyaPrakash Gupta
SatyaPrakash Gupta 2020-4-16
编辑:SatyaPrakash Gupta 2020-4-16
@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 ?

请先登录,再进行评论。

采纳的回答

darova
darova 2020-4-16
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 个评论
SatyaPrakash Gupta
SatyaPrakash Gupta 2020-4-17
编辑:SatyaPrakash Gupta 2020-4-17
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 2020-4-17
I don't understand the question. This is your data:
Can you make a simple sketch of the result you expect?

请先登录,再进行评论。

更多回答(2 个)

Image Analyst
Image Analyst 2020-4-17
编辑:Image Analyst 2020-4-17
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.

SatyaPrakash Gupta
SatyaPrakash Gupta 2020-4-17
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 个评论
darova
darova 2020-4-17
I can't, sorry. Your question is too difficult for me
I did my best. That is all i can
SatyaPrakash Gupta
SatyaPrakash Gupta 2020-4-17
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by