Issue while plotting image (wrong scale)

2 visualizzazioni (ultimi 30 giorni)
Priyank Goel
Priyank Goel il 4 Ago 2021
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')

Risposte (0)

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by