What is Image Processing?
Image processing is any form of processing for which the input is an image or a series of images or videos, such as photographs or frames of video. The output of image processing can be either an image or a set of characteristics or parameters related to the image.
Open-CV
OpenCV is a free open source library used in real-time image processing. It mainly focuses on image processing, video capture and analysis including features like face detection and object detection.
Let’s start with the basics.
First install the Open-CV library using command
pip install opencv-python
Let’s see how we can read an image and display an image using Open-CV and python.
1) Reading an Image
Let’s see the syntax for reading an image in our IDE
Syntax
cv2.imread(“parameter 1”,” parameter 2”)
**parameter 1: – **your image to be read
parameter 2: –
**1: **Loads a colour image neglecting any transparency of image
**0: **Loads image in grayscale mode
**-1: **Loads image as such including alpha channel
2) Displaying an Image
Syntax
cv2.imshow(‘Window name’,’ display image’)
cv2.waitKey(0)
cv2.destroyAllWindows()
#technology #python #using opencv