Hello,
I have a filter of size 150 by 150 When using imagesc to plot the filter, the background is green
minValue = -1.5; maxValue = +1.5;
The RGB index of zeros in the image (green color) is is 0.5,1,0.5
I would like to change all the index '0' in the image to white while leaving the remaining as they are if possible.
size(colormap) : 64 3
I have tried the following:
imagesc(filter)
currentMap = colormap;
newMap = [1 1 1; currentMap];
colormap(newMap)
% The code above applies only to the top row of the filter but instead I would like the remaining index '0' to be 1
The code below changes the background to while but this time both +ve and -ve values of the filter turn purple:
j = colormap;
j(:,1) = [ 1 ];
j(:,3) = [ 1 ];
colormap(j);
imagesc(filter);
Looking forward to your feedback. Thanks a lot for your help.
Ash