[meta-freescale] OpenCV capture

Carlos Rafael Giani dv at pseudoterminal.org
Tue Jul 14 07:53:25 PDT 2015


On 07/14/2015 04:51 PM, Gary Thomas wrote:
> On 2015-07-14 08:33, Carlos Rafael Giani wrote:
>> On 07/14/2015 04:13 PM, Gary Thomas wrote:
>>> I'd like to use OpenCV with my i.MX6 system to capture and
>>> process data directly from the camera(s) I have connected
>>> to the CPU.  Sadly, these cameras (CCS, MIPI) produce I420
>>> data but the OpenCV capture code can only work with GBR24.
>>>
>>> Is there a way to make this conversion happen, perhaps using
>>> the VPU/IPU (I'm not sure which)?
>>>
>>
>> I420 -> RGB/BGR should be doable with IPU and G2D. I recommend using 
>> G2D, since it is much more straightforward to use. GBR is not 
>> supported, but could you swap G and B inside OpenCV?
>
> Perhaps.  How would I set things up to do this conversion
> in the IPU/G2D?
>

If you are using GStreamer, gstreamer-imx has imxipuvideotransform and 
imxg2dvideotransform elements that can do this.
You can also look at their source code.


More information about the meta-freescale mailing list