GClasses

GClasses::G2DRegionGraph Class Reference

Implements a region adjacency graph for 2D images, and lets you merge similar regions to create a hierarchical breakdown of the image. More...

#include <GRegion.h>

Inheritance diagram for GClasses::G2DRegionGraph:
GClasses::GRegionAjacencyGraph

List of all members.

Public Member Functions

 G2DRegionGraph (int nWidth, int nHeight)
virtual ~G2DRegionGraph ()
void makeWatershedRegions (const GImage *pImage)
 Toboggans the gradient magnitude image of the provided image to produce a list of watershed regions.
void makeCoarserRegions (G2DRegionGraph *pFineRegions)
 Given a G2DRegionGraph, this merges every region with its closest neighbor to form a coarser G2DRegionGraph.
GImageregionMask ()
 Gets a pointer to the region mask image.
void setMaskPixel (int x, int y, unsigned int c, size_t nRegion)
 Specifies which region the given pixel belongs to. The color of the pixel is also specified so it can keep track of the average color of each region.

Protected Attributes

GImagem_pRegionMask

Detailed Description

Implements a region adjacency graph for 2D images, and lets you merge similar regions to create a hierarchical breakdown of the image.


Constructor & Destructor Documentation

GClasses::G2DRegionGraph::G2DRegionGraph ( int  nWidth,
int  nHeight 
)
virtual GClasses::G2DRegionGraph::~G2DRegionGraph ( ) [virtual]

Member Function Documentation

void GClasses::G2DRegionGraph::makeCoarserRegions ( G2DRegionGraph pFineRegions)

Given a G2DRegionGraph, this merges every region with its closest neighbor to form a coarser G2DRegionGraph.

void GClasses::G2DRegionGraph::makeWatershedRegions ( const GImage pImage)

Toboggans the gradient magnitude image of the provided image to produce a list of watershed regions.

GImage* GClasses::G2DRegionGraph::regionMask ( ) [inline]

Gets a pointer to the region mask image.

void GClasses::G2DRegionGraph::setMaskPixel ( int  x,
int  y,
unsigned int  c,
size_t  nRegion 
)

Specifies which region the given pixel belongs to. The color of the pixel is also specified so it can keep track of the average color of each region.


Member Data Documentation