Reading Image as Color or GrayScale Image in Python using OpenCV - Machine Learning Tutorials, Courses and Certifications

Reading Image as Color or GrayScale Image in Python using OpenCV - Machine Learning Tutorials, Courses and Certifications

Machine Learning April 4, 2021 Computer Vision Comments Off on Reading Image as Color or GrayScale Image in Python using OpenCV 11,473 Views

In this article, we’ll try to open an image by using OpenCV (Open Source Computer Vision). To use the OpenCV library in python, we need to install these libraries as a prerequisite:

To install these libraries, we need to run these pip commands in cmd:

Note : Instead of writng cv2.IMREAD_GRAYSCALE, write 0 to read image as GrayScale image

Note : Instead of writng cv2.IMREAD_COLOR, write 1 to read image as color image

Recommended articles