MATLAB: Convert white color in image to red color

change white into redcolorcolor-convertconvertImage Processing Toolbox

Could you please support me by Matlab code to convert white color in any image to red color ?

Best Answer

k is the image(RGB) array
j=k(:,:,1);
l=k(:,:,2);
m=k(:,:,3);
l((j>=40))=0;
m(j>=40)=0;
k(:,:,1)=j;k(:,:,2)=l;k(:,:,3)=m;
imshow(k)