Frame processor
Module Io
The Io.FrameProcessor allows reading and processing of frames from a camera or video file. The FrameProcessor is useful writing code that supports either kind of source, and when you want to manually request frames.
By default nothing is shown. But you can show the canvas FrameProcessor is using to capture frames, or a raw preview.
Once created, call getFrame
to get an ImageData frame. With this, you can manually scan through the pixels of the image.
Capturing from a camera
If you have several cameras, you might need to specify which one. At times you may also want to restrict the frame size, since processing smaller images is faster than large.
Camera constraints can also be specified when creating the FrameProcessor instance:
Capturing from a file
useVideo
takes a File instance.