A= imread('camera man.png');k=1;for I=1:256; j=1:256;endx=0.3;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);endendS=(x*255)+1;Q=0.2;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);endendD=(Q*255)+1;L= mod(S(k),8)+1;P=mod(D(k),8)+1;swap??
MATLAB: How swap the bits at position L&P of A(I,j).
binaryMATLABmatrix
Best Answer