Deforming an image without changing axis scale

조회 수: 6(최근 30일)
I have a image where when I convert the dimensions from pixels to micrometers, the size of the picture is has a long x-axis and very short y-axis (shown in first image attached). I want to know it there is a way to resize the picture but keep the same axis? When ever I try to use the imresize function the axis always change to the actual pixel size (shown in second image attached). I am trying to get a similar size to the second picture but have the same axis lables in the first picture.

채택된 답변

ANKUR KUMAR
ANKUR KUMAR 2021년 7월 16일
편집: ANKUR KUMAR 2021년 7월 16일
You can use axis square to force image to be square. See this below example.
Let us load sample image:
corn_gray = imread('corn.tif',3);
figure
imshow(corn_gray(:,1:100)')
axis on
figure
imshow(corn_gray(:,1:100)')
axis square
axis on
  댓글 수: 1
Elana Peisner
Elana Peisner 2021년 7월 19일
Thank you! that works :)

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

추가 답변(0개)

범주

Find more on Image Processing Toolbox in Help Center and File Exchange

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by