Ocean
|
This class is the base class for all constraints. More...
Public Member Functions | |
virtual | ~Constraint ()=default |
Destructs this constraint. More... | |
Constraint (const Scalar impact) | |
Creates an empty constraint. More... | |
Scalar | impact () const |
Returns the impact factor of this constraint. More... | |
virtual Scalar | cost (const Vector2 &inside, const Vector2 &outside) const =0 |
Returns the cost for a given for two given points. More... | |
virtual Scalar | weight (const Vector2 &point) const =0 |
Returns the weight of this constraint according to a given point. More... | |
Protected Member Functions | |
Constraint ()=default | |
Creates an empty constraint. More... | |
virtual std::unique_ptr< Constraint > | copy (const Scalar scale=Scalar(1)) const =0 |
Creates a copy of this constraint by an optional scale parameter. More... | |
Protected Attributes | |
Scalar | impact_ = Scalar(0) |
Impact factor of this constraint. More... | |
Friends | |
class | Constraints |
This class is the base class for all constraints.
Constraints can be used to improve the image quality of a synthesized image.
Constraints cover e.g., geometrical structures, patterns or other kinds of visual information not entirely converted by a patch-based synthesis.
|
virtualdefault |
Destructs this constraint.
|
inlineexplicit |
Creates an empty constraint.
impact | The impact factor, with range [0, infinity) |
|
protecteddefault |
Creates an empty constraint.
|
protectedpure virtual |
Creates a copy of this constraint by an optional scale parameter.
A scale of 0.5 provide a constraint for an image with bisected dimensions.
The resulting object has to be released by the caller.
scale | The scale to be used |
Implemented in Ocean::CV::Synthesis::FiniteLineConstraint, and Ocean::CV::Synthesis::LineConstraint.
|
pure virtual |
Returns the cost for a given for two given points.
inside | The inside point (point inside the mask to determine the cost for - according to the second point) |
outside | The outside point (point outside the mask) |
Implemented in Ocean::CV::Synthesis::FiniteLineConstraint, and Ocean::CV::Synthesis::LineConstraint.
|
inline |
Returns the impact factor of this constraint.
Returns the weight of this constraint according to a given point.
point | The point to determine the weight for |
Implemented in Ocean::CV::Synthesis::FiniteLineConstraint, Ocean::CV::Synthesis::LineConstraint, and Ocean::CV::Synthesis::StructureConstraint.
|
friend |
Impact factor of this constraint.