PIxel to length Scale

조회 수: 9 (최근 30일)
Robert Roy
Robert Roy 2015년 1월 30일
댓글: Robert Roy 2015년 1월 30일
Hi there I have currently produced image that I am trying to change the scaling of the axis from pixels to either mm or cm. I know from scaling that the resolution is 0.048 mm/pixel.
The part of the code I am using for imaging is:
image=AverageImg1
imagesc(flipud(AverageImg1),[0 550]);
set(gca,'YDir','normal');

채택된 답변

Jan
Jan 2015년 1월 30일
You can use iamge() instead and specify the X and Y ticks manually:
x = linspace(0, 0.048 * 550, 551);
y = linspace(0, 0.048 * 550, 551);
image(x, y, AverageImg1);
  댓글 수: 1
Robert Roy
Robert Roy 2015년 1월 30일
Thanks but unfortunately due to the nature of the data I can only use the imagesc. The pixel scale is 1024*1280. With this method as well it seems to change the actual intensity values as well when the only thing that needs changed is the axis scale.

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

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by