cvCreateImage size [closed]

asked 2014-06-27 04:03:33 -0500

hvn gravatar image

Hi,

I'm capturing images using

IplImage* image = cvCreateImage(cvGetSize(image_in), 8, 3);

where image_in is e.g. 160x120 or 320x240. But so far, no matter the size, the images shown using imshow() are 640x480 while I want at max. 320x480. How can I do that ?

Thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2014-06-27 06:58:28.464453

Comments

1

could you try to avoid the outdated c-api ?

(using the c++ api, you don't even have to pre-allocate result images, so things will get much more simple)

berak gravatar imageberak ( 2014-06-27 04:08:31 -0500 )edit

I can try, but how can I do it without that ?

hvn gravatar imagehvn ( 2014-06-27 05:14:09 -0500 )edit
1

the most simple idea would be namedWindow("lalala", CV_WINDOW_NORMAL); <-- now you can resize that manually

(but i'm only guessing. all your questions here lately suffer from being totally vague)

berak gravatar imageberak ( 2014-06-27 05:19:38 -0500 )edit

Thank you, that works nicely.

hvn gravatar imagehvn ( 2014-06-27 06:11:40 -0500 )edit