How to represent a binary digital image as a function?

119 Views Asked by At

I am trying to represent a binary image as a function. Similar to this question I want something like this:

dsfs

I know the correct way is:

enter image description here

Is it also correct to say a binary image with m rows and n columns has N pixels (N = mn), and the function is like below?

dfg

Or do I have to mention the rows and columns?

Because I only have the number of pixels (N) and know nothing about m and n.