Convert binary image to rgb image again ?is it possible?
7 views (last 30 days)
Show older comments
I'm trying to convert rgb image to binary image using code i found on this website too :
Irgb = imread('wtmk.png');
threshold = 128;
Igray = rgb2gray(Irgb);
Ibw = Igray>threshold;
I wonder if i can get back to rgb image from binary image? anyone can give me advise?
0 Comments
Answers (2)
Image Analyst
on 20 Mar 2013
Do you want a watermarking demo, because I can give that to you for gray scale images? For color, you simply extract the 3 color channels:
redChannel = rgbImage(:, :, 1); greenChannel = rgbImage(:, :, 2); blueChannel = rgbImage(:, :, 3);
watermark each of the three color channels individually, and then recombine with cat:
watermarkedRGBImage = cat(3, watermarkedRed, watermarkedRGreen, watermarkedRBlue);
at least that's one way - I'm sure there are more sophisticated methods with hidden watermarks that are more resistant to attack (cropping, rotating, adding noise, etc.).
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!