8#ifndef META_OCEAN_CV_SYNTHESIS_CREATOR_INPAINTING_CONTENT_F_1_H
9#define META_OCEAN_CV_SYNTHESIS_CREATOR_INPAINTING_CONTENT_F_1_H
53 void createSubset(
const unsigned int firstColumn,
const unsigned int numberColumns,
const unsigned int firstRow,
const unsigned int numberRows)
const override;
64 template <
unsigned int tChannels>
65 void createSubsetChannels(
const unsigned int firstColumn,
const unsigned int numberColumns,
const unsigned int firstRow,
const unsigned int numberRows)
const;
78template <
unsigned int tChannels>
81 const unsigned int layerWidth =
layerF_.width();
82 const unsigned int layerHeight =
layerF_.height();
84 ocean_assert(
layerF_.mask().width() == layerWidth);
85 ocean_assert(
layerF_.mask().height() == layerHeight);
87 uint8_t*
const frameData =
target_.data<uint8_t>();
89 const unsigned int framePaddingElements =
target_.paddingElements();
91 for (
unsigned int y = firstRow; y < firstRow + numberRows; ++y)
93 uint8_t* framePixel =
target_.pixel<uint8_t>(firstColumn, y);
94 const uint8_t* maskPixel =
layerF_.mask().constpixel<uint8_t>(firstColumn, y);
95 const Vector2* mappingPixel =
layerF_.mapping()() + y * layerWidth + firstColumn;
97 for (
unsigned int x = firstColumn; x < firstColumn + numberColumns; ++x)
99 if (*maskPixel != 0xFF)
101 const Vector2& position = *mappingPixel;
103 ocean_assert(position.
x() >= 0 && position.
y() >= 0 && position.
x() <=
Scalar(layerWidth - 1u) && position.
y() <=
Scalar(layerHeight - 1u));
107 framePixel += tChannels;
static void interpolatePixel8BitPerChannel(const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements, const VectorT2< TScalar > &position, uint8_t *result)
Determines the interpolated pixel values for a given pixel position in an 8 bit per channel frame.
Definition FrameInterpolatorBilinear.h:1997
Creator1(const Layer &layer)
Creates a new creator object.
Definition Creator1.h:38
CreatorF(const LayerF &layer)
Creates a new creator object.
Definition CreatorF.h:44
const LayerF & layerF_
Specialized layer reference.
Definition CreatorF.h:41
CreatorFrame(const Layer &layer, Frame &target)
Creates a new creator object.
Definition CreatorFrame.h:44
Frame & target_
Target frame of the creator.
Definition CreatorFrame.h:41
This class implements the base class for all creators.
Definition Creator.h:29
CreatorInpaintingContentF1(const LayerF1 &layer, Frame &target)
Creates a new creator object.
Definition CreatorInpaintingContentF1.h:68
void createSubsetChannels(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const
Specialization of the default function that creates a subset of the information.
Definition CreatorInpaintingContentF1.h:79
void createSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const override
Creates a subset of the information.
CreatorSubset(const Layer &layer)
Creates a new creator object.
Definition CreatorSubset.h:55
This class implements a single layer for pixel synthesis within one frame and sub-pixel accuracy.
Definition LayerF1.h:44
This class implements Ocean's image class.
Definition Frame.h:1969
const T & x() const noexcept
Returns the x value.
Definition Vector2.h:703
const T & y() const noexcept
Returns the y value.
Definition Vector2.h:715
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition Vector2.h:28
float Scalar
Definition of a scalar type.
Definition Math.h:129
Namespace of the CV Synthesis library.
Definition Constraint.h:25
Namespace of the CV library.
Definition Advanced.h:17
The namespace covering the entire Ocean framework.
Definition Accessor.h:15