필터 지우기
필터 지우기

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 CenterFile Exchange에서 Language Support에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by