31#ifndef SEGMENT_STATISTICS_OP_H
32#define SEGMENT_STATISTICS_OP_H
34#include "SegmentAreaOp.h"
86 SegmentStatisticsOp(
const std::string & statistics=
"d",
double min=1,
double max=255,
double scale=1.0,
double offset=0) :
87 SegmentOp(__FUNCTION__,
"Segment statistics: area, mx, my, variance, slimness, horizontality, verticality, elongation") {
88 parameters.link(
"statistics", this->statistics = statistics,
"aAxXyYsSlhve");
89 parameters.link(
"intensity", this->intensity.tuple(),
"min:max");
93 this->intensity.set(min,max);
100 std::string statistics;
map_t parameters
Parameters (name -> linked variable), typically linked to member variables of the derived class.
Definition BeanLike.h:313
const map_t & getParameters() const
Returns the parameter map (const access).
Definition BeanLike.h:116
void copyStruct(const ReferenceMap &m, const T &src, T &dst, extLinkPolicy policy=RESERVE)
Experimental. Copies references and values of a structure to another.
Definition ReferenceMap.h:412
Struct for image (excluding data)
Definition ImageConf.h:333
Container applicable for Channels and Images, with alpha support.
Definition ImageTray.h:266
A base class for computing statistics of segments. As segment is an area of connected pixels.
Definition SegmentOp.h:53
Computes statistics of segments: area, centroid, horizontality, verticality, variance and elongation....
Definition SegmentStatisticsOp.h:79
virtual void traverseChannels(const ImageTray< const Channel > &src, ImageTray< Channel > &dst) const
Definition SegmentStatisticsOp.cpp:97
SegmentStatisticsOp(const std::string &statistics="d", double min=1, double max=255, double scale=1.0, double offset=0)
Default constructor.
Definition SegmentStatisticsOp.h:86
void getDstConf(const ImageConf &src, ImageConf &dst) const
Resizes dst, ensures src area and channel count for each stat. .
Definition SegmentStatisticsOp.cpp:44