Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

how swap the bits position of image A(I,j).please correct the mistake.

1 vue (au cours des 30 derniers jours)
Sultan Mehmood
Sultan Mehmood le 12 Juil 2018
Commenté : Guillaume le 12 Juil 2018
A= imread('camera man.png');
k=1:65536;
for I=1:256;
for j=1:256;
x=[0.3,zeros(1,65535)];
p=0.343;
for n=2:65536;
if x(n-1)>=0 & x(n-1)<=p
x(n)=x(n-1)/p;
else
x(n)=(1-x(n-1))/(1-p);
end
end
S=(x*255)+1;
Q=[0.2,zeros(1,65535)];
p=0.343;
for n=2:65536;
if Q(n-1)>=0 & Q(n-1)<=p
Q(n)=Q(n-1)/p;
else
Q(n)=(1-Q(n-1))/(1-p);
end
end
D=(Q*255)+1;
L=mod(S,8)+1;
P=mod(D,8)+1;
bits = bitget(A(I,j),[L,P]);
A(I,j)=bitor(bitset(A(I,j),[P,L],bits));
end
end
  3 commentaires
Sultan Mehmood
Sultan Mehmood le 12 Juil 2018
Modifié(e) : Sultan Mehmood le 12 Juil 2018
butt the error is still in code.so kindly help me in this code
Guillaume
Guillaume le 12 Juil 2018
I have showed several of the problems in your other question.
These problems have nothing to do with the swapping of the bits. They're much earlier than that.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by