Main Page Class Hierarchy Compound List File List Compound Members File Members

# ImageFilter Class Reference

`#include <ImageFilter.h>`

List of all members.

## Detailed Description

This class provides image filters.

Author:
  Jia L. Du

## Public Member Functions
| ImageFilter ()
void | sobelFilter (image &source, image &destination)
void | color2Grey (colimage &source, image &destination)
void | calculateHue (colimage &source, int row, image &destination)
## Static Public Attributes
const BYTE | NO_HUE = 255
## Private Member Functions
BYTE | RGBtoHue (BYTE r, BYTE g, BYTE b)

## Constructor & Destructor Documentation

ImageFilter::ImageFilter | ( |  | ) |

## Member Function Documentation

void ImageFilter::calculateHue | ( | colimage & | source,
|  | int | row,
|  | image & | destination
| ) |

  | Calculates the hue for one row in a RGB image. Note: Although a reference to a whole image is passed to store the calculated hues only the specified row is actually converted! If the whole RGB image is to be converted to hues this method must be called seperately for each row of the image while always passing the same source and destination Parameters:
  source | The source RGB image
  row | The row in the source image for which the hues are to be calculated
  destination | A reference to a greyscale image that is to contain the calculated hues
Author: adapted from Andrew Barry

void ImageFilter::color2Grey | ( | colimage & | source,
|  | image & | destination
| ) |

  | Converts a RGB image to grayscale. The source image is not modified Parameters:
  source | The source color image
  destination | A reference to the new, filtered image

BYTE ImageFilter::RGBtoHue | ( | BYTE | r,
|  | BYTE | g,
|  | BYTE | b
| ) | `[private]`

  | Calculates the hue for an RGB triple Parameters:
  r | Red value
  g | Green value
  b | Blue value
See also: NO_HUE Returns: The calculated hue (scaled to 0..252. The value 255 is used for no hue) Author: Thomas Braunl

void ImageFilter::sobelFilter | ( | image & | source,
|  | image & | destination
| ) |

  | Applies the sobel (edge detection) filter to the source image. The source image is not modified Parameters:
  source | The source image
  destination | A reference to the new, filtered image

## Member Data Documentation

const BYTE ImageFilter::NO_HUE = 255`[static]`

| This value is returned by RGBtoHue if the passed RGB triple has no hue See also: RGBtoHue