Basic Elements of Image
Before starting to do image processing you need to understand the basic of any image. The building blocks of any image is pixel.
Pixel can be thought of that way, it is a color or intensity of light in a place of image. If we think of image as a grid, each square in the grid can be thought of a pixel.
Let’s assume that we have an image with 400X300 resolution. This means that our image is represented as a bunch of pixels, with 400 rows and 300 columns. Overall there are 120000 pixels in the image. Pixels are represented in two ways, grayscale and color.
In a grayscale image, each pixel has a value between 0 to 255. Values close to 0 are darker and close to 255 are lighter.
The color image consists of three color which are red, green and blue. In a color image each pixel has specific value for red, green and blue. The image are generally known as RGB image. The value of each color is between 0 to 255. So for representing a pixel in color image you need to know each value. To construct a white color the values would be (255,255,255). To construct a black color it should be (0,0,0).