Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Broken code:visual cryptography

3 Ansichten (letzte 30 Tage)
parth jai
parth jai am 21 Jul. 2017
Geschlossen: Walter Roberson am 21 Jul. 2017
The code is:
clc;
clear all;
i=imread('lena256x256.jpg');
i=im2bw(i,0.3);
s=size(i);
a=s(1);
b=s(2);
s1a=[1 0;1 0];
part1=zeros(a,2*b);
part2=zeros(a,2*b);
[x y]=find(i==1);
len=length(x);
for I=1:len
a1=x(I);b1=y(I);
part1((a1),(2*b1-1):(2*b1))=s1a(1,1:2);
part2((a1),(2*b1-1):(2*b1))=s1a(2,1:2);
end
[x y]=find(i==0);
len=length(x);
s1a=[1 0;0 1];
for I=1:len
a1=x(I);b1=y(I);
part1((a1),(2*b1-1):(2*b1))=s1a(1,1:2);
part2((a1),(2*b1-1):(2*b1))=s1a(2,1:2);
end
decrypt=bitor(part1,part2);
decrypt=~decrypt;
figure;imshow(decrypt);
figure;imshow(part1);
figure;imshow(part2);
Images of each part, decrypted image and original image are attached.
Thank you!

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by