Page 203 - Ai_C10_Flipbook
P. 203
In computer systems, data is represented using the binary system, which consists of ones and zeros. Each bit in
a computer's memory can hold one of these two values. Since each pixel is represented by 1 byte of data, which
consists of 8 bits, the total number of possible values for a pixel is 2 raised to the power of 8 (2^8), resulting
in 256 possible values. These values range from 0 to 255, providing a nuanced spectrum of pixel intensities for
representing colours and brightness levels.
Similarly, for when the number of bits is 8, then the total patterns are 2^8=256. Where, ^ represent the exponent.
Additionally, the use of 8 bits for each pixel allows for the efficient storage and processing of images in a variety
of applications, from simple graphics to high-definition photographs. With 256 possible values, this system can
represent different shades of gray or multiple colour channels in formats such as RGB (Red, Green, Blue), where
each colour channel is also represented by an 8-bit value. This binary representation ensures that images are both
stored and displayed with a rich depth of colour and brightness while remaining computationally manageable.
Grayscale Images
Grayscale images are images made up of different shades of gray, ranging from black to white, but without any colour
or hue. It only contains brightness information, meaning they don’t have any colour data (like red, green, or blue). Each
pixel just represents a certain level of brightness or gray, so you don’t see vibrant colours, but you can still see details
in different light or dark areas of the image. The darkest shade is black, representing the complete absence of colour
with a pixel value of 0. The lightest shade is white, indicating the full presence of colour with a pixel value of 255.
In Grayscale images, each pixel is made up of 1 byte (which is 8 bits). This byte stores the pixel’s brightness level,
with values from 0 (black) to 255 (white). A pixel’s value determines how dark or light it appears on the image.
The pixels in a grayscale image are arranged in a 2D grid (a flat array of rows and columns). The image's height
(number of rows) and width (number of columns) define the size of the image. For example, a grayscale image
with a height of 100 pixels and a width of 200 pixels would have 20,000 pixels in total.
Grayscale images are simpler to process and take up less memory compared to coloured images. This makes them
useful in situations where colour isn’t necessary, like certain types of scans, medical images, or old black-and-white
photos. The value of pixels is within the range of 0-255 for an image.
The images we see, computer stores them in the form of numbers.
RGB Images
All coloured images around us are made up of 3 primary colours of Red, Green and R B
Blue. All the colours are made by mixing these primary colours in varying intensity.
Every coloured image when split is stored in the form of 3 different channels, R
Channel, G Channel and B Channel. Each channel has a pixel value varying from 0-255.
For example, if we see the turquoise colour RGB band would look like [64, 224, 208]. In
a coloured image a single pixel contains red, green and blue values in triplets. G
Computer Vision 201

