matlab code for copy move forgery detection using dct
#1

copy move forgery detection using any method............require basic code in matlab
Reply
#2
matlab code for copy move forgery detection using dct

%L = imread('images/lena3.jpg');
L = imread('images/Toronto2_F.png');
L=rgb2gray(L);
figure(1);
imshow(L);

b=256; % block size used to look for duplicates
b1=sqrt(b);
Nn = 5; % how many close rows to check
Nd = 15; %Threashold
Nc=26; % Truncate PCA at this length
Nt=26;

% calculate the total size of the image
n = numel(L);

b2 = sqrt(n)-sqrt(b)+1;
% calculate Nb
Nb= power((sqrt(n)-sqrt(b)+1),2);

% the matix of Nc plus the position
M=zeros(Nb, Nc);
% temp index array
Mi = zeros(Nb, 2);
i=1;
disp('Starting PCA');
for r = 1:b2
for c = 1:b2
% Extract each block
B = L(r:r+b1-1,c:c+b1-1);

[pc, latent, explained] = pcacov(cov(double(B)));
%[pc, latent, explained] = princomp(double(B), 'NumComponents', Nc);

Z = pc(1:Nc);
Mi(i,Smile = [r c];
M(i,Smile = Z;
i = i+1;
end
end

disp('Sorting M -> S');
%Sort M array in lexicographic order -> S
[S, index] = sortrows(M);
P= zeros(1,3);
disp('Finding Duplicates');
for i = 1:Nb
iv = index(i);
xi=mod(iv,b2) + 1;
yi=ceil(iv/b2);
j = i+1;
while j < Nb && abs(i - j) < Nn
jv=index(j);
xj=mod(jv,b2) + 1;
yj=ceil(jv/b2);

z=sqrt(power(xi-xj,2) + power(yi-yj,2));
% only process those whose size is above Nd

if z > Nd

idx = find(P(:,1)== xi & P(:,2)==yi, 1, 'last');
if isempty(idx)==1
P = [P; [xi, yi, 1]];
else
P(idx,3) = P(idx,3) + 1;
end

idx = find(P(:,1)== xi & P(:,2)==yi, 1, 'last');
if isempty(idx)==1
P = [P; [xj, yj, 1]];
else
P(idx,3) = P(idx,3) + 1;
end
end
j = j + 1;
end
end

disp('Sorting findings');
rows = size(P,1);
% sort descending order
P = sortrows(P, -3);
% Mark the found blocks
disp('Creating Image');
idx = 1;
% Create a black image
RI = zeros(sqrt(n), sqrt(n));
while idx < rows && P(idx,3) > 5
x = P(idx,1);
y = P(idx,2);
RI(x,y) = 1;
idx = idx + 1;
end
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: copy move forgery detection mathlab code,
Popular Searches: copy move detection in image ppt, image forgery detection, image copy move forgery detection source code in matlab, image forgery detection project in matlab, matlab source code for forgery detection, right move property, detection of copy move forgery ppt,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  A New Data Mining Based Network Intrusion Detection Model prem0597 2 4,231 04-05-2018, 09:42 PM
Last Post: Guest
  authentication schemes for session passwords using color and images project source code 2 2,237 03-02-2018, 09:35 AM
Last Post: Nischithnash
  image encryption and decryption using rsa algorithm in matlab 2 7,909 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  download liver tumor ct scan image in matlab with source code 4 8,066 21-05-2017, 09:54 PM
Last Post: abdulrahmanmashaal
  mini ir radar for unauthorized object detection 3 1,141 15-04-2017, 03:11 PM
Last Post: jaseela123d
  MATLAB codes needed for powerline communication 1 8,077 12-04-2017, 05:00 PM
Last Post: jaseela123d
  source code for task scheduling using genetic algorithm using java 2 8,528 11-04-2017, 08:31 PM
Last Post: Guest
Thumbs Up source code of online payment system using steganography and visual cryptography 3 8,509 06-04-2017, 09:56 AM
Last Post: jaseela123d
  matlab code for wavelet based ofdm transmitter 1 923 24-02-2017, 11:18 AM
Last Post: ijasti
  code to extract brain tumor detection using matlab 2 1,067 17-10-2016, 04:32 PM
Last Post: girish123ak

Forum Jump: