Ocean
|
This class implements functions calculation the sum of absolute differences. More...
#include <SumAbsoluteDifferences.h>
Static Public Member Functions | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static uint32_t | patch8BitPerChannel (const uint8_t *const image0, const uint8_t *const image1, const unsigned int width0, const unsigned int width1, const unsigned int centerX0, const unsigned int centerY0, const unsigned int centerX1, const unsigned int centerY1, const unsigned int image0PaddingElements, const unsigned int image1PaddingElements) |
Returns the sum of absolute differences between two square image patches. | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static uint32_t | patchBuffer8BitPerChannel (const uint8_t *const image0, const unsigned int width0, const unsigned int centerX0, const unsigned int centerY0, const unsigned int image0PaddingElements, const uint8_t *const buffer1) |
Returns the sum of absolute differences between an image patch and a memory buffer. | |
template<unsigned int tChannels, unsigned int tPixels> | |
static uint32_t | buffer8BitPerChannel (const uint8_t *buffer0, const uint8_t *buffer1) |
Returns the sum of square differences between two memory buffers. | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static uint32_t | patchMirroredBorder8BitPerChannel (const uint8_t *image0, const uint8_t *image1, const unsigned int width0, const unsigned int height0, const unsigned int width1, const unsigned int height1, const unsigned int centerX0, const unsigned int centerY0, const unsigned int centerX1, const unsigned int centerY1, const unsigned int image0PaddingElements, const unsigned int image1PaddingElements) |
Returns the sum of absolute differences between two patches within an image, patch pixels outside the image will be mirrored back into the image. | |
template<typename T , unsigned int tChannels> | |
static void | determine (const T *firstFrame, const T *secondFrame, const unsigned int width, const unsigned int height, typename AbsoluteDifferenceValueTyper< T >::Type *absoluteDifferences, const unsigned int firstFramePaddingElements, const unsigned int secondFramePaddingElements) |
Determines the sum of absolute differences between two individual frames, individually for each channel. | |
static bool | determine (const Frame &firstFrame, const Frame &secondFrame, Indices32 &absoluteDifferences) |
Determines the sum of absolute differences between two individual frames, individually for each plane, and individually for each channel. | |
![]() | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static OCEAN_FORCE_INLINE uint32_t | patch8BitPerChannelTemplate (const uint8_t *image0, const uint8_t *image1, const unsigned int width0, const unsigned int width1, const unsigned int centerX0, const unsigned int centerY0, const unsigned int centerX1, const unsigned int centerY1, const unsigned int image0PaddingElements, const unsigned int image1PaddingElements) |
Returns the sum of absolute differences between two square patches. | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static uint32_t | patch8BitPerChannelTemplate (const uint8_t *patch0, const uint8_t *patch1, const unsigned int patch0StrideElements, const unsigned int patch1StrideElements) |
Returns the sum of absolute differences between two square patches. | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static OCEAN_FORCE_INLINE uint32_t | patchBuffer8BitPerChannelTemplate (const uint8_t *image0, const unsigned int width0, const unsigned int centerX0, const unsigned int centerY0, const unsigned int image0PaddingElements, const uint8_t *buffer1) |
Returns the sum of absolute differences between a square image patch and a buffer. | |
template<unsigned int tChannels, unsigned int tPatchSize> | |
static uint32_t | patchBuffer8BitPerChannelTemplate (const uint8_t *patch0, const uint8_t *buffer1, const unsigned int patch0StrideElements) |
Returns the sum of absolute differences between a square image patch and a buffer. | |
template<unsigned int tBufferSize> | |
static uint32_t | buffer8BitPerChannelTemplate (const uint8_t *const buffer0, const uint8_t *const buffer1) |
Returns the sum of absolute differences between two individual buffers. | |
template<unsigned int tChannels> | |
static uint32_t | patchMirroredBorder8BitPerChannelTemplate (const uint8_t *image0, const uint8_t *image1, const unsigned int patchSize, const unsigned int width0, const unsigned int height0, const unsigned int width1, const unsigned int height1, const unsigned int centerX0, const unsigned int centerY0, const unsigned int centerX1, const unsigned int centerY1, const unsigned int image0PaddingElements, const unsigned int image1PaddingElements) |
Returns the sum of absolute differences between two patches within an image, patch pixels outside the image will be mirrored back into the image. | |
static OCEAN_FORCE_INLINE uint32_t | patch8BitPerChannel (const uint8_t *image0, const uint8_t *image1, const unsigned int channels, const unsigned int patchSize, const unsigned int width0, const unsigned int width1, const unsigned int centerX0, const unsigned int centerY0, const unsigned int centerX1, const unsigned int centerY1, const unsigned int image0PaddingElements, const unsigned int image1PaddingElements) |
Returns the sum of absolute differences between two square patches. | |
static uint32_t | patch8BitPerChannel (const uint8_t *patch0, const uint8_t *patch1, const unsigned int channels, const unsigned int patchSize, const unsigned int patch0StrideElements, const unsigned int patch1StrideElements) |
Returns the sum of absolute differences between two square patches. | |
static OCEAN_FORCE_INLINE uint32_t | patchBuffer8BitPerChannel (const uint8_t *image0, unsigned int channels, unsigned int patchSize, const unsigned int width0, const unsigned int centerX0, const unsigned int centerY0, const unsigned int image0PaddingElements, const uint8_t *buffer1) |
Returns the sum of absolute differences between a square image patch and a buffer. | |
static uint32_t | patchBuffer8BitPerChannel (const uint8_t *patch0, const uint8_t *buffer1, unsigned int channels, unsigned int patchSize, const unsigned int patch0StrideElements) |
Returns the sum of absolute differences between a square image patch and a buffer. | |
static uint32_t | buffer8BitPerChannel (const uint8_t *const buffer0, const uint8_t *const buffer1, const unsigned int bufferSize) |
Returns the sum of absolute differences between two individual buffers. | |
This class implements functions calculation the sum of absolute differences.
|
inlinestatic |
Returns the sum of square differences between two memory buffers.
buffer0 | The first memory buffer, must be valid |
buffer1 | The second memory buffer, must be valid |
tChannels | The number of channels the buffers have, with range [1, infinity) |
tPixels | The number of pixels the buffer holds, in pixels, with range [1, infinity) |
|
inlinestatic |
Determines the sum of absolute differences between two individual frames, individually for each plane, and individually for each channel.
firstFrame | The first frame for which the absolute difference will be determined, must be valid, must have an element type of FrameType::DT_UNSIGNED_INTEGER_8. |
secondFrame | The second frame for which the absolute difference will be determined, must be valid, must have the same frame type as 'firstFrame' |
absoluteDifferences | The resulting absolute differences, one for each plane and channel; first all differences for the first plane, then all differences for the second plane etc., with range [0, infinity) |
|
static |
Determines the sum of absolute differences between two individual frames, individually for each channel.
firstFrame | The first frame for which the absolute difference will be determined, must be valid |
secondFrame | The second frame for which the absolute difference will be determined, must be valid |
width | The with of the first frame and second frame in pixel, with range [1, infinity) |
height | The height of the first frame and second frame in pixel, with range [1, infinity) |
absoluteDifferences | The resulting absolute differences, one for each channel, must be valid, with range [0, infinity) |
firstFramePaddingElements | The number of optional padding elements at the end of each row of the first frame, in elements, with range [0, infinity) |
secondFramePaddingElements | The number of optional padding elements at the end of each row of the second frame, in elements, with range [0, infinity) |
T | The data type of each pixel element, e.g., 'uint8_t' or 'float' |
tChannels | The number of frame channels, with range [1, infinity) |
|
inlinestatic |
Returns the sum of absolute differences between two square image patches.
image0 | The image in which the first patch is located, must be valid |
image1 | The image in which the second patch is located, must be valid |
width0 | The width of the first image, in pixels, with range [tPatchSize, infinity) |
width1 | The width of the second image, in pixels, with range [tPatchSize, infinity) |
centerX0 | Horizontal center position of the (tPatchSize x tPatchSize) block in the first frame, with range [tPatchSize/2, width - tPatchSize/2 - 1] |
centerY0 | Vertical center position of the (tPatchSize x tPatchSize) block in the first frame, with range [tPatchSize/2, height - tPatchSize/2 - 1] |
centerX1 | Horizontal center position of the (tPatchSize x tPatchSize) block in the second frame, with range [tPatchSize/2, width - tPatchSize/2 - 1] |
centerY1 | Vertical center position of the (tPatchSize x tPatchSize) block in the second frame, with range [tPatchSize/2, height - tPatchSize/2 - 1] |
image0PaddingElements | The number of padding elements at the end of each row of the first image, in elements, with range [0, infinity) |
image1PaddingElements | The number of padding elements at the end of each row of the second image, in elements, with range [0, infinity) |
tChannels | The number of frame channels, with range [1, infinity) |
tPatchSize | The size of the square patch (the edge length) in pixel, with range [1, infinity), must be odd |
|
inlinestatic |
Returns the sum of absolute differences between an image patch and a memory buffer.
image0 | The image in which the image patch is located, must be valid |
width0 | Width of the first frame in pixels, with range [tPatchSize, infinity) |
centerX0 | Horizontal center position of the (tPatchSize x tPatchSize) block in the first frame, with range [tPatchSize / 2, width0 - tPatchSize / 2 - 1] |
centerY0 | Vertical center position of the (tPatchSize x tPatchSize) block in the first frame, with range [tPatchSize / 2, height0 - tPatchSize / 2 - 1] |
image0PaddingElements | The number of padding elements at the end of each row of the first image, in elements, with range [0, infinity) |
buffer1 | The memory buffer with tChannels * tPatchSize * tPatchSize elements, must be valid |
tChannels | The number of channels for the given frames, with range [1, infinity) |
tPatchSize | The size of the square patch (the edge length) in pixel, with range [1, infinity), must be odd |
|
static |
Returns the sum of absolute differences between two patches within an image, patch pixels outside the image will be mirrored back into the image.
image0 | The image in which the first patch is located, must be valid |
image1 | The image in which the second patch is located, must be valid |
width0 | The width of the first image, in pixels, with range [tPatchSize, infinity) |
height0 | The height of the first image, in pixels, with range [tPatchSize, infinity) |
width1 | The width of the second image, in pixels, with range [tPatchSize, infinity) |
height1 | The height of the second image, in pixels, with range [tPatchSize, infinity) |
centerX0 | Horizontal center position of the (tPatchSize x tPatchSize) block in the first frame, with range [tPatchSize/2, width - tPatchSize/2 - 1] |
centerY0 | Vertical center position of the (tPatchSize x tPatchSize) block in the first frame, with range [tPatchSize/2, height - tPatchSize/2 - 1] |
centerX1 | Horizontal center position of the (tPatchSize x tPatchSize) block in the second frame, with range [tPatchSize/2, width - tPatchSize/2 - 1] |
centerY1 | Vertical center position of the (tPatchSize x tPatchSize) block in the second frame, with range [tPatchSize/2, height - tPatchSize/2 - 1] |
image0PaddingElements | The number of padding elements at the end of each row of the first image, in elements, with range [0, infinity) |
image1PaddingElements | The number of padding elements at the end of each row of the second image, in elements, with range [0, infinity) |
tChannels | The number of frame channels, with range [1, infinity) |
tPatchSize | The size of the square patch (the edge length) in pixel, with range [1, infinity), must be odd |