Ask Your Question

Resize window for displaying image in MAC version 10.2.12

asked 2017-01-17 22:16:17 -0500

J2691 gravatar image

updated 2020-10-11 14:17:47 -0500

I am trying to resize the window for displaying an image in Mac. When I use two different image with different dimensions, for the bigger one I see I am not able to resize it manually. The Mac version is 10.2.12. The command I am using is: cv::namedWindow("image",CV_WINDOW_AUTOSIZE); cv::resizeWindow("image", 400, 400); But it doesnot work. Is there any other way to resize the image in this version of Mac?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-17 23:38:38 -0500

Tetragramm gravatar image

As per the documentation: Only windows created without cv::WINDOW_AUTOSIZE flag can be resized.

edit flag offensive delete link more


Even if I don't use cv::WINDOW_AUTOSIZE, I dont see changes in the image when I change dimensions manually using cv::resizeWindow("image", 400, 400); Is there any change in format for the new xcode version?

J2691 gravatar imageJ2691 ( 2017-01-18 04:30:41 -0500 )edit

You have to explicitly declare it WINDOW_NORMAL. The default parameter is AUTOSIZE.

namedWindow("ellipse", WINDOW_NORMAL);
resizeWindow("ellipse", img.cols / 2, img.rows / 2);
imshow("ellipse", img);
Tetragramm gravatar imageTetragramm ( 2017-01-18 17:37:40 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-01-17 22:16:17 -0500

Seen: 856 times

Last updated: Jan 17 '17