8 #ifndef META_OCEAN_CV_SYNTHESIS_OPTIMIZER_I_H
9 #define META_OCEAN_CV_SYNTHESIS_OPTIMIZER_I_H
39 static inline std::vector<int> calculateSearchRadii(
const unsigned int radii,
const unsigned int width,
const unsigned int height);
60 OCEAN_SUPPRESS_UNUSED_WARNING(
layerI_);
65 ocean_assert(radii != 0u);
66 ocean_assert(width != 0u && height != 0u);
68 std::vector<int> result(radii);
70 const unsigned int maxWidthHeight = max(width, height);
72 for (
unsigned int n = 0u; n < radii; ++n)
74 result[n] = int(max(2u, (maxWidthHeight - (maxWidthHeight - 1u) * n / radii + 1u) / 2u));
This class implements the base class for all synthesis layers with integer accuracy.
Definition: LayerI.h:29
This class is the base class for all image synthesis operators.
Definition: Operator.h:28
This class is the base class for all synthesis optimizers.
Definition: Optimizer.h:30
This class is the base class for all optimizers that use a mapping with integer accuracy.
Definition: OptimizerI.h:29
static std::vector< int > calculateSearchRadii(const unsigned int radii, const unsigned int width, const unsigned int height)
Calculate the search radii for the mapping optimization.
Definition: OptimizerI.h:63
LayerI & layerI_
Specialized layer reference.
Definition: OptimizerI.h:52
OptimizerI(LayerI &layer)
Creates a new optimizer object.
Definition: OptimizerI.h:55
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15