finding dense location and define centeriod of the each dense location

2 ビュー (過去 30 日間)
SatyaPrakash Gupta
SatyaPrakash Gupta 2020 年 4 月 15 日
コメント済み: Image Analyst 2020 年 4 月 17 日
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 Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by