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;
78 template <
unsigned int tChannels>
91 for (
unsigned int y = firstRow; y < firstRow + numberRows; ++y)
93 uint8_t* framePixel =
target_.
pixel<uint8_t>(firstColumn, y);
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));
104 CV::FrameInterpolatorBilinear::interpolatePixel8BitPerChannel<tChannels, CV::PC_TOP_LEFT>(frameData, layerWidth, layerHeight, framePaddingElements, position, framePixel);
107 framePixel += tChannels;
This class implements the base class for all creators that support mappings for one frame.
Definition: Creator1.h:28
This class is the base class for all creators that support mappings with float accuracy.
Definition: CreatorF.h:29
const LayerF & layerF_
Specialized layer reference.
Definition: CreatorF.h:41
This class implements the base class for all creator objects that create a resulting frame as output.
Definition: CreatorFrame.h:28
Frame & target_
Target frame of the creator.
Definition: CreatorFrame.h:41
This class implements the base class for all creators.
Definition: Creator.h:29
This class implements a creator object that creates the final synthesis image for a mapping with floa...
Definition: CreatorInpaintingContentF1.h:37
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.
This class implements a creator that can be distributed to subsets of the synthesis layer.
Definition: CreatorSubset.h:28
This class implements a single layer for pixel synthesis within one frame and sub-pixel accuracy.
Definition: LayerF1.h:44
virtual const MappingF & mapping() const =0
Returns the mapping of this synthesis layer.
unsigned int height() const
Returns the height of this layer.
Definition: Layer.h:169
const Frame & mask() const
Returns the mask of this layer.
Definition: Layer.h:184
unsigned int width() const
Returns the width of this layer.
Definition: Layer.h:164
This class implements Ocean's image class.
Definition: Frame.h:1792
T * data(const unsigned int planeIndex=0u)
Returns a pointer to the pixel data of a specific plane.
Definition: Frame.h:4159
T * pixel(const unsigned int x, const unsigned int y, const unsigned int planeIndex=0u)
Returns the pointer to the data of a specific pixel.
Definition: Frame.h:4209
const T * constpixel(const unsigned int x, const unsigned int y, const unsigned int planeIndex=0u) const
Returns the pointer to the constant data of a specific pixel.
Definition: Frame.h:4250
unsigned int paddingElements(const unsigned int planeIndex=0u) const
Returns the optional number of padding elements at the end of each row for a specific plane.
Definition: Frame.h:4042
unsigned int width() const
Returns the width of the frame format in pixel.
Definition: Frame.h:3143
unsigned int height() const
Returns the height of the frame in pixel.
Definition: Frame.h:3148
const T & x() const noexcept
Returns the x value.
Definition: Vector2.h:698
const T & y() const noexcept
Returns the y value.
Definition: Vector2.h:710
float Scalar
Definition of a scalar type.
Definition: Math.h:128
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15