can u help me sir? I wanna source code for copy move forgery detection using dwt.

I need a help I want the source code for discrete wavelet transform can u help me plz?

1 Comment

Maybe this will be a little helpful:
clc;
clear all;
close all;
x=imread('image.ext');
% subplot(6,6,1),
figure,imshow(x),title('orginal image');
[xar,xhr,xvr,xdr]=dwt2(x(:,:,1),'db2');
[xag,xhg,xvg,xdg]=dwt2(x(:,:,2),'db2');
[xab,xhb,xvb,xdb]=dwt2(x(:,:,3),'db2');
xa(:,:,1)=xar; xa(:,:,2)=xag;xa(:,:,3)=xab;
xh(:,:,1)=xhr; xh(:,:,2)=xhg;xh(:,:,3)=xhb;
xv(:,:,1)=xvr; xv(:,:,2)=xvg;xv(:,:,3)=xvb;
xd(:,:,1)=xdr; xd(:,:,2)=xdg;xd(:,:,3)=xdb;
% subplot(6,6,2),
figure,imshow(xa/200),title('xa/255');
% subplot(6,6,3),
figure,imshow(xh),title('H');
% subplot(6,6,4),
figure,imshow(xv),title('V');
% subplot(6,6,5),
figure,imshow(xd),title('D');
x1=[xa*0.003 log10(xv)*0.3; log10(xh)*0.3 log10(xd)*0.3];
% subplot(6,6,6),
imshow(x1),title('X1');
[r, c]=size(xa);
figure,imshow([r,c]),title('r,c)');
b=im2col(xa,[8 8],'sliding');
figure,imshow(b);

Sign in to comment.

Answers (1)

Rather than write your own, consider using the dwt function from Wavelet Toolbox.

3 Comments

Thank u coz u answer me I have project in forgery detection and I have algorithm of dwt I want the code to understand some step in my algorithm and this step is:
  1. read the image selected by user
  2. if the input image is not gray converted
  3. apply wavelet transform to specified level L
  4. for each overlapping b*b block in the 'LL level:
  5. 4.1.form a matrix A of definition b2 column and (M-b+1)×(N-b+1) rows by extracting the resulting pixel values by row in to row of A
  6. 4.2. Form another matrix B same as A with two additional column for storing top left coordinate
  7. end
can u help me in step 4 plz sir.
hi could you send me the code for forgery detection by Wavelet transform
Thank you

Sign in to comment.

Categories

Find more on Wavelet Toolbox in Help Center and File Exchange

Products

Tags

Asked:

on 19 Dec 2016

Edited:

on 11 Oct 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!