필터 지우기
필터 지우기

I am trying to implement LSB watermarking in matlab.But i am getting the error=> Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> watermarke​d_image(ii​,jj)=bitse​t(watermar​ked_image,​1,watermar​k(ii,jj));

조회 수: 1 (최근 30일)
here is the code=>
clc file1='C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg'; [cover_image,map]=imread(file1); %imshow(cover_image,map);
file2='C:\Users\Public\Pictures\Sample Pictures\Hydrangeas.jpg'; [message_image]=imread(file2); %imshow(message_image);
message_image=double(message_image); message_image=round(message_image./256); message_image=uint8(message_image);
O=size(cover_image,1) P=size(cover_image,2)
Q=size(message_image,1) R=size(message_image,2)
for ii = 1:O for jj = 1:P watermark(ii,jj)=message_image(mod(ii,Q)+1,mod(jj,R)+1); end end watermark=double(watermark) watermark=round(watermark./256); watermarked_image=cover_image; for ii =1:O for ii= 1:P watermarked_image(ii,jj)=bitset(watermarked_image,1,watermark(ii,jj)); end end
imshow(watermarked_image)

채택된 답변

Image Analyst
Image Analyst 2013년 10월 5일
Chances are you have 3D true color images. So you need to specify a color channel, as in watermark(row, column, colorChannel), not just the row and column, as in watermark(row, column).
  댓글 수: 6
Urmila
Urmila 2013년 10월 7일
Hello sir,when i tried to attach the images then i got message =>
You are limited to 10 daily uploads. If you need to upload additional files, delete one or more files now or wait 24 hours to upload more files.
Is it means that i have already attached some images?If yes then why i cant see it?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by