How to scramble an image using Gyrator transform? matlab code?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aberna P
am 10 Jan. 2023
Kommentiert: Aberna P
am 21 Apr. 2023
Need to scramble the image using gyrator trnasform? Is their any tool for that?
1 Kommentar
Walter Roberson
am 10 Jan. 2023
So is your project on https://www.researchgate.net/publication/271437364_Quaternion_gyrator_transform_and_its_application_to_color_image_encryption or on https://www.researchgate.net/publication/328640568_Asymmetric_Image_Encryption_Using_Gyrator_Transform_with_Singular_Value_Decomposition_ICoEVCI_2018_India or https://www.mdpi.com/1424-8220/15/8/19199
To answer your question: Yes, some of the authors of the papers implemented their code in MATLAB.
However, you might not find it easy to convince one of the authors to make their code available.
Akzeptierte Antwort
Nayan
am 5 Apr. 2023
Hi
Though the gyrator transform is not directly available in MATLAB. You could use the FFT and permutation matrix.
Find the attached code to scramble an Image using the Gyrator transform.
Hope this helps!
% Read the input image
img = imread('1680714900716.jpg');
% Convert the input image to grayscale
if size(img, 3) == 3
img = rgb2gray(img);
end
% Generate a random permutation matrix
N = size(img, 1);
P = eye(N);
ind = randperm(N);
P = P(ind,:);
% Compute the Fourier transform of the input image
F = fft2(img);
% Compute the gyrator transform matrix
G = diag(exp(2*pi*1i*(0:N-1)/N));
G = P*G*P';
% Apply the gyrator transform to the Fourier coefficients of the input image
F_scrambled = G*F*G';
% Compute the inverse Fourier transform of the scrambled Fourier coefficients
img_scrambled = ifft2(F_scrambled);
% Display the input and scrambled images
figure;
subplot(1, 2, 1); imshow(img); title('Input image');
subplot(1, 2, 2); imshow(abs(img_scrambled),[]); title('Scrambled image');
2 Kommentare
lse owen
am 11 Apr. 2023
Thanks! Is there any way to calculate the permutation matrix according to the rotation angle?
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!