All of lore.kernel.org
 help / color / mirror / Atom feed
* OpenCV capture
@ 2015-07-14 14:13 Gary Thomas
  2015-07-14 14:33 ` Carlos Rafael Giani
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2015-07-14 14:13 UTC (permalink / raw)
  To: meta-freescale@yoctoproject.org

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)?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenCV capture
  2015-07-14 14:13 OpenCV capture Gary Thomas
@ 2015-07-14 14:33 ` Carlos Rafael Giani
  2015-07-14 14:51   ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Rafael Giani @ 2015-07-14 14:33 UTC (permalink / raw)
  To: meta-freescale

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?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenCV capture
  2015-07-14 14:33 ` Carlos Rafael Giani
@ 2015-07-14 14:51   ` Gary Thomas
  2015-07-14 14:53     ` Carlos Rafael Giani
  2015-07-15  3:08     ` Alfonso Tamés
  0 siblings, 2 replies; 5+ messages in thread
From: Gary Thomas @ 2015-07-14 14:51 UTC (permalink / raw)
  To: meta-freescale

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?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenCV capture
  2015-07-14 14:51   ` Gary Thomas
@ 2015-07-14 14:53     ` Carlos Rafael Giani
  2015-07-15  3:08     ` Alfonso Tamés
  1 sibling, 0 replies; 5+ messages in thread
From: Carlos Rafael Giani @ 2015-07-14 14:53 UTC (permalink / raw)
  To: meta-freescale

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OpenCV capture
  2015-07-14 14:51   ` Gary Thomas
  2015-07-14 14:53     ` Carlos Rafael Giani
@ 2015-07-15  3:08     ` Alfonso Tamés
  1 sibling, 0 replies; 5+ messages in thread
From: Alfonso Tamés @ 2015-07-15  3:08 UTC (permalink / raw)
  To: Gary Thomas; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

Hi Gary,

Have you seen this guide for OpenCV and i.MX6?

http://imxcv.blogspot.mx/2014/02/building-opencv-24x-for-freescales-imx6.html <http://imxcv.blogspot.mx/2014/02/building-opencv-24x-for-freescales-imx6.html>

Regards,

Alfonso

>> 
>> 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?
> 


[-- Attachment #2: Type: text/html, Size: 1202 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-15  3:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 14:13 OpenCV capture Gary Thomas
2015-07-14 14:33 ` Carlos Rafael Giani
2015-07-14 14:51   ` Gary Thomas
2015-07-14 14:53     ` Carlos Rafael Giani
2015-07-15  3:08     ` Alfonso Tamés

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.