video format and inversion

Steve Sisak steve.sisak at ioxperts.com
Mon May 7 13:49:10 GMT 2007


At 1:02 PM -0400 5/7/07, Mike Travisano wrote:
>I'm trying to integrate this code into a cross-platform (Mac, Win) 
>implementation, which uses Trolltech's QT libraries (these have 
>support for RGB only).

Which RGB format(s)?

>The problems I am seeing are:
>
>1)       It appears as though I cannot get image data in the RGB 
>format from the input device. It looks like YUV is the only color 
>space available. I've used other stand-alone applications as well, 
>including some of the QuickTime examples, and I'm observing the same 
>issue.

I'm pretty sure 24-bit RGB is supported and we generate 32-bit from 
that in the driver (although the hardware only supports 15fps RGB at 
VGA)

>2)       The frames appear to be inverted. Rendering of the frames 
>is done through my use of TrollTech's QT, so the image is flipped 
>180 degrees.

Not sure I can help much there -- sounds like they use a non-standard 
coordinate system.

>I'm tempted to write a color space converter (YUV to RGB) and flip 
>the image at the same time, but I'm hoping that there is a quicker 
>solution. Are there functions on the Mac to do this? Is there a way 
>to get RGB data from video capture devices on the Mac?

(These are typed from memory, but s/b close)

Assuming you're talking to the Video Digitizer (which you can get 
from the video channel of the sequence grabber):

VDGetCompressTypes()  returns the lost of supported compression types
VDSetCompression() lets you set which of those (and the depth) to use
VDGetImageDescription() returns an image description for what you're getting

I don't know anything about Qt, but might be able to provide more 
info with more details.

Since you can't guarantee what pixel format you're going to get, you 
might want to feed the output of the VDig/SG to a 
DecompressionSession to an RGB GWorld which can also do flip/mirror 
in the process.

QuickTime and CoreVideo are the video architectures on the Mac and 
both provide very deep control over video and video formats.

HTH,

-Steve

-- 
_________________________________________________________________________
Steve Sisak, CTO                                 steve.sisak at ioxperts.com
IOXperts, Inc.                                     voice: +1 617 876-2572
87 Bristol St #3A                                    fax: +1 617 876-2337
Cambridge, MA 02139                               mobile: +1 617 388-6476


More information about the Video-Developers mailing list