Visual Servoing Platform
version 3.6.1 under development (2024-11-15)
|
This tutorial follows Tutorial: Introduction to color segmentation using HSV color scale.
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.
In the previous tutorial (see Tutorial: Introduction to color segmentation using HSV color scale), we used the following lines to determine HSV low/high range values in hsv_range
vector:
Then this vector was used to determine the pixels that were in the HSV low/high ranges in oder to compute a mask
:
In tutorial-hsv-range-tuner.cpp we propose a tool that allows to set these HSV low/high values either using a trackbar or by clicking on a pixel in the image before fine tuning the range values with the trackbar.
$ cd $VISP_WS/visp-build/tutorial/segmentation/color $ ./tutorial-hsv-range-tuner --image ballons.jpg
$ ./tutorial-hsv-range-tuner
To use this tool, in the "Current frame" window:
calib/hsv-thresholds.yml
. Hereafter we provide a possible content: $ cat calib/hsv-thresholds.yml # File created 2024/04/03 17:28:10 rows: 6 cols: 1 data: - [0] - [64] - [222] - [255] - [128] - [242]
You are now ready to see how to continue with Tutorial: Live color segmentation using HSV color scale.