SEGenerator Class Reference

Basic generators for structuring elements for morphological filters. More...

#include <filters/morphology/segenerator.h>

List of all members.


Static Public Member Functions

static unsigned char * linear (unsigned int width, unsigned int height, unsigned int *proposed_center_x, unsigned int *proposed_center_y, float slope_angle_rad)
 Generate linear structuring element.
static unsigned char * square (unsigned int width, unsigned int height)
 Generate square structuring element.
static void drawSE (unsigned char *yuv422planar_buffer, unsigned char *mask, unsigned int width, unsigned int height)
 Draw structuring element.
static void drawSEbw (unsigned char *yuv422planar_buffer, unsigned char *mask, unsigned int width, unsigned int height)
 Draw structuring element.

Detailed Description

Basic generators for structuring elements for morphological filters.

Author:
Tim Niemueller

Definition at line 29 of file segenerator.h.


Member Function Documentation

void SEGenerator::drawSE ( unsigned char *  yuv422planar_buffer,
unsigned char *  mask,
unsigned int  width,
unsigned int  height 
) [static]

Draw structuring element.

This draws the structuring element to an image buffer.

Parameters:
yuv422planar_buffer image buffer
mask structuring element
width width of structuring element
height height of structuring element

Definition at line 164 of file segenerator.cpp.

void SEGenerator::drawSEbw ( unsigned char *  yuv422planar_buffer,
unsigned char *  mask,
unsigned int  width,
unsigned int  height 
) [static]

Draw structuring element.

This draws the structuring element to a b/w image buffer.

Parameters:
yuv422planar_buffer image buffer
mask structuring element
width width of structuring element
height height of structuring element

Definition at line 185 of file segenerator.cpp.

unsigned char * SEGenerator::linear ( unsigned int  width,
unsigned int  height,
unsigned int *  proposed_center_x,
unsigned int *  proposed_center_y,
float  slope_angle_rad 
) [static]

Generate linear structuring element.

Parameters:
width width of structuring element
height height of structuring element
proposed_center_x contains the proposed x coordinate of the anchor upon return
proposed_center_y contains the proposed y coordinate of the anchor upon return
slope_angle_rad the slope of the line in radians
Returns:
buffer with linear structuring element. The buffer has been allocated using malloc(). Use free() to free the memory after you are done with it.

Definition at line 55 of file segenerator.cpp.

References Drawer::draw_line(), fawkes::normalize_mirror_rad(), PNGWriter::set_buffer(), Drawer::set_buffer(), Drawer::set_color(), Writer::set_dimensions(), Writer::set_filename(), FvRawWriter::write(), and PNGWriter::write().

unsigned char * SEGenerator::square ( unsigned int  width,
unsigned int  height 
) [static]

Generate square structuring element.

Parameters:
width width of structuring element
height height of structuring element
Returns:
buffer with square structuring element. The buffer has been allocated using malloc(). Use free() to free the memory after you are done with it.

Definition at line 148 of file segenerator.cpp.

Referenced by FilterGeodesicDilation::FilterGeodesicDilation(), and FilterGeodesicErosion::FilterGeodesicErosion().


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