필터 지우기
필터 지우기

I would like to scramble image using henon map.I have written the following code with the help of bifurcation diagram matlab code.

조회 수: 2 (최근 30일)
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개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by