CGAL 6.1.1 - Classification

Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions
CGAL::Classification::Feature::Color_channel< GeomTraits, PointRange, ColorMap > Class Template Reference
Reference Manual » Predefined Features

`#include <CGAL/Classification/Feature/Color_channel.h>`

## Inherits from

CGAL::Classification::Feature_base.

## Definition

template<typename GeomTraits, typename PointRange, typename ColorMap>
class CGAL::Classification::Feature::Color_channel< GeomTraits, PointRange, ColorMap >

Feature based on HSV colorimetric information.

If the input point cloud has colorimetric information, it can be used for classification purposes.

The HSV channels are defined this way:

- Hue ranges from 0 to 360 and measures the general "tint" of the color (green, blue, pink, etc.)
- Saturation ranges from 0 to 100 and measures the "strength" of the color (0 is gray and 100 is the fully saturated color)
- Value ranges from 0 to 100 and measures the "brightness" of the color (0 is black and 100 is the fully bright color)

Its default name is "color_hue", "color_saturation" or "color_value", depending on which channel is chosen in the constructor.

Note
  The user only needs to provide a map to standard (and more common) RGB colors, the conversion to HSV is done internally.

Template Parameters

  GeomTraits | model of CGAL Kernel.
  PointRange | model of `ConstRange`. Its iterator type is `RandomAccessIterator` and its value type is the key type of `ColorMap`.
  ColorMap | model of `ReadablePropertyMap` whose key type is the value type of the iterator of `PointRange` and value type is `CGAL::IO::Color`.

## Public Types
enum | Channel { HUE = 0 , SATURATION = 1 , VALUE = 2 }
| Selected channel. More...

## Public Member Functions
| Color_channel (const PointRange &input, ColorMap color_map, Channel channel)
| constructs a feature based on the given color channel.
Public Member Functions inherited from CGAL::Classification::Feature_base
const std::string & | name () const
| returns the name of the feature (initialized to `abstract_feature` for `Feature_base`).
void | set_name (const std::string &name)
| changes the name of the feature.
virtual float | value (std::size_t index)=0
| returns the value taken by the feature for at the item for the item at position `index`.

## Member Enumeration Documentation

## ◆ Channel

template<typename GeomTraits , typename PointRange , typename ColorMap >

enum CGAL::Classification::Feature::Color_channel::Channel

Selected channel.

Enumerator
HUE | 0
SATURATION | 1
VALUE | 2

## Constructor & Destructor Documentation

## ◆ Color_channel()

template<typename GeomTraits , typename PointRange , typename ColorMap >

CGAL::Classification::Feature::Color_channel< GeomTraits, PointRange, ColorMap >::Color_channel | ( | const PointRange & | input,
|  | ColorMap | color_map,
|  | Channel | channel
| ) |  |

constructs a feature based on the given color channel.

Parameters

  input | point range.
  color_map | property map to access the colors of the input points.
  channel | chosen HSV channel.