regarding masking the image
1 回表示 (過去 30 日間)
古いコメントを表示
kindly expalin the following line
mask_h and mask_w are the scalar inputs
mask = zeros(mask_h,mask_w);
mask(1:mask_h/2,:) = -1;
mask(mask_h/2 + 1:end,:) = 1;
0 件のコメント
採用された回答
waqas
2020 年 7 月 21 日
移動済み: DGM
2023 年 5 月 5 日
First line is defining a zero matrix With mask_h rows and mask_w columns.
In the second line, all the entries in first half of the rows are being assigned a value of -1.
For third line, rest of the rows, i.e., all the entries from half of the rows till the end are assigned a value of 1.
You are using Matlab indexing to assign values of 1 or -1 to the entries based on their location in the matrix.
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Author Block Masks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!