ossimOpenCVThresholdFilter Class Reference

OpenCV Threshold Filter. More...

#include <ossimOpenCVThresholdFilter.h>

List of all members.

Public Member Functions

 ossimOpenCVThresholdFilter (ossimObject *owner=NULL)
ossimString getShortName () const
ossimString getLongName () const
virtual ossimRefPtr
< ossimImageData > 
getTile (const ossimIrect &tileRect, ossim_uint32 resLevel=0)
virtual void initialize ()
virtual ossimScalarType getOutputScalarType () const
ossim_uint32 getNumberOfOutputBands () const
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)

Protected Member Functions

void runUcharTransformation (ossimImageData *tile)

Protected Attributes

ossimRefPtr< ossimImageData > theTile
 Output tile.
double theThreshold
 Threshold value.
double theMaxValue
 Maximum value to use with CV_THRESH_BINARY and CV_THRESH_BINARY_INV thresholding types.
int theThresholdType
 Thresholding type (see the detailed description).

Detailed Description

OpenCV Threshold Filter.

Applies a fixed-level threshold to array elements.

Parameters:
src Source array (single-channel, 8-bit or 32-bit floating point)
dst Destination array; must be either the same type as src or 8-bit
threshold Threshold value
maxValue Maximum value to use with CV_THRESH_BINARY and CV_THRESH_BINARY_INV thresholding types
thresholdType – Thresholding type (see the discussion)

The function applies fixed-level thresholding to a single-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, i.e. filtering out pixels with too small or too large values. There are several types of thresholding that the function supports that are determined by thresholdType:

CV_THRESH_BINARY.png
CV_THRESH_BINARY_INV.png
CV_THRESH_TRUNC.png
CV_THRESH_TOZERO.png
CV_THRESH_TOZERO_INV.png

Also, the special value CV_THRESH_OTSU may be combined with one of the above values. In this case the function determines the optimal threshold value using Otsu’s algorithm and uses it instead of the specified thresh. The function returns the computed threshold value. Currently, Otsu’s method is implemented only for 8-bit images.

threshold.png

Member Function Documentation

bool ossimOpenCVThresholdFilter::loadState ( const ossimKeywordlist &  kwl,
const char *  prefix = 0 
) [virtual]

Method to the load (recreate) the state of an object from a keyword list. Return true if ok or false on error.


The documentation for this class was generated from the following files:
 All Classes Functions Variables

Generated on Thu May 13 09:23:33 2010 for opencv-ossim-plugin by  doxygen 1.6.1