Kindly help me to understand the following steps

1 visualización (últimos 30 días)
Renjith V Ravi
Renjith V Ravi el 4 de Mzo. de 2017
Comentada: John D'Errico el 4 de Mzo. de 2017
Please help me to understand, what processing is happening for the variable ' encoded_img ' in the following code
post_fix=[];
if find(encoded_img < 2, 1, 'last') < length(encoded_img)
post_fix=encoded_img(find(encoded_img < 2, 1, 'last')+1:end);
end
pre_fix=encoded_img(1:3);
encoded_img=encoded_img(4:find(encoded_img < 2, 1, 'last'));
encoded_img_len=length(encoded_img)
if mod(length(encoded_img),8) ~= 0
encoded_img=[encoded_img, zeros(1, 8-mod(length(encoded_img),8))];
end
encoded_img_mat=reshape(encoded_img, 8, round(length(encoded_img)/8));
uint8_encoded_img=bin2dec(num2str(encoded_img_mat'));
  2 comentarios
Image Analyst
Image Analyst el 4 de Mzo. de 2017
Can you not locate the author of this poorly documented code?
John D'Errico
John D'Errico el 4 de Mzo. de 2017
The thing is, code, without any documentation, taken out of context, where we have no clue what to expect, such code is almost impossible to just read and explain. And even if one could explain in theory what the code does in terms or processing pure numbers, it would not be an explanation that makes any sense to you.
So contact the author.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by