フィルターのクリア

How to get only one white dot in place of many scattered neighboring white dots

1 回表示 (過去 30 日間)
SYED AQEEL HAIDER
SYED AQEEL HAIDER 2018 年 11 月 16 日
回答済み: Image Analyst 2018 年 11 月 20 日
I have attached 'm1.jpg' with this queation. I have placed a red colored boxes around the collection of white dots in the image where I want to get only one white dot in replacement of the bunch of white dots. Is there any function or trick you suggest. Please share an automated solution.
m1.jpg

採用された回答

KSSV
KSSV 2018 年 11 月 16 日
Get the locations of the points using find..group them and use mean to each group. YOu will get a single point.
  1 件のコメント
SYED AQEEL HAIDER
SYED AQEEL HAIDER 2018 年 11 月 20 日
I have written this command
I1 = imread('m1.jpg')
[X,Y] = find(I1);
R1 = [X(1),Y(1)]
R2 = [X(2),Y(2)]
and so on till
Rm = [X(m),Y(m)]
now, kindly mention how may I group these points before getting mean

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2018 年 11 月 20 日
You can use kmeans() if you have the Statistics and Machine Learning Toolbox. It will give you the cluster centroids.

カテゴリ

Help Center および File ExchangeSpatial Search についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by