Kindly help me to understand the following steps

조회 수: 1 (최근 30일)
Renjith V Ravi
Renjith V Ravi 2017년 3월 4일
댓글: John D'Errico 2017년 3월 4일
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