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:1792
This class implements a matrix with arbitrary size.
Definition: Matrix.h:63
This class implements a sparse matrix using a float type for its elements that is specified by T.
Definition: SparseMatrix.h:61
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