ARToolKit | Mailing List Archive |
![]() |
From: | Blair MacIntyre <blair@c ............> | Received: | Nov 20, 2001 |
To | Denis Mohnhaupt <demohn@g .....> | ||
Subject: | Re: Changing video image size | ||
It depends on what platform you are running on. If you look in the video grabbing library (that has a different implementation for each platform), the interface does not support changing resolutions. Most of the implementations hard code the resolution. So, if you want to change it at startup, you can just change the grabbing library itself and recompile. If you wan to be able to change the resolution while the application is running, that will require some more significant changes. On Tuesday, November 20, 2001, at 05:16 AM, Denis Mohnhaupt wrote: > Hello, > > does anyone know, if and how it is possible to change the resolution of > the > video image in my own application? Are there maybe some ARTK functions > which > can do this? > > Regards, > Denis Mohnhaupt > > -- > GMX - Die Kommunikationsplattform im Internet. > http://www.gmx.net |
From: | Denis Mohnhaupt <demohn@g .....> | Received: | Nov 20, 2001 |
To | artoolkit@h .................. | ||
Subject: | Changing video image size | ||
Hello, does anyone know, if and how it is possible to change the resolution of the video image in my own application? Are there maybe some ARTK functions which can do this? Regards, Denis Mohnhaupt -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
From: | Denis Mohnhaupt <demohn@g .....> | Received: | Nov 20, 2001 |
To | artoolkit@h .................. | ||
Subject: | Re: Changing video image size | ||
> It depends on what platform you are running on. If you look in the > video grabbing library (that has a different implementation for each > platform), the interface does not support changing resolutions. Most of > the implementations hard code the resolution. Oops, I forgot to mention the platform :-D I need this for a Windows application. > So, if you want to change it at startup, you can just change the > grabbing library itself and recompile. If you want to be able to change > the resolution while the application is running, that will require some > more significant changes. It may be sufficient if it happens at startup, by reading a config file or so. Where do I have to make the changes? Thanks, Denis -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
From: | Mark Billinghurst <grof@h ..................> | Received: | Nov 20, 2001 |
To | Denis Mohnhaupt <demohn@g .....> | ||
Subject: | Re: Changing video image size | ||
On Tue, 20 Nov 2001, Denis Mohnhaupt wrote: > Hello, > > does anyone know, if and how it is possible to change the resolution of the > video image in my own application? Are there maybe some ARTK functions which > can do this? Hi Dennis, This is very easy. You can change the application window size by changing the values passed to the function argInit - for example argInit( &cparam, 1.0, 0, 0, 0, 0 ); in simpleTest.c The second value in this function is a scaling term saying how much you want the application window scaled relative to the size of the captured video image. The default video capture size is 320x240 pixels, so with a value of 1.0 you get an application window of 320x240 size. If you want a 640x480 window set this value to 2.0. The video pixels will then be stretched to create a larger window. So basically this is a zoom function. Of course you can always capture video at a higher resolution (provided your capture card/camera can support this). Under linux you just provide a different argument to char *vconf = "-channel=1"; For example to change the size of the captured image to 640x480 you use the following arguement: char *vconf1 = "-width=640 -height=480 -channel=1"; Under windows you need to change the capture resolution by using the Video For Windows dialog box. The easiest way to do this is to run the ExCamera.exe application - hit the "cap" button to stop video capture and then the "F" button to change the video format. This will put up a dialog box listing all the formats supported by your capture device and you can choose the resolution you want. When you run your ARToolKit application after this (such as simpleTest) it will capture video frames at this resolution. I hope this helps, Mark +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Mark Billinghurst | Human Interface Technology Laboratory grof@h .................. | University of Washington, Box 352-142 fax: +1-206-543-5380 | Seattle, WA 98195 |