|
Ocean
|
This class is the base class for all constraints. More...
#include <Constraint.h>
Public Member Functions | |
| virtual | ~Constraint ()=default |
| Destructs this constraint. | |
| Constraint (const Scalar impact) | |
| Creates an empty constraint. | |
| Scalar | impact () const |
| Returns the impact factor of this constraint. | |
| virtual Scalar | cost (const Vector2 &inside, const Vector2 &outside) const =0 |
| Returns the cost for a given for two given points. | |
| virtual Scalar | weight (const Vector2 &point) const =0 |
| Returns the weight of this constraint according to a given point. | |
Protected Member Functions | |
| Constraint ()=default | |
| Creates an empty constraint. | |
| virtual std::unique_ptr< Constraint > | copy (const Scalar scale=Scalar(1)) const =0 |
| Creates a copy of this constraint by an optional scale parameter. | |
Protected Attributes | |
| Scalar | impact_ = Scalar(0) |
| Impact factor of this constraint. | |
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::LineConstraint, and Ocean::CV::Synthesis::FiniteLineConstraint.
|
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::LineConstraint, and Ocean::CV::Synthesis::FiniteLineConstraint.
|
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::StructureConstraint, Ocean::CV::Synthesis::LineConstraint, and Ocean::CV::Synthesis::FiniteLineConstraint.
|
friend |
Impact factor of this constraint.