Why does MATLAB resample display data for *some* large images and not others? Can this be turned off?
조회 수: 10 (최근 30일)
표시 이전 댓글
When displaying large images (i.e. images with dimension greater than the screen resolution) using IMSHOW, IMAGESC, and similar functions, MATLAB will downsample the displayed image (CData not manipulated). However, this only happens when my image has dimension below 2048 pixels (i.e. images with dimension larger than 2048 do not have display data manipulated). This can be demonstrated by simply padding an image just under 2048 pixels and zooming in on an area of high detail. Why? How can this be avoided? Example below.
% Create image with dimension = 2048
im = zeros(2048);
% Draw line pair down center of image
im(:,[1000,1002]) = 1;
% Display and zoom in (no line pair)
figure; imshow(im)
% Display portion of image with dimensions within screen resolution (line pairs visible)
figure; imshow(im(1:1010,1:1010))
% Create new image with dimension = 2049 (or larger)
im2 = zeros(2049);
% Draw line pair down center of image
im2(:,[1000,1002]) = 1;
% Display and zoom in (line pair now visible)
figure; imshow(im2)
댓글 수: 0
답변 (1개)
Image Analyst
2017년 1월 11일
I think it just depends on what rows and columns it decides to use when it does the resampling. For one case it might decide to use column 1000 with the line and you'll see it, and in another case it might decide to use column 1001 with no line and not use the 1000 line, so the line doesn't show up. It's downsampling in both cases, it's just using different sets of pixels.
댓글 수: 5
참고 항목
카테고리
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!