필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

can anyone explain what does this code do? Thanks in advance

조회 수: 1 (최근 30일)
SIBI SIVA
SIBI SIVA 2017년 4월 10일
마감: Stephen23 2017년 4월 10일
clc;
clear all;
close all;
imag1 = imread('peppers.png');
imag2=rgb2gray(imag1);
x= imresize(imag2, [64, 64]);
[n,m,k]=size(x);
b=8;
n=n*b*m;
bi = zeros(n,1,'uint8');
c = 0.3;
tic;
for i = 2 : n
sum = 1 - 2* c * c;
if (sum<0.0)
bi(i-1) = 1;
end
c = sum;
end
key = zeros(n/b,1,'uint8');
for i1 = 1 : n/b
for i2 = 1 : b
key(i1) = key(i1) + bi(i2*i1)* 2^(i2-1);
end
end;
[n, m, k] = size(x)
for ind = 1 : m
Fkey(:,ind) = key((1+(ind-1)*n) : (((ind-1)*n)+n));
end
for i3 = 1 : k
x1= x(:,:,i3);
for i4 = 1 : n
for i5=1:m
y(i4,i5) = bitxor(x1(i4,i5),Fkey(i4,i5));
end
end
xout(:,:,i3) = y(:,:,1);
end;
  댓글 수: 1
per isakson
per isakson 2017년 4월 10일
  • Click the Help button above the edit-box, in which you write your question.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 4월 10일
What does the program documentation say about what it does and how it works? What did the author of the code say when you asked them what the program was for? What were you searching for when you found the code, or did you just ask Google to find yourself a random MATLAB program that you thought you might start learning MATLAB from?

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by