Previous | Next --- Slide 10 of 116
Back to Lecture Thumbnails
zebra25

Hi, what is the range of the function f? I recall we said that we can map it back to [0,1] for convenience in calculation, but what is it in general? Is it like standard images where it can be [-\infinity, \infinity] and we map it to [0,255] to represent it in pixels?

motoole2

In general, the function $f$ can output any value in $[-\infty, \infty]$. For example, when taking the derivative of an image, it can have both positive and negative values.

When saved as a .jpg or .png, images are usually stored with only 8 bits worth of information per pixel, i.e., $[0, 255]$. However, there are other images formats that can store 16 bits worth of information per pixel (e.g., .tiff), or even use floating point values to represent pixel values (e.g., .exr, .hdr).

When reading in these images, it is often helpful to (i) convert these images from uint8 to float (to avoid issues with overflows/underflows when processing the images), and (ii) divide the pixel values to [0,1].