Azzera filtri
Azzera filtri

Kindly help me to understand the following steps

2 visualizzazioni (ultimi 30 giorni)
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 Commenti
Image Analyst
Image Analyst il 4 Mar 2017
Can you not locate the author of this poorly documented code?
John D'Errico
John D'Errico il 4 Mar 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by