Quantcast

cvSetCaptureProperty() not working. pls help

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cvSetCaptureProperty() not working. pls help

stefan.maier86
Hi

I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my capture with cvCreateCaptureFromCam(0) which works fine, i dont have problems with grabbing frames and displaying pictures neither.

But when i try to change the resolution with

cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)

there is not happening anything. The capture resolution stays in 640x480.

Second problem: when i try to set the fps with

cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)

opencv displays an highgui:v4l error: option #5 not supported..

the webcam definitely works with a 1280x1024 resolution and 15 fps. I can use it with guvcview without any problems. Also varios other webcams have the same problem so i dont think the problem is the camera. I spent a lot of time on finding out what the problem but didnt find a solution. Hopefully you can help me!

Here some System Infos:
Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2

Thank you!
Stefan


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

lyuba
Stefan,

if I understood correctly, OpenCV under Linux doesn't support getting all
this essential properties like width, height and fps. I've read it somewhere
in documentation, but cannot find where right now.
They are so desirable for me as well.

Probably it's possible to let OpenCV creators know somehow that we all need
this? It's not possible to create a feature request without the
permissions:
https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor

--
Best regards,
Lyubov

On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <[hidden email]>wrote:

>
>
> Hi
>
> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my
> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
> problems with grabbing frames and displaying pictures neither.
>
> But when i try to change the resolution with
>
> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
>
> there is not happening anything. The capture resolution stays in 640x480.
>
> Second problem: when i try to set the fps with
>
> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
>
> opencv displays an highgui:v4l error: option #5 not supported..
>
> the webcam definitely works with a 1280x1024 resolution and 15 fps. I can
> use it with guvcview without any problems. Also varios other webcams have
> the same problem so i dont think the problem is the camera. I spent a lot of
> time on finding out what the problem but didnt find a solution. Hopefully
> you can help me!
>
> Here some System Infos:
> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
>
> Thank you!
> Stefan
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/OpenCV/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/OpenCV/join
    (Yahoo! ID required)

<*> To change settings via email:
    [hidden email]
    [hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

Victor Eruhimov
Stefan, Lyubov, I have created a ticket for this https://code.ros.org/trac/opencv/ticket/376. Best Regards, Victor

On Jun 10, 2010, at 3:35 PM, Lyubov Kolosovska wrote:

> Stefan,
>
> if I understood correctly, OpenCV under Linux doesn't support getting all
> this essential properties like width, height and fps. I've read it somewhere
> in documentation, but cannot find where right now.
> They are so desirable for me as well.
>
> Probably it's possible to let OpenCV creators know somehow that we all need
> this? It's not possible to create a feature request without the
> permissions:
> https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor
>
> --
> Best regards,
> Lyubov
>
> On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <[hidden email]>wrote:
>
>>
>>
>> Hi
>>
>> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my
>> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
>> problems with grabbing frames and displaying pictures neither.
>>
>> But when i try to change the resolution with
>>
>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
>>
>> there is not happening anything. The capture resolution stays in 640x480.
>>
>> Second problem: when i try to set the fps with
>>
>> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
>>
>> opencv displays an highgui:v4l error: option #5 not supported..
>>
>> the webcam definitely works with a 1280x1024 resolution and 15 fps. I can
>> use it with guvcview without any problems. Also varios other webcams have
>> the same problem so i dont think the problem is the camera. I spent a lot of
>> time on finding out what the problem but didnt find a solution. Hopefully
>> you can help me!
>>
>> Here some System Infos:
>> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
>>
>> Thank you!
>> Stefan
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>   Get Emails (get all posts)
>   Daily Digest (one summary email per day)
>   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
> Yahoo! Groups Links
>
>
>



[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

Shervin Emami
In reply to this post by lyuba
Hi Stefan & Lyubov,

I don't know about the Linux implementation, but on Windows XP, I
think it depends on whether the camera drivers support the correct way
of changing the settings. Because I remember that with OpenCV v1.1 for
some of my cheap USB webcams, cvGetCaptureProperty() and
cvSetCaptureProperty() wouldnt work, and for some of the cameras, my
whole computer would freeze if I called them! But with my current
cameras they work fine. So either the issues were fixed recently for
Windows, or my newer cameras happen to be supported better. All I know
is that camera capture in OpenCV and the CvCam library seem to be very
outdated & hacked together compared to the rest of OpenCV. I guess
thats why they removed CvCam recently?

Cheers,
Shervin Emami.



On Thu, Jun 10, 2010 at 7:35 PM, Lyubov Kolosovska <[hidden email]> wrote:

> Stefan,
>
> if I understood correctly, OpenCV under Linux doesn't support getting all
> this essential properties like width, height and fps. I've read it somewhere
> in documentation, but cannot find where right now.
> They are so desirable for me as well.
>
> Probably it's possible to let OpenCV creators know somehow that we all need
> this? It's not possible to create a feature request without the
> permissions:
> https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor
>
> --
> Best regards,
> Lyubov
>
> On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <[hidden email]>wrote:
>
>>
>>
>> Hi
>>
>> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my
>> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
>> problems with grabbing frames and displaying pictures neither.
>>
>> But when i try to change the resolution with
>>
>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
>>
>> there is not happening anything. The capture resolution stays in 640x480.
>>
>> Second problem: when i try to set the fps with
>>
>> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
>>
>> opencv displays an highgui:v4l error: option #5 not supported..
>>
>> the webcam definitely works with a 1280x1024 resolution and 15 fps. I can
>> use it with guvcview without any problems. Also varios other webcams have
>> the same problem so i dont think the problem is the camera. I spent a lot of
>> time on finding out what the problem but didnt find a solution. Hopefully
>> you can help me!
>>
>> Here some System Infos:
>> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
>>
>> Thank you!
>> Stefan
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>   Get Emails (get all posts)
>   Daily Digest (one summary email per day)
>   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
> Yahoo! Groups Links
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

lyuba
Thanks to everybody for the answers!

As for me, I can't even GET the resolution and fps under Ubuntu with
Logiteck C300.

Probably somebody could give a tip on how to get fps without OpenCV
direct method? Maybe something like measuring the output of grabber
for one second - how much frames does it produce (if yes, then how?).
Appreciate your
ideas!

--
Best regards,
Lyubov



On Thu, Jun 10, 2010 at 3:56 PM, Shervin Emami <[hidden email]> wrote:

> Hi Stefan & Lyubov,
>
> I don't know about the Linux implementation, but on Windows XP, I
> think it depends on whether the camera drivers support the correct way
> of changing the settings. Because I remember that with OpenCV v1.1 for
> some of my cheap USB webcams, cvGetCaptureProperty() and
> cvSetCaptureProperty() wouldnt work, and for some of the cameras, my
> whole computer would freeze if I called them! But with my current
> cameras they work fine. So either the issues were fixed recently for
> Windows, or my newer cameras happen to be supported better. All I know
> is that camera capture in OpenCV and the CvCam library seem to be very
> outdated & hacked together compared to the rest of OpenCV. I guess
> thats why they removed CvCam recently?
>
> Cheers,
> Shervin Emami.
>
>
>
> On Thu, Jun 10, 2010 at 7:35 PM, Lyubov Kolosovska <[hidden email]> wrote:
>> Stefan,
>>
>> if I understood correctly, OpenCV under Linux doesn't support getting all
>> this essential properties like width, height and fps. I've read it somewhere
>> in documentation, but cannot find where right now.
>> They are so desirable for me as well.
>>
>> Probably it's possible to let OpenCV creators know somehow that we all need
>> this? It's not possible to create a feature request without the
>> permissions:
>> https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor
>>
>> --
>> Best regards,
>> Lyubov
>>
>> On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <[hidden email]>wrote:
>>
>>>
>>>
>>> Hi
>>>
>>> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my
>>> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
>>> problems with grabbing frames and displaying pictures neither.
>>>
>>> But when i try to change the resolution with
>>>
>>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
>>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
>>>
>>> there is not happening anything. The capture resolution stays in 640x480.
>>>
>>> Second problem: when i try to set the fps with
>>>
>>> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
>>>
>>> opencv displays an highgui:v4l error: option #5 not supported..
>>>
>>> the webcam definitely works with a 1280x1024 resolution and 15 fps. I can
>>> use it with guvcview without any problems. Also varios other webcams have
>>> the same problem so i dont think the problem is the camera. I spent a lot of
>>> time on finding out what the problem but didnt find a solution. Hopefully
>>> you can help me!
>>>
>>> Here some System Infos:
>>> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
>>>
>>> Thank you!
>>> Stefan
>>>
>>>
>>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> ------------------------------------
>>
>> Change settings: http://www.yahoogroups.com/mygroups, select
>>   Get Emails (get all posts)
>>   Daily Digest (one summary email per day)
>>   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
>> Yahoo! Groups Links
>>
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

lyuba
Thank you for the tip, but it's for Windows. I am now fighting with Ubuntu
:)

--
Best regards,
Lyubov


On Thu, Jun 10, 2010 at 5:37 PM, bluekid ... <[hidden email]> wrote:

> Try videoInput library
> http://muonics.net/school/spring05/videoInput/
>
> 2010/6/10 Lyubov Kolosovska <[hidden email]>
>
>>
>>
>> Thanks to everybody for the answers!
>>
>> As for me, I can't even GET the resolution and fps under Ubuntu with
>> Logiteck C300.
>>
>> Probably somebody could give a tip on how to get fps without OpenCV
>> direct method? Maybe something like measuring the output of grabber
>> for one second - how much frames does it produce (if yes, then how?).
>> Appreciate your
>> ideas!
>>
>> --
>> Best regards,
>> Lyubov
>>
>> On Thu, Jun 10, 2010 at 3:56 PM, Shervin Emami <[hidden email]<shervin.emami%40gmail.com>>
>> wrote:
>> > Hi Stefan & Lyubov,
>> >
>> > I don't know about the Linux implementation, but on Windows XP, I
>> > think it depends on whether the camera drivers support the correct way
>> > of changing the settings. Because I remember that with OpenCV v1.1 for
>> > some of my cheap USB webcams, cvGetCaptureProperty() and
>> > cvSetCaptureProperty() wouldnt work, and for some of the cameras, my
>> > whole computer would freeze if I called them! But with my current
>> > cameras they work fine. So either the issues were fixed recently for
>> > Windows, or my newer cameras happen to be supported better. All I know
>> > is that camera capture in OpenCV and the CvCam library seem to be very
>> > outdated & hacked together compared to the rest of OpenCV. I guess
>> > thats why they removed CvCam recently?
>> >
>> > Cheers,
>> > Shervin Emami.
>> >
>> >
>> >
>> > On Thu, Jun 10, 2010 at 7:35 PM, Lyubov Kolosovska <
>> [hidden email] <kolosovska%40gmail.com>> wrote:
>> >> Stefan,
>> >>
>> >> if I understood correctly, OpenCV under Linux doesn't support getting
>> all
>> >> this essential properties like width, height and fps. I've read it
>> somewhere
>> >> in documentation, but cannot find where right now.
>> >> They are so desirable for me as well.
>> >>
>> >> Probably it's possible to let OpenCV creators know somehow that we all
>> need
>> >> this? It's not possible to create a feature request without the
>> >> permissions:
>> >>
>> https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor
>> >>
>> >> --
>> >> Best regards,
>> >> Lyubov
>> >>
>> >> On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <
>> [hidden email] <stefan.maier86%40yahoo.com>>wrote:
>> >>
>> >>>
>> >>>
>> >>> Hi
>> >>>
>> >>> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create
>> my
>> >>> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
>> >>> problems with grabbing frames and displaying pictures neither.
>> >>>
>> >>> But when i try to change the resolution with
>> >>>
>> >>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
>> >>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
>> >>>
>> >>> there is not happening anything. The capture resolution stays in
>> 640x480.
>> >>>
>> >>> Second problem: when i try to set the fps with
>> >>>
>> >>> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
>> >>>
>> >>> opencv displays an highgui:v4l error: option #5 not supported..
>> >>>
>> >>> the webcam definitely works with a 1280x1024 resolution and 15 fps. I
>> can
>> >>> use it with guvcview without any problems. Also varios other webcams
>> have
>> >>> the same problem so i dont think the problem is the camera. I spent a
>> lot of
>> >>> time on finding out what the problem but didnt find a solution.
>> Hopefully
>> >>> you can help me!
>> >>>
>> >>> Here some System Infos:
>> >>> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
>> >>>
>> >>> Thank you!
>> >>> Stefan
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >> [Non-text portions of this message have been removed]
>> >>
>> >>
>> >>
>> >> ------------------------------------
>> >>
>> >> Change settings: http://www.yahoogroups.com/mygroups, select
>> >>   Get Emails (get all posts)
>> >>   Daily Digest (one summary email per day)
>> >>   Read on the web (read posts on the web only)Or Unsubscribe by mailing
>> [hidden email] <OpenCV-unsubscribe%40yahoogroups.com>
>> >> Yahoo! Groups Links
>> >>
>> >>
>> >>
>> >>
>> >
>>  
>>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/OpenCV/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/OpenCV/join
    (Yahoo! ID required)

<*> To change settings via email:
    [hidden email]
    [hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

nganon
This post has NOT been accepted by the mailing list yet.
In reply to this post by lyuba


On Thu, Jun 10, 2010 at 4:53 PM, lyuba [via opencv-users] <[hidden email]> wrote:
Thanks to everybody for the answers!

As for me, I can't even GET the resolution and fps under Ubuntu with
Logiteck C300.

Probably somebody could give a tip on how to get fps without OpenCV
direct method? Maybe something like measuring the output of grabber
for one second - how much frames does it produce (if yes, then how?).
Appreciate your
ideas!


I think you need ffmpeg development package to be installed in order 
to get video working (better) with OpenCV. Ubuntu may have renamed it to 
ffmpeg-dev or ffmpeg-debug.. smth like that. They like renaming packages.

About cvSetCaptureProperty, try to create a new IplImage with the size you 
want, instead resizing the original frame/image. That may work as expected.

About getting frames info, you need the following hack from OpenCV book:

<code>
char tempSize[4];                                                                                                                                                               
ifstream  videoFile( fname , ios::in | ios::binary );                                                                                                                          
videoFile.seekg( 0x30 , ios::beg );                                                                                                                                            
videoFile.read( tempSize , 4 );                                                                                                                                                 
int frames = (unsigned char ) tempSize[0] + 0x100*(unsigned char ) tempSize[1] + \
0x10000*(unsigned char ) tempSize[2] +    0x1000000*(unsigned char ) tempSize[3];              
videoFile.close(  );                                                                                                                                                            
</code>

Hope this helps.
                                                                                                                                                                          
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

stefan.maier86
In reply to this post by lyuba
Thanks for the answers!

So there is no way to get the cvSetCaptureProperty() function working properly?
Is there any other way to adapt the webcam settings for the use with openCV? I really need a solution for this..

Regards
Stefan

--- In [hidden email], Lyubov Kolosovska <kolosovska@...> wrote:

>
> Thanks to everybody for the answers!
>
> As for me, I can't even GET the resolution and fps under Ubuntu with
> Logiteck C300.
>
> Probably somebody could give a tip on how to get fps without OpenCV
> direct method? Maybe something like measuring the output of grabber
> for one second - how much frames does it produce (if yes, then how?).
> Appreciate your
> ideas!
>
> --
> Best regards,
> Lyubov
>
>
>
> On Thu, Jun 10, 2010 at 3:56 PM, Shervin Emami <shervin.emami@...> wrote:
> > Hi Stefan & Lyubov,
> >
> > I don't know about the Linux implementation, but on Windows XP, I
> > think it depends on whether the camera drivers support the correct way
> > of changing the settings. Because I remember that with OpenCV v1.1 for
> > some of my cheap USB webcams, cvGetCaptureProperty() and
> > cvSetCaptureProperty() wouldnt work, and for some of the cameras, my
> > whole computer would freeze if I called them! But with my current
> > cameras they work fine. So either the issues were fixed recently for
> > Windows, or my newer cameras happen to be supported better. All I know
> > is that camera capture in OpenCV and the CvCam library seem to be very
> > outdated & hacked together compared to the rest of OpenCV. I guess
> > thats why they removed CvCam recently?
> >
> > Cheers,
> > Shervin Emami.
> >
> >
> >
> > On Thu, Jun 10, 2010 at 7:35 PM, Lyubov Kolosovska <kolosovska@...> wrote:
> >> Stefan,
> >>
> >> if I understood correctly, OpenCV under Linux doesn't support getting all
> >> this essential properties like width, height and fps. I've read it somewhere
> >> in documentation, but cannot find where right now.
> >> They are so desirable for me as well.
> >>
> >> Probably it's possible to let OpenCV creators know somehow that we all need
> >> this? It's not possible to create a feature request without the
> >> permissions:
> >> https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor
> >>
> >> --
> >> Best regards,
> >> Lyubov
> >>
> >> On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <stefan.maier86@...>wrote:
> >>
> >>>
> >>>
> >>> Hi
> >>>
> >>> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my
> >>> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
> >>> problems with grabbing frames and displaying pictures neither.
> >>>
> >>> But when i try to change the resolution with
> >>>
> >>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
> >>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
> >>>
> >>> there is not happening anything. The capture resolution stays in 640x480.
> >>>
> >>> Second problem: when i try to set the fps with
> >>>
> >>> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
> >>>
> >>> opencv displays an highgui:v4l error: option #5 not supported..
> >>>
> >>> the webcam definitely works with a 1280x1024 resolution and 15 fps. I can
> >>> use it with guvcview without any problems. Also varios other webcams have
> >>> the same problem so i dont think the problem is the camera. I spent a lot of
> >>> time on finding out what the problem but didnt find a solution. Hopefully
> >>> you can help me!
> >>>
> >>> Here some System Infos:
> >>> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
> >>>
> >>> Thank you!
> >>> Stefan
> >>>
> >>>
> >>>
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >> ------------------------------------
> >>
> >> Change settings: http://www.yahoogroups.com/mygroups, select
> >>   Get Emails (get all posts)
> >>   Daily Digest (one summary email per day)
> >>   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
> >> Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cvSetCaptureProperty() not working. pls help

Victor Eruhimov
In reply to this post by Victor Eruhimov
Stefan, Lyubov, below is the input on this problem from Vadim (Vadim, thanks a lot!), could you please check that you have installed a correct library? Thanks, Victor

#376: changing resolution of a video stream in linux
----------------------------------------------------+-----------------------
Reporter:  relrotciv                                |        Owner:  vp153    
   Type:  defect                                   |       Status:  closed    
Priority:  blocker                                  |    Component:  highgui  
Version:  2.0                                      |   Resolution:  worksforme
Keywords:  resolution, linux, fps, webcam, capture  |  
----------------------------------------------------+-----------------------
Changes (by vp153):

 * status:  new => closed
 * resolution:  => worksforme


Comment:

The solution is to use the newer libv4l-based wrapper.
1. install libv4l-dev (this is how it's called in Ubuntu)
2. rerun cmake, you will see "V4L/V4L2: Using libv4l"
3. rerun make. now the resolution can be changed. tested with built-in
isight on MBP.

On Jun 10, 2010, at 4:19 PM, Victor Eruhimov wrote:

> Stefan, Lyubov, I have created a ticket for this https://code.ros.org/trac/opencv/ticket/376. Best Regards, Victor
>
> On Jun 10, 2010, at 3:35 PM, Lyubov Kolosovska wrote:
>
>> Stefan,
>>
>> if I understood correctly, OpenCV under Linux doesn't support getting all
>> this essential properties like width, height and fps. I've read it somewhere
>> in documentation, but cannot find where right now.
>> They are so desirable for me as well.
>>
>> Probably it's possible to let OpenCV creators know somehow that we all need
>> this? It's not possible to create a feature request without the
>> permissions:
>> https://code.ros.org/trac/opencv/newticket?component=please%20specify&type=enhancement&priority=minor
>>
>> --
>> Best regards,
>> Lyubov
>>
>> On Wed, Jun 9, 2010 at 9:14 PM, stefan.maier86 <[hidden email]>wrote:
>>
>>>
>>>
>>> Hi
>>>
>>> I am trying to use OpenCV under Linux Ubuntu with a webcam. I create my
>>> capture with cvCreateCaptureFromCam(0) which works fine, i dont have
>>> problems with grabbing frames and displaying pictures neither.
>>>
>>> But when i try to change the resolution with
>>>
>>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH,1280)
>>> cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT,1024)
>>>
>>> there is not happening anything. The capture resolution stays in 640x480.
>>>
>>> Second problem: when i try to set the fps with
>>>
>>> cvSetCaptureProperty(capture,CV_CAP_PROP_FPS,15)
>>>
>>> opencv displays an highgui:v4l error: option #5 not supported..
>>>
>>> the webcam definitely works with a 1280x1024 resolution and 15 fps. I can
>>> use it with guvcview without any problems. Also varios other webcams have
>>> the same problem so i dont think the problem is the camera. I spent a lot of
>>> time on finding out what the problem but didnt find a solution. Hopefully
>>> you can help me!
>>>
>>> Here some System Infos:
>>> Ubuntu 10.04 / Eclipse SDK 3.5.2 / OpenCV paket 2.0.0-3ubuntu2
>>>
>>> Thank you!
>>> Stefan
>>>
>>>
>>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> ------------------------------------
>>
>> Change settings: http://www.yahoogroups.com/mygroups, select
>>   Get Emails (get all posts)
>>   Daily Digest (one summary email per day)
>>   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
>> Yahoo! Groups Links
>>
>>
>>
>



[Non-text portions of this message have been removed]

Loading...