finding a region of interest

조회 수: 3 (최근 30일)
Itzik Ben Shabat
Itzik Ben Shabat 2012년 11월 6일
Hi, I have an grayscale image matrix (basicly a 0,1 matrix). I am "drawing" a binary image using rectangle(). ( using a for loop on the matrix to identify the color and draw a each rectangle). (i know i can use imshow and enter a matrix there is a reason why im not using it). so far it works fine what i want to do next is select a region (say rectangular or circular). i want to know which of the rectangles the region is covering. is there a way to do this ? thanks

채택된 답변

Image Analyst
Image Analyst 2012년 11월 6일
See code in my comment here http://www.mathworks.com/matlabcentral/answers/52570#comment_108924 to find out if rectangles overlap.
  댓글 수: 3
Itzik Ben Shabat
Itzik Ben Shabat 2012년 11월 7일
found it myself. with getPosition(imrect()) should do the trick. thanks
Image Analyst
Image Analyst 2012년 11월 7일
Oh, I thought you already knew the rectangle because you said you were drawing it with rectangle(), which requires you to know the coordinates already. If you don't know them, you can use imrect(), or rbbox().

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by