[Pythonmac-SIG] Re: Quicktime and SequenceGrabber
Marcus Mendenhall
marcus.h.mendenhall at vanderbilt.edu
Thu Aug 19 23:59:21 CEST 2004
> From: Jerome <jeremy.knope at gmail.com>
> Date: August 19, 2004 2:24:56 PM CDT
> To: Python <pythonmac-sig at python.org>
> Subject: Re: Re: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber,
> anybody use it?
> Reply-To: Jerome <jeremy.knope at gmail.com>
>
>
> So i tried opening the component now since being told that you do
> \x00\x00\x00\x00 for a 4 byte OSType string that's just 0
>
> so that returned a component instance, yay!
>
> but sadness again:
>
> In [11]: Qt.SGInitialize(seqGrab)
> -----------------------------------------------------------------------
> ----
> TypeError Traceback (most recent call
> last)
>
> /Users/jerome/Desktop/<console>
>
> TypeError: Component required
>
> but it is a component, ComponentInstance type at least...
>
A few months ago, I tackled the problem of using SWIG to wrap almost
the entire Quicktime library, including SequenceGrabber stuff, for use
in python. It works well enough (actually, extremely well), that I
can use a python program to put up a window, plug in a firewire camera,
and digitize video to a window, with the ability to pass buffers into a
queue in python for realtime analysis. I also wrapped some bits of the
accelerated video framework so that (under 10.3 and beyond, where this
framework exists), a lot of the hard work of converting video formats
to floating point arrays is done using the Altivec processor, making
the whole thing pretty efficient. I can handle 30 frames/second of
320x240 video in real time, using Numpy math, doing (for example) a
square root of a significant chunk of the image (Ok, that's somewhat
stupid, but that part was just a demo).
If anyone is interested in getting this, contact me at
marcus.h.mendenhall at vanderbilt.edu
and I will be happy to send the code along. It is includes a setup.py
distutils wrapper, so it is capable of compiling and installing itself
pretty much unattended. You need swig from fink, of course. It is, as
one might expect, shockingly poorly documented except for sample code.
I did, however, try to make the sample code fairly self-explanatory, so
I don't think it will be too hard to make it work.
Marcus Mendenhall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2468 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040819/7178f108/attachment.bin
More information about the Pythonmac-SIG
mailing list