22#include <opencv2/core.hpp>
33 MorphoOp::Gradient, MorphoOp_Values, ParamCateg);
40 KernelShape::Rectangle, KernelShape_Values, ParamCateg);
44 cv::Size(7, 7), ParamCateg);
48 "is at the kernel center",
49 cv::Point(-1, -1), ParamCateg);
59 public jevois::Parameter<morphologyfilter::op, morphologyfilter::kshape,
60 morphologyfilter::ksize, morphologyfilter::anchor,
61 morphologyfilter::iter>
71 virtual std::string
process(cv::Mat
const & src, cv::Mat & dst)
override;
Base class for an image filter.
JEVOIS_DEFINE_ENUM_CLASS(KernelShape,(Rectangle)(Cross)(Ellipse))
Enum.
JEVOIS_DECLARE_PARAMETER(kshape, KernelShape, "Kernel shape", KernelShape::Rectangle, KernelShape_Values, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(iter, unsigned int, "Number of iterations of the filter to apply", 1U, ParamCateg)
Parameter.
JEVOIS_DEFINE_ENUM_CLASS(MorphoOp,(Erode)(Dilate)(Open)(Close)(Gradient)(TopHat)(BlackHat))
Enum.
JEVOIS_DECLARE_PARAMETER(op, MorphoOp, "Morphological operation to apply", MorphoOp::Gradient, MorphoOp_Values, ParamCateg)
Parameter.
virtual std::string process(cv::Mat const &src, cv::Mat &dst) override
Processing function: filters the image src and puts the results into dst.
JEVOIS_DECLARE_PARAMETER(ksize, cv::Size, "Kernel width and height", cv::Size(7, 7), ParamCateg)
Parameter.
virtual ~MorphologyFilter()
Virtual destructor for safe inheritance.
JEVOIS_DECLARE_PARAMETER(anchor, cv::Point, "Anchor point x and y default value [-1 -1] means that the anchor " "is at the kernel center", cv::Point(-1, -1), ParamCateg)
Parameter.