필터 지우기
필터 지우기

2D baker map code implementation

조회 수: 8 (최근 30일)
myetceteramail myetceteramail
myetceteramail myetceteramail 2017년 1월 12일
댓글: Zeina Abdullah 2022년 2월 22일
I am trying to implement the discretized baker map for the shuffling of pixels,i am not able to understand the discretized version of it clearly.and neither am i able to implement it properly on matlab it always show index out of bounds error. here is the link http://link.springer.com/chapter/10.1007/978-3-540-95972-4_16 please can somebody help. I am a beginner and this is my effort at it i know it is pathetic but still.
for i=1:row
for j=1:col
if(1<=j<row/2)
newcord1=((2*(j-1))+mod(i-1,2));
newcord2=(floor(0.5*(i-mod(i-1,2))+1));
im(i,j)=im(newcord2,newcord1);
elseif(row/2 <=j <=row)
newcord1=((2*(j-64))+mod(i,2));
newcord2=floor(0.5*(i-mod(i,2))+63);
im(i,j)=im(newcord2,newcord1);
end
end
end
  댓글 수: 5
Zeina Abdullah
Zeina Abdullah 2022년 2월 21일
Hi , please can you help me i need a chaotic interleaver code using baker map . please tell any thing can help me in my problem . @Parveiz Lone @su su maung @Syahirah Rahim @myetceteramail myetceteramail @Walter Roberson
Zeina Abdullah
Zeina Abdullah 2022년 2월 22일
@su su maung if the input 8*8 how dose the code will be change

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 1월 12일
if(1<=j<row/2)
means
if ((1<=j)<row/2)
The first part, 1<=j, returns false (0) or true (1). That 0 or 1 is then compared to row/2.
You probably want
if 1<=j && j<row/2

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by