MATLAB: In Image steganography why secret image converted into black & white before embidding

audiodwtsteganographyWavelet Toolbox

si = double(handles.si);
alpha = 0.05;
for i = 1:4:size(LL3,1)
for j = 1:4:size(LL3,2);
block = LL3(i:i+3,j:j+3);
block1 = si(i:i+3,j:j+3);
emb(i:i+3,j:j+3) = ((1-alpha)*block)+(alpha*block1);
end
end
axes(handles.axes5);
imshow(emb,[]);
title('emb image');
% IDWT
out3 = idwt2(emb,LH3,HL3,HH3,'haar');
out2 = idwt2(out3,LH2,HL2,HH2,'haar');
out1 = idwt2(out2,LH1,HL1,HH1,'haar');
axes(handles.axes5);
imshow(out1,[]);
title('Stego G panel image');
handles.out1 = out1;
% Update handles structure
guidata(hObject, handles);
helpdlg('Process completed');

Best Answer

It is not required that you convert the image to black and white. You can use grayscale images, and you can use color images, and you can use audio, and anything else that can be stored as a sequence of bytes that can then be converted to a sequence of bits.
However, it could be that some of the embedding techniques attempt to transfer key elements of the image instead of sending the image as a bit stream; those particular embedding techniques might have restrictions on what they can handle.