convert YUY2 to openCV's BGR

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

convert YUY2 to openCV's BGR

2,652件の閲覧回数
weideding
Contributor II

I am using MX8MQ, never met these kind of troubles since from mx51,mx6 before, so discouraged.

My project has to convert camera's data YUY2 to BGR, which openCV needs for computer vision. gstreamer 'videoconvert' plugin SW way, it is too slowly, 400ms/frame for 1080P. 

Unfortunately, MX8MQ does not support 2D, it means we cannot use gstreamer plugin imxvideoconvert_g2d to convert by GPU hardware. Tried to use openCL over GPU, it was working, but reading data from GPU takes 70ms as I descibed in blew link:

use GPU openCL to convert YUY2 to RGB 

 

I tried to third way,  use VPU to get RGB from output, but VPU output format only supports YUV format(typical format NV12). If it is working, then i will do: camera YUY2->encode h264-> vpudec->BGR.  Is it possible to make VPU to output BGR instead of NV12?

I know MX8MQ does not support encode h264 by VPU, only has to use SW.  It will also take much cpu.

0 件の賞賛
返信
2 返答(返信)

2,329件の閲覧回数
weideding
Contributor II

I already had this docs and source code, thanks. But not found useful information from those. 

why does execute clEnqueueReadBuffer need so long time? > 70ms

0 件の賞賛
返信

2,331件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Weide

one can look at SoftISP application note

https://www.nxp.com/docs/en/application-note/AN12060.pdf 

and OpenCL examples

gtec-demo-framework/DemoApps/OpenCL/SoftISP at master · NXPmicro/gtec-demo-framework · GitHub 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信