The structure of image data for image processing applications
Digital
images usually are comprised of a set of dots called pixels which are
the smallest discernable detail in a digital image. These pixels in
digital cameras are received by sensors. For a pixel in the image the
sensor measures the number of photons and turns them into an electrical
signal which is finally represented as a number after some process in
the camera such as quantization. For grayscale images, this process
leads to one number for each pixel, and for color images it may lead to
three numbers which represents red, green and blue values of the
corresponding pixel. So, for each pixel, there is number which roughly
represents the number of photons received by the sensor of camera.
Usually in the digital image processing tasks, we deal with these set of
numbers and often represent them as a matrix. The matrix is two
dimensional for grayscale images and three dimensional for color images.
The figure below shows an example of how a 4*4 part of an image (which
we call it a patch hereafter) can be represented mathematically in a
color image.
![]() |
| Displaying a color image patch data stored in a 4*4*3 matrix |
The effect of quantization leads to a set of discrete possible numbers for a pixel value. For example, in a stored 8-bit grayscale image the value of each pixel is an integer between 0 and 255 in which 0 means the pure black color and 255 represents the pure white color.

No comments:
Post a Comment