Hello!
On Linux using Gem 0.92 from SVN I am using [pix_video] with Logitech QuickCam 4000 and v4l driver but the red and blue colours are swapped.
Is there a way to instruct [pix_video] to use different colorspace (BGR instead of RGB)? If not what is the cheapest way to convert from one colorspace to the other. How can I get any additional information from pix_video (framerate, resolution ...)?
Thanks and take care, Miha
On Sat, 29 Aug 2009, Miha Tomi wrote:
Is there a way to instruct [pix_video] to use different colorspace (BGR instead of RGB)? If not what is the cheapest way to convert from one colorspace to the other. How can I get any additional information from pix_video (framerate, resolution ...)?
use [pix_colorMatrix] with
0 0 1 0 1 0 1 0 0
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Miha Tomšič wrote:
Hello!
On Linux using Gem 0.92 from SVN I am using [pix_video] with Logitech QuickCam 4000 and v4l driver but the red and blue colours are swapped.
Is there a way to instruct [pix_video] to use different colorspace (BGR instead of RGB)? If not what is the cheapest way to convert from one colorspace to the other.
a simple _hack_ is to use YUV-colorspace with [pix_video] and then (if you really need it) [pix_rgba] to convert to RGBA.
How can I get any additional information from pix_video (framerate, resolution ...)?
resolution: use [pix_info] to get the resolution of the current video-frame. framerate: Gem runs at a fixed framerate as given to [gemwin].
masdr IOhannes
On Mon, 7 Sep 2009, IOhannes m zmoelnig wrote:
Miha Tomi wrote:
On Linux using Gem 0.92 from SVN I am using [pix_video] with Logitech QuickCam 4000 and v4l driver but the red and blue colours are swapped. Is there a way to instruct [pix_video] to use different colorspace (BGR instead of RGB)? If not what is the cheapest way to convert from one colorspace to the other.
a simple _hack_ is to use YUV-colorspace with [pix_video] and then (if you really need it) [pix_rgba] to convert to RGBA.
Do you mean that the BGR thing is a bug in Gem or what? Because if it isn't, then YUV might as well be YVU, in which case you'd still use [pix_colormatrix], but possibly with different constants... what is [pix_colormatrix] supposed to do on a YUV image ? are its coefficients still RGB-wise in that case?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Mathieu Bouchard wrote:
On Mon, 7 Sep 2009, IOhannes m zmoelnig wrote:
Miha Tomi wrote:
On Linux using Gem 0.92 from SVN I am using [pix_video] with Logitech QuickCam 4000 and v4l driver but the red and blue colours are swapped. Is there a way to instruct [pix_video] to use different colorspace (BGR instead of RGB)? If not what is the cheapest way to convert from one colorspace to the other.
a simple _hack_ is to use YUV-colorspace with [pix_video] and then (if you really need it) [pix_rgba] to convert to RGBA.
Do you mean that the BGR thing is a bug in Gem or what? Because if it
yep, i suspect so (but then there are of course also broken drivers and/or APIs; i thought that all these issues are kindof "fixed" (by explicitely ignoring them) in v4l2...which leaves Gem as the culprit).
pix_film will capture and convert (most?) YUV-spaces correctly into it's own UYVY, but seems to have problems with converting them into RGBA. the fix is braindead, but i hadn't had to time to check why and when it is happening.
isn't, then YUV might as well be YVU, in which case you'd still use [pix_colormatrix], but possibly with different constants... what is [pix_colormatrix] supposed to do on a YUV image ? are its coefficients still RGB-wise in that case?
rtfs... [pix_colormatrix] currently only works on RGBA...
fgamsdr IOhannes