How to extract features of image using DCT??
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am working on a copy move forgery in which first i input the image then convert it in ycbcr colour code nd then make y component as input image and apply SWT on image. now can u plz help me how to apply DCT for extracting the features of this image. I am attaching my code.
clc
clear all
close all
I = imread('gun.png');
K = imresize(I,[256 256]);
ycbcr = rgb2ycbcr(K);
figure
imshow(ycbcr);
title('Image in RGB Color Space');
%a = 128+zeros(256,256);
%Isolate Y.
Y = ycbcr(:,:,1);
%Isolate Cb.
Cb = ycbcr(:,:,2);
%Isolate Cr.
Cr= ycbcr(:,:,3);
figure, imshow(Y), title('Y Component')
%Display the Cb Component.
figure, imshow(Cb), title('Cb Component')
%Display the Cr Component.
figure, imshow(Cr), title('Cr Component')
[ca,chd,cvd,cdd] = swt2(Y,2,'db6');
A1 = wcodemat(ca(:,:,1),255);
H1 = wcodemat(chd(:,:,1),255);
V1 = wcodemat(cvd(:,:,1),255);
D1 = wcodemat(cdd(:,:,1),255);
subplot(2,2,1)
image(A1)
title('Approximation Coef. of Level 1')
subplot(2,2,2)
image(H1)
title('Horizontal Detail Coef. of Level 1')
subplot(2,2,3)
image(V1)
title('Vertical Detail Coef. of Level 1')
subplot(2,2,4)
image(D1)
title('Diagonal Detail Coef. of Level 1')
2 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!