TASK 4
TASK DESCRIPTION
TEAM TASK
🔅 Task 4.1
📌 Create image by yourself Using Python Code
🔅 Task 4.2
📌 Take 2 image crop some part of both image and swap it.
🔅 Task 4.3
📌 Take 2 image and combine it to form single image. For example collage
🔅 Task 4.1
📌 Create image by yourself Using Python Code
WE HAVE CREATED CUBIC BLOCKS WITH DIFFERENT COLORS
STEP 1 -
>> Import numpy and cv2 libraries in the Jupyter Notebook.
>> Define a function link_joints to connect two points by drawing a line.
STEP 2 -
>> Now initialise all the points of the cubes and also give color codes for all cubes.
STEP 3 -
>> At last run the program to obtain three different cubes with three different colours.
🔅 Task 4.2
📌 Take 2 image crop some part of both image and swap it.
STEP 1 -
>> Import two images from the hardisk to crop and swap them.
>> Import cv2 and matplotlib.pyplot.
STEP 2 -
>> Display both the images imported from the hardisk.
STEP 3 -
>> Crop some part from both above two images for further swapping.
STEP 4 -
>> Now resize cropped part of first image to the size of the second cropped part.
>> After resizing paste cropped part of first image in place of second cropped part.
STEP 5 -
>> Simply follow step 4 again for second cropped image.
.
🔅 Task 4.3
📌 Take 2 image and combine it to form single image.
STEP 1 -
>> Import numpy library as it has functions called hstack and vstack which can be used to combine images horizontally and vertically respectively.
>> Import two images from the hardisk and display them.
STEP 2 -
>> Resize both images according to your need.
>> Now use hstack function to combine both images horizontally.
>> Finally run the program to obtain a single image.
GITHUB LINK- https://github.com/PRASOON-MAURYA/LW-Summer-Tasks/blob/main/task4.py
TASK ENDED…