How to apply a rectangular on images?
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I want to apply a rectangular on an image. First I want to click on the image and give the program a point and then apply the rectangular on the image, the point will be the center of the rectangular. after that I want to have the pixel value of the selected area. what should I do?
I found this in other questions: h=imrect(gca,[10 10 100 100]) it will apply rectangular h on the image, how can I give the point by just clicking on the image by myself since I do not know the start point for rectangular, this rectangular will start from point (10 10), I want the point which I select be the center of the rectangular not the starting point. and after that I want to work on the pixel value of pixels inside the rectangular. what should I do?
댓글 수: 0
답변 (1개)
Image Analyst
2015년 1월 10일
0 개 추천
Why not just call imcrop()?
댓글 수: 4
Faranak
2015년 1월 10일
Image Analyst
2015년 1월 10일
rectangular is an adjective. I have no idea what that might be if it's not the pixels inside the rectangular region that you drew with imcrop() or rbbox(). Explain exactly what "inside pixels" means to you if it's not the cropped image pixels grayImage(row1:row2, column1:column2) that are inside the box defined by row1, row2, column1, and column2.
Faranak
2015년 1월 10일
Image Analyst
2015년 1월 11일
You either crop it, and work on the sub image, or you don't and need to take care to never have indexes outside row1, row2, col1, and col2. Either way, I don't care.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!