I require a plot of a pcolor for my project result. Each projection data(Trial1, 2,,3,... ) I had set it in numeric matrix form. hh = surface(zeros(size(x)),x,'Parent',cax);
1 回表示 (過去 30 日間)
古いコメントを表示
%LBP formula
DispMap= zeros(pixel);
for Tx=1:N
for Rx=1:N
DispMap= DispMap + (SL(Rx,Tx)*NormEpair{Rx,Tx});
end
end
%%-------Fixed scale 0 to 1------
normDispMap=DispMap; % rename display image
a = min(normDispMap(:));
b = max(normDispMap(:));
for Tx = 1:pixel;
for Rx = 1:pixel;
normDispMap(Tx,Rx) = ((normDispMap(Tx,Rx)-a)./ (b-a))*1;
%%Eliminate NaN value at norm DispMap ; if not matlab cant plot img
e=normDispMap(Tx,Rx);
d=isnan(e);
e(d)=NaN;
normDispMap(Tx,Rx)=e;
end
end
%Displaying map
subplot(1,2,1);
pcolor(normDispMap(1:pixel,1:pixel));
imageCenter=[72.5,72.5];
title('reconstructed image(rescaled 0-1)');
shading interp; % To hide the grid line from pcolor
colormap (jet) % Change color map to jet colour
colorbar % Display colorbar at RHS
subplot(1,2,2);
imagesc(normDispMap(1:pixel,1:pixel))
set(gca, 'YDir', 'normal')
2 件のコメント
Walter Roberson
2022 年 5 月 20 日
%%-------Fixed scale 0 to 1------
why not just call rescale()?
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!