8#ifndef META_OCEAN_CV_ADVANCED_POISSON_BLENDING_H
9#define META_OCEAN_CV_ADVANCED_POISSON_BLENDING_H
Provides image blending based on Poisson Blending, a seamless image composition algorithm from Perez,...
Definition PoissonBlending.h:36
static size_t createIndexLookup(const Frame &sourceMask, const CV::PixelBoundingBox &sourceBoundingBox, const uint8_t maskValue, Frame &indexLookup)
Creates an index lookup frame for masked source pixels.
static void poissonBlendingSubset(const Frame *indexLookup, const Frame *source, Frame *target, const SparseMatrixF *matrixA, const CV::PixelBoundingBox *sourceBoundingBox, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int firstChannel, const unsigned int channelCount)
Performs separate Poisson blending calculations for a range of color channels.
static void createMaskNeighborRelationsMatrix(const Frame &indexLookup, const CV::PixelBoundingBox &sourceBoundingBox, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int targetWidth, const unsigned int targetHeight, SparseMatrixF &matrixA)
Creates a sparse matrix representing the relations between neighbored source mask pixels.
static void poissonBlending(const Frame &source, const Frame &sourceMask, Frame &target, const int left, const int top, const uint8_t maskValue=0xFFu, Worker *worker=nullptr)
Performs Poisson Blending of the specified source frame into the specified target frame.
static void createSummedBorderLaplacianVector(const Frame &indexLookup, const Frame &source, const Frame &target, const CV::PixelBoundingBox &sourceBoundingBox, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int channelIndex, MatrixF &vectorB)
Creates the vector representing the sum of border pixels and source frame laplacian for each pixel wi...
static void insertResultDataToChannel(const Frame &indexLookup, const MatrixF &vectorX, const CV::PixelBoundingBox &sourceBoundingBox, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int channelIndex, Frame &target)
Inserts the solved matrix into the output frame for the specified channel number.
This class implements Ocean's image class.
Definition Frame.h:1969
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
PixelBoundingBoxT< unsigned int > PixelBoundingBox
Definition of the default PixelBoundingBox object with data type allowing only positive coordinate va...
Definition PixelBoundingBox.h:28
SparseMatrixT< float > SparseMatrixF
Instantiation of the SparseMatrixT template class using a single precision float data type.
Definition SparseMatrix.h:44
MatrixT< float > MatrixF
Definition of the MatrixT template class using a single precision float data type.
Definition Matrix.h:39
Namespace of the CV Advanced library.
Definition Advanced.h:20
Namespace of the CV library.
Definition Advanced.h:17
The namespace covering the entire Ocean framework.
Definition Accessor.h:15