Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I trying to make an image resize tool using python and opencv. In that I want to resize an image by dragging mouse over a canvas.

Please let me know if it is possible using opencv or it can be done by any other library in python. Thanks!

What I have tried:

I just tried simple and basic example of resizing an image.

import cv2

my_img = cv2.imread('4.1.04.tiff')
resized_img = cv2.resize(my_img,None,fx=0.5, fy=0.5, interpolation = cv2.INTER_CUBIC)
cv2.imshow('Image',resized_img)
cv2.waitKey(0)
cv2.destroyAllWindows()
Posted
Comments
Sayan Bera 24-May-18 8:08am    
handle this by overriding mouse events

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900