504 views

Uploaded by kirandasi123

- ch06
- finalse
- Image forgery review
- Project - Color Based Moving Object Detection with Matlab
- Matlab Codes
- Detection of Copy-Move Forgery in Digital Images
- matlab
- Final Year Matlab Project List With Abstract 2012
- Face Detect Matlab 1
- copy move forgery based on DWT-DCT
- Copy Move Forgery
- Copy - Move Image Forgery Detection in a Parallel Environment
- fulltext digital forgery
- 1.Abbas Cheddad-Steganoflage-A New Image Steganography Algorithm
- Vectors
- CA141
- 29271
- CBSE computer science XII sample paper 2.pdf
- Array Class 3
- CBSE Practical 2016.docx

You are on page 1of 4

5.5..1 INTRODUCTION

The following Matlab code is executed on Microsoft windows XP professional version

2002 with intel ( R) Pentium ( R) D CPU 3.00GHZ 3.01GHZ and 1GB RAM system and

the Matlab software version used is 7.0.

clear all;

close all;

% Converting an RGB image into a Grey scale image

A1= imread('image.bmp');

A= rgb2gray(A1);

figure,imshow(A);

[m n]=size(A);

% Preparing the index regarding the row and column position of the matrix

index=[];

for j=1:n-(B-1)

for i=1:m-(B-1)

index=[index;i,j];

end

end

[y u]=size(index);

% Sliding a B x B block along the image

A1=A(:,1:187);

A2=im2col(A1,[B B],'sliding');

A3=A2';

A4=A(:,183:370);

A5=im2col(A4,[B B ],'sliding');

A6=A5';

A7=[A3;A6]; % Resultant matrix of size (m-B+1)(n-B+1) by BxB

A8=length(A7);

[B,index1]=sortrows(A7); % preparing the index for the resultant matrix

B1=diff(B);

B2=B(1,:);

B3=[B2;B1];

B4=abs(B3);

B5=B(1:A8-1,:)-B(2:A8,:);

B6=B(A8,:);

B7=[B5;B6];

B8=abs(B7);

C=B4';

C1=sum(C);

C2=C1';

33

DETECTION OF COPY MOVE FORGERY IN DIGITAL IMAGES

CHAPTER-5 IMPLEMENTATION DETAILS

C3=B8';

C4=sum(C3);

C5=C4';

C6=C2.*C5;

D=find(C6==0);

E=index1([D]);

r=index([E],:);

G=length(r);

for H=1:G

p=r(H,1);

q=r(H,2);

A(p,q)=255;

end

figure,imshow(A);

clear all;

close all;

% Converting an RGB image into a Grey scale image

A1=imread('buck.bmp');

A=rgb2gray(A1);

figure,imshow(A);

[m n]=size(A);

% Preparing the index regarding the row and column position of the matrix

index=[];

for j=1:n-7

for i=1:m-7

index=[index;i,j];

end

end

[y u]=size(index);

% Sliding a B x B block along the image

A1=A(:,1:188);

A2=im2col(A1,[8 8],'sliding');

A3=A2';

A4=A(:,182:368);

A5=im2col(A4,[8 8],'sliding');

A6=A5';

A7=[A3;A6]; % Resultant matrix of size (m-B+1)(n-B+1) by BxB

A8=length(A7);

[o y]=size(A7);

l=[16 11 10 16 24 40 51 61;12 12 14 19 26 58 60 55;14 13 16 24 40 57 69 56;14 17 22

29 51 87 80 62;18 22 37 56 68 109 103 77;24 35 55 64 81 104 113 92;49 64 78 87 103

121 120 101;72 92 95 98 112 100 103 99]; % 8 X 8 quantization matrix

% calculating DCT for each block and dividing by quantization matrix

for v=1:o

j=col2im(A7(v,:),[1 1],[8 8],'sliding');

t=dct2(j);

34

DETECTION OF COPY MOVE FORGERY IN DIGITAL IMAGES

CHAPTER-5 IMPLEMENTATION DETAILS

Z=t./l;

k=reshape(Z,1,y);

A7(v,:)=k;

end

[B,index1]=sortrows(A7);

% Identifying identical rows

B1=diff(B);

B2=B(1,:);

B3=[B2;B1];

B4=abs(B3);

B5=B(1:A8-1,:)-B(2:A8,:);

B6=B(A8,:);

B7=[B5;B6];

B8=abs(B7);

C=B4';

C1=sum(C);

C2=C1';

C3=B8';

C4=sum(C3);

C5=C4';

C6=C2.*C5;

D=find(C6==0);

E=index1([D]);

r=index([E],:);

G=length(r);

for H=1:G

p=r(H,1);

q=r(H,2);

A(p,q)=255;

endfigure,

imshow(A);

35

DETECTION OF COPY MOVE FORGERY IN DIGITAL IMAGES

CHAPTER-5 IMPLEMENTATION DETAILS

IMREAD : The imread function reads an image from any supported graphics image file

format, in any of the supported bit depths. Most image file formats use 8 bits to store

pixel values. When these are read into memory, MATLAB stores them as class uint8.

For file formats that support 16-bit data, PNG and TIFF, MATLAB stores the images as

class uint16.

RGB2GRAY : rgb2gray converts RGB images to grayscale by eliminating the hue and

saturation information while retaining the luminance.

IM2COL : Converts each sliding m-by-n block of A into a column of B, with no zero

padding. B has m*n rows and contains as many columns as there are m-by-n

neighborhoods of A. If the size of A is [mm nn], then the size of B is (m*n)-by-((mm-

m+1)*(nn-n+1)).

[B,index] = sortrows(A) also returns an index vector index.

vector, then diff(X) returns a vector, one element shorter than X, of differences between

adjacent elements: [X(2)-X(1) X(3)-X(2) ... X(n)-X(n-1)]

If X is a matrix, then diff(X) returns a matrix of row differences: [X(2:m,:)-X(1:m-1,:)]

ABS : abs(X) returns an array Y such that each element of Y is the absolute value of

the corresponding element of X.

sum(A) returns the sum of the elements. If A is a matrix, sum(A) treats the columns of A

as vectors, returning a row vector of the sums of each column. If A is a

multidimensional array, sum(A) treats the values along the first non-singleton dimension

as vectors, returning an array of row vectors.

36

DETECTION OF COPY MOVE FORGERY IN DIGITAL IMAGES

- ch06Uploaded byrikudomessi
- finalseUploaded bySharath Kumar
- Image forgery reviewUploaded bySunil Kumar Vasistha
- Project - Color Based Moving Object Detection with MatlabUploaded byJans Hendry
- Matlab CodesUploaded byonlymag4u
- Detection of Copy-Move Forgery in Digital ImagesUploaded byJunel Herrera
- matlabUploaded byOwolabi Olusola
- Final Year Matlab Project List With Abstract 2012Uploaded byMohit Sngg
- Face Detect Matlab 1Uploaded byKhalifa Bakkar
- copy move forgery based on DWT-DCTUploaded byShiva Kee
- Copy Move ForgeryUploaded bymihirdhruve
- Copy - Move Image Forgery Detection in a Parallel EnvironmentUploaded byCS & IT
- fulltext digital forgeryUploaded bycrab10_suji
- 1.Abbas Cheddad-Steganoflage-A New Image Steganography AlgorithmUploaded byyukina_snowangel
- VectorsUploaded bystudboy
- CA141Uploaded bySiddharth Hari Nair
- 29271Uploaded byGama_yhwh
- CBSE computer science XII sample paper 2.pdfUploaded byFirdosh Khan
- Array Class 3Uploaded byDinesh Kumar
- CBSE Practical 2016.docxUploaded bymann123456789
- String Array Kip IrvineUploaded byahmadvcs
- CBSE Practical 2016Uploaded bymann123456789
- XII PB-I CS 2011-12Uploaded byManish Rusia
- Programmin FinalUploaded byAcey Ashes
- Fourier Approximations with PythonUploaded byAnirudth N
- Bad Fast C++Uploaded byWilliamSucky
- Yahoo InterviewUploaded byAarti Soni
- Collection of Our Best Table Expressions _ SCNUploaded byabhilash
- EE213-KIPIRVINE_CHAP4_-1Uploaded byAnonymous d00Z9tvIOi
- VectorsUploaded byAnmol Garg

- Modular Welding Fixture.pdfUploaded bykirandasi123
- FormulasUploaded bybilal132
- Common Sales Terms Explained for MarketersUploaded bykirandasi123
- Seed Funding CompaniesUploaded bykirandasi123
- Concentrated Solar PowerUploaded bykirandasi123
- Business Proposal SampleUploaded bykirandasi123
- How to Recharge Your Body, Mind & SoulUploaded bykirandasi123
- Basics of TrigonometryUploaded byJishnu Rajendran
- Rest vs SleepUploaded bykirandasi123
- Antikythera Mechanism.pdfUploaded bykirandasi123
- Stress Strain CurveUploaded bykirandasi123
- Small Business LoansUploaded bykirandasi123
- Engineer QuotesUploaded bykirandasi123
- Vol 4 No 7 Page 706 to 710Uploaded bykirandasi123
- Smart People SlidesUploaded byAditya Khunteta
- Mechanical Projects Short List 2010-201Uploaded bykirandasi123
- Mechanical Projects Short List 2010-201Uploaded bykirandasi123

- Gas ChromatographyUploaded byLuh Putu Pitrayani Sukma
- C GuideUploaded bykannan.selvam5426
- Heavy MetalsUploaded byiqbalpec8721
- ford.docxUploaded bybhaktishah117
- LS-5 Series_Manual.pdfUploaded byDoly
- chapter 6 ip class 12Uploaded byArun Ganesh
- 4. Reconfigurable Sequence DetectionUploaded byHitesh Prasad
- IIP Group 3 Project PlanUploaded byCHINTAN NARENDRASINH ATODARIA PGP Mumbai 2017-19
- FM Chapter - VIIUploaded byVijaykumar Surla
- Careers in PhysicsUploaded byhoneytrap99
- Routh Hurwitz Stability CriterionUploaded byifiok
- III SemesterUploaded byYogesh
- Java 1.9year ExpirUploaded byKalmesh Mopagar
- Data Collection for Well PlanningUploaded byDeepanshu Melana
- iGuzzini working catalogue 2010 - EnglishUploaded byiGuzzini illuminazione SpA
- Gas Metering PT-1Uploaded bybrian
- Hydrocarbon Sep Catalogue EnglishUploaded byZoltán Boér
- turnigyUploaded byArnon Zamir
- Alloptic Home Gateway 4000Uploaded byjrojac99
- ABM AND ABCUploaded byMs. Fit
- InterferenceUploaded byrnsabir
- Research Paper Engineering Plastic InjecUploaded byGunjan Trivedi
- Site and Services SchemeUploaded byPreethi Mariappan
- Make Your Own Spectroscope FINALUploaded byAnge Quintriqueo
- 05 - Work, Energy and PowerUploaded byAñîkët Kãmãl
- 4-2-07_WMF-T33-105-R015v01_OTA-TR-069Uploaded bybelalr84
- Wlc Design Ftrs FaqUploaded byscribdGMMEGA
- Electrical Thumb Rules Part 1Uploaded byameeri143
- SharePoint Server 2016 ManagingUploaded byNemanja Filipovic
- lycurgus.pdfUploaded bymaria