visp icon indicating copy to clipboard operation
visp copied to clipboard

Introduce HSV color format in ViSP

Open fspindle opened this issue 6 years ago • 0 comments

It could be interesting to introduce the HSV format that decomposes colors into their hue, saturation and value components without using 3rd parties like OpenCV.

  • Need to introduce vpHSV class
  • In vpImageConvert class introduce image conversion from vpImage<unsigned char> to vpImage<vpHSV>
void convert (const vpImage<unsigned char> &src, vpImage<vpHSV> &dest)
  • In vpImageConvert class introduce image conversion from vpImage<vpRGBa> to vpImage<vpHSV>. Could call vpImageConvert::RGBaToHSV() but this function need maybe to be optimized.
void convert (const vpImage<vpRGBa> &src, vpImage<vpHSV> &dest)
  • In vpImageConvert class introduce
static void split (const vpImage<vpHSV> &src, vpImage< unsigned char > *h, vpImage< unsigned char > *s, vpImage< unsigned char > *v)
  • Introduce a tutorial that shows how to read an image from hard drive, convert it in HSV and do color segmentation using 3 thresholds, one for each channel

fspindle avatar Jan 07 '19 17:01 fspindle