os x video question

Hello,

I have a iSight and I wanted to know how I could save a frame of 640x480 pixels in an array for manipulation in a language like Perl.  What should I research to figure out how to do this?
meuedynAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alex CuryloCommented:
The most convenient is to use QuickTime's Sequence Grabber to connect to any video camera on your system and get a video feed which you can copy a frame from any time you feel like.

Canonical Apple source code samples  for Sequence Grabber usage here:

http://developer.apple.com/samplecode/QuickTime/idxMovieCreation-date.html
0
meuedynAuthor Commented:
Points increased!

Is there anyway to do this from the unix commandline?  Some command to query the video feed, pull whatever data (an array, I suppose) is sitting on the video bus at the time (the currently live image.. whatever the camera sees).  It should be a grid of numbers, 24 bit (for 24bit color), 640 wide by 480 high or something similar that you can set the size of.  

 Doesnt the CCD on the camera translate optical images into grids that can be interpreted as bitmaps and then pushed to a location for processing?  How can I access this data?
0
Alex CuryloCommented:
>Is there anyway to do this from the unix commandline?

Not unless you write a command line tool yourself.

> It should be a grid of numbers, 24 bit (for 24bit color), 640 wide by 480 high or something similar that you can set the size of.  

Er, no. Raw data that you request from a camera connected via FireWire (there is no such thing as a native "video feed") is probably in some YUV compressed format. It's certainly nothing even remotely resembling an uncompressed bitmap.

>  Doesnt the CCD on the camera translate optical images into grids that can be interpreted as bitmaps and then pushed to a location for processing?  How can I access this data?

That is the function of the SequenceGrabber, to request raw data from a camera and turn it into something that vaguely resembles a "video feed", the technical name of which is a 'SGChannel'. That can have a bitmap ('GWorld') associated with it, and you can be notified when new data arrives to be drawn into it. See the sample source code referred to earlier, particularly the "SGDataProcSample" sample, which is the closest thing to a raw video feed that you can access compatibly.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.