Borrar filtros
Borrar filtros

Explain the following encoding code

1 visualización (últimos 30 días)
Nitesh
Nitesh el 6 de Mzo. de 2014
Respondida: Walter Roberson el 6 de Mzo. de 2014
Below code is used in encoding where B=pic(:,:,1) is matrix of image.
for v v = 1:1000 % This is the encoder.
for uu = 1:7
if msgmat(vv,uu)==1;
if rem(B(idx(uu+7*(vv-1))),2)==0
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))+1;
end
elseif rem(B(idx(uu+7*(vv-1))),2)==1
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))-1;
end
end
Please tell me whats going on in above code ???? v v and uu are variables

Respuestas (1)

Walter Roberson
Walter Roberson el 6 de Mzo. de 2014
The code sets the bottom bit of a location in B to be the same as the value of msgmat() at a location.
idx(uu+7*(vv-1)) would work out the same as idx(uu,vv) provided that idx had 7 rows.

Categorías

Más información sobre Standard File Formats en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by