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.
  댓글 수: 2
SatyaPrakash Gupta
SatyaPrakash Gupta 2020년 4월 17일
sorry i do not have computer vision toolbox , how can i implement in matlab lab without this toolbox ?
Image Analyst
Image Analyst 2020년 4월 17일
Well, don't bother. You already have an answer that you've accepted that works.

댓글을 달려면 로그인하십시오.


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