/**
  \page tutorial-hsv-segmentation-live Tutorial: Live color segmentation using HSV color scale
  \tableofcontents

\section hsv_video_intro Introduction

This tutorial follows \ref tutorial-hsv-range-tuner.

To run this tutorial you will need:
- a Realsense camera like a D435 device
- ViSP build with librealsense and PCL libraries as 3rd parties

We suppose here that you already set the HSV low/high ranges using the range tuner tool explained in
\ref tutorial-hsv-range-tuner.

Note that all the material (source code and images) described in this tutorial is part of ViSP source code
(in `tutorial/segmentation/color` folder) and could be found in
https://github.com/lagadic/visp/tree/master/tutorial/segmentation/color.

\section hsv_video_recorded Color segmentation on a recorded video

- If not already done, the first step is to record a video as described in \ref tutorial-grabber.
  Let us consider the case of a Realsense camera. To record a video you may run:
\verbatim
$ cd $VISP_WS/visp-build/tutorial/grabber
$ ./tutorial-grabber-realsense --seqname /tmp/seq/image-%04d.png --record 0
\endverbatim
  - Use left click to start recording, and then right click to stop and quit.
  - The sequence of successive images is recorded in `/tmp/seq/` folder.

- Use the HSV range tuner tool explained in \ref tutorial-hsv-range-tuner to select the color you want to segment.
  We select the HSV low/high range on the first image of the sequence with
\verbatim
$ cd $VISP_WS/visp-build/tutorial/segmentation/color
$ ./tutorial-hsv-range-tuner --image /tmp/seq/image-0001.png
\endverbatim
  - As a result you will find the learned HSV low/high ranges in `calib/hsv-thresholds.yml`

- Now you are ready to process all the recorded video in order to perform color segmentation based on the
  content of `calib/hsv-thresholds.yml`
\verbatim
$ ./tutorial-hsv-segmentation --video /tmp/seq/image-%04d.png --hsv-thresholds calib/hsv-thresholds.yml
\endverbatim

\section hsv_video_live Color segmentation on a live stream

- We suppose here that you have a Realsense camera and that you install librealsense before building ViSP with
  librealsense 3rdparty support. If you are not familiar with these steps, follow one of the \ref tutorial_install_src
  tutorials.
- Plug your Realsense camera and use the HSV range tuner tool explained in \ref tutorial-hsv-range-tuner to select
  the color you want to segment.
\verbatim
$ cd $VISP_WS/visp-build/tutorial/segmentation/color
$ ./tutorial-hsv-range-tuner --hsv-thresholds calib/hsv-thresholds.yml
\endverbatim
  - As a result you will find the learned HSV low/high ranges in `calib/hsv-thresholds.yml`

- Now you are ready to process the Realsense live stream in order to perform color segmentation based on the
  content of `calib/hsv-thresholds.yml`
\verbatim
$ ./tutorial-hsv-segmentation --hsv-thresholds calib/hsv-thresholds.yml
\endverbatim

\section hsv_video_next Next tutorial

You are now ready to see how to continue with \ref tutorial-hsv-segmentation-pcl.

*/
