Ocean
Ocean::CV::Histogram Class Reference

This class implements an image histogram. More...

Data Structures

class  Histogram8BitPerChannel
 This class implements a standard histogram object storing 8 bit per channel. More...
 
class  HistogramBase8BitPerChannel
 This class implements the base class for all histogram objects holding 8 bit per data channel. More...
 
class  IntegralHistogram8BitPerChannel
 This class implements an integral histogram object. More...
 
class  LookupTable8BitPerChannel
 This class implements a simple lookup table. More...
 

Static Public Member Functions

template<unsigned int tChannels>
static Histogram8BitPerChannel< tChannels > determineHistogram8BitPerChannel (const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Determines the standard histogram for a given frame. More...
 
template<unsigned int tChannels>
static Histogram8BitPerChannel< tChannels > determineHistogram8BitPerChannel (const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int subframeLeft, const unsigned int subframeTop, const unsigned int subframeWidth, const unsigned int subframeHeight, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Determines the standard histogram in a sub region of a given frame. More...
 
static bool equalization (Frame &frame, const Scalar factor=1, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
static bool equalization (const Frame &source, Frame &target, const Scalar factor=1, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
static bool adjustColorToReference (Frame &frame, const Frame &reference, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
static bool adjustColorToReference (Frame &frame, const Frame &reference, const unsigned int horizontalBins, const unsigned int verticalBins, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame while using corresponding bins for the adjustments only (not the entire frame information). More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (uint8_t *frame, const unsigned int frameWidth, const unsigned int frameHeight, const uint8_t *reference, const unsigned int referenceWidth, const unsigned int referenceHeight, const unsigned int horizontalBins, const unsigned int verticalBins, const unsigned int framePaddingElements, const unsigned int referencePaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame while using corresponding bins for the adjustments only (not the entire frame information). More...
 
static bool adjustColorToReference (const Frame &source, Frame &target, const Frame &reference, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static bool equalization (uint8_t *frame, const unsigned int width, const unsigned int height, const Scalar factor, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
template<unsigned int tChannels>
static bool equalization (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const Scalar factor, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
template<unsigned int tChannels>
static bool equalization (uint8_t *frame, const unsigned int width, const unsigned int height, const IntegralHistogram8BitPerChannel< tChannels > &normalizedIntegral, const Scalar factor, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
template<unsigned int tChannels>
static bool equalization (uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int subframeLeft, const unsigned int subframeTop, const unsigned int subframeWidth, const unsigned int subframeHeight, const IntegralHistogram8BitPerChannel< tChannels > &normalizedIntegral, const Scalar factor, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Applies a histogram equalization in a sub region of a given frame. More...
 
template<unsigned int tChannels>
static bool equalization (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const IntegralHistogram8BitPerChannel< tChannels > &normalizedIntegral, const Scalar factor, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
template<unsigned int tChannels>
static bool equalization (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int subframeLeft, const unsigned int subframeTop, const unsigned int subframeWidth, const unsigned int subframeHeight, const IntegralHistogram8BitPerChannel< tChannels > &normalizedIntegral, const Scalar factor, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
 Applies a histogram equalization for a given frame. More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (uint8_t *frame, const unsigned int frameWidth, const unsigned int frameHeight, const uint8_t *reference, const unsigned int referenceWidth, const unsigned int referenceHeight, const unsigned int framePaddingElements, const unsigned int referencePaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const uint8_t *reference, const unsigned int referenceWidth, const unsigned int referenceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int referencePaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (uint8_t *frame, const unsigned int width, const unsigned int height, const IntegralHistogram8BitPerChannel< tChannels > &invertedNormalizedReferenceIntegral, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int subframeLeft, const unsigned int subframeTop, const unsigned int subframeWidth, const unsigned int subframeHeight, const IntegralHistogram8BitPerChannel< tChannels > &invertedNormalizedReferenceIntegral, const unsigned int framePaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const IntegralHistogram8BitPerChannel< tChannels > &invertedNormalizedReferenceIntegral, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static bool adjustColorToReference (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int subframeLeft, const unsigned int subframeTop, const unsigned int subframeWidth, const unsigned int subframeHeight, const IntegralHistogram8BitPerChannel< tChannels > &invertedNormalizedReferenceIntegral, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
 Adjusts the color of a frame according to a given reference frame. More...
 

Static Private Member Functions

template<unsigned int tChannels>
static void determineHistogram8BitPerChannelSubset (const uint8_t *frame, const unsigned int width, const unsigned int height, Histogram8BitPerChannel< tChannels > *histogram, Lock *lock, const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows)
 Determines the standard histogram in a subset of a given frame. More...
 
template<unsigned int tChannels>
static void equalizationSubset (uint8_t *frame, const unsigned int width, const unsigned int height, const IntegralHistogram8BitPerChannel< tChannels > *normalizedIntegral, const unsigned int factor, const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows)
 Applies a histogram equalization in a subset of a given frame. More...
 
template<unsigned int tChannels>
static void equalizationOfTargetSubset (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const IntegralHistogram8BitPerChannel< tChannels > *normalizedIntegral, const unsigned int factor, const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows)
 Applies a histogram equalization in a subset of a given frame. More...
 
template<unsigned int tChannels>
static void adjustColorToReferenceSubset (uint8_t *frame, const unsigned int width, const unsigned int height, const LookupTable8BitPerChannel< tChannels > *lookupTable, const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows)
 Adjusts the color in a subset of a frame according to a given reference frame. More...
 
template<unsigned int tChannels>
static void adjustColorToReferenceOfTargetSubset (const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const LookupTable8BitPerChannel< tChannels > *lookupTable, const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows)
 Adjusts the color of a frame according to a given reference frame. More...
 

Detailed Description

This class implements an image histogram.

Member Function Documentation

◆ adjustColorToReference() [1/10]

static bool Ocean::CV::Histogram::adjustColorToReference ( const Frame source,
Frame target,
const Frame reference,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames. The frame types of the source frame and the given reference frame must be identical.

Parameters
sourceThe source frame that is used to create the target frame
targetThe target frame with adjusted color information
referenceReference frame providing the color statistics for the new frame
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ adjustColorToReference() [2/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  sourceWidth,
const unsigned int  sourceHeight,
const uint8_t *  reference,
const unsigned int  referenceWidth,
const unsigned int  referenceHeight,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
const unsigned int  referencePaddingElements,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames. The frame types of the source frame and the given reference frame must be identical.

Parameters
sourceThe source frame that is used to create the target frame
targetThe target frame with adjusted color information
sourceWidthThe width of the source and target frame in pixel
sourceHeightThe height of the source and target frame in pixel
referenceReference frame providing the color statistics for the new frame
referenceWidthThe width of the reference frame in pixel
referenceHeightThe height of the reference frame in pixel
sourcePaddingElementsThe number of padding elements at the end of each source row, in elements, with range [0, infinity)
targetPaddingElementsThe number of padding elements at the end of each target row, in elements, with range [0, infinity)
referencePaddingElementsThe number of padding elements at the end of each reference row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReference() [3/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const IntegralHistogram8BitPerChannel< tChannels > &  invertedNormalizedReferenceIntegral,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
Worker worker = nullptr 
)
inlinestatic

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames. The frame types of the source frame and the given reference frame must be identical.

Parameters
sourceThe source frame that is used to create the target frame
targetThe target frame with adjusted color information
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
invertedNormalizedReferenceIntegralAlready determined inverted and normalized integral histogram of the reference frame
sourcePaddingElementsThe number of padding elements at the end of each source row, in elements, with range [0, infinity)
targetPaddingElementsThe number of padding elements at the end of each target row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReference() [4/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const unsigned int  subframeLeft,
const unsigned int  subframeTop,
const unsigned int  subframeWidth,
const unsigned int  subframeHeight,
const IntegralHistogram8BitPerChannel< tChannels > &  invertedNormalizedReferenceIntegral,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames. The frame types of the source frame and the given reference frame must be identical.

Parameters
sourceThe source frame that is used to create the target frame
targetThe target frame with adjusted color information
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
subframeLeftHorizontal start position of the sub region within the frame, in pixel with range [0, width)
subframeTopVertical start position of the sub region within the frame, in pixel with range [0, heigh)
subframeWidthThe width of the sub region, in pixel with range [1, width - subframeLeft]
subframeHeightThe height of the sub region, in pixel with range [1, height - subframeTop]
invertedNormalizedReferenceIntegralAlready determined inverted and normalized integral histogram of the reference frame
sourcePaddingElementsThe number of padding elements at the end of each source row, in elements, with range [0, infinity)
targetPaddingElementsThe number of padding elements at the end of each target row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReference() [5/10]

static bool Ocean::CV::Histogram::adjustColorToReference ( Frame frame,
const Frame reference,
const unsigned int  horizontalBins,
const unsigned int  verticalBins,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame while using corresponding bins for the adjustments only (not the entire frame information).

The function applies a forward and backward mapping of the normalized integral histograms of both frames.
The frame types of the frame and the given reference frame must be identical.

Parameters
frameThe frame for that the color values will be adjusted
referenceReference frame providing the color statistics for the new frame
horizontalBinsThe number of horizontal bins to use, with range [1, min(frame.width(), reference.with())]
verticalBinsThe number of vertical bins to use, with range [1, min(frame.height(), reference.height())]
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ adjustColorToReference() [6/10]

static bool Ocean::CV::Histogram::adjustColorToReference ( Frame frame,
const Frame reference,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames.
The frame types of the frame and the given reference frame must be identical.

Parameters
frameThe frame for that the color values will be adjusted
referenceReference frame providing the color statistics for the new frame
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ adjustColorToReference() [7/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( uint8_t *  frame,
const unsigned int  frameWidth,
const unsigned int  frameHeight,
const uint8_t *  reference,
const unsigned int  referenceWidth,
const unsigned int  referenceHeight,
const unsigned int  framePaddingElements,
const unsigned int  referencePaddingElements,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames.

Parameters
frameThe frame for that the color values will be adjusted
frameWidthThe width of the frame in pixel
frameHeightThe height of the frame in pixel
referenceReference frame providing the color statistics for the new frame
referenceWidthThe width of the reference frame in pixel
referenceHeightThe height of the reference frame in pixel
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
referencePaddingElementsThe number of padding elements at the end of each reference row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReference() [8/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( uint8_t *  frame,
const unsigned int  frameWidth,
const unsigned int  frameHeight,
const uint8_t *  reference,
const unsigned int  referenceWidth,
const unsigned int  referenceHeight,
const unsigned int  horizontalBins,
const unsigned int  verticalBins,
const unsigned int  framePaddingElements,
const unsigned int  referencePaddingElements,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame while using corresponding bins for the adjustments only (not the entire frame information).

The function applies a forward and backward mapping of the normalized integral histograms of both frames.
The frame types of the frame and the given reference frame must be identical.

Parameters
frameThe frame for that the color values will be adjusted
frameWidthThe width of the frame in pixel, with range [1, infinity)
frameHeightThe height of the frame in pixel, with range [1, infinity)
referenceReference frame providing the color statistics for the new frame
referenceWidthThe width of the reference frame in pixel, with range [1, infinity)
referenceHeightThe height of the reference frame in pixel, with range [1, infinity)
horizontalBinsThe number of horizontal bins to use, with range [1, min(frameWidth, referenceWidth)]
verticalBinsThe number of vertical bins to use, with range [1, min(frameHeight, referenceHeight)]
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
referencePaddingElementsThe number of padding elements at the end of each reference row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReference() [9/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const IntegralHistogram8BitPerChannel< tChannels > &  invertedNormalizedReferenceIntegral,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
inlinestatic

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames.

Parameters
frameThe frame for that the color values will be adjusted
widthThe width of the frame in pixel
heightThe height of the frame in pixel
invertedNormalizedReferenceIntegralAlready determined inverted and normalized integral histogram of the reference frame
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReference() [10/10]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::adjustColorToReference ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const unsigned int  subframeLeft,
const unsigned int  subframeTop,
const unsigned int  subframeWidth,
const unsigned int  subframeHeight,
const IntegralHistogram8BitPerChannel< tChannels > &  invertedNormalizedReferenceIntegral,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
static

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames.

Parameters
frameThe frame for that the color values will be adjusted
widthThe width of the frame in pixel
heightThe height of the frame in pixel
subframeLeftHorizontal start position of the sub region within the frame, in pixel with range [0, width)
subframeTopVertical start position of the sub region within the frame, in pixel with range [0, heigh)
subframeWidthThe width of the sub region, in pixel with range [1, width - subframeLeft]
subframeHeightThe height of the sub region, in pixel with range [1, height - subframeTop]
invertedNormalizedReferenceIntegralAlready determined inverted and normalized integral histogram of the reference frame
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReferenceOfTargetSubset()

template<unsigned int tChannels>
void Ocean::CV::Histogram::adjustColorToReferenceOfTargetSubset ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const LookupTable8BitPerChannel< tChannels > *  lookupTable,
const unsigned int  firstColumn,
const unsigned int  numberColumns,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
const unsigned int  firstRow,
const unsigned int  numberRows 
)
staticprivate

Adjusts the color of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames. The frame types of the source frame and the given reference frame must be identical.

Parameters
sourceThe source frame that is used to create the target frame
targetThe target frame with adjusted color information
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
lookupTableLookup table defining the adjustment of the color
firstColumnFirst column to be handled
numberColumnsNumber of columns to be handled
sourcePaddingElementsOptional number of padding elements of the source frame, range: [0, infinity)
targetPaddingElementsOptional number of padding elements of the target frame, range: [0, infinity)
firstRowFirst row to be handled
numberRowsNumber of rows to be handled
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ adjustColorToReferenceSubset()

template<unsigned int tChannels>
void Ocean::CV::Histogram::adjustColorToReferenceSubset ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const LookupTable8BitPerChannel< tChannels > *  lookupTable,
const unsigned int  firstColumn,
const unsigned int  numberColumns,
const unsigned int  framePaddingElements,
const unsigned int  firstRow,
const unsigned int  numberRows 
)
staticprivate

Adjusts the color in a subset of a frame according to a given reference frame.

The function applies a forward and backward mapping of the normalized integral histograms of both frames.

Parameters
frameThe frame for that the color values will be adjusted
widthThe width of the frame in pixel
heightThe height of the frame in pixel
lookupTableLookup table defining the adjustment of the color
firstColumnFirst column to be handled
numberColumnsNumber of columns to be handled
framePaddingElementsOptional number of padding elements of the input frame, range: [0, infinity)
firstRowFirst row to be handled
numberRowsNumber of rows to be handled
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ determineHistogram8BitPerChannel() [1/2]

template<unsigned int tChannels>
Histogram::Histogram8BitPerChannel< tChannels > Ocean::CV::Histogram::determineHistogram8BitPerChannel ( const uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
static

Determines the standard histogram for a given frame.

Parameters
frameThe frame for that the histogram has to be determined
widthThe width of the given frame in pixel
heightThe height of the given frame in pixel
framePaddingElementsOptional number of padding elements of the input frame, range: [0, infinity)
workerOptional worker object to distributed the computation
Returns
Resulting standard histogram object
Template Parameters
tChannelsNumber of channels of the given frame, with range [1, infinity)

◆ determineHistogram8BitPerChannel() [2/2]

template<unsigned int tChannels>
Histogram::Histogram8BitPerChannel< tChannels > Ocean::CV::Histogram::determineHistogram8BitPerChannel ( const uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const unsigned int  subframeLeft,
const unsigned int  subframeTop,
const unsigned int  subframeWidth,
const unsigned int  subframeHeight,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
static

Determines the standard histogram in a sub region of a given frame.

Parameters
frameThe frame for that the histogram has to be determined
widthThe width of the given frame in pixel
heightThe height of the given frame in pixel
subframeLeftHorizontal start position of the sub region within the frame, in pixel with range [0, width)
subframeTopVertical start position of the sub region within the frame, in pixel with range [0, height)
subframeWidthThe width of the sub region, in pixel with range [1, width - subframeLeft]
subframeHeightThe height of the sub region, in pixel with range [1, height - subframeTop]
workerOptional worker object to distributed the computation
framePaddingElementsOptional number of padding elements of the input frame, range: [0, infinity), default: 0
Returns
Resulting standard histogram object
Template Parameters
tChannelsNumber of channels of the given frame, with range [1, infinity)

◆ determineHistogram8BitPerChannelSubset()

template<unsigned int tChannels>
void Ocean::CV::Histogram::determineHistogram8BitPerChannelSubset ( const uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
Histogram8BitPerChannel< tChannels > *  histogram,
Lock lock,
const unsigned int  firstColumn,
const unsigned int  numberColumns,
const unsigned int  framePaddingElements,
const unsigned int  firstRow,
const unsigned int  numberRows 
)
staticprivate

Determines the standard histogram in a subset of a given frame.

Parameters
frameThe frame for that the histogram has to be determined, must be valid
widthThe width of the given frame in pixel, with range [1, infinity)
heightThe height of the given frame in pixel, with range [1, infinity)
histogramResulting histogram
lockOptional lock object that needs to be defined if this function is executed in parallel
firstColumnFirst column to be handled
numberColumnsNumber of columns to be handled
framePaddingElementsOptional number of padding elements of the input frame, range: [0, infinity)
firstRowFirst row to be handled, with range [0, infinity)
numberRowsNumber of rows to be handled, with range [1, height - firstRow]
Template Parameters
tChannelsNumber of channels of the given frame, with range [1, infinity)

◆ equalization() [1/8]

static bool Ocean::CV::Histogram::equalization ( const Frame source,
Frame target,
const Scalar  factor = 1,
Worker worker = nullptr 
)
static

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
sourceThe source frame for that an equalized target frame will be created
targetThe target frame receiving the equalization result
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ equalization() [2/8]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::equalization ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const IntegralHistogram8BitPerChannel< tChannels > &  normalizedIntegral,
const Scalar  factor,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
Worker worker = nullptr 
)
inlinestatic

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
sourceThe source frame for that an equalized target frame will be created
targetThe target frame receiving the equalization result
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
normalizedIntegralAlready determined normalized integral histogram of the given source frame
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
sourcePaddingElementsThe number of padding elements at the end of each source row, in elements, with range [0, infinity)
targetPaddingElementsThe number of padding elements at the end of each target row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the source and target frame, with range [1, infinity)

◆ equalization() [3/8]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::equalization ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const Scalar  factor,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
Worker worker = nullptr 
)
inlinestatic

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
sourceThe source frame for that an equalized target frame will be created
targetThe target frame receiving the equalization result
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
sourcePaddingElementsThe number of padding elements at the end of each source row, in elements, with range [0, infinity)
targetPaddingElementsThe number of padding elements at the end of each target row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the source and target frame, with range [1, infinity)

◆ equalization() [4/8]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::equalization ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const unsigned int  subframeLeft,
const unsigned int  subframeTop,
const unsigned int  subframeWidth,
const unsigned int  subframeHeight,
const IntegralHistogram8BitPerChannel< tChannels > &  normalizedIntegral,
const Scalar  factor,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
Worker worker = nullptr 
)
static

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
sourceThe source frame for that an equalized target frame will be created
targetThe target frame receiving the equalization result
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
subframeLeftHorizontal start position of the sub region within the frame, in pixel with range [0, width)
subframeTopVertical start position of the sub region within the frame, in pixel with range [0, heigh)
subframeWidthThe width of the sub region, in pixel with range [1, width - subframeLeft]
subframeHeightThe height of the sub region, in pixel with range [1, height - subframeTop]
normalizedIntegralAlready determined normalized integral histogram of the given source frame
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
sourcePaddingElementsThe number of padding elements at the end of each source row, in elements, with range [0, infinity)
targetPaddingElementsThe number of padding elements at the end of each target row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the source and target frame, with range [1, infinity)

◆ equalization() [5/8]

static bool Ocean::CV::Histogram::equalization ( Frame frame,
const Scalar  factor = 1,
Worker worker = nullptr 
)
static

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
frameThe frame that will be equalized according the histogram
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ equalization() [6/8]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::equalization ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const IntegralHistogram8BitPerChannel< tChannels > &  normalizedIntegral,
const Scalar  factor,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
inlinestatic

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
frameThe frame that will be equalized according the histogram
widthThe width of the frame in pixel
heightThe height of the frame in pixel
normalizedIntegralAlready determined normalized integral histogram of the given frame
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ equalization() [7/8]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::equalization ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const Scalar  factor,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
inlinestatic

Applies a histogram equalization for a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
frameThe frame that will be equalized according the histogram
widthThe width of the frame in pixel, with range [1, infinity)
heightThe height of the frame in pixel, with range [1, infinity)
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ equalization() [8/8]

template<unsigned int tChannels>
bool Ocean::CV::Histogram::equalization ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const unsigned int  subframeLeft,
const unsigned int  subframeTop,
const unsigned int  subframeWidth,
const unsigned int  subframeHeight,
const IntegralHistogram8BitPerChannel< tChannels > &  normalizedIntegral,
const Scalar  factor,
const unsigned int  framePaddingElements,
Worker worker = nullptr 
)
static

Applies a histogram equalization in a sub region of a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
frameThe frame that will be equalized according the histogram
widthThe width of the frame in pixel
heightThe height of the frame in pixel
subframeLeftHorizontal start position of the sub region within the frame, in pixel with range [0, width)
subframeTopVertical start position of the sub region within the frame, in pixel with range [0, heigh)
subframeWidthThe width of the sub region, in pixel with range [1, width - subframeLeft]
subframeHeightThe height of the sub region, in pixel with range [1, height - subframeTop]
normalizedIntegralAlready determined normalized integral histogram of the given frame
factorInterpolation factor between the original and the fully equalized frame, with range [0, 1]: 0 means the original frame is taken by 100 percent while 1 means that the equalized frame is taken by 100 percent
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
workerOptional worker object to distribute the computation
Returns
True, if succeeded
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

◆ equalizationOfTargetSubset()

template<unsigned int tChannels>
void Ocean::CV::Histogram::equalizationOfTargetSubset ( const uint8_t *  source,
uint8_t *  target,
const unsigned int  width,
const unsigned int  height,
const IntegralHistogram8BitPerChannel< tChannels > *  normalizedIntegral,
const unsigned int  factor,
const unsigned int  firstColumn,
const unsigned int  numberColumns,
const unsigned int  sourcePaddingElements,
const unsigned int  targetPaddingElements,
const unsigned int  firstRow,
const unsigned int  numberRows 
)
staticprivate

Applies a histogram equalization in a subset of a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
sourceThe source frame for that an equalized target frame will be created
targetThe target frame receiving the equalization result
widthThe width of the source and target frame in pixel
heightThe height of the source and target frame in pixel
normalizedIntegralAlready determined normalized integral histogram of the given frame
factorInterpolation factor, with range [0, 256]
firstColumnFirst column to be handled
numberColumnsNumber of columns to be handled
sourcePaddingElementsOptional number of padding elements of the source frame, range: [0, infinity)
targetPaddingElementsOptional number of padding elements of the target frame, range: [0, infinity)
firstRowFirst row to be handled
numberRowsNumber of rows to be handled
Template Parameters
tChannelsNumber of channels of the source and target frame, with range [1, infinity)

◆ equalizationSubset()

template<unsigned int tChannels>
void Ocean::CV::Histogram::equalizationSubset ( uint8_t *  frame,
const unsigned int  width,
const unsigned int  height,
const IntegralHistogram8BitPerChannel< tChannels > *  normalizedIntegral,
const unsigned int  factor,
const unsigned int  firstColumn,
const unsigned int  numberColumns,
const unsigned int  framePaddingElements,
const unsigned int  firstRow,
const unsigned int  numberRows 
)
staticprivate

Applies a histogram equalization in a subset of a given frame.

The frame is equalized by application of the integral histogram of the original frame.

Parameters
frameThe frame that will be equalized according the histogram
widthThe width of the frame in pixel
heightThe height of the frame in pixel
normalizedIntegralAlready determined normalized integral histogram of the given frame
factorInterpolation factor, with range [0, 256]
firstColumnFirst column to be handled
numberColumnsNumber of columns to be handled
framePaddingElementsOptional number of padding elements of the input frame, range: [0, infinity)
firstRowFirst row to be handled
numberRowsNumber of rows to be handled
Template Parameters
tChannelsNumber of channels of the frame, with range [1, infinity)

The documentation for this class was generated from the following file: