STIRA  0.1
Static Public Member Functions | List of all members
stira::imagetools::ColorBalancer Class Reference

ref: http://scien.stanford.edu/class/psych221/projects/00/trek/ More...

#include <ColorBalancer.h>

Static Public Member Functions

static ImageRunBalance (Image *pImageIn, double weightGM=0.5)
 Weighted balance from following two color balancing results. More...
 
static ImageRunGrayWorld (Image *pImageIn)
 Performs Gray World color balancing. More...
 
static ImageRunGrayColorPoint (Image *pImageIn)
 
static ImageRunPerfectReflector (Image *pImageIn)
 Performs Perfect Reflector color balancing. More...
 

Detailed Description

ref: http://scien.stanford.edu/class/psych221/projects/00/trek/

Member Function Documentation

Image * stira::imagetools::ColorBalancer::RunBalance ( Image pImageIn,
double  weightGM = 0.5 
)
static

Weighted balance from following two color balancing results.

Warning
Generates new image, that becomes responsability of the caller to delete
Parameters
weightGMweight of result of GrayWorld result (added with (1-weightGM) times Perfect Reflector result)

References stira::imagedata::Image::GetImageName(), stira::imagedata::Image::GetNumberOfBands(), and stira::imagedata::Image::SetImageName().

Image * stira::imagetools::ColorBalancer::RunGrayWorld ( Image pImageIn)
static

Performs Gray World color balancing.

Warning
Generates new image, that becomes responsability of the caller to delete Based on the assumption that given an image with sufficient amount of color variations, the average value of the R, G, and B components of the image should average to a common gray value. Color balancing algorithms can apply this assumption by forcing its images to have a common average gray value for its R, G, and B components.

References stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetImageName(), stira::imagedata::Image::GetNumberOfBands(), and stira::imagedata::Image::SetImageName().

Image * stira::imagetools::ColorBalancer::RunPerfectReflector ( Image pImageIn)
static

Performs Perfect Reflector color balancing.

Warning
Generates new image, that becomes responsability of the caller to delete Based on the following fact: An illuminated glossy surface or specularity reflects a highlight known as Perfect Reflector or Specular Reflection. If the surface is shiny enough, it reflects the actual color of the light source, independently of the color of the surface. Therefore, the R, G, and B components of the brightest or most reflective spot are used to scale the RGBs of all other objects in the image

References stira::imagedata::ColorValue::c, stira::imagedata::Image::Clone(), stira::imagedata::Image::GetBands(), stira::imagedata::Image::GetColor(), stira::imagedata::Image::GetHeight(), stira::imagedata::Image::GetImageName(), stira::imagedata::Image::GetNumberOfBands(), stira::imagedata::Image::GetWidth(), stira::imagedata::Image::RGBToYUV(), stira::imagedata::ArrayGrid< T >::SetGridValues(), stira::imagedata::Image::SetImageName(), stira::imagedata::ArrayGrid< T >::SetValue(), and stira::imagedata::Image::sRGBToLab().


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