Convert color information between color spaces
visionhdl.ColorSpaceConverter
converts between
R'G'B' and Y'CbCr color spaces, and also converts R'G'B' to intensity.
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 full
description of the interface, see Streaming Pixel Interface.
Note
The ColorSpaceConverter
System object™ operates on gamma-corrected color spaces. However, to simplify use of
the System object, the property arguments do not include the prime notation.
Note
Starting in R2016b, instead of using the step
method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For
example, y = step(obj,x)
and y = obj(x)
perform equivalent operations.
returns
a System object, CSC
= visionhdl.ColorSpaceConverterCSC
, that converts R'G'B' to Y'CbCr using the Rec.
601 (SDTV) standard.
returns a System object, CSC
= visionhdl.ColorSpaceConverter(Name
,Value
)CSC
, with additional options specified by one or
more Name
,Value
pair arguments.
Name
is a property name and
Value
is the corresponding value. Name
must
appear inside single quotes (''
). You can specify several name-value
pair arguments in any order as Name1,Value1,...,NameN,ValueN
.
Properties not specified retain their default values.
|
Conversion that the object performs on the input video stream.
The |
|
Conversion equation to use on the input video stream.
This property does not apply when you set |
|
Scanning standard to use for HDTV conversion.
This property applies when you set |
step | Convert one pixel between color spaces |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
This object implements the algorithms described on the Color Space Converter block reference page.
Color Space Converter | rgb2gray
| visionhdl.FrameToPixels
| rgb2ycbcr
(Image Processing Toolbox) | ycbcr2rgb
(Image Processing Toolbox)