regarding masking the image
2 Ansichten (letzte 30 Tage)
waqas am 21 Jul. 2020
Verschoben: DGM am 5 Mai 2023
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.