๐…๐ฎ๐ง ๐ฐ๐ข๐ญ๐ก ๐‚๐จ๐ฆ๐ฉ๐ฎ๐ญ๐ž๐ซ ๐•๐ข๐ฌ๐ข๐จ๐ง ๐š๐ง๐ ๐ˆ๐ฆ๐š๐ ๐ž ๐ฉ๐ซ๐จ๐œ๐ž๐ฌ๐ฌ๐ข๐ง๐ 

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 :

  1. Mahek Batra (Team Leader)
  2. Bhavesh Sonewale
  3. Aditya Pande
  4. 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 :-

https://github.com/Bhavesh-github-zen/Summer-2021-Task-4---Image-processing-OpenCV.git

Thatโ€™s all for today. Hope you like this practical. Thanks.

Connect with me on LinkedIn :-

https://www.linkedin.com/in/bhaveshsonewale/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store