The os.listdir is used to list the directories, the directories will be listed before and after saving the image.The image dora.jpg from the path is copied to the directory by changing the name dora.jpg to cat.jpg and listing the file name from the directory after save the cat.jpg file.The imread is used to specify the way in which the image should be read, the os.chdir(directory) method to change current directories to a given path. In this example, I have imported a module called cv2 and os and taken a variable as a path and assigned a path and taken a directory as another variable, and assigned the path of the directory.Here, we can see how to save the file with opencv2 in python. Python show image Python save the file with OpenCV2
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |