Image Pre-processing using Open CV

Logix_Quest
3 min readAug 26, 2020

--

Using Jupyter Notebook

Image processing is a method to perform some operations on an image, in order to get an enhanced image or to extract some useful information from it. It is a type of signal processing in which input is an image and output may be image or characteristics/features associated with that image. Here we’re doing image-pre processing using open CV.

Nowadays, image processing is among rapidly growing technologies. It forms core research area within engineering and computer science disciplines too. The aim of pre-processing is an improvement of the image data that suppresses unwilling distortions or enhances some image features important for further processing, although geometric transformations of images (e.g. rotation, scaling, translation) are classified among pre-processing methods.

Firstly, we’ll import libraries.

importing libraries

Now read image, using Open CV.

read image

To find type, we’ll use type method.

find type

To find shape,

shape of image

To view image, we’ll use ‘imshow’ method.

view image

To view its original color:

original color

To change its color to grayscale,

GrayScale

To change color to gray:

gray color

To change color into magma:

magma

To resize image:

resizing image

To change size of image, providing a specific ratio:

resizing image against some ratio

To flip image and having direction to right or left:

result 1
result 2

To save image with new name in folder:

save image

Hi readers! this is image pre-processing using Open CV. If you like my work, don’t forget to clap.

Thank You.

--

--

Logix_Quest
Logix_Quest

No responses yet