# -*- coding:utf-8 -*-
'''
Created on 2017年8月10日
@author: fengj
'''
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread("C:\\Users\\fengjiexyb\\Desktop\\0.png")
height,width,layer=img.shape
#print height,width,int(0.5*width),int(0.5*height)
res=cv2.resize(img,(int(2*width),int(2*height)),interpolation=cv2.INTER_AREA)
#cv2.imshow('res',res)
cv2.imwrite("C:\\Users\\fengjiexyb\\Desktop\\0-1.png", res)
cv2.waitKey()
使用opencv2变换图片大小
最新推荐文章于 2024-01-02 16:19:45 发布