ossimOpenCVPyrSegmentation Class Reference

OpenCV Pyramids Segmentation. More...

#include <ossimOpenCVPyrSegmentation.h>

List of all members.

Public Member Functions

 ossimOpenCVPyrSegmentation (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.
int theLevel
 Maximum level of the pyramid for the segmentation.
double theThreshold1
 Error threshold for establishing the links.
double theThreshold2
 Error threshold for for the segments clustering.

Detailed Description

OpenCV Pyramids Segmentation.

Implements image segmentation by pyramids.

Parameters:
level Maximum level of the pyramid for the segmentation
threshold1 Error threshold for establishing the links
threshold2 Error threshold for for the segments clustering

The function implements image segmentation by pyramids. The pyramid builds up to the level . The links between any pixel a on level i and its candidate father pixel b on the adjacent level are established if $ p(c(a),c(b)) < threshold1 $. After the connected components are defined, they are joined into several clusters. Any two segments A and B belong to the same cluster, if $ p(c(A),c(B)) < threshold2 $. If the input image has only one channel, then $ p(c^1,c^2)=|c^1-c^2| $. If the input image has three channels (red, green and blue), then

$ p(c^1,c^2) = 0.30 (c^1_ r - c^2_ r) + 0.59 (c^1_ g - c^2_ g) + 0.11 (c^1_ b - c^2_ b). $

There may be more than one connected component per a cluster. The images src and dst should be 8-bit n-channel images or equal size.


Member Function Documentation

bool ossimOpenCVPyrSegmentation::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