GClasses
|
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>
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. | |
GImage * | regionMask () |
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 | |
GImage * | m_pRegionMask |
Implements a region adjacency graph for 2D images, and lets you merge similar regions to create a hierarchical breakdown of the image.
GClasses::G2DRegionGraph::G2DRegionGraph | ( | int | nWidth, |
int | nHeight | ||
) |
virtual GClasses::G2DRegionGraph::~G2DRegionGraph | ( | ) | [virtual] |
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.
GImage* GClasses::G2DRegionGraph::m_pRegionMask [protected] |