how can image encryption by chaos(lorenz)
Mostrar comentarios más antiguos
i write program and some error appear clear all; close all; x(1)=1.45; y(1)=1.55; z(1)=1.23; %x1=0; %y1=22; %z1=0; a=10; b=28; c=8/3; h=0.01 n=10000; for i=2:n x(i)=x(i-1)+h*a*(y(i-1)-x(i-1)); y(i)=y(i-1)+h*(b*x(i-1)-x(i-1)*z(i-1)-y(i-1)); z(i)=z(i-1)+h*(x(i-1)*y(i-1)-c*z(i-1)); x1(i)=10.^14*x(i)-round(10.^14*x(i))+0.2; y1(i)=10.^14*y(i)-round(10.^14*y(i))+0.2; z1(i)=10.^14*z(i)-round(10.^14*z(i))+0.2; % x1(i)=x1(i-1)+h*a*(y1(i-1)-x1(i-1)); %y1(i)=y1(i-1)+h*(b*x1(i-1)-x1(i-1)*z1(i-1)-y(i-1)); %z1(i)=z1(i-1)+h*(x1(i-1)*y1(i-1)-c*z1(i-1)); end % plot3(x,y,z); figure subplot(3,1,1); %plot(x1); subplot(3,1,2); %plot(y1); subplot(3,1,3); %plot(z1); figure; subplot(3,1,1); r=xcorr(x); %plot(r); subplot(3,1,2); e=xcorr(y); %plot(e); subplot(3,1,3); f=xcorr(z); %plot(f); figure; b=imread('cameraman.tif'); %imshow(b); [n m]=size(b); sort(x); [d1,ind1]=sort(x,n); ind1; sort(y); [d2,ind2]=sort(y,n); ind2; for h=1:n b1=b(ind1(h),:);
for j=1:m
b1=b(:,ind2(j));
end
end
imwrite(b1,'cameraman.tif','tif')
the error in imwrite can i use another code to appear image after permutation
Respuestas (1)
Image Analyst
el 22 de Nov. de 2012
0 votos
I'm not sure what you're asking. Yes, you can "appear" (display, show) images after anything with the imshow(), image(), or imagesc() functions. Did that answer your question?
2 comentarios
jinan eng
el 22 de Nov. de 2012
Image Analyst
el 22 de Nov. de 2012
What's the class of b1? Is it uint8? Try issuing this command on the command line
whos b1
What does it say? If you have some kind of non-integer image, you may have to use the TIFF class to write it out instead of imwrite().
Categorías
Más información sobre Image Filtering and Enhancement en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!