This class implements a container holding constraints.
More...
#include <Constraint.h>
|
| Constraints ()=default |
| Creates a new constraint container.
|
|
| Constraints (const Constraints &constraints) |
| Copy constructor.
|
|
| Constraints (Constraints &&constraints)=default |
| Default move constructor.
|
|
| Constraints (const Constraints &constraints, const Scalar scale) |
| Copies a constraint container and applies an explicit scale factor.
|
|
| ~Constraints ()=default |
| Destructs the constraint container.
|
|
void | addConstraint (std::unique_ptr< Constraint > constraint) |
| Adds a new constraint.
|
|
size_t | size () const |
| Returns the number of constraints.
|
|
void | initializeDecisions (const uint8_t *mask, const unsigned int width, const unsigned int height, const unsigned int maskPaddingElements) const |
| Initializes the constraint decisions.
|
|
Scalar | cost (const unsigned int insideX, const unsigned int insideY, const Vector2 &outside) const |
| Returns the cost for one inside point and one outside point.
|
|
Scalar | cost (const unsigned int insideX, const unsigned int insideY, const unsigned int outsideX, const unsigned int outsideY) const |
| Returns the cost for one inside point and one outside point.
|
|
bool | isEmpty () const |
| Returns whether this container does not hold any constraint.
|
|
| operator bool () const |
| Returns whether this container holds at least one constraint.
|
|
Constraints & | operator= (Constraints &&constraints)=default |
| Default move operator.
|
|
This class implements a container holding constraints.
◆ ConstraintsVector
Definition of a vector holding constraints.
◆ Constraints() [1/4]
Ocean::CV::Synthesis::Constraints::Constraints |
( |
| ) |
|
|
default |
Creates a new constraint container.
◆ Constraints() [2/4]
Ocean::CV::Synthesis::Constraints::Constraints |
( |
const Constraints & |
constraints | ) |
|
Copy constructor.
- Parameters
-
constraints | The constraints to be copied |
◆ Constraints() [3/4]
Ocean::CV::Synthesis::Constraints::Constraints |
( |
Constraints && |
constraints | ) |
|
|
default |
Default move constructor.
- Parameters
-
constraints | The constraints to be moved |
◆ Constraints() [4/4]
Ocean::CV::Synthesis::Constraints::Constraints |
( |
const Constraints & |
constraints, |
|
|
const Scalar |
scale |
|
) |
| |
Copies a constraint container and applies an explicit scale factor.
- Parameters
-
constraints | The constraints to be copied |
scale | The scale factor to be applied for each constraint to be copied, with range (0, infinity) |
◆ ~Constraints()
Ocean::CV::Synthesis::Constraints::~Constraints |
( |
| ) |
|
|
default |
Destructs the constraint container.
◆ addConstraint()
void Ocean::CV::Synthesis::Constraints::addConstraint |
( |
std::unique_ptr< Constraint > |
constraint | ) |
|
|
inline |
Adds a new constraint.
The given constraint will be released by the container.
- Parameters
-
constraint | The constraint to be added |
◆ cost() [1/2]
Scalar Ocean::CV::Synthesis::Constraints::cost |
( |
const unsigned int |
insideX, |
|
|
const unsigned int |
insideY, |
|
|
const unsigned int |
outsideX, |
|
|
const unsigned int |
outsideY |
|
) |
| const |
|
inline |
Returns the cost for one inside point and one outside point.
- Parameters
-
insideX | Horizontal inside position |
insideY | Vertical inside position |
outsideX | Horizontal outside point |
outsideY | Vertical outside point |
- Returns
- Resulting cost
◆ cost() [2/2]
Scalar Ocean::CV::Synthesis::Constraints::cost |
( |
const unsigned int |
insideX, |
|
|
const unsigned int |
insideY, |
|
|
const Vector2 & |
outside |
|
) |
| const |
|
inline |
Returns the cost for one inside point and one outside point.
- Parameters
-
insideX | Horizontal inside position |
insideY | Vertical inside position |
outside | The outside point |
- Returns
- Resulting cost
◆ initializeDecisions()
void Ocean::CV::Synthesis::Constraints::initializeDecisions |
( |
const uint8_t * |
mask, |
|
|
const unsigned int |
width, |
|
|
const unsigned int |
height, |
|
|
const unsigned int |
maskPaddingElements |
|
) |
| const |
Initializes the constraint decisions.
- Parameters
-
mask | The mask to create the decisions for, must be valid |
width | The width of the mask in pixel |
height | The height of the mask in pixel |
maskPaddingElements | The number of padding elements at the end of each mask row, in elements, with range [0, infinity) |
◆ isEmpty()
bool Ocean::CV::Synthesis::Constraints::isEmpty |
( |
| ) |
const |
|
inline |
Returns whether this container does not hold any constraint.
- Returns
- True, if so
◆ operator bool()
Ocean::CV::Synthesis::Constraints::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Returns whether this container holds at least one constraint.
- Returns
- True, if so
◆ operator=() [1/2]
Disabled assign operator.
- Returns
- Reference to this object
◆ operator=() [2/2]
Default move operator.
- Parameters
-
constraints | The constraints to be moved |
- Returns
- Reference to this object
◆ size()
size_t Ocean::CV::Synthesis::Constraints::size |
( |
| ) |
const |
|
inline |
Returns the number of constraints.
The number of constraints
◆ constraints_
Vector holding the internal constraints.
◆ decisionFrame_
Frame Ocean::CV::Synthesis::Constraints::decisionFrame_ |
|
mutableprivate |
The documentation for this class was generated from the following file: