|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: [OpenCV] OpenCV Webcamera resolutionOn Sunday 27 April 2008 11:01, George Toderici wrote:
> It may be even nicer to be able to initlalize the capture with a > "suggested" resolution. For instance, even before starting the capture > process to specify that you'd prefer frames of size 320x240 instead of > 1280x1024. This would require a (small) change in the API and it would make > people a lot less confused about not having the proper capture resolution > and how to set it. I really like the idea. I would even go one step further and allow requesting a framerate as well. Some cameras only allow certain combinations of resolution and framerate (high resolutions at low framerates and vice versa). So some framerates+resolutions are tricky to reach when the parameters can only be set one at a time because the order of setting framerate and resolution is important. Most camera interfaces require requesting resolution and framerate anyway. So it makes sense to pass the option down to the user instead of choosing some arbitrary value which may or may not be supported by the hardware. The user may know something about that. If we use initialized parameters, the API change should be backward compatible for C++ at least. Plain C users will have to call cvCreateCameraCapture(0, 0, 0, 0) or something to get the same behaviour as before. If nobody complains I'll change cvCreateCameraCapture() to CVAPI(CvCapture*) cvCreateCameraCapture(int index, int width CV_DEFAULT(0), int height CV_DEFAULT(0), double framerate CV_DEFAULT(0)); I only have access to a firewire camera so I won't be able to change all our camera interfaces natively though. Although for interfaces that don't support the options directly we can simply call cvSetCaptureProperty() from cvCreateCameraCapture(). It's not the same as I mentioned above but it should work at least for some cameras and resolution/framerate combinations. cheers, nils ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Opencvlibrary-devel mailing list Opencvlibrary-devel@... https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel |
| Free Forum Powered by Nabble | Forum Help |