フィルターのクリア

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 Center および File ExchangeStandard File Formats についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by