Ocean
InitializerRandomMappingAreaConstrainedI1.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_CV_SYNTHESIS_INITIALIZER_RANDOM_MAPPING_AREA_CONSTRAINED_I_1_H
9 #define META_OCEAN_CV_SYNTHESIS_INITIALIZER_RANDOM_MAPPING_AREA_CONSTRAINED_I_1_H
10 
18 
19 namespace Ocean
20 {
21 
22 namespace CV
23 {
24 
25 namespace Synthesis
26 {
27 
28 /**
29  * This initializer creates a random initial mapping and further respects a filter that defines undesired source elements.
30  * The initializer randomly selects target positions as long as they lie outside the synthesis mask.<br>
31  * No appearance constraints will be used to create the initial mapping.<br>
32  * @ingroup cvsynthesis
33  */
34 class OCEAN_CV_SYNTHESIS_EXPORT InitializerRandomMappingAreaConstrainedI1 :
35  virtual public InitializerAreaConstrained,
36  virtual public InitializerI,
37  virtual public InitializerRandomized,
38  virtual public InitializerSubset,
39  virtual public Initializer1
40 {
41  public:
42 
43  /**
44  * Creates a new initializer object.
45  * @param layer The layer for that the initial mapping has to be provided
46  * @param randomGenerator Random generator object used to created random numbers during the initialization process
47  * @param filter The filter mask that divides the target region into desired and undesired target content
48  */
49  inline InitializerRandomMappingAreaConstrainedI1(LayerI1& layer, RandomGenerator& randomGenerator, const Frame& filter);
50 
51  private:
52 
53  /**
54  * Initializes a subset of the entire mapping area.
55  * @see InitializerSubset::initializeSubset().
56  * @see initializeSubsetChannels().
57  */
58  void initializeSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const override;
59 };
60 
62  Initializer(layer),
63  InitializerAreaConstrained(layer, filter),
64  InitializerI(layer),
65  InitializerRandomized(layer, randomGenerator),
66  InitializerSubset(layer),
67  Initializer1(layer)
68 {
69  // nothing to do here
70 }
71 
72 }
73 
74 }
75 
76 }
77 
78 #endif // META_OCEAN_CV_SYNTHESIS_INITIALIZER_RANDOM_MAPPING_AREA_CONSTRAINED_I_1_H
This class is the base class for all initializers that are provided for a single frame only.
Definition: Initializer1.h:29
This class implements a base class for all initializers basing on area constraints.
Definition: InitializerAreaConstrained.h:30
This class implements the base class for all synthesis initializers.
Definition: Initializer.h:34
This class implements the base class for all initializer objects that are applied for mappings with i...
Definition: InitializerI.h:30
This initializer creates a random initial mapping and further respects a filter that defines undesire...
Definition: InitializerRandomMappingAreaConstrainedI1.h:40
InitializerRandomMappingAreaConstrainedI1(LayerI1 &layer, RandomGenerator &randomGenerator, const Frame &filter)
Creates a new initializer object.
Definition: InitializerRandomMappingAreaConstrainedI1.h:61
void initializeSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const override
Initializes a subset of the entire mapping area.
This class is the base class for all initializers that mainly initialize the synthesis mapping by a h...
Definition: InitializerRandomized.h:30
This class is the base class for all initializer objects that can separate the initialization process...
Definition: InitializerSubset.h:29
This class implements a single layer for pixel synthesis within one frame and pixel accuracy.
Definition: LayerI1.h:41
This class implements Ocean's image class.
Definition: Frame.h:1760
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15