IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
Threshold< IntervalType > Class Template Reference

#include <peak_icv/algorithms/thresholds/peak_icv_threshold.hpp>

Public Member Functions

 Threshold (const IntervalType &interval)
 Creates an instance of class Threshold.
 
 Threshold (typename IntervalType::type minimum, typename IntervalType::type maximum)
 Creates an instance of class Threshold.
 
peak::icv::Region Process (const Image &image) const
 Applies a threshold on a given single-channel image and returns a region with selected pixels whose gray values are in the range Interval.minimum <= gray value <= Interval.maximum.
 

Static Public Member Functions

static IntervalType GetRange (const Image &image)
 Queries the minimum and maximum value of a given image and provides it as an interval.
 

Detailed Description

template<typename IntervalType>
class peak::icv::detail::Threshold< IntervalType >

Class for thresholding an image.

Template Parameters
Intervalshall only be interval types
Since
ids_peak_icv 1.1

Definition at line 37 of file peak_icv_threshold.hpp.

Constructor & Destructor Documentation

◆ Threshold() [1/2]

template<typename IntervalType >
Threshold ( const IntervalType & interval)
explicit

Creates an instance of class Threshold.

Parameters
[in]intervalInterval with lower and upper threshold value.
Since
ids_peak_icv 1.1

Definition at line 130 of file peak_icv_threshold.hpp.

◆ Threshold() [2/2]

template<typename IntervalType >
Threshold ( typename IntervalType::type minimum,
typename IntervalType::type maximum )
explicit

Creates an instance of class Threshold.

Parameters
[in]minimumLower threshold value.
[in]maximumUpper threshold value.
Since
ids_peak_icv 1.1

Definition at line 135 of file peak_icv_threshold.hpp.

Member Function Documentation

◆ GetRange()

template<typename IntervalType >
IntervalType GetRange ( const Image & image)
static

Queries the minimum and maximum value of a given image and provides it as an interval.

Parameters
[in]imageThis is the image for which the range is calculated.
Returns
Returns the maximum possible range of the given image.
Since
ids_peak_icv 1.1

Definition at line 155 of file peak_icv_threshold.hpp.

◆ Process()

template<typename IntervalType >
peak::icv::Region Process ( const Image & image) const

Applies a threshold on a given single-channel image and returns a region with selected pixels whose gray values are in the range Interval.minimum <= gray value <= Interval.maximum.

Parameters
[in]imageImage to threshold
Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • Coord3D_C32f

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Returns
Returns a region with selected pixels.
Exceptions
OutOfRangeExceptionIf the interval is out of bounds for the pixel format.
NotPossibleExceptionIf the image is too big for processing.
Since
ids_peak_icv 1.1

Definition at line 140 of file peak_icv_threshold.hpp.