Effacer les filtres
Effacer les filtres

2D baker map code implementation

8 vues (au cours des 30 derniers jours)
myetceteramail myetceteramail
Commenté : Zeina Abdullah le 22 Fév 2022
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 commentaires
Zeina Abdullah
Zeina Abdullah le 21 Fév 2022
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 le 22 Fév 2022
@su su maung if the input 8*8 how dose the code will be change

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 12 Jan 2017
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

Catégories

En savoir plus sur Image Processing and Computer Vision dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by