Fawkes API  Fawkes Development Version
firevision::SEGenerator Class Reference

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

#include <>>

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. More...
 
static unsigned char * square (unsigned int width, unsigned int height)
 Generate square structuring element. More...
 
static void drawSE (unsigned char *yuv422planar_buffer, unsigned char *mask, unsigned int width, unsigned int height)
 Draw structuring element. More...
 
static void drawSEbw (unsigned char *yuv422planar_buffer, unsigned char *mask, unsigned int width, unsigned int height)
 Draw structuring element. More...
 

Detailed Description

Basic generators for structuring elements for morphological filters.

Author
Tim Niemueller

Definition at line 33 of file segenerator.h.

Member Function Documentation

◆ drawSE()

void firevision::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_bufferimage buffer
maskstructuring element
widthwidth of structuring element
heightheight of structuring element

Definition at line 169 of file segenerator.cpp.

◆ drawSEbw()

void firevision::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_bufferimage buffer
maskstructuring element
widthwidth of structuring element
heightheight of structuring element

Definition at line 190 of file segenerator.cpp.

◆ linear()

unsigned char * firevision::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
widthwidth of structuring element
heightheight of structuring element
proposed_center_xcontains the proposed x coordinate of the anchor upon return
proposed_center_ycontains the proposed y coordinate of the anchor upon return
slope_angle_radthe 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 60 of file segenerator.cpp.

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

◆ square()

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

Generate square structuring element.

Parameters
widthwidth of structuring element
heightheight 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 153 of file segenerator.cpp.

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


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