Online documentation for VideoProcessor
Generated 2006-03-17
Configurable video processor (part of Media/Video/Analysis framework).
Description
Audio processing component which can receive audio frames (via sink), apply various
processing steps to the frame, and then output it to another audio component (via source).
Installation
See AudioCaptureManager component for video capture requirements.
Configuration
Configured by setting configuration property.
Allows value of the form "PROCESSOR1(ARG1,ARG2,...),PROCESSOR2(ARG1,...),...".
Available processors are:
- RegionProcessor, emits frames limited to a sub-region of the input. Configuration syntax "Region(topleftfaction,toprightfraction,widthfraction,heightfraction}", e.g. "Region(0.1,0.1,0.2,0.2)".
- SubsampleProcessor, emits frames subsampled in x and y (i.e. 1 in n pixels in each direction). Configuration syntax "Subsample(xstep,ystep)", e.g. "Subsample(2,2)".
- DropProcessor, emits 1 frame and then drop N frames, repeatedly. Configuration syntax "Drop(dropNum)", e.g. "Drop(5)".
- FormatProcessor, emits frames in the requested format, "RGB" (packed 8bpp), "YUV" (3 floats), "float" (1 float) or "boolean" (1 boolean) per pixel. Syntax "Format(RGB|YUV|float|boolean)", e.g. "Format(YUV)".
- ChangeProcessor, emits frames in "float" format (1 float per pixel), where the value is the square of the difference between the current and the last frame, with the (up to 3) per-pixel components scaled as specified. If the input format has less than 3 components then the other scale factors are ignored. Configuration syntax "Change(yscale,uscale,vscale)", e.g. "Change(1.0,1.0,1.0)".
- DifferenceProcessor, emits frames in "float" format (1 float per pixel), where the value is the square of the difference between the current and the reference frame, with the (up to 3) per-pixel components scaled as specified. If the input format has less than 3 components then the other scale factors are ignored. Configuration syntax "Difference(yscale,uscale,vscale)", e.g. "Difference(1.0,1.0,1.0)".
- ColourDistanceProcessor, emits frames in "float" format (1 float per pixel), where the value is the square of the difference between the current frame and a supplied reference colour, with the (up to 3) per-pixel components scaled as specified. Configuration syntax "ColourDistance(yref,uref,vref,yscale,uscale,vscale)", e.g. "ColourDistance(0.1,0.2,0.5,1.0,1.0,0.1)".
- ThresholdProcessor, emits frames in "boolean" format (1 boolean per pixel), where true indicates that the input (coerced to 1 float per pixel) is greater than (or less than) the specified threshold. Configuration syntax "Threshold(threshold)", e.g. "Threshold(0.1)", for above threshold, "ThresholdBelow(threshold)", e.g. "ThesholdBelow(0.2)" for below threshold.
- MedianProcessor, currently coerces input to "boolean" and emits frames in "boolean" format (1 boolean per pixel), where the output value is the commonest in a square +/-radius of the input pixel. The output image will be smaller by the radius all around. Configuration syntax "Median(radius)", e.g. "Median(1)".
- MeanProcessor, currently coerces input to "float" or "YUV" format and emits frames in the same format, where the output value is the average in a square +/-radius of the input pixel. The output image will be smaller by the radius all around. Configuration syntax "Mean(radius)", e.g. "Mean(1)".
- ChangeGateProcessor, is a combination of Change, Threshold, and Median, which emits a frame which is a copy of the input frame but with 'false' pixels after the (optional) median filter forced to '0'/'false'. I.e. it 'gates' the input image to show only changing pixels. Configuration syntax "ChangeGate(yscale,uscale,vscale,threshold,medianRadius)", e.g. "ChangeGate(1.0,1.0,1.0,0.005,1)".
- DifferenceGateProcessor, is a combination of Difference, Threshold, and Median, which emits a frame which is a copy of the input frame but with 'false' pixels after the (optional) median filter forced to '0'/'false'. I.e. it 'gates' the input image to show only pixels difference from the reference image. Configuration syntax "DifferenceGate(yscale,uscale,vscale,threshold,medianRadius)", e.g. "DifferenceGate(1.0,1.0,1.0,0.005,1)".
- BackgroundGateProcessor, is a combination of Change, Threshold, and FrameAverage (see below) which emits a frame which is a copy of the input frame only when the input frame is considered not to have changed for some specified time. (The last accepted background image is re-emitted while considering subsequent frames.). Configuration syntax "BackgroundGate(yscale,uscale,vscale,threshold,changeFraction,staticTimeSeconds)", e.g. "ChangeGate(1.0,1.0,1.0,0.005,0.01,5.0)".
Usage
Typically, link to sink from the source property of a JMFVideoCaptureDevice component
(created by an JMFVideoCaptureManager component) or from the source property of
a chained SimpleVideoProcessor component to a VideoFrameAverage or VideoFrameExporter component
which exposes the final processing result.
View the component web page using the URL in the configUrl property, which includes
access to most recent input and processed image(s).
Note: for efficiency/performance, perform Drop, Subsample and/or Region processes as close to
the start of the processing chain as possible.
Technical Details
Part of the visionframework set of components; extends AbstractVideoProcessor.
some visualisation facilities.