67 DifferentialOp(
const std::string & name,
const std::string & description,
size_t channels=1,
int radius=1) :
68 ImageOp(name, description), channels(channels) {
70 parameters.link(
"radius", this->radius = radius,
"pix");
71 parameters.link(
"LIMIT", this->
LIMIT =
true,
"0|1");
76 parameters.
copyStruct(op.getParameters(), op, *
this);
85 const size_t channels;
97 void traverse(
const Channel & src,
Channel & dst,
int di,
int dj)
const = 0;
102 traverse(src, dst, radius, 0);
107 traverse(src, dst, 0, radius);
128 "Computes horizontal and vertical derivatives: df/di and df/dj.", 2, radius) {
137 GradientOp(
const std::string & name,
const std::string & description,
size_t channels=1 ,
int radius=1) :
159 GradientOp(__FUNCTION__,
"Horizontal intensity difference", 1, radius){};
163 traverseHorz(src, dst);
182 GradientOp(__FUNCTION__,
"Vertical intensity difference", 1 , radius){};
186 traverseVert(src, dst);
206 LaplaceOp(
int radius=1) :
DifferentialOp(__FUNCTION__,
"Second intensity derivatives, (df/di)^2 and (df/dj)^2", 2, radius){
211 LaplaceOp(
const std::string & name,
const std::string & description,
int radius=1) :
DifferentialOp(name, description, 1, radius){
237 this->radius = radius;
242 traverseHorz(src, dst);
266 this->radius = radius;
272 traverseVert(src, dst);
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:399
Image with static geometry.
Definition: ImageChannel.h:60
Virtual base class for horizontal and vertical intensity derivatives.
Definition: DifferentialOp.h:52
bool LIMIT
Applied only for unsigned dst types.
Definition: DifferentialOp.h:90
virtual void getDstConf(const ImageConf &src, ImageConf &dst) const
Given source image, determine respective dest image configuration.
Definition: DifferentialOp.cpp:46
Definition: DifferentialOp.h:155
void traverseChannel(const Channel &src, Channel &dst) const
Apply to single channel.
Definition: DifferentialOp.h:162
Computes spatial horizontal derivatives (dx and dy).
Definition: DifferentialOp.h:124
virtual void traverse(const Channel &src, Channel &dst, int di, int dj) const
Definition: DifferentialOp.cpp:115
Definition: DifferentialOp.h:177
void traverseChannel(const Channel &src, Channel &dst) const
Apply to single channel.
Definition: DifferentialOp.h:185
Struct for image (excluding data)
Definition: ImageConf.h:333
Base class for image processing functions.
Definition: ImageOp.h:49
ImageOp(const std::string &name=__FUNCTION__, const std::string &description="")
Definition: ImageOp.h:156
Container applicable for Channels and Images, with alpha support.
Definition: ImageTray.h:267
Computes second horizontal derivative, dx2.
Definition: DifferentialOp.h:232
void traverseChannel(const Channel &src, Channel &dst) const
Apply to single channel.
Definition: DifferentialOp.h:241
Computes second intensity derivatives.
Definition: DifferentialOp.h:202
virtual void traverse(const Channel &src, Channel &dst, int di, int dj) const
Definition: DifferentialOp.cpp:224
Computes second vertical derivative, dy2.
Definition: DifferentialOp.h:261
void traverseChannel(const Channel &src, Channel &dst) const
Apply to single channel.
Definition: DifferentialOp.h:271
Definition: DataSelector.cpp:1277