Python 调整图像大小,仅在中心周围显示100x100像素
我想用cv2调整图像大小,使图像只有100x100大,并用imshow显示 发件人: 致:Python 调整图像大小,仅在中心周围显示100x100像素,python,opencv,image-processing,Python,Opencv,Image Processing,我想用cv2调整图像大小,使图像只有100x100大,并用imshow显示 发件人: 致: cv2中是否有省略部分图像的功能?多亏了busybyte,我找到了答案: img = cv.imread("PATH") centerx, centery = [int(img.shape[0] / 2) - 50, int(img.shape[1] / 2) - 50] img = img[centerx:centerx + 100, centery:centery + 100] 它将图像从中心收
cv2中是否有省略部分图像的功能?多亏了busybyte,我找到了答案:
img = cv.imread("PATH")
centerx, centery = [int(img.shape[0] / 2) - 50, int(img.shape[1] / 2) - 50]
img = img[centerx:centerx + 100, centery:centery + 100]
它将图像从中心收缩到所需的100x100大小 多亏了爱管闲事的人,我找到了答案:
img = cv.imread("PATH")
centerx, centery = [int(img.shape[0] / 2) - 50, int(img.shape[1] / 2) - 50]
img = img[centerx:centerx + 100, centery:centery + 100]
它将图像从中心收缩到所需的100x100大小 请参阅“感兴趣区域”([感兴趣区域opencv python][3]-堆栈溢出)[3]:请参阅“感兴趣区域”([感兴趣区域opencv python][3]-堆栈溢出)[3]: