I am testing OpenCV4Tegra on my Jetson TK1.
I want to convert YUV bufer to RGBA in efficient way.
So I use this line with success:
cv::cvtColor(src, dst, (int)cv::COLOR_YUV2BGRA_Y422);
But the performance is not enough, the execution time is 80ms for a 2 Mega Pixel image.
And I see that only 1 core is used on the CPU even if I can read on the OpenCV4Tegra description :
- "ARM NEON SIMD optimizations, multi-core CPU optimizations and some GLSL GPU optimizations" http://elinux.org/Jetson/Computer_Vision_Performance
In a second chance, I tried with the OpenCV GPU module :
cv::gpu::cvtColor(srcGpu, dstGpu, (int)cv::COLOR_YUV2BGRA_UYVY);
But unfortunately, an error is thrown :
- "OpenCV Error: Bad flag (parameter or structure field) (Unknown/unsupported color conversion code) in cvtColor, file /hdd/buildbot/slave_jetson_tk1_2/52-O4T-L4T/opencv/modules/gpu/src/color.cpp"
So it seems that this conversion is not implemented in the GPU module. But we can see that the conversion functions exist in NPP library, for example “nppiCbYCr422ToBGR_709HDTV_8u_C2C4R”.
This experience leads me to ask 2 questions:
Is there a way to improve the performance of cvtColor on CPU ?
(by enable the multicore execution for exemple)
Is there any chance to get the COLOR_YUV2BGRA_Y422 conversion implemented in the OpenCV GPU module in the future?
Setup information :
Installation frome the JetPack 1.2 https://developer.nvidia.com/jetson-tk1-development-pack
- OpenCV4Tegra : 184.108.40.206
- L4T : 21.4
Thank you in advance for your advice,