@@ -142,6 +142,24 @@ namespace imgproc {
142
142
}
143
143
};
144
144
145
+ G_TYPED_KERNEL (GBGR2I420, <GMat(GMat)>, " org.opencv.imgproc.colorconvert.bgr2i420" ) {
146
+ static GMatDesc outMeta (GMatDesc in) {
147
+ GAPI_Assert (in.depth == CV_8U);
148
+ GAPI_Assert (in.chan == 3 );
149
+ GAPI_Assert (outSz_w > 0 && outSz_h > 0 );
150
+ return in.withType (in.depth , 1 ).withSize (Size (in.size .width , in.size .height * 3 / 2 ));
151
+ }
152
+ };
153
+
154
+ G_TYPED_KERNEL (GRGB2I420, <GMat(GMat)>, " org.opencv.imgproc.colorconvert.rgb2i420" ) {
155
+ static GMatDesc outMeta (GMatDesc in) {
156
+ GAPI_Assert (in.depth == CV_8U);
157
+ GAPI_Assert (in.chan == 3 );
158
+ GAPI_Assert (outSz_w > 0 && outSz_h > 0 );
159
+ return in.withType (in.depth , 1 ).withSize (Size (in.size .width , in.size .height * 3 / 2 ));
160
+ }
161
+ };
162
+
145
163
G_TYPED_KERNEL (GNV12toRGB, <GMat(GMat, GMat)>, " org.opencv.imgproc.colorconvert.nv12torgb" ) {
146
164
static GMatDesc outMeta (GMatDesc in_y, GMatDesc in_uv) {
147
165
GAPI_Assert (in_y.chan == 1 );
@@ -828,7 +846,7 @@ Output image must be 8-bit unsigned 3-channel image @ref CV_8UC3.
828
846
@note Function textual ID is "org.opencv.imgproc.colorconvert.bgr2rgb"
829
847
830
848
@param src input image: 8-bit unsigned 3-channel image @ref CV_8UC3.
831
- @sa BGR2RGB
849
+ @sa RGB2BGR
832
850
*/
833
851
GAPI_EXPORTS GMat BGR2RGB (const GMat& src);
834
852
@@ -891,6 +909,30 @@ Output image must be 8-bit unsigned 3-channel image @ref CV_8UC3.
891
909
*/
892
910
GAPI_EXPORTS GMat RGB2YUV (const GMat& src);
893
911
912
+ /* * @brief Converts an image from BGR color space to I420 color space.
913
+
914
+ The function converts an input image from BGR color space to I420.
915
+ The conventional ranges for R, G, and B channel values are 0 to 255.
916
+
917
+ @note Function textual ID is "org.opencv.imgproc.colorconvert.bgr2i420"
918
+
919
+ @param src input image: 8-bit unsigned 3-channel image @ref CV_8UC3.
920
+ @sa I4202BGR
921
+ */
922
+ GAPI_EXPORTS GMat BGR2I420 (const GMat& src);
923
+
924
+ /* * @brief Converts an image from RGB color space to I420 color space.
925
+
926
+ The function converts an input image from RGB color space to I420.
927
+ The conventional ranges for R, G, and B channel values are 0 to 255.
928
+
929
+ @note Function textual ID is "org.opencv.imgproc.colorconvert.rgb2i420"
930
+
931
+ @param src input image: 8-bit unsigned 3-channel image @ref CV_8UC3.
932
+ @sa I4202RGB
933
+ */
934
+ GAPI_EXPORTS GMat RGB2I420 (const GMat& src);
935
+
894
936
/* * @brief Converts an image from BGR color space to LUV color space.
895
937
896
938
The function converts an input image from BGR color space to LUV.
0 commit comments