Fawkes API
Fawkes Development Version
|
24 #include <core/exception.h>
25 #include <fvfilters/difference.h>
26 #include <fvfilters/morphology/closing.h>
27 #include <fvfilters/morphology/segenerator.h>
28 #include <fvfilters/morphology/tophat_closing.h>
32 namespace firevision {
41 fawkes::Exception e("FilterTophatClosing failed"); \
42 e.append("Function: %s", __FUNCTION__); \
43 e.append("Message: %s", m); \
55 closing =
new FilterClosing();
56 diff =
new FilterDifference();
58 src[SUBTRACTFROM] = src[FILTERIMAGE] = dst = NULL;
59 src_roi[SUBTRACTFROM] = src_roi[FILTERIMAGE] = dst_roi = NULL;
75 ERROR(
"src[SUBTRACTFROM] == NULL");
77 ERROR(
"src[FILTERIMAGE] == NULL");
79 ERROR(
"marker and mask ROI differ");
FilterTophatClosing()
Constructor.
unsigned int se_width
Width of structuring element.
unsigned int se_height
Height of structuring element.
virtual void set_src_buffer(unsigned char *buf, ROI *roi, orientation_t ori=ORI_HORIZONTAL, unsigned int buffer_num=0)
Set source buffer with orientation.
unsigned char ** src
Source buffers, dynamically allocated by Filter ctor.
virtual void set_dst_buffer(unsigned char *buf, ROI *roi)
Set the destination buffer.
unsigned int se_anchor_y
Anchor point y offset of structuring element.
static const unsigned int SUBTRACTFROM
Image that we subtract from.
virtual ~FilterTophatClosing()
Destructor.
virtual void set_dst_buffer(unsigned char *buf, ROI *roi)
Set the destination buffer.
virtual void set_src_buffer(unsigned char *buf, ROI *roi, orientation_t ori=ORI_HORIZONTAL, unsigned int buffer_num=0)
Set source buffer with orientation.
ROI ** src_roi
Source ROIs, dynamically allocated by Filter ctor.
virtual void set_structuring_element(unsigned char *se, unsigned int se_width, unsigned int se_height, unsigned int se_anchor_x, unsigned int se_anchor_y)
Set the structuring element for successive filter runs.
unsigned int se_anchor_x
Anchor point x offset of structuring element.
unsigned char * se
Structuring element.
ROI * dst_roi
Destination ROI.
unsigned char * dst
Destination buffer.
static const unsigned int FILTERIMAGE
Image to filter.