visionhdl.DemosaicInterpolator
Construct full RGB pixel data from Bayer pattern pixel stream
Description
The visionhdl.DemosaicInterpolator
System object™ constructs the full RGB pixel values from a Bayer pattern pixel stream.
You can select a low-complexity bilinear interpolation or a moderate-complexity
gradient-corrected bilinear interpolation. The object implements the calculations using
hardware-efficient algorithms for HDL code generation.
The object performs bilinear interpolation on a 3-by-3 pixel window using only additions and bit shifts.
The object performs gradient correction on a 5-by-5 pixel window. The object implements the calculation using bit shifts, additions, and low-order canonical signed digit (CSD) multiplication.
To construct full RGB pixel data from a Bayer pattern pixel stream:
Create the
visionhdl.DemosaicInterpolator
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Syntax
Description
creates a System object that interpolates RGB data from a Bayer pattern pixel
stream.bayerInterpolator
= visionhdl.DemosaicInterpolator
sets properties using one or more name-value arguments. For example,
bayerInterpolator
= visionhdl.DemosaicInterpolator(Name
,Value
)'SensorAlignment','RGGB'
specifies the pattern of the RGB
pixels in the input stream.
Properties
Usage
Description
This object uses a streaming pixel interface with a structure
for frame control signals. This interface enables the object to operate independently of image
size and format and to connect with other Vision HDL Toolbox™ objects. The object accepts and returns a scalar pixel value and control signals
as a structure containing five signals. The control signals indicate the validity of each pixel
and its location in the frame. To convert a pixel matrix into a pixel stream and control
signals, use the visionhdl.FrameToPixels
object. For a
description of the interface, see Streaming Pixel Interface.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Algorithms
This object implements the algorithms described on the Demosaic Interpolator block reference page.