Computer vision Working principle part 2

Adarsha Regmi
2 min readAug 30, 2021

review of first part :: explained flow for image processing and about image processing

# continuing forward

In computer vision applications we either deal with image or videos. video is also a image processed multiple frames continuously.

Type of image

a) Grayscale

b) Color

color vs grayscale

Image as functions

Image can be represented as a function of two variables. X and Y which define a 2D Dimensional area. Digital images are made of a grid of pixels. The pixel stands for picture element. The image is collection of pixels.

a) Grayscale image

In this image we have 32 pixels columns and 16 pixels as rows basis. Overall

size = 32 x 16 = 512 pixels.

each pixel has value from 0 to 255. (Grayscale ) where 0 indicates dark and 255 indicates white.

you can see F(27,7 ) = 0 (black)

b) color image

Instead of representing the color pixel with 1D it is represented by 3D plane. (RGB, HSV, LAB,etc.)


Application >> TRansformation

Darken the image

G(x, y) = 0.5 * F(x, y)

Brighten the image

G(x, y) = 2 * F(x, y)

Move an object 150 pixels down

G(x, y) = F(x, y + 150)

Remove the gray in an image to transform the image into only black and white

G(x, y) = { 0 if F(x, y) < 130, 255 otherwise }

WHY these numbers ??

Because we have build computer to process number not images.

Continue to third for knowing more about CV