필터 지우기
필터 지우기

Explain the following encoding code

조회 수: 1 (최근 30일)
Nitesh
Nitesh 2014년 3월 6일
답변: Walter Roberson 2014년 3월 6일
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

답변 (1개)

Walter Roberson
Walter Roberson 2014년 3월 6일
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.

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by