resize image with opencv [cv2]
“can’t show full image?” yes, because your image bigger than monitor resolution.
let scale it down.
this sample is show how to resize image down 4 times
import cv2 filename = "panorama_00098.jpg" oriimage = cv2.imread(filename) newx,newy = oriimage.shape/4,oriimage.shape/4 #new size (w,h) newimage = cv2.resize(oriimage,(newx,newy)) cv2.imshow("original image",oriimage) cv2.imshow("resize image",newimage) cv2.waitKey(0)
I added more example, try to see
resize image by width