Constraint in a 2d pixel matrix

In reply to dave_59:

Hi Dave, does arr and mat refer to the same two dimensional array? Please clarify. If not then what does two dimensional variable arr needed for?