[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

os x video question

Posted on 2004-11-15
5
Medium Priority
?
250 Views
Last Modified: 2013-12-26
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?
0
Comment
Question by:meuedyn
  • 2
3 Comments
 
LVL 4

Expert Comment

by:Alex Curylo
ID: 12595546
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
 

Author Comment

by:meuedyn
ID: 12596015
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
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 2000 total points
ID: 12596185
>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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question