Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

show image with ratio opencv python

import cv2

# load the image, clone it, and setup the mouse callback function
image = cv2.imread('1.jpg')
cv2.namedWindow('image', cv2.WINDOW_KEEPRATIO)
# keep looping until the 'q' key is pressed
while True:
    # display the image and wait for a keypress
    cv2.imshow('image', image)
    key = cv2.waitKey()

    if key == 27:
        break

# close all open windows
cv2.destroyAllWindows()
Comment

PREVIOUS NEXT
Code Example
Python :: sklearn adjusted r2 
Python :: python check if character before character in alphabet 
Python :: splittext py 
Python :: how to change colour of rows in csv using pandas 
Python :: virtual env in python 
Python :: pyspark concat columns 
Python :: pandas create a column from index 
Python :: shuffle rows dataframe 
Python :: check if numpy array is 1d 
Python :: how to get current time in milliseconds in python 
Python :: python get all characters 
Python :: exit python script 
Python :: converting bool to 1 if it has true and if it is false print 1 
Python :: send email hotmail using python 
Python :: resize multiple images to same size python 
Python :: key item loop list python 
Python :: python compare two json objects and get difference 
Python :: how to make a pygame window 
Python :: How to add card in trello API using python 
Python :: list to string python 
Python :: python list to string with spaces 
Python :: pytz timezone list 
Python :: plot pandas figsize 
Python :: python http server command line 
Python :: take two numbers as inout in single line in python 
Python :: for each value in column pandas 
Python :: python selenium screenshot 
Python :: ordered char list python 
Python :: Plotting keras model trainning history 
Python :: how to move a column to last in pandas 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =