% 我得到错误 DC11=dct2(C11);DCC12=dct2(C12);......从单元格转换为双精度是不可能的。%在图像中使用 LSB 和 DCT 隐写术的数据安全性
%step1:Divide cover image to 8*8 Block
C=imread('E:\sofia1.jpg');
C=C(:,:,1);
[r1 c1]=size(C);
row=r1;
col=c1;
% a punch of code to make a square image C with equal dimension (not mentioned)
C=mat2cell(C,[32 32 32 32 32 32 32 32 ],[32 32 32 32 32 32 32 32]); % divide the matrix
C11=C{1,1}; C12=
{1,2};C13=C{1,3};C14=C{1,4};C15=C{1,5};C16=C{1,6};C17=C{1,7};C18=C{1,8};
%step2:perform 2D-DCT on each Block
DC11=dct2(C11);DCC12=dct2(C12);
DC13=dct2(C13);DC14=dct2(C14);DC15=dct2(C15);DC16=dct2(C16);DC17=dct2(C17);
DC18=dct2(C18);