The API for calling the CvtColor supports RGB converts to GRAY, RGB and BGR converts to NV12.
Parameter
taskHandle Task handles are responsible for the interaction of the operator with the UCP architecture.dstImg The output picture size is the same as the input picture, type supports U8C1, format supports Y and nv12.srcImg The input picture type supports U8C3 and format supports RGB and BGR.Return Value
0 means the API was successfully executed, otherwise the execution failed.Conversion Support Table
| srcFmt/dstFmt | gray | nv12 | rgb_p | rgb | bgr_p | bgr | yuv_p | yuv |
|---|---|---|---|---|---|---|---|---|
| gray | N | N | N | N | N | N | N | N |
| nv12 | N | N | N | N | N | N | N | N |
| rgb_p | N | N | N | N | N | N | N | N |
| rgb | Y | Y | N | N | N | N | N | N |
| bgr_p | N | N | N | N | N | N | N | N |
| bgr | N | Y | N | N | N | N | N | N |
| yuv_p | N | N | N | N | N | N | N | N |
| yuv | N | N | N | N | N | N | N | N |