mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Updated documentation to new "COLOR_" format for color conversion enums.
This commit is contained in:
@@ -106,7 +106,7 @@ But in case of a non-linear transformation, an input RGB image should be normali
|
||||
:math:`\rightarrow` L*u*v* transformation. For example, if you have a 32-bit floating-point image directly converted from an 8-bit image without any scaling, then it will have the 0..255 value range instead of 0..1 assumed by the function. So, before calling ``cvtColor`` , you need first to scale the image down: ::
|
||||
|
||||
img *= 1./255;
|
||||
cvtColor(img, img, CV_BGR2Luv);
|
||||
cvtColor(img, img, COLOR_BGR2Luv);
|
||||
|
||||
If you use ``cvtColor`` with 8-bit images, the conversion will have some information lost. For many applications, this will not be noticeable but it is recommended to use 32-bit images in applications that need the full range of colors or that convert an image before an operation and then convert back.
|
||||
|
||||
@@ -129,7 +129,7 @@ The function can do the following transformations:
|
||||
|
||||
::
|
||||
|
||||
cvtColor(src, bwsrc, CV_RGB2GRAY);
|
||||
cvtColor(src, bwsrc, COLOR_RGB2GRAY);
|
||||
|
||||
..
|
||||
|
||||
@@ -138,7 +138,7 @@ The function can do the following transformations:
|
||||
|
||||
*
|
||||
RGB
|
||||
:math:`\leftrightarrow` CIE XYZ.Rec 709 with D65 white point ( ``CV_BGR2XYZ, CV_RGB2XYZ, CV_XYZ2BGR, CV_XYZ2RGB`` ):
|
||||
:math:`\leftrightarrow` CIE XYZ.Rec 709 with D65 white point ( ``COLOR_BGR2XYZ, COLOR_RGB2XYZ, COLOR_XYZ2BGR, COLOR_XYZ2RGB`` ):
|
||||
|
||||
.. math::
|
||||
|
||||
@@ -160,7 +160,7 @@ The function can do the following transformations:
|
||||
|
||||
*
|
||||
RGB
|
||||
:math:`\leftrightarrow` YCrCb JPEG (or YCC) ( ``CV_BGR2YCrCb, CV_RGB2YCrCb, CV_YCrCb2BGR, CV_YCrCb2RGB`` )
|
||||
:math:`\leftrightarrow` YCrCb JPEG (or YCC) ( ``COLOR_BGR2YCrCb, COLOR_RGB2YCrCb, COLOR_YCrCb2BGR, COLOR_YCrCb2RGB`` )
|
||||
|
||||
.. math::
|
||||
|
||||
@@ -195,7 +195,7 @@ The function can do the following transformations:
|
||||
Y, Cr, and Cb cover the whole value range.
|
||||
|
||||
*
|
||||
RGB :math:`\leftrightarrow` HSV ( ``CV_BGR2HSV, CV_RGB2HSV, CV_HSV2BGR, CV_HSV2RGB`` )
|
||||
RGB :math:`\leftrightarrow` HSV ( ``COLOR_BGR2HSV, COLOR_RGB2HSV, COLOR_HSV2BGR, COLOR_HSV2RGB`` )
|
||||
In case of 8-bit and 16-bit images,
|
||||
R, G, and B are converted to the floating-point format and scaled to fit the 0 to 1 range.
|
||||
|
||||
@@ -234,7 +234,7 @@ The function can do the following transformations:
|
||||
H, S, and V are left as is
|
||||
|
||||
*
|
||||
RGB :math:`\leftrightarrow` HLS ( ``CV_BGR2HLS, CV_RGB2HLS, CV_HLS2BGR, CV_HLS2RGB`` ).
|
||||
RGB :math:`\leftrightarrow` HLS ( ``COLOR_BGR2HLS, COLOR_RGB2HLS, COLOR_HLS2BGR, COLOR_HLS2RGB`` ).
|
||||
In case of 8-bit and 16-bit images,
|
||||
R, G, and B are converted to the floating-point format and scaled to fit the 0 to 1 range.
|
||||
|
||||
@@ -284,7 +284,7 @@ The function can do the following transformations:
|
||||
H, S, V are left as is
|
||||
|
||||
*
|
||||
RGB :math:`\leftrightarrow` CIE L*a*b* ( ``CV_BGR2Lab, CV_RGB2Lab, CV_Lab2BGR, CV_Lab2RGB`` ).
|
||||
RGB :math:`\leftrightarrow` CIE L*a*b* ( ``COLOR_BGR2Lab, COLOR_RGB2Lab, COLOR_Lab2BGR, COLOR_Lab2RGB`` ).
|
||||
In case of 8-bit and 16-bit images,
|
||||
R, G, and B are converted to the floating-point format and scaled to fit the 0 to 1 range.
|
||||
|
||||
@@ -340,7 +340,7 @@ The function can do the following transformations:
|
||||
L, a, and b are left as is
|
||||
|
||||
*
|
||||
RGB :math:`\leftrightarrow` CIE L*u*v* ( ``CV_BGR2Luv, CV_RGB2Luv, CV_Luv2BGR, CV_Luv2RGB`` ).
|
||||
RGB :math:`\leftrightarrow` CIE L*u*v* ( ``COLOR_BGR2Luv, COLOR_RGB2Luv, COLOR_Luv2BGR, COLOR_Luv2RGB`` ).
|
||||
In case of 8-bit and 16-bit images,
|
||||
R, G, and B are converted to the floating-point format and scaled to fit 0 to 1 range.
|
||||
|
||||
@@ -389,7 +389,7 @@ The function can do the following transformations:
|
||||
http://www.poynton.com/ColorFAQ.html
|
||||
|
||||
*
|
||||
Bayer :math:`\rightarrow` RGB ( ``CV_BayerBG2BGR, CV_BayerGB2BGR, CV_BayerRG2BGR, CV_BayerGR2BGR, CV_BayerBG2RGB, CV_BayerGB2RGB, CV_BayerRG2RGB, CV_BayerGR2RGB`` ). The Bayer pattern is widely used in CCD and CMOS cameras. It enables you to get color pictures from a single plane where R,G, and B pixels (sensors of a particular component) are interleaved as follows:
|
||||
Bayer :math:`\rightarrow` RGB ( ``COLOR_BayerBG2BGR, COLOR_BayerGB2BGR, COLOR_BayerRG2BGR, COLOR_BayerGR2BGR, COLOR_BayerBG2RGB, COLOR_BayerGB2RGB, COLOR_BayerRG2RGB, COLOR_BayerGR2RGB`` ). The Bayer pattern is widely used in CCD and CMOS cameras. It enables you to get color pictures from a single plane where R,G, and B pixels (sensors of a particular component) are interleaved as follows:
|
||||
|
||||
.. image:: pics/bayer.png
|
||||
|
||||
|
||||
Reference in New Issue
Block a user