I would like to scramble image using henon map.I have written the following code with the help of bifurcation diagram matlab code.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
if true
% code
clc;
clear all;
close all;
imag1= imread('desert.jpg');
%info = imfinfo('barbara.jpg');
%if((info.ColorType)~='gray scale')
v=rgb2gray(imag1);
subplot(1,2,1);
[rows, columns] = size(v);
N=rows;
M=columns;
imshow(imag1);
x(1)=0;
y(1)=0;
[height, width] = size(v);
i=2;
for i=2:10000
x(i)=mod(1-1.4*(x(i-1)^2)+y(i-1),N)+1;
y(i)=mod(0.3*x(i-1),N)+1;
m=x(i);
n=y(i);
for r=1:M
for c=1:N
v1(r,c)=v(m,n);
end
end
end
v2 = im2uint8(v1);
subplot(1,2,2);
imshow(v2);
results = NPCR_and_UACI(v,v2);
end
I am getting error due to modulus statement.
after applying mod..there should be integer value...
But We're getting fractional part.How?Can anyone explain this?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!