Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

brightness_Filter Class Reference
[Image Processing FiltersSingle FrameEnhancementPixel Manipulation Filters]

#include <brightness_Filter.h>

Inheritance diagram for brightness_Filter:

phFilter phMutex phObject List of all members.

Detailed Description

Adjusts the brightness of an image in the pipeline.

There are two methods of applying a brightness adjustment:

  1. one value for all channels or a specific channel
  2. an array of values applied to the channels in array indexed order

The first method is very simple, one sets an adjustment value and a channel value. If the channel value is -1 or greater than the number of channels in the image then the adjustment is applied to all the channels. Otherwise, only the given channel (ex: 0 for R in RGB) is altered.

If channel is -1, "all channels" doesn't always mean that all channels will be adjusted. For RGB formats it is true, but for other formats such as HSV, SCT, etc. only certain channels will be adjusted. S & V are adjusted for the HSV colorspace. The first channel of SCT/LAB is adjusted.

The second method takes an array of values (adjustment_array) and a value for the number of elements in that array (nelems). Each entry in the array is applied to it's respective channel (0->R, 1->G, 2->B for RGB formats) to adjust the brightness of the pixel channels. If there are less values than channels in the image's pixels, then only those values will be applied. If there are more entries in the array than channels in the image's pixels, then only the first n values will be used for the given image format.

The adjustment value can be positive or negative and the value of a pixel channel will be restricted to it's range of valid values( 0-255 for 8 bit channels ).

Supports the following formats:

Todo:
add example image inputs and processed image outputs

add example application code that shows how the processed images were output

Definition at line 92 of file brightness_Filter.h.

Public Member Functions

 brightness_Filter (int32_t adjustment=0, int32_t channel=-1)
 brightness_Filter (int32_t *adjustment_array, uint32_t nelems)
 ~brightness_Filter ()
int set (int32_t adjustment, int32_t channel=-1)
int set (int32_t *adjustment_array, uint32_t nelems)
phFiltercloneFilter ()

Protected Member Functions

int filter ()

Private Attributes

int m_use_param
int32_t m_adjustment
int32_t m_channel
int32_tm_adjust_arr
uint32_t m_adjust_nelems
uint32_t m_adjust_arr_size
int32_tm_temp_adjust
uint32_t m_temp_adjust_size


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



Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:30 2007 for phission by  doxygen 1.4.4