𝐅𝐮𝐧 𝐰𝐢𝐭𝐡 𝐂𝐨𝐦𝐩𝐮𝐭𝐞𝐫 𝐕𝐢𝐬𝐢𝐨𝐧 𝐚𝐧𝐝 𝐈𝐦𝐚𝐠𝐞 𝐩𝐫𝐨𝐜𝐞𝐬𝐬𝐢𝐧𝐠
Task Description 📄
🔅 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
Team Members :
- Mahek Batra (Team Leader)
- Bhavesh Sonewale
- Aditya Pande
- Tanmay Chauhan
In this article, we will learn about about how image is created by writing python code and will also see how we can create our own image and also crop images and then swap them. Basically, an image is a 3D Array which is nothing but collection of pixels in which some values are stored. Similarly, a video is nothing but the collection of multiple images captured in sequential order. If we want to crop any image, then as image is an array we can do slicing operation on it and accordingly and crop this image according to our requirement. Thus, the operations that we perform on image and videos are known as Image and Video Processing. In python, we will use “opencv-python” library in order to to these operations and this library can be installed using “pip” command. Following are some functions I have used in performing this task:-
i) imread()-> This fucntion is used to read the image which is already stored in your directory so that we can store it’s output in some variable.
ii) imshow()-> This function will open a window and show you the image we have created or imported.
iii) waitKey()-> This function is used to hold the window untill the time we want it to show us image otherwise program will crash.
iv) destroyAllWindows()-> This function is used to terminate or kill the window which is displaying our image in order to save our program from being crashed.
v) zeros()-> This function will create an array which will have all its values as zero (null). It comes under numpy library.
vi) shape-> This keyword is used to see the dimensions or size of our array.
vii) hstack()-> This function is used to combine two or more arrays horizontally having same dimensions to form one single array. It also comes under numpy library.
Here is the video of entire task :-
Github URL :-
That’s all for today. Hope you like this practical. Thanks.
Connect with me on LinkedIn :-