Single frame grab from webcam

inversemedia's picture

Thanks all in advance, helping my son with a QC science fair project and we're newbies so appreciate any guidance...

We've built a rig to photograph peoples irises using a USB webcam, able to select it (video input patch) and getting a realtime stream to the billboard.

**Any hints at how to trigger (via spacebar) a single frame grab of that stream? **

Looking to grab a single frame (and then if it was a bad image or if they blinked,toggle the spacebar to get another single frame grab) and then use that as the basis for selecting a region of interest (the iris) and then doing some pixel by pixel analysis for color content.

BTW I found that the Logitech c920 webcam is HD res, and using Webcam settings app By Mactaris, lets you override the autofocus, control gain and many other settings. http://mactaris.blogspot.com/p/webcam-settings.html

Serious Cyrus's picture
Re: Single frame grab from webcam

The sample and hold patch will let you grab frames from a video input.

inversemedia's picture
Re: Single frame grab from webcam

Serious Cyrus, many many thanks for your suggestion to sample and hold.

Sorry but now am trying to move a billboard mask tied to the mouse location...

We have a quartz comp attached, with mask radius tied to the scroll button, via a macro that accepts radius. Do not know xcode to add new macro inputs that can accept x,y position of the mask.

I greatly appreciate any suggestions you or any one else on the forum may have.

thank you!

PreviewAttachmentSize
Hexacolor7filein.qtz1.23 MB

Serious Cyrus's picture
Re: Single frame grab from webcam

I take it you mean you want to add x/y inputs to the Render In Image patch? Very simple, you can rightclick on any input for a patch, and choose "Publish Inputs > ", then choose the input port, they will then become inputs for parent patches. The radius input you already have is just an input splitter with the input port published, using splitters like this can make your compositions easier to read, but not strictly required.

If you use input splitter patches, don't forget to change the type from "Virtual" whenever you know what type it will accept, and add appropriate ranges for values.