Problem bluewhitered function colormap
Show older comments
Hello,
I have a problem using the bluewhitered function. I want to create a average image of a sequence (works) and change the colormap to bluewhitered, where I can see all 3 colors. This doesn't work as planed, because the final picture is just red and white. How can I change that?
pwd=uigetdir('Choose folder with pictures');
savepath=uigetdir('SavePath');
savename='averageIm';
cd (pwd)
DirFiles = dir([pwd '/*.tif']);
jpg_average = 0;
for i = 1:numel(DirFiles)
im=double(imread(DirFiles(i).name));
jpg_average = im + jpg_average;
end
average= double(jpg_average/numel(DirFiles));
figure(1);
colormap(bluewhitered(256));
im = imagesc(average);
cd(savepath);
saveas(figure(1), (strcat('Case_',strcat(savename),'.png')) )

Accepted Answer
More Answers (0)
Categories
Find more on White in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!