Scaling an imaged array
이전 댓글 표시
A = Some matrix of dimension (n x n)
'image(A)' creates an image with side length of n. Is there there a way to resize this image?
댓글 수: 3
Image Analyst
2011년 8월 8일
Do you mean that you want to change the number of elements in the array, like you'd do with imresize(), or do you mean that you want to change the size of the axes control that the image is displayed in, as you'd do with the set(handle, 'Position',...) function?
Frank
2011년 8월 9일
Frank
2011년 8월 9일
답변 (1개)
Walter Roberson
2011년 8월 8일
0 개 추천
You can pass in to image() the x and y coordinates of the lower left and upper right centers of the corresponding pixels (note this is not the coordinates of the edges of the pixels.) The coordinates would be in whatever data coordinates are in effect (or get rescaled to in later calls).
Note that changing the coordinates might not have an visual result unless there is already spare room in the axes. The size of the axes (relative to the uipanel or figure) determines the density of the data coordinates.
If your image is relatively small and there is obviously more available room, then something might have executed "axis tight" and you might want to reverse that.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!