Ocean
InitializerShrinkingErosionI1.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_SHRINKING_EROSION_I_1_H
9 #define META_OCEAN_CV_SYNTHESIS_INITIALIZER_SHRINKING_EROSION_I_1_H
10 
17 
18 namespace Ocean
19 {
20 
21 namespace CV
22 {
23 
24 namespace Synthesis
25 {
26 
27 /**
28  * This class implements an initializer that initializes the mapping by shrinking the inpainting mask by an erosion filter.
29  * For the resulting initial inpainting image the final mapping is determined by application of simple appearance mapping initializer.
30  * @see InitializerAppearanceMappingI1, LayerI1, MappingI.
31  * @ingroup cvsynthesis
32  */
33 class OCEAN_CV_SYNTHESIS_EXPORT InitializerShrinkingErosionI1 :
34  virtual public InitializerI,
35  virtual public InitializerRandomized,
36  virtual public Initializer1
37 {
38  public:
39 
40  /**
41  * Creates a new initializer object.
42  * @param layer The layer for that the initial mapping has to be provided
43  * @param randomGenerator Random number generator
44  * @param appearanceInitializer Appearance initializer to be applied afterwards
45  */
46  inline InitializerShrinkingErosionI1(LayerI1& layer, RandomGenerator& randomGenerator, const InitializerAppearanceMapping& appearanceInitializer);
47 
48  /**
49  * Invokes the initialization process.
50  * @see Initializer::invoke().
51  */
52  bool invoke(Worker* worker = nullptr) const override;
53 
54  private:
55 
56  /// Additional appearance mapping initializer.
58 };
59 
61  Initializer(layer),
62  InitializerI(layer),
63  InitializerRandomized(layer, randomGenerator),
64  Initializer1(layer),
65  appearanceInitializer_(appearanceInitializer)
66 {
67  // nothing to do here
68 }
69 
70 }
71 
72 }
73 
74 }
75 
76 #endif // META_OCEAN_CV_SYNTHESIS_INITIALIZER_SHRINKING_EROSION_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 the abstract base class for all appearance initializers.
Definition: InitializerAppearanceMapping.h:28
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 class is the base class for all initializers that mainly initialize the synthesis mapping by a h...
Definition: InitializerRandomized.h:30
This class implements an initializer that initializes the mapping by shrinking the inpainting mask by...
Definition: InitializerShrinkingErosionI1.h:37
bool invoke(Worker *worker=nullptr) const override
Invokes the initialization process.
InitializerShrinkingErosionI1(LayerI1 &layer, RandomGenerator &randomGenerator, const InitializerAppearanceMapping &appearanceInitializer)
Creates a new initializer object.
Definition: InitializerShrinkingErosionI1.h:60
const InitializerAppearanceMapping & appearanceInitializer_
Additional appearance mapping initializer.
Definition: InitializerShrinkingErosionI1.h:57
This class implements a single layer for pixel synthesis within one frame and pixel accuracy.
Definition: LayerI1.h:41
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15