opencv record of learning and namedWindow imshow

No namedWindow function automatically perform a former imshow function, but this function to create a window of default parameters for the cv2.WINDOW_AUTOSIZE

Window size will automatically adapt the displayed image, and can not change the size of the window

cv2.namedWindow("demo" , cv2.WINDOW_NORMAL)                             
cv2.imshow("demo" , lena)

This can adjust the size of the time window generation

Different window function may be obtained by varying the parameters

Window size can be changed cv2.WINDOW_NORMAL
You can not change the window size cv2.WINDOW_AUTOSIZE
Adaptive window size than the column cv2.WINDOW_FREERATIO
Window size remains proportion cv2.WINDOW_KEEPRATIO
Display color becomes dark cv2.WINDOW_GUI_EXPANDED

Guess you like

Origin www.cnblogs.com/miaorn/p/12172685.html