error using "bitset" function for DCT steganography...please help
Mostrar comentarios más antiguos
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 comentario
Jan
el 20 de Nov. de 2016
The message "Inputs must be non-negative integers" sounds clear. What is the type and the values of channel_q?
Respuesta aceptada
Más respuestas (1)
Budoor Salem
el 22 de Nov. de 2016
0 votos
Categorías
Más información sobre Quantizers en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!