Answers for "resize image python numpy"

3

resize numpy array image

import cv2
import numpy as np

img = cv2.imread('your_image.jpg')
res = cv2.resize(img, dsize=(54, 140), interpolation=cv2.INTER_CUBIC)
Posted by: Guest on December-13-2020
0

resize image array python

import cv2
#img is your image as array

#size of the new image
height = 500
width = 500

img_resized = cv2.resize(img, (width, height))
Posted by: Guest on May-12-2021

Python Answers by Framework

Browse Popular Code Answers by Language