Issue while plotting image (wrong scale)

2 次查看(过去 30 天)
Hello, I am getting inverted image, and when I am trying to invert it using (reverse) I got the the corrected image but the y axis scale also got inverted. Is this correct or is there a way to correct it. Please suggest possible solution, I am confused whether it is right or not for single valued decomposition.
I have attached the MATLAB script and the output image for your reference after inversion but the scale is also inverted and is going from high to low.
for i = 1:52;
data(:,:,i) = rgb2gray(imread(sprintf('~/Downloads/4_68_image/scene_%0.4d.bmp',i)));
end
r = 1024;
c = 1024;
data = double(reshape(data,r*c,52));
mode = 1
freq = 1
[Phi ,~, C]=svd(data-repmat(mean(data,2),[1 size(data,2)]),'econ');
% Plot the figures
close all
figure('name','POD')
subplot(1,1,1)
imagesc(reshape(Phi(1:r*c,mode),r,c));axis image;set(gca,'Ydir','reverse')

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by