MATLAB Answers

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

26 views (last 30 days)
Lana Lawran
Lana Lawran on 19 Dec 2016
Edited: Image Analyst on 11 Oct 2018
I need a help I want the source code for discrete wavelet transform can u help me plz?
  1 Comment
esmail alwrafi
esmail alwrafi on 3 Jan 2017
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)

Steven Lord
Steven Lord on 3 Jan 2017
Rather than write your own, consider using the dwt function from Wavelet Toolbox.
  3 Comments

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!