필터 지우기
필터 지우기

How to apply walsh hadamard transform?

조회 수: 7 (최근 30일)
Sneha
Sneha 2018년 1월 15일
답변: Sufiyan 2023년 4월 25일
Please help me with the code to implement the walsh hadamard transform on an image. I am not aware how to apply the transform on a 256*256 lena image.

답변 (1개)

Sufiyan
Sufiyan 2023년 4월 25일
Hi,
You can refer to the code below to apply Hadamard transform on the image.
% Load the PNG image
img = imread('img.jpg');
img = double(img);
% Resize the image to 256x256
lena = imresize(lena, [256,256]);
% Compute the Walsh-Hadamard Transform
wht = hadamard(256) .* lena .* hadamard(256)';
wht = wht / sqrt(256*256);
% Display the results
subplot(1,2,1);
imshow(uint8(lena));
title('Original Image');
subplot(1,2,2);
imshow(log(1+abs(wht)), []);
title('Walsh-Hadamard Transform');
You can refer to the hadamard(256) documentation to get more information about the function.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by