error using "bitset" function for DCT steganography...please help
显示 更早的评论
I was working on DCT steganography function after getting the quantized DCT coefficients I did this embedding function on the first channel of the image...my quantized DCT coefficients in this code called "channel_q" where I don't embed in the first DC coefficient of each block and I don't embed in 0 or 1 coefficient..using the "bitset" function for embedding the binary message in the quantized DCT coefficients.. I keep getting this error..can anyone help please..I am stuck at this point
??? Error using ==> bitset
Inputs must be non-negative integers.
Error in ==> jpeg_Embedding at 61
channel_q(i+ii-1,j+jj-1,k)=bitset(channel_q(i+ii-1,j+jj-1,k),1,BinaryMsg(j));
here is the embedding function
message='this is a message to test';
BinaryMsg=str2bin(message);
msgB_length=length(BinaryMsg);
%================================
if (ch == 1)% only embed in the luma
for k=1:1
for i=1:block_size:size(channel_q,1)
for j=1:block_size:size(channel_q,2)
for ii=1:block_size
for jj=1:block_size
if(~( channel_q(1,1)) || (channel_q(i,j) ~=0) || (channel_q(i,j) ~=1))
channel_q(i+ii-1,j+jj-1,k)=bitset(channel_q(i+ii-1,j+jj-1,k),1,BinaryMsg(j));
if (BinaryMsg(j)==msgB_length)
break;
else
BinaryMsg(j+1)
end
end
end
end
end
end
end
end
1 个评论
Jan
2016-11-20
The message "Inputs must be non-negative integers" sounds clear. What is the type and the values of channel_q?
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Quantizers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!