I have 4*4 known matrix.i m converting it into binary and i want to embed text 'abc' into that. i am also converting it into binary.but i am getting error:Undefined function or method 'bitset' for input arguments of type 'char'.
Show older comments
%here is my code..what wrong i am doing?
clc;
a=[1:4;5:8;9:12;13:16]
b=dec2bin(a,8)
c=size(b,1)
d=size(b,2)
text='abc'
binarytext=dec2bin(text,8)
e=size(binarytext,1)
f=size(binarytext,2)
for ii = 1:c
for jj = 1:d
watermark(ii,jj)=binarytext(mod(ii,e)+1,mod(jj,f)+1)
end
end
g=size(watermark)
watermarked_image=b
for ii = 1:c
for jj = 1:d
watermarked_image(ii,jj)=bitset(watermarked_image(ii,jj),1,1)
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!