24 #include <core/exception.h>
26 #include <fvfilters/morphology/tophat_closing.h>
27 #include <fvfilters/morphology/segenerator.h>
28 #include <fvfilters/morphology/closing.h>
29 #include <fvfilters/difference.h>
39 const unsigned int FilterTophatClosing::SUBTRACTFROM = 0;
41 const unsigned int FilterTophatClosing::FILTERIMAGE = 1;
44 fawkes::Exception e("FilterTophatClosing failed"); \
45 e.append("Function: %s", __FUNCTION__); \
46 e.append("Message: %s", m); \
56 FilterTophatClosing::FilterTophatClosing()
78 if (
dst == NULL ) ERROR(
"dst == NULL");
unsigned int se_anchor_y
Anchor point y offset of structuring element.
unsigned int se_anchor_x
Anchor point x offset 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.
virtual void apply()
Apply the filter.
virtual void set_dst_buffer(unsigned char *buf, ROI *roi)
Set the destination buffer.
unsigned char * se
Structuring element.
Calculates the difference of two images.
virtual ~FilterTophatClosing()
Destructor.
unsigned int se_height
Height of structuring element.
Morphological filter interface.
unsigned char ** src
Source buffers, 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.
static const unsigned int FILTERIMAGE
Image to filter.
ROI ** src_roi
Source ROIs, dynamically allocated by Filter ctor.
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 int se_width
Width of structuring element.
virtual void apply()
Apply the filter.
unsigned char * dst
Destination buffer.
static const unsigned int SUBTRACTFROM
Image that we subtract from.
ROI * dst_roi
Destination ROI.
virtual void apply()
Apply the filter.
virtual void set_dst_buffer(unsigned char *buf, ROI *roi)
Set the destination buffer.