Closed formula for matrix index mapping
I am given a matrix of integers with width w_g
and height h_g
filled with values 0
to w_g x h_g - 1
and a local matrix filter with width w_l
and height h_l
. I want to map each value in the matrix to a corresponding index in the smaller matrix.
For w_g = 9
, h_g = 8
, w_l = 3
and h_l = 2
the matrix values
Closed formula for matrix index mapping
I am given a matrix of integers with width w_g
and height h_g
filled with values 0
to w_g x h_g - 1
and a local matrix filter with width w_l
and height h_l
. I want to map each value in the matrix to a corresponding index in the smaller matrix.
For w_g = 9
, h_g = 8
, w_l = 3
and h_l = 2
the matrix values