Python OpenCV如何在转换后保存图像 [英] Python OpenCV how to save an image after transforming it
本文介绍了Python OpenCV如何在转换后保存图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是python的新手.我正在使用opencv转换图像.
以下是脚本中的最后两行:
I am new to python. I am using opencv to tranform an image.
Below are the two last lines in the script:
warped = warped.astype("uint8") * 255
cv2.imshow("Scanned", imutils.resize(warped, height = 650))
我想将变形的图像另存为jpeg文件.
我该怎么办?
I would like to save the warped image as a jpeg file.
How do I go about it?
推荐答案
首先将修改后的图像保存在变量中,然后使用以下命令:
First hold the modified image in a variable, then use the following command:
cv2.imwrite("IMAGE_NAME.png", warpedimage)
这篇关于Python OpenCV如何在转换后保存图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文