I want to try extracting message from images that have been inserted messages before..but there is an error with the description bellow..
this code extract :
% Read Image Stego
IS = imread('imagestego.bmp');
% Extract RedChannel
RedChannel = IS(:,:,1);
% Convert RedChannel to biner
bitstego = uint8(reshape(dec2bin(RedChannel,8)',1,[]) = '0');
nBitstego = length(bitstego);
% Extraction
extBits = bitget(RedChannel(1:end),1).';
extMessage = char(bin2dec(reshape(int2str(extBits),8,[]).').');
and this error from extract code :
>> latihanextract
Error: File: latihanextract.m Line: 8 Column: 55
The expression to the left of the equals sign is not a valid target for an assignment.
and this is embedding code before..it's work!
coverImage = imread('foto1.jpg');
message = 'IMRON';
%EMBEDDING
RedChannel = coverImage(:,:,1);
GreenChannel = coverImage(:,:,2);
BlueChannel = coverImage(:,:,3);
bits = uint8(reshape(dec2bin(message,8)',1,[]) - '0');
nBits = length(bits);
RedChannel(1:nBits) = bitset(RedChannel(1:nBits),1,bits);
Imageresults = cat(3,RedChannel,GreenChannel,BlueChannel);
imwrite(Imageresults,'imagestego.bmp');
so what's the problem ?