hi all
<skip_if_no_interest_in_backgroundstory> i have a philips webcam, the spc 900nc, which i would like to use with gem. since there is the new pwc driver[1], the cam can be accessed over v4l and thus with gem. the problem is that certain, for me very important, settings are pwc specific, which means the only way to set them is using setpwc, which also seems to work fine at first glance. but there is a silly little problem with some settings, e.g automatic gain control: i can set the gain manually with setpwc, but when i launch another program afterwards, that accesses the cam (e.g. Gem), the cam/driver forgot about these settings and gain is set to 'auto' again. there are two ways to overcome this problem.
1) the probably more obvious solution would be to implement all pwc specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
2) the other approach would require only very tiny changes to pix_videoNEW.cpp . philips cams are usually shipped with some kind of non-volatile ram, where settings can be stored and restored. now we come to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram. when running gem afterwards, all settings would be restored and finally i would be able to have a constant gain, which is fundamental for some tasks (e.g working with [pix_background])
[1] http://saillard.org/linux/pwc/ </skip_if_no_interest_in_backgroundstory>
-------------------------------------------------
i want to ask you guys, if you could help me add the necessary changes to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task (i might be wrong), but i am unfortunately not a c nor cpp coder. basically it would be transfering the function, that does create the 'restore' signal, from setpwc.c to pix_videoNEW.cpp . please do understand me right, this isn't a request about including the chances to Gem-cvs, but just for me, since i cannot really use the cam with gem yet.
you'll find setpwc.c here: http://romanhaefeli.net/setpwc.c
and you probably need to include this in pix_videoNEW.cpp : http://romanhaefeli.net/pwc-ioctl.h
have a look at line 323 of setpwc.c, there you can see, what setpwc does to let the cam restore the settings from ram. if this little thingie could be transferred to gem, it would solve all my ubs-cam problems.
i really appreciate your help here
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
hi all
nobody responed to that post. i am very sorry, if it was too nasty to ask so directly.
however, i would like to know, how difficult it would be and probably how much time it would require. knowing that, i could probably hire someone to code it for me. it is a really essential thing for my work.
roman
On Mon, 2007-09-17 at 05:07 +0200, Roman Haefeli wrote:
hi all
<skip_if_no_interest_in_backgroundstory> i have a philips webcam, the spc 900nc, which i would like to use with gem. since there is the new pwc driver[1], the cam can be accessed over v4l and thus with gem. the problem is that certain, for me very important, settings are pwc specific, which means the only way to set them is using setpwc, which also seems to work fine at first glance. but there is a silly little problem with some settings, e.g automatic gain control: i can set the gain manually with setpwc, but when i launch another program afterwards, that accesses the cam (e.g. Gem), the cam/driver forgot about these settings and gain is set to 'auto' again. there are two ways to overcome this problem.
- the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
- the other approach would require only very tiny changes to
pix_videoNEW.cpp . philips cams are usually shipped with some kind of non-volatile ram, where settings can be stored and restored. now we come to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram. when running gem afterwards, all settings would be restored and finally i would be able to have a constant gain, which is fundamental for some tasks (e.g working with [pix_background])
[1] http://saillard.org/linux/pwc/
</skip_if_no_interest_in_backgroundstory>
i want to ask you guys, if you could help me add the necessary changes to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task (i might be wrong), but i am unfortunately not a c nor cpp coder. basically it would be transfering the function, that does create the 'restore' signal, from setpwc.c to pix_videoNEW.cpp . please do understand me right, this isn't a request about including the chances to Gem-cvs, but just for me, since i cannot really use the cam with gem yet.
you'll find setpwc.c here: http://romanhaefeli.net/setpwc.c
and you probably need to include this in pix_videoNEW.cpp : http://romanhaefeli.net/pwc-ioctl.h
have a look at line 323 of setpwc.c, there you can see, what setpwc does to let the cam restore the settings from ram. if this little thingie could be transferred to gem, it would solve all my ubs-cam problems.
i really appreciate your help here
roman
___________________________________________________________ Der frhe Vogel fngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
hello
are you still using liux? could you tell me if this webcam work great? did you have to to install a driver or is it plug and play? what about latency? is there anything i have to know befor buying one?
thanks Cyrille
Roman Haefeli a écrit :
hi all
nobody responed to that post. i am very sorry, if it was too nasty to ask so directly.
however, i would like to know, how difficult it would be and probably how much time it would require. knowing that, i could probably hire someone to code it for me. it is a really essential thing for my work.
roman
On Mon, 2007-09-17 at 05:07 +0200, Roman Haefeli wrote:
hi all
<skip_if_no_interest_in_backgroundstory> i have a philips webcam, the spc 900nc, which i would like to use with gem. since there is the new pwc driver[1], the cam can be accessed over v4l and thus with gem. the problem is that certain, for me very important, settings are pwc specific, which means the only way to set them is using setpwc, which also seems to work fine at first glance. but there is a silly little problem with some settings, e.g automatic gain control: i can set the gain manually with setpwc, but when i launch another program afterwards, that accesses the cam (e.g. Gem), the cam/driver forgot about these settings and gain is set to 'auto' again. there are two ways to overcome this problem.
- the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
- the other approach would require only very tiny changes to
pix_videoNEW.cpp . philips cams are usually shipped with some kind of non-volatile ram, where settings can be stored and restored. now we come to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram. when running gem afterwards, all settings would be restored and finally i would be able to have a constant gain, which is fundamental for some tasks (e.g working with [pix_background])
[1] http://saillard.org/linux/pwc/
</skip_if_no_interest_in_backgroundstory>
i want to ask you guys, if you could help me add the necessary changes to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task (i might be wrong), but i am unfortunately not a c nor cpp coder. basically it would be transfering the function, that does create the 'restore' signal, from setpwc.c to pix_videoNEW.cpp . please do understand me right, this isn't a request about including the chances to Gem-cvs, but just for me, since i cannot really use the cam with gem yet.
you'll find setpwc.c here: http://romanhaefeli.net/setpwc.c
and you probably need to include this in pix_videoNEW.cpp : http://romanhaefeli.net/pwc-ioctl.h
have a look at line 323 of setpwc.c, there you can see, what setpwc does to let the cam restore the settings from ram. if this little thingie could be transferred to gem, it would solve all my ubs-cam problems.
i really appreciate your help here
roman
___________________________________________________________ Der frhe Vogel fngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
On Wed, 2007-09-19 at 19:48 +0200, cyrille henry wrote:
are you still using liux? could you tell me if this webcam work great? did you have to to install a driver or is it plug and play? what about latency? is there anything i have to know befor buying one?
hi again
first, i need to declare that i am not an expert at all. though, i think, this cam is probably the best ubs-cam i found yet. the image quality is quite good, though when making a snapshot, you will see the compression artefacts. what is kind of special about this model, is that it gives you bright pictures even when it's quite dark. qualitywise it certainly has an improved image compared to a bunch of cheaper cams i saw. the reasons i bought this cam, is the fact, that it seems to be widely used in amateur astronomics and that i was sure, that it will be supported by a linux driver.
to the specs (which are completely different from the manufacturers ones):
max. res. = 640x480 max. fps = 30 (not 90 as suggested by manufacturer) 15 @ 640x480 30 @ 320x240 30 @ 160x120 uses ubs 1.1 (fullspeed), not usb 2.0 (highspeed) as suggested by manufacturer (though it works of course on a 2.0 plug)
issues, i have/had with this cam:
- wrong colorspace in gridflow (yuv was displayed as rgb), but solved
- swapped colors in gem (r<->b), solved
- agc cannot be set to 'manual' with other programs than setpwc, means all other programs use 'automatic'. (please see previous mail for details), partially known solution, but not yet implemented.
hope, that helps you out. drop a line, if you wanna see example images/movies.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
On Wed, 2007-09-19 at 21:06 +0200, Roman Haefeli wrote:
On Wed, 2007-09-19 at 19:48 +0200, cyrille henry wrote:
are you still using liux? could you tell me if this webcam work great? did you have to to install a driver or is it plug and play? what about latency? is there anything i have to know befor buying one?
hi again
first, i need to declare that i am not an expert at all. though, i think, this cam is probably the best ubs-cam i found yet. the image quality is quite good, though when making a snapshot, you will see the compression artefacts. what is kind of special about this model, is that it gives you bright pictures even when it's quite dark. qualitywise it certainly has an improved image compared to a bunch of cheaper cams i saw. the reasons i bought this cam, is the fact, that it seems to be widely used in amateur astronomics and that i was sure, that it will be supported by a linux driver.
to the specs (which are completely different from the manufacturers ones):
max. res. = 640x480 max. fps = 30 (not 90 as suggested by manufacturer) 15 @ 640x480 30 @ 320x240 30 @ 160x120 uses ubs 1.1 (fullspeed), not usb 2.0 (highspeed) as suggested by manufacturer (though it works of course on a 2.0 plug)
i forgot to mention the latency. afaict, it depends on which program you are using. gem seems to be much faster here than mplayer, for example. it also depends on the framerate you are using. i hardly notice any latency, when using gem @ 30fps. at 15 fps, latency is quite noticable (~100ms?), which seems obvious.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
On Wed, 19 Sep 2007, Roman Haefeli wrote:
- wrong colorspace in gridflow (yuv was displayed as rgb), but solved
GridFlow 0.8 let you figure out the colorspace conversions to be done, and doesn't prevent yuv from being interpreted as rgb and vice-versa. GridFlow 0.9 has colorspace conversion the way it should have had from the start, so you select your colorspace independently of the colorspaces of the camera itself.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
hello,
here is a very quick try to make a pd object to control the pwc. i don't have one, so i can't test. but the code is quite simple, i hope it can work.
tell me, cyrille
Roman Haefeli a écrit :
hi all
nobody responed to that post. i am very sorry, if it was too nasty to ask so directly.
however, i would like to know, how difficult it would be and probably how much time it would require. knowing that, i could probably hire someone to code it for me. it is a really essential thing for my work.
roman
On Mon, 2007-09-17 at 05:07 +0200, Roman Haefeli wrote:
hi all
<skip_if_no_interest_in_backgroundstory> i have a philips webcam, the spc 900nc, which i would like to use with gem. since there is the new pwc driver[1], the cam can be accessed over v4l and thus with gem. the problem is that certain, for me very important, settings are pwc specific, which means the only way to set them is using setpwc, which also seems to work fine at first glance. but there is a silly little problem with some settings, e.g automatic gain control: i can set the gain manually with setpwc, but when i launch another program afterwards, that accesses the cam (e.g. Gem), the cam/driver forgot about these settings and gain is set to 'auto' again. there are two ways to overcome this problem.
- the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
- the other approach would require only very tiny changes to
pix_videoNEW.cpp . philips cams are usually shipped with some kind of non-volatile ram, where settings can be stored and restored. now we come to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram. when running gem afterwards, all settings would be restored and finally i would be able to have a constant gain, which is fundamental for some tasks (e.g working with [pix_background])
[1] http://saillard.org/linux/pwc/
</skip_if_no_interest_in_backgroundstory>
i want to ask you guys, if you could help me add the necessary changes to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task (i might be wrong), but i am unfortunately not a c nor cpp coder. basically it would be transfering the function, that does create the 'restore' signal, from setpwc.c to pix_videoNEW.cpp . please do understand me right, this isn't a request about including the chances to Gem-cvs, but just for me, since i cannot really use the cam with gem yet.
you'll find setpwc.c here: http://romanhaefeli.net/setpwc.c
and you probably need to include this in pix_videoNEW.cpp : http://romanhaefeli.net/pwc-ioctl.h
have a look at line 323 of setpwc.c, there you can see, what setpwc does to let the cam restore the settings from ram. if this little thingie could be transferred to gem, it would solve all my ubs-cam problems.
i really appreciate your help here
roman
___________________________________________________________ Der frhe Vogel fngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
On Thu, 2007-09-20 at 00:18 +0200, cyrille henry wrote:
hello,
here is a very quick try to make a pd object to control the pwc. i don't have one, so i can't test. but the code is quite simple, i hope it can work.
is your mail supposed to have an attachment?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
yep, sorry, here it is.
cyrille
Roman Haefeli a écrit :
On Thu, 2007-09-20 at 00:18 +0200, cyrille henry wrote:
hello,
here is a very quick try to make a pd object to control the pwc. i don't have one, so i can't test. but the code is quite simple, i hope it can work.
is your mail supposed to have an attachment?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
hi cyrille
thanks a lot for your effort. the object does instantiate without any troubles. first, when i banged it, i got:
VIDIOCPWCRUSER: Invalid argument
then i realized, that the video device must be hardcoded somewhere and is probably hardcoded to /dev/video0. actually my cam is running on /dev/video1. so i changed it in the code and compiled the object myself. when banging, i get now:
VIDIOCPWCRUSER: Bad file descriptor
unfortunately, i don't have a clue at all, what this means.
the idea of having such an object is a genius idea, since it makes the cam usuable for all video externals at the same time without having to change the code of the externals. actually, i didn't know, that it could be done outside of gem, but it seems like that it could.
yo, cyrille... i'd understand, if you wouldn't want to investigate this any further, but i would be very glad and would appreciate a lot, if you are still interested.
roman
On Thu, 2007-09-20 at 00:39 +0200, cyrille henry wrote:
yep, sorry, here it is.
cyrille
Roman Haefeli a écrit :
On Thu, 2007-09-20 at 00:18 +0200, cyrille henry wrote:
hello,
here is a very quick try to make a pd object to control the pwc. i don't have one, so i can't test. but the code is quite simple, i hope it can work.
is your mail supposed to have an attachment?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
hello,
Roman Haefeli a écrit :
hi cyrille
thanks a lot for your effort. the object does instantiate without any troubles. first, when i banged it, i got:
VIDIOCPWCRUSER: Invalid argument
then i realized, that the video device must be hardcoded somewhere and is probably hardcoded to /dev/video0. actually my cam is running on /dev/video1. so i changed it in the code and compiled the object myself.
this could easilly be fixed if a clean object was needed.
when banging, i get now:
VIDIOCPWCRUSER: Bad file descriptor
unfortunately, i don't have a clue at all, what this means.
me neither.
did you try it before and after creation ot the pix_video object? did you try with gem rendering on and off?
the idea of having such an object is a genius idea, since it makes the cam usuable for all video externals at the same time without having to change the code of the externals. actually, i didn't know, that it could be done outside of gem, but it seems like that it could.
in fact, i realize that this object would do exactly the same than starting setpwc on a terminal afer pd is starded. did you try using setpwc afer starting pd?
yo, cyrille... i'd understand, if you wouldn't want to investigate this any further, but i would be very glad and would appreciate a lot, if you are still interested.
well, i don't have anymore idea, and i can't test anything. so, i give up, but i'm sur a developer could do it for you quite easilly.
cyrille
roman
On Thu, 2007-09-20 at 00:39 +0200, cyrille henry wrote:
yep, sorry, here it is.
cyrille
Roman Haefeli a écrit :
On Thu, 2007-09-20 at 00:18 +0200, cyrille henry wrote:
hello,
here is a very quick try to make a pd object to control the pwc. i don't have one, so i can't test. but the code is quite simple, i hope it can work.
is your mail supposed to have an attachment?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
On Thu, 2007-09-20 at 01:36 +0200, cyrille henry wrote:
hello,
Roman Haefeli a écrit :
hi cyrille
thanks a lot for your effort. the object does instantiate without any troubles. first, when i banged it, i got:
VIDIOCPWCRUSER: Invalid argument
then i realized, that the video device must be hardcoded somewhere and is probably hardcoded to /dev/video0. actually my cam is running on /dev/video1. so i changed it in the code and compiled the object myself.
this could easilly be fixed if a clean object was needed.
when banging, i get now:
VIDIOCPWCRUSER: Bad file descriptor
unfortunately, i don't have a clue at all, what this means.
me neither.
did you try it before and after creation ot the pix_video object? did you try with gem rendering on and off?
ok, i think i sorted it out. when writing the last mail, i only tried sending the bang, _after_ rendering was started. it seems like i got the error, because the cam was already 'occupied' by gem.
now i tried to do it _before_ i start rendering. this seems to work, since i get no error and the led of the cam is lighting up. BUT: the cam seems to stay occupied by [setpwc] until i close pd, which means i cannot access it with [pix_video] anymore, after i banged [setpwc].
i think, it canNOT be solved by adding a 'close' method to [setpwc], because then i'd have the problem again, that the cam is 'forgetting' it's settings again.
the idea of having such an object is a genius idea, since it makes the cam usuable for all video externals at the same time without having to change the code of the externals. actually, i didn't know, that it could be done outside of gem, but it seems like that it could.
no, it seems like the 'VIDIOCPWCRUSER' needs to be included in gem/pix_video/<or whatever code manages the access to the video devices> the command should be executed, whenever rendering starts in gem (which is the same as 'whenever the video device is opened').
your [setpwc] and [pix_film] seem to look like two different applications from the pwc-drivers perspective.
in fact, i realize that this object would do exactly the same than starting setpwc on a terminal afer pd is starded. did you try using setpwc afer starting pd?
it obviously does the exact same thing, whith the drawbacks. the problem here is the same: the programm setpwc cannot access the devices, when pd/gem is using it. same problem as with [setpwc].
would it be difficult to port the exact same thing, as you did in [setpwc], to gem/pix_videoNEW.cpp, so that it would not use a bang to trigger 'VIDIOCPWCRUSER', but the start_rendering command?
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Roman Haefeli a écrit :
hi all
<skip_if_no_interest_in_backgroundstory> i have a philips webcam, the spc 900nc, which i would like to use with gem. since there is the new pwc driver[1], the cam can be accessed over v4l and thus with gem. the problem is that certain, for me very important, settings are pwc specific, which means the only way to set them is using setpwc, which also seems to work fine at first glance. but there is a silly little problem with some settings, e.g automatic gain control: i can set the gain manually with setpwc, but when i launch another program afterwards, that accesses the cam (e.g. Gem), the cam/driver forgot about these settings and gain is set to 'auto' again. there are two ways to overcome this problem.
- the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
- the other approach would require only very tiny changes to
pix_videoNEW.cpp . philips cams are usually shipped with some kind of non-volatile ram, where settings can be stored and restored. now we come to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram. when running gem afterwards, all settings would be restored and finally i would be able to have a constant gain, which is fundamental for some tasks (e.g working with [pix_background])
[1] http://saillard.org/linux/pwc/
</skip_if_no_interest_in_backgroundstory>
i want to ask you guys, if you could help me add the necessary changes to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task (i might be wrong), but i am unfortunately not a c nor cpp coder. basically it would be transfering the function, that does create the 'restore' signal, from setpwc.c to pix_videoNEW.cpp . please do understand me right, this isn't a request about including the chances to Gem-cvs, but just for me, since i cannot really use the cam with gem yet.
why don't you start setpwc before pd to restor data?
cyrille
you'll find setpwc.c here: http://romanhaefeli.net/setpwc.c
and you probably need to include this in pix_videoNEW.cpp : http://romanhaefeli.net/pwc-ioctl.h
have a look at line 323 of setpwc.c, there you can see, what setpwc does to let the cam restore the settings from ram. if this little thingie could be transferred to gem, it would solve all my ubs-cam problems.
i really appreciate your help here
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev
On Wed, 2007-09-19 at 19:57 +0200, cyrille henry wrote:
Roman Haefeli a écrit :
hi all
<skip_if_no_interest_in_backgroundstory> i have a philips webcam, the spc 900nc, which i would like to use with gem. since there is the new pwc driver[1], the cam can be accessed over v4l and thus with gem. the problem is that certain, for me very important, settings are pwc specific, which means the only way to set them is using setpwc, which also seems to work fine at first glance. but there is a silly little problem with some settings, e.g automatic gain control: i can set the gain manually with setpwc, but when i launch another program afterwards, that accesses the cam (e.g. Gem), the cam/driver forgot about these settings and gain is set to 'auto' again. there are two ways to overcome this problem.
- the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
- the other approach would require only very tiny changes to
pix_videoNEW.cpp . philips cams are usually shipped with some kind of non-volatile ram, where settings can be stored and restored. now we come to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram. when running gem afterwards, all settings would be restored and finally i would be able to have a constant gain, which is fundamental for some tasks (e.g working with [pix_background])
[1] http://saillard.org/linux/pwc/
</skip_if_no_interest_in_backgroundstory>
i want to ask you guys, if you could help me add the necessary changes to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task (i might be wrong), but i am unfortunately not a c nor cpp coder. basically it would be transfering the function, that does create the 'restore' signal, from setpwc.c to pix_videoNEW.cpp . please do understand me right, this isn't a request about including the chances to Gem-cvs, but just for me, since i cannot really use the cam with gem yet.
why don't you start setpwc before pd to restor data?
hi cyrille
that is actually the important point. yeah, i usually run setpwc first in order to do all desired settings. however, this works only for some settings, e.g. framerate or whitebalance. it does _not_ work for automatic gain control. people from pwc mailinglist told me, that this is, because the setting for automatic gain control gets reset each time when accessing the cam. this means, the setting i used with setpwc doesn't have any effect anymore, when starting gem, which is _really_ odd. i cannot tell if this is behaviour is due to a problem of the cam or the driver. one solution came up to my mind. i could use setpwc to store the desired settings on the cam's nvram. of course, these settings can only be used, when the programm, that accesses the cam (e.g gem) does send the command to the driver to restore the settings. this is why i would like to port the according part of setpwc to gem, so that gem _always_ uses the settings, that are in the nvram. i hope i could make my problem clear, and also it's solution.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Roman Haefeli wrote:
hi all
i really appreciate your help here
in order to motivate you a bit more on patching your Gem sources (for the pix_texture thing...), here is another one, which hopefully might do what you want with the pwc. just apply the patch, and copy the pwc-ioctl.h into Pixes (if it is not already in some standard path), compile and see whether it works...
(i haven't tried as i don't have a pwc here (i think))
mfga.dr IOhannes
On Fri, 2007-09-21 at 10:17 +0200, IOhannes m zmoelnig wrote:
Roman Haefeli wrote:
hi all
i really appreciate your help here
in order to motivate you a bit more on patching your Gem sources (for the pix_texture thing...), here is another one, which hopefully might do what you want with the pwc. just apply the patch, and copy the pwc-ioctl.h into Pixes (if it is not already in some standard path), compile and see whether it works...
(i haven't tried as i don't have a pwc here (i think))
mfga.dr IOhannes
hey, cool. though, i think you forgot the attachment again.
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
On Fri, 2007-09-21 at 10:17 +0200, IOhannes m zmoelnig wrote:
Roman Haefeli wrote:
hi all
i really appreciate your help here
in order to motivate you a bit more on patching your Gem sources (for the pix_texture thing...), here is another one, which hopefully might do what you want with the pwc. just apply the patch, and copy the pwc-ioctl.h into Pixes (if it is not already in some standard path), compile and see whether it works...
(i haven't tried as i don't have a pwc here (i think))
hey, thanks a lot for your efforts. it seems, that this patch seems to restore the settings.
unfortunately it introduced a new problem. every two seconds i get a black frame. right now, i don't have an idea, what could be the cause of that. though, it's not quite sure, if it's gems problem at all. since gem is the only application i have, that can restore the settings and display the image at the same time, i cannot test with another program, how the stored settings would look like there. yo, i think i do some tests with all possible settings. but just to make sure: gem doesn't do anything with a period of 2 sec, does it?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
On Fri, 2007-09-21 at 11:21 +0200, Roman Haefeli wrote:
On Fri, 2007-09-21 at 10:17 +0200, IOhannes m zmoelnig wrote:
Roman Haefeli wrote:
hi all
i really appreciate your help here
in order to motivate you a bit more on patching your Gem sources (for the pix_texture thing...), here is another one, which hopefully might do what you want with the pwc. just apply the patch, and copy the pwc-ioctl.h into Pixes (if it is not already in some standard path), compile and see whether it works...
(i haven't tried as i don't have a pwc here (i think))
hey, thanks a lot for your efforts. it seems, that this patch seems to restore the settings.
unfortunately it introduced a new problem. every two seconds i get a black frame. right now, i don't have an idea, what could be the cause of that. though, it's not quite sure, if it's gems problem at all. since gem is the only application i have, that can restore the settings and display the image at the same time, i cannot test with another program, how the stored settings would look like there. yo, i think i do some tests with all possible settings. but just to make sure: gem doesn't do anything with a period of 2 sec, does it?
good knews. i solved the problem in a more general way. matju found the line in the pwc driver code, that does initialize the agc settings (whenever the cam is accessed, it sets it to 'auto').
removing this line in the driver prevents it from resetting the agc value everytime. that means, now when i use setpwc, the values are still used, when accessing the cam with [pix_video] -> i can manually set the gain control.
though i don't need the patch for videoV4L.cpp anymore, thank you a lot for your help and your patience.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
On Mon, 17 Sep 2007, Roman Haefeli wrote:
- the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be set from within gem. besides that it seems very awkward to implement driver specific options in [pix_new], it is probably also a lot of work.
In GridFlow, you can access about half of the pwc-specific features, and you can see them in the [#camera] control panel. The values of the control panel can be recovered through the right inlet if you send a "get" message, e.g. a "contrast $1" message is emitted, where $1 is a number in the range 0..65535.
On some camera drivers, using pwc options crashes the driver in some way. So you have to check in some way (how?) that you have a pwc camera, or have this as an option to the user.
to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram.
It's much easier to interactively test the camera and modify options at runtime than to try to use setpwc, which is why solution 1 is much better.
E.g. I've made a patch that gives feedback on the colour balance, which is better than automatic colour balance, because you can do things like specify a region of the image that you want to balance, ignoring the rest of the picture (e.g. balance colour only according to the brightest or the most vivid colours). I could have made that patch run fully automatically. That's the kind of thing that setpwc can't do for you.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Fri, 2007-09-21 at 14:06 -0400, Mathieu Bouchard wrote:
to the interesting point: if [pix_video] would send a 'restore' signal to the pwc driver, whenever rendering is turned on (is the same as 'whenever [pix_video] accesses the cam, right?). this would mean, that i could set all required settings beforehand using 'setpwc' with the option to save all settings into non-volatile ram.
It's much easier to interactively test the camera and modify options at runtime than to try to use setpwc, which is why solution 1 is much better.
i totally agree with you, but you cannot expect, that every program you will ever use with your pwc driven cam will support the pwc specific features (i know only gridflow, that does that). that is why i was looking for either a driver based solution or a solution that could be implemented very easily, so that i could probably patch programs other than gem.
E.g. I've made a patch that gives feedback on the colour balance, which is better than automatic colour balance, because you can do things like specify a region of the image that you want to balance, ignoring the rest of the picture (e.g. balance colour only according to the brightest or the most vivid colours). I could have made that patch run fully automatically. That's the kind of thing that setpwc can't do for you.
oh, yes.. indeed, it's very interesting to be able to use the cam in that way.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de