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>
41 fawkes::Exception e("FilterTophatClosing failed"); \
42 e.append("Function: %s", __FUNCTION__); \
43 e.append("Message: %s", m); \
75 ERROR(
"src[SUBTRACTFROM] == NULL");
77 ERROR(
"src[FILTERIMAGE] == NULL");
79 ERROR(
"marker and mask ROI differ");
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.
virtual void set_dst_buffer(unsigned char *buf, ROI *roi)
Set the destination buffer.
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.
virtual void apply()
Apply the filter.
Calculates the difference of two images.
virtual void apply()
Apply the filter.
FilterTophatClosing()
Constructor.
static const unsigned int FILTERIMAGE
Image to filter.
virtual void apply()
Apply the filter.
virtual ~FilterTophatClosing()
Destructor.
static const unsigned int SUBTRACTFROM
Image that we subtract from.
ROI ** src_roi
Source ROIs, dynamically allocated by Filter ctor.
virtual void set_dst_buffer(unsigned char *buf, ROI *roi)
Set the destination buffer.
unsigned char ** src
Source buffers, dynamically allocated by Filter ctor.
unsigned char * dst
Destination buffer.
ROI * dst_roi
Destination ROI.
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.
Morphological filter interface.
unsigned int se_height
Height of structuring element.
unsigned int se_width
Width of structuring element.
unsigned int se_anchor_y
Anchor point y offset of structuring element.
unsigned char * se
Structuring element.
unsigned int se_anchor_x
Anchor point x offset of structuring element.