Performs a point-wise operation (e.g. assignment, arithmetic) between two matrices that are not of the same size with a given offset. The result has the size of the first matrix and the outlying elements are left intact.
Input:
matrix (matrix): First operand matrix.
patch (matrix): Second operand matrix.
offset (vector): Two-element vector that defines the row and column offset of the second operand.
operation (char): A char that defines the type of the operation.
- '+': addition
- '-': subraction
- '*': multiplication
- '/': division
- '=': assignment
Output:
new (matrix): Resulting matrix.
mask (matrix): Binary mask of the elements that were affected by the operation.