# Copy-Move forgery detection using 2D Discrete wavelet transform

10 Feb 15

How I get Overlapping blocks of size b*b are created with one pixel shifting and the number of overlapping blocks for each layer(R,G,B palne)

10 Feb 15

I cannt get your question,could you pls elaborate.

11 Feb 15

Sir,I attached base paper for more detail.

11 Feb 15

Do you face any bugs in your code or you need the entire source code to be developed.

we dont have any sample matlab code based on the reference document you provided.if u have written some code and want to debug we are happy to do that.

12 Feb 15

How to arrange approximate coefficient(LL band) of wavelet transform into matrix form.

15 Feb 15

Sir,i write a matlab code.But I have problem.How to arrange approximate co-efficient in M*N matrix form.I attach code file.

15 Feb 15

Sir,i write a matlab code.But I have problem.How to arrange approximate co-efficient in M*N matrix form.I attach code file.only one level decomposition use in my project

16 Feb 15

The coefficients are already in MxN Format.

[M N]=size(a)
where M is the rows and N is the columns of the image.

[LL,LH,HL,HH]=dwt2(a,'haar');

[M1 N1]=size(LL);

IF M is 256 THEN M1 will be 128.

type whos in command window and you could check the varaiable

17 Feb 15

Thank you sir,
But I have problem.In code how get overlapping block of image of size B*B and one pixel shifting.
I attached code below.

20 Feb 15

Sir,you know other method to detect copy-move forgery in digital image?

20 Feb 15

pls attach the code you develop

20 Feb 15

I attached code below.

20 Feb 15

And I also attached my base paper below.

20 Feb 15

%Red Component of Colour Image
Red_Input_Image=zeros(size(Input_Image,1),size(Input_Image,2),3);
Red_Input_Image(:,:,1)=Input_Image(:,:,1);
imshow(uint8(Red_Input_Image));
figure;

%Green Component of Colour Image
Green_Input_Image=zeros(size(Input_Image,1),size(Input_Image,2),3);
Green_Input_Image(:,:,2)=Input_Image(:,:,2);
imshow(uint8(Green_Input_Image));
figure;

%Blue Component of Colour Image
Blue_Input_Image=zeros(size(Input_Image,1),size(Input_Image,2),3);
Blue_Input_Image(:,:,3)=Input_Image(:,:,3);
imshow(uint8(Blue_Input_Image));
figure;

%Apply Two Dimensional Discrete Wavelet Transform
[LLr,LHr,HLr,HHr]=dwt2(Red_Input_Image(:,:,1),'haar');
[LLg,LHg,HLg,HHg]=dwt2(Green_Input_Image(:,:,2),'haar');
[LLb,LHb,HLb,HHb]=dwt2(Blue_Input_Image(:,:,3),'haar');

First_Level_Decomposition(:,:,1)=[LLr,LHr;HLr,HHr];
First_Level_Decomposition(:,:,2)=[LLg,LHg;HLg,HHg];
First_Level_Decomposition(:,:,3)=[LLb,LHb;HLb,HHb];
First_Level_Decomposition=uint8(First_Level_Decomposition);

%Display Image
subplot(1,2,1);imshow(Input_Image);title('Input Image');
subplot(1,2,2);imshow(First_Level_Decomposition,[]);title('First Level Decomposition');

% Overlapping blocks of size b*b are created with one pixel shifting and the number of overlapping blocks for RED layer
Im_r = uint8(Red_Input_Image);
[M,N,~] = size(Im_r);
rr = 64; cc = 64; xx = 32; yy = 32;

numBlocksYY = numel(1:rr-xx:(M-(rr-1)));
numBlocksXX = numel(1:cc-yy:(N-(cc-1)));
[numBlocksYY, numBlocksXX];
C = cell(numBlocksYY*numBlocksXX,1);
counter_r = 1;
for ii=1:rr-xx:(M-(rr-1))
for jj=1:cc-yy:(N-(cc-1))
fprintf('[%d:%d, %d:%d]\n',ii,ii+rr-1,jj,jj+cc-1);
C{counter_r} = Im_r(ii:(ii+rr-1), jj:(jj+cc-1), : );
counter_r = counter_r + 1;
end
fprintf('\n');
end

figure;
for ii=1:numBlocksYY*numBlocksXX

what exactly you are doing with the column mentioned in red
subplot(numBlocksYY,numBlocksYY,ii), imagesc( C{ii} ); axis image; colormap gray;
end

% Overlapping blocks of size b*b are created with one pixel shifting and the number of overlapping blocks for GREEN layer
Im_g = uint8(Green_Input_Image);
[M,N,~] = size(Im_g);
rr = 64; cc = 64; xx = 32; yy = 32;

numBlocksYY = numel(1:rr-xx:(M-(rr-1)));
numBlocksXX = numel(1:cc-yy:(N-(cc-1)));
[numBlocksYY, numBlocksXX];
C = cell(numBlocksYY*numBlocksXX,1);
counter_g = 1;
for ii=1:rr-xx:(M-(rr-1))
for jj=1:cc-yy:(N-(cc-1))
fprintf('[%d:%d, %d:%d]\n',ii,ii+rr-1,jj,jj+cc-1);
C{counter_g} = Im_g(ii:(ii+rr-1), jj:(jj+cc-1), : );
counter_g = counter_g + 1;
end
fprintf('\n');
end

figure;
for ii=1:numBlocksYY*numBlocksXX
subplot(numBlocksYY,numBlocksYY,ii), imagesc( C{ii} ); axis image; colormap gray;
end

% Overlapping blocks of size b*b are created with one pixel shifting and the number of overlapping blocks for BLUE layer
Im_b = uint8(Blue_Input_Image);
[M,N,~] = size(Im_b);
rr = 64; cc = 64; xx = 32; yy = 32;

numBlocksYY = numel(1:rr-xx:(M-(rr-1)));
numBlocksXX = numel(1:cc-yy:(N-(cc-1)));
[numBlocksYY, numBlocksXX];
C = cell(numBlocksYY*numBlocksXX,1);
counter_b = 1;
for ii=1:rr-xx:(M-(rr-1))
for jj=1:cc-yy:(N-(cc-1))
fprintf('[%d:%d, %d:%d]\n',ii,ii+rr-1,jj,jj+cc-1);
C{counter_b} = Im_b(ii:(ii+rr-1), jj:(jj+cc-1), : );
counter_b = counter_b + 1;
end
fprintf('\n');
end

figure;
for ii=1:numBlocksYY*numBlocksXX
subplot(numBlocksYY,numBlocksYY,ii), imagesc( C{ii} ); axis image; colormap gray;
end

20 Feb 15

what exactly you are doing with the column mentioned in red

20 Feb 15

After getting the approximate coefficient,LL band of each layer(R,G,B) each dividing into the overlapping block with one pixel shifting.
Sir,If any mistake in my code please correct.

20 Feb 15

Could you explain me in a 8 x8 matrix what is the input an what should be the output.

20 Feb 15

I dont find time to go thru the paper,I am not getting the concept what you try to explain.

20 Feb 15

Hello sir,
I want to divide the image into 10*10 overlapping block with one pixel shifting using matalab.

23 Feb 15