linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: HSV format
@ 2016-05-24 21:19 Ricardo Ribalda Delgado
  2016-05-27  8:56 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-05-24 21:19 UTC (permalink / raw)
  To: linux-media, Hans Verkuil

Hi

HSV is a  cylindrical-coordinate representation of a color. It is very
useful for computer vision because the Hue component can be used to
segment a scene.

My plan was to add a format in videodev2.h and then add support for
vivid, libv4l2-convert and qv4l2.

There are also plans to prepare a patch for opencv to use this format
without any software conversion, and also for Gstreamer... but all
these changes depend on the changes on videodev2.h

The question is how open would be the linux-media community for such a
change, considering that there is no real device driver using it in
tree ( Our hardware is currently out of tree_

Today we only have an HSV format on v4l2-mediabus.h
V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32), but no HSV format on
videodev2.h


Thanks!!!



-- 
Ricardo Ribalda

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

* Re: RFC: HSV format
  2016-05-24 21:19 RFC: HSV format Ricardo Ribalda Delgado
@ 2016-05-27  8:56 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2016-05-27  8:56 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado, linux-media, Mauro Carvalho Chehab

On 05/24/2016 11:19 PM, Ricardo Ribalda Delgado wrote:
> Hi
> 
> HSV is a  cylindrical-coordinate representation of a color. It is very
> useful for computer vision because the Hue component can be used to
> segment a scene.
> 
> My plan was to add a format in videodev2.h and then add support for
> vivid, libv4l2-convert and qv4l2.
> 
> There are also plans to prepare a patch for opencv to use this format
> without any software conversion, and also for Gstreamer... but all
> these changes depend on the changes on videodev2.h
> 
> The question is how open would be the linux-media community for such a
> change, considering that there is no real device driver using it in
> tree ( Our hardware is currently out of tree_
> 
> Today we only have an HSV format on v4l2-mediabus.h
> V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32), but no HSV format on
> videodev2.h

It's always a bit tricky to decide what to do with this. In general I feel
uncomfortable with the idea of defines that aren't used. Certainly for very
hardware-specific formats I don't like the idea of adding unused formats to
the kernel.

In this case I am however inclined to accept it provided:

- it's not a crazy format: e.g. AHSV (32 bit) or HSV (24 bit) would be fine,
  but some weird macroblock format would be a lot more problematic.
- it's fully documented
- implemented in vivid etc.
- patches adding it to opencv/gstreamer are CC-ed to linux-media as well so
  I know that it is going to be used there.

But you will have to check with Mauro as well, he has the final say in this.

Regards,

	Hans

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

end of thread, other threads:[~2016-05-27  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 21:19 RFC: HSV format Ricardo Ribalda Delgado
2016-05-27  8:56 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).