area
조회 수: 11 (최근 30일)
이전 댓글 표시
How can I create a rectangle with a set area (for example a 1000) with imrect? I know you have the setResizable (h,TF) function, but I am looking for the kind of 'revert' version of this.
댓글 수: 0
답변 (3개)
Image Analyst
2012년 1월 2일
Create it where? In an array? As a graphics object in the overlay above some plot or image? Solid rectangle, or just the perimeter?
댓글 수: 0
Walter Roberson
2012년 1월 3일
I suspect you want to set a position constraint function; see http://www.mathworks.com/help/toolbox/images/ref/imroi.html#imroi-setposcon
Each time the function was called, you would return the adjusted Position of the rectangle.
You may wish to remember some past positions in order to figure out which direction the user is "mostly" trying to drag a side.
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!