Representing an image as a function

2.6k Views Asked by At

I am currently working on a project about image processing. The main method I will be using is image thresholding. When describing it, I would like to use mathematical terms. I have another paper that I am using where they define an image as a function in the following way;

Image of the paper describing an image as a function

$I:U \to [0,1]^c$

I was hoping someone could help me understand the notation.

Thank you.

2

There are 2 best solutions below

1
On BEST ANSWER

For simplicity let’s assume the image is square (has the same number of pixels $n$ in height and width.) Moreover, let’s assume that there are $c=3$ colors (as in RBG.)

The set $U$, here, is (indexing from 1) just $\{(1,1), \ldots, (1,n), (2,1), \ldots, (2,n), \ldots, (n,1), \ldots, (n,n)\}$, i.e. the locations of all the pixels in the image.

Writing the image as $I : U \to [0,1]^3$ just says that we can represent an image by mapping each pixel location $(i,j)$ to the corresponding amount of red $I(i,j)_1$, green $I(i,j)_2$, and blue $I(i,j)_3$ in the image (in RGB) where $0$ indicates none of the color and $1$ indicates the color is fully on.

This is a pretty accurate model of an image, in that the only difference from how we typically encode color images is that instead of $[0,1]$ being used to indicate pixel strength, the typical encoding uses the finite set $\{0,1,\ldots,255\}$ due to finite precision issues, where $0$ still indicates having none of the color but $255$ indicates that the color is full on.

1
On

$U$ is the pixels, so if $m=640$ and $n=1280$ then $U$ is the rectangular space $[0,639] \times [0,1279]$. $c$ is the number of colors, so if there are 3 colors then $c=3$ and $(0,1)^c=(0,1)\times (0,1) \times (0,1)$ and is a 3D box with side length 1.

I am not sure what in particular you don't understand