Ask Your Question
0

The window that opend by flag cv::WINDOW_AUTOSIZE is resized

asked 2020-03-19 08:23:10 -0600

KangSH gravatar image

updated 2020-03-19 09:39:46 -0600

supra56 gravatar image

I got some trouble in window matter.

I opened some window to show image init, and i tried resize.

I know that window opened by flag cv::WINDOW_AUTOSIZE is can't be resize, but in my PC, it resized.

I wonder that the size of image is not change and only size of window is resize when i resize the window.

Here is some of my code.

cv2.namedWindow('origin', cv2.WINDOW_AUTOSIZE)

cv2.imshow('origin', img)

cv2.moveWindow('origin', 200,200)

cv2.waitKey(0)

cv2.resizeWindow('origin', 200, 200)

I'll upload before and after the resize window

This is before the resize. image description

and this is after the resize

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-19 09:01:48 -0600

mvuori gravatar image

The flag means the _user_ can't resize it, but obviously a programmer can. And a programmer can do it before imshow and/or imshow again as needed.

edit flag offensive delete link more

Comments

Then work like this is correct in progress?

KangSH gravatar imageKangSH ( 2020-03-19 09:05:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-19 08:23:10 -0600

Seen: 624 times

Last updated: Mar 19 '20