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 ==> bitsetInputs 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 endend end
Best Answer