python版opencv使用resize调整图片大小:
res = cv2.resize(img,None,fx=0.6, fy=0.6, interpolation = cv2.INTER_CUBIC)。
from PIL import ImageGrab是对电脑屏幕的截屏,而不是对浏览器的截屏。
import ImageGrab
im = ImageGrab.grab()
im.show()
本文介绍了使用Python进行图像处理的方法,包括使用OpenCV库调整图片大小的具体操作,并展示了如何利用PIL库中的ImageGrab模块来捕获电脑屏幕。文中还提供了一个简单的示例代码。
python版opencv使用resize调整图片大小:
res = cv2.resize(img,None,fx=0.6, fy=0.6, interpolation = cv2.INTER_CUBIC)。
from PIL import ImageGrab是对电脑屏幕的截屏,而不是对浏览器的截屏。
import ImageGrab
im = ImageGrab.grab()
im.show()
转载于:https://my.oschina.net/silverhammer/blog/340001
2781

被折叠的 条评论
为什么被折叠?