Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

opencv imshow resize

import cv2
 
img = cv2.imread('/home/img/python.png', cv2.IMREAD_UNCHANGED)
 
print('Original Dimensions : ',img.shape)
 
scale_percent = 60 # percent of original size
width = int(img.shape[1] * scale_percent / 100)
height = int(img.shape[0] * scale_percent / 100)
dim = (width, height)
  
# resize image
resized = cv2.resize(img, dim, interpolation = cv2.INTER_AREA)
 
print('Resized Dimensions : ',resized.shape)
 
cv2.imshow("Resized image", resized)
cv2.waitKey(0)
cv2.destroyAllWindows()
Comment

python opencv imresize

im = cv2.resize(im, None, fx=1/3, fy=1/3, interpolation=cv2.INTER_AREA)
Comment

opencv resize image

cv2.resize(src, dsize[, dst[, fx[, fy[, interpolation]]]])
Comment

PREVIOUS NEXT
Code Example
Python :: make tkinter label and input 
Python :: python range in reverse order 
Python :: how to connect wifi using python 
Python :: argparse required arguments 
Python :: make pickle file python 
Python :: check object type python 
Python :: replace string if it contains a substring pandas 
Python :: drop all characters after a character in python 
Python :: train test split 
Python :: convert dictionary keys/values to lowercase in python 
Python :: pytest multi thread 
Python :: opencv invert image 
Python :: python anagram finder 
Python :: pytorch optimizer change learning rate 
Python :: 1. write a program to multiply two numbers using function python 
Python :: repeat array along new axis 
Python :: python get file name without dir 
Python :: pvm python 
Python :: change shortcuts in pychar, 
Python :: pandas pivot 
Python :: python write line break 
Python :: beautiful soup get class name 
Python :: datetime date from string 
Python :: pandas series to tuple list 
Python :: python hide details 
Python :: delete database entry using name django 
Python :: remove first character of string python 
Python :: simple way of finding file extension python programming 
Python :: generate unique id from given string python 
Python :: pandas make new dataframe 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =