![]() ![]() Image = cv2.imread('C:/Users/N/Desktop/Test.jpg') This function receives as input the path of the image to read and returns the image as a numpy ndarrayįor a detailed tutorial on how to read and display an image using OpenCV, please check here. To do it, we need to call the imread function. Next, we need to read the original image we want to convert to gray scale. The first thing we need to do is importing the cv2 module, to be able to access the OpenCV functions. ![]() This tutorial was tested using Python version 2.7.8 and OpenCV version 3.2.0. For a detailed tutorial on how to convert an image to gray scale, please consult this previous post. In this tutorial, we will read an image and convert it to gray scale, and then save the new image to our file system. So, it is useful to have a way of saving the changes we performed in a new image. In this tutorial we will check how to save an image to the file system using OpenCV on Python.Īs we have been covering in previous tutorials, OpenCV allows us to read and manipulate images, amongst many other features. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |