Kindly help me to understand the following steps

1 次查看(过去 30 天)
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 个评论
Image Analyst
Image Analyst 2017-3-4
Can you not locate the author of this poorly documented code?
John D'Errico
John D'Errico 2017-3-4
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by