Some tasks on computer vision using opencv

Babuakash
3 min readJun 9, 2021

Task-4

Task -4.1

Problem statement:-

Create image by yourself Using Open CV-2

Using Random function I’m creating 300 * 300 art where I used cv2.circle( ) to make a art.

Also using random( ) I'm taking the colors and radius of circles by this my art getting different colors on every compilation of code.

First compilation out-put
Second compilation Out-put

So Everytime by compilation of code you will get different art .

Task 4.2

Problem statement:-

Take 2 image crop some part of both image and swap it.

For this task, I'm swapping 2 images faces.

First we detect the face on both image and then swap their faces.

Pic-1
pic-2

After detection faces my final output will be :-

Pic-1 face swapped with Pic-2

Task 4.3

Problem statement:-

Take 2 image and combine it to form single image. For example collage.

By using hstack( )function I'm merging the 2 image .

Input pic-1
Input pic-2

Finall output : -

Out - put

Hope you find this article Helpful !!!

For Code, you can visit my Git-Hub Repo

For any query contact me by Linkedin Profile.

HappY Learing : )

--

--