フィルターのクリア

Get the position of pixels with specifed color

2 ビュー (過去 30 日間)
nghia nguyen
nghia nguyen 2011 年 4 月 19 日
Hi!
I have a problem with my fisrt IP project. I have a picture with 2 circles in it, a red circle and green circle. I want to get the position of two center and then connect them. Please tell me how can I do that. Thanks so much.

採用された回答

Walter Roberson
Walter Roberson 2011 年 4 月 19 日
convert the image to black and white, "label" the image, use regionprops() to find the centroid of each of the objects.
But you will have to define what you mean by "connect them": is that only for display purposes, or do you need to make a new image that has them connected (i.e., for further processing or for writing to a file) ?
  8 件のコメント
Walter Roberson
Walter Roberson 2011 年 4 月 25 日
Please make the image available on a web server and post the URL.
nghia nguyen
nghia nguyen 2011 年 4 月 25 日
Thanks.Here are links
http://www.flickr.com/photos/48230201@N02/5653553606/in/photostream
http://www.flickr.com/photos/48230201@N02/5652986417/in/photostream/

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLanguage Support についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by