STIRA
0.1
|
class with tools for image intensity remapping using histograms, like histogram matching and histogram equalization More...
#include <HistogramTools.h>
Public Member Functions | |
HistogramTools () | |
constructor | |
~HistogramTools () | |
destructor | |
Static Public Member Functions | |
static void | RemapHistogramInROI (ArrayGrid< double > *pInGrid, common::RectangularROI< int > rroi, histogram::IntHistogram *fhCumulativeInput, histogram::FloatHistogram *fhCumulativeReference) |
remap intensities in an image ROI to follow a target histogram References http://en.wikipedia.org/wiki/Histogram_equalization -> Backprojection http://en.wikipedia.org/wiki/Histogram_matching More... | |
static double | MatchHistogramValue (double inValue, histogram::IntHistogram *fhIncomingCumulativeHistogram, histogram::FloatHistogram *fhCumulativeReferenceHistogram) |
matches an intensity from an image with ihIncomingCumulativeHistogram to transform it to ihCumulativeReferenceHistogram More... | |
static Image * | RobustLinearRescale (Image *pSourceImage, double lowerFraction=0.01, double upperFraction=0.99) |
Performs robust linear intensity rescaling, creating a new object as result A new image is created, which becomes the responsability of the caller. More... | |
static bool | RobustLinearRescaleNoNew (Image *pSourceImage, double lowerFraction=0.01, double upperFraction=0.99) |
Performs robust linear intensity rescaling on the image itself, creating no new object (No new image is created; old values are overwritten) More... | |
static void | HistogramEqualizeSingleBand (ArrayGrid< double > *pInOutGrid) |
performs histogram equalization on a single band More... | |
static Image * | HistogramEqualizePerBand (Image *pInImage) |
performs histogram equalization on an image, but for all bands independantly More... | |
static Image * | HistogramEqualizeHSI (Image *pInImage) |
performs histogram equalization on an RGB image using transformation to HSI color space RGB colors are transformed to HSI, and only the I component is equalized; after that, the result is transformed back to RGB More... | |
static Image * | ColorHistogramEqualize (Image *pInImage) |
performs histogram equalization on an RGB image using transformation to CIE-Lab color space RGB colors are transformed to CIE-Lab, and only the L component is equalized; after that, the result is transformed back to RGB (values are clipped to range 0-255) More... | |
class with tools for image intensity remapping using histograms, like histogram matching and histogram equalization
performs histogram equalization on an RGB image using transformation to CIE-Lab color space RGB colors are transformed to CIE-Lab, and only the L component is equalized; after that, the result is transformed back to RGB (values are clipped to range 0-255)
pInImage | the input image |
References stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetImageName(), stira::imagedata::Image::GetNumberOfBands(), stira::imagedata::Image::LabTosRGB(), stira::imagedata::Image::SetImageName(), and stira::imagedata::Image::sRGBToLab().
performs histogram equalization on an RGB image using transformation to HSI color space RGB colors are transformed to HSI, and only the I component is equalized; after that, the result is transformed back to RGB
pInImage | the input image |
References stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetImageName(), stira::imagedata::Image::GetNumberOfBands(), stira::imagedata::Image::HSIToRGB(), stira::imagedata::Image::RGBToHSI(), and stira::imagedata::Image::SetImageName().
performs histogram equalization on an image, but for all bands independantly
pInImage | the input image |
References stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetImageName(), stira::imagedata::Image::GetNumberOfBands(), and stira::imagedata::Image::SetImageName().
|
static |
performs histogram equalization on a single band
pInOutGrid | the input grid; values are changed on source data |
References stira::histogram::IntHistogram::ConvertInCumulativeHistogram(), stira::histogram::HistogramMaster< T >::GetBinValue(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::GridStatistics< T >::GetMinMax(), stira::histogram::HistogramMaster< T >::GetNrOfBins(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), stira::histogram::FloatHistogram::InitializeWithNormalizedCumulativeHistogram(), and stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
matches an intensity from an image with ihIncomingCumulativeHistogram to transform it to ihCumulativeReferenceHistogram
inValue | incoming intensity value to be remapped |
fhIncomingCumulativeHistogram | incoming cumulative histogram before remapping (not normalized) |
fhCumulativeReferenceHistogram | target cumulative histogram after remapping (not normalized) |
References stira::common::MathUtils::ClipValue(), stira::histogram::HistogramMaster< T >::GetBinValue(), and stira::histogram::HistogramMaster< T >::GetNrOfBins().
|
static |
remap intensities in an image ROI to follow a target histogram References http://en.wikipedia.org/wiki/Histogram_equalization -> Backprojection http://en.wikipedia.org/wiki/Histogram_matching
pInGrid | source image grid with intensity values to be remapped |
rroi | the rectangular region of interest within which values are to be remapped |
ihCumulativeReferenceHistogram | target cumulative histogram after remapping (not normalized) |
References stira::common::MathUtils::ClipValue(), stira::common::RectangularROI< T >::GetBottomRightCorner(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::common::RectangularROI< T >::GetTopLeftCorner(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), stira::imagedata::ArrayGrid< T >::SetValue(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Performs robust linear intensity rescaling, creating a new object as result A new image is created, which becomes the responsability of the caller.
pSourceImage | input image |
lowerFraction | fraction of darkest pixels to ignore |
upperFraction | fraction of pixels to take into account (1-upperFraction is fraction to be discarded) |
References stira::imagedata::Image::Clone().
|
static |
Performs robust linear intensity rescaling on the image itself, creating no new object (No new image is created; old values are overwritten)
pSourceImage | input image; contains result as well |
lowerFraction | fraction of darkest pixels to ignore |
upperFraction | fraction of pixels to take into account (1-upperFraction is fraction to be discarded) |
References stira::common::MathUtils::ClipValue(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetHeight(), stira::histogram::IntHistogram::GetLowerBound(), stira::imagedata::GridStatistics< T >::GetMinMax(), stira::imagedata::Image::GetNumberOfBands(), stira::histogram::IntHistogram::GetUpperBound(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::Image::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().