image in image using hiding
이전 댓글 표시
what we can do?
댓글 수: 1
There are some examples on the File Exchange
And lots of threads on LSB encoding on the forum
If you're trying to cram a large 3-channel image into a single bitplane of a smaller 1-channel image, you're going to have to decide how much data you want to lose and how you want to lose it. Even after resizing the host image, you're still trying to fit 4.7E6 bits of data into 1.2E6 bits. You can reduce the size of the payload by reducing its geometry, or bits per sample. You can also convert it to an indexed image, but the question asks about embedding RGB content, so I don't know that's acceptable.
There's also the option to use more than the least-significant bit plane, but that would rapidly become visually noticeable. Certainly, occupying the 5 least-significant bit planes with payload would be more than obvious.
It's also worth noting that you're not maintaining the aspect ratio of the host image when you resize it, which is kind of a dead giveaway that the image has been modified. Use NaN in the geometry specification to specify a slack dimension.
채택된 답변
추가 답변 (1개)
Image Analyst
2022년 1월 22일
0 개 추천
I'm attaching an example of hiding a gray scale image in a gray scale image. It should be no problem for you to adapt it to use one or both as RGB images.
댓글 수: 5
elma ozge
2022년 1월 23일
Image Analyst
2022년 1월 23일
My code does that. Just take it one step at a time. Split your images into 3 parts
[rCover, gCover, bCover] = imsplit(rgbCover);
[rHidden, gHidden, bHidden] = imsplit(rgbWatermark);
Now use my code 3 times.
Hide rHidden in rCover, hide gHidden in gCover, and hide bHidden in bCover. Then recombine the separate color channels into one RGB image using cat():
rStego = cat(3, rCover, gCover, bCover);
I'm pretty sure it's not beyond your capabilities!
elma ozge
2022년 1월 23일
yanqi liu
2022년 1월 24일
yes,sir,may be use
if numberOfColorChannels > 1
% If it's color, extract the red channel.
hiddenImage = [hiddenImage(:,:,1) hiddenImage(:,:,2) hiddenImage(:,:,3)];
end
to make the matrix into 2 dimension
Image Analyst
2022년 1월 24일
Yes, you can do what Yanqi said. Just make sure you have enough pixels to do the hiding. This means that you need to have at least 8 times the number of pixels in the red, green, and blue channels all summed together. So if your RGB image is 256x256x3 = 196,608 pixels, then you'll need to have a gray scale image of at least 196,608*8 = 1,572,864 gray scale pixels.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



