Ocean
|
This class implements function to downsize a frame. More...
Static Public Member Functions | |
static bool | downsampleByTwo11 (const Frame &source, Frame &target, Worker *worker=nullptr) |
Reduces the resolution of a given frame by two, applying a 1-1 downsampling. More... | |
static bool | downsampleBinayMaskByTwo11 (const Frame &source, Frame &target, const unsigned int threshold=766u, Worker *worker=nullptr) |
Reduces the resolution of a given binary mask by two, applying a 1-1 downsampling. More... | |
static bool | downsampleByTwo14641 (const Frame &source, Frame &target, Worker *worker=nullptr) |
Reduces the resolution of a given frame by two, applying a 1-4-6-4-1 downsampling. More... | |
static bool | downsampleByTwo11 (Frame &frame, Worker *worker=nullptr) |
Reduces the resolution of a given frame by two, taking four pixel values into account. More... | |
static bool | downsampleBinayMaskByTwo11 (Frame &mask, const unsigned int threshold=766u, Worker *worker=nullptr) |
Reduces the resolution of a given binary mask by two, taking 2x2 (= four) mask pixel values into account. More... | |
static bool | downsampleByTwo14641 (Frame &frame, Worker *worker=nullptr) |
Reduces the resolution of a given frame by two, applying a 1-4-6-4-1 downsampling. More... | |
static bool | pyramidByTwo11 (const Frame &source, uint8_t *const pyramidTarget, const size_t pyramidTargetSize, const unsigned int layers, const bool copyFirstLayer, Worker *worker) |
Fills the buffer of a pyramid frame for frames with 1 plane and data type DT_UNSIGNED_INTEGER_8. More... | |
static bool | pyramidByTwo8BitPerChannel11 (const uint8_t *source, uint8_t *pyramidTarget, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const size_t pyramidTargetSize, const unsigned int layers, const unsigned int sourcePaddingElements, const bool copyFirstLayer, Worker *worker) |
Fills the buffer of a pyramid frame for frames with 1 plane and data type DT_UNSIGNED_INTEGER_8 applying a 1-1 downsampling. More... | |
static void | downsampleByTwo8BitPerChannel11 (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Reduces the resolution of a given frame by two, applying a 1-1 downsampling. More... | |
static void | downsampleBinayMaskByTwo8BitPerChannel11 (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int threshold=766u, Worker *worker=nullptr) |
Reduces the resolution of a given binary frame with 8bit per pixel with values 0 and 255 by two, taking four pixel values into account. More... | |
static void | downsampleByTwo8BitPerChannel14641 (const uint8_t *const source, uint8_t *const target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Reduces the resolution of a given frame by two, applying a 1-4-6-4-1 downsampling. More... | |
Protected Types | |
typedef void(* | DownsampleBlockByTwo8BitPerChannelFunction) (const uint8_t *const sourceRow0, const uint8_t *const sourceRow1, uint8_t *const target) |
Definition of a function pointer allowing to down sample a block of elements by using a 11 pattern. More... | |
typedef void(* | DownsampleBlockByTwoBinary8BitPerChannelFunction) (const uint8_t *const sourceRow0, const uint8_t *const sourceRow1, uint8_t *const target, const uint16_t threshold) |
Definition of a function pointer allowing to down sample a binary block of elements by using a 11 pattern. More... | |
Static Protected Member Functions | |
static bool | pyramidByTwo8BitPerChannel11WithThreads (const uint8_t *source, uint8_t *pyramidTarget, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const size_t pyramidTargetSize, const unsigned int layers, const bool copyFirstLayer, const unsigned int sourcePaddingElements, const unsigned int threads, Worker *worker) |
Fills the buffer of a pyramid frame for frames with 1 plane and data type DT_UNSIGNED_INTEGER_8. More... | |
static void | pyramidByTwo8BitPerChannel11WithThreadsSubset (const uint8_t *source, uint8_t *pyramidTarget, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const size_t pyramidTargetSize, const unsigned int layers, const bool copyFirstLayer, const unsigned int sourcePaddingElements, const unsigned int firstSubsetsSourceHeight, const unsigned int subsets, const unsigned int subsetIndex, const unsigned int valueOne) |
Fills a subset of the buffer of a pyramid frame for a given frame with 1 plane and data type DT_UNSIGNED_INTEGER_8. More... | |
static void | downsampleByTwo8BitPerChannel11Subset (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Reduces the resolution of a given frame by two. More... | |
static void | downsampleBinayMaskByTwo8BitPerChannel11Subset (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int threshold, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Reduces the resolution of a given binary frame with 8bit per pixel with values 0 and 255 by two, taking four pixel values into account. More... | |
static void | determineFunctionDownsampleBlockByTwo8Bit11 (const unsigned int sourceWidth, const unsigned int channels, DownsampleBlockByTwo8BitPerChannelFunction &downsampleBlockFunction, unsigned int &sourceElementsPerBlock) |
Determines the function to down sample a block of pixel elements by two with a 11 filter pattern. More... | |
static OCEAN_PREVENT_INLINE void | downsampleByTwoOneRowThreeColumns8BitPerChannel121 (const uint8_t *source, uint8_t *target, const unsigned int channels, const unsigned int sourceStrideElements) |
Downsamples an area of 2x3 pixels (two rows and three columns) to one pixel in a frame, applying a 1-2-1 down sampling filter. More... | |
static OCEAN_PREVENT_INLINE void | downsampleByTwoThreeRows8BitPerChannel121 (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int channels, const unsigned int sourceStrideElements) |
Downsamples three rows to one row in a frame, applying a 2x3 [1-2-1, 1-2-1] down sampling filter. More... | |
static void | downsampleByTwoRowVertical8BitPerChannel14641 (const uint8_t *const source, uint16_t *targetRow, const unsigned int sourceElements, const unsigned int sourceHeight, const unsigned int sourceStrideElements, const unsigned int ySource) |
Applies a vertical 14641 filter to each pixel in a given row not applying any SIMD instructions. More... | |
static void | downsampleByTwoRowHorizontal8BitPerChannel14641 (const uint16_t *sourceRow, uint8_t *targetRow, const unsigned int targetWidth, const unsigned int channels) |
Applies a horizontal 14641 filter to each second pixel in a given row not applying any SIMD instructions. More... | |
static void | downsampleByTwoRowVertical8BitPerChannel14641SSE (const uint8_t *const source, uint16_t *targetRow, const unsigned int sourceElements, const unsigned int sourceHeight, const unsigned int sourceStrideElements, const unsigned int ySource) |
Applies a vertical 14641 filter to each pixel in a given row using SSE instructions. More... | |
static void | downsampleByTwoRowVertical8BitPerChannel14641NEON (const uint8_t *const source, uint16_t *targetRow, const unsigned int sourceElements, const unsigned int sourceHeight, const unsigned int sourceStrideElements, const unsigned int ySource) |
Applies a vertical 14641 filter to each pixel in a given row using NEON instructions. More... | |
template<unsigned int tChannels> | |
static void | downsampleByTwoRowHorizontal8BitPerChannel14641NEON (const uint16_t *sourceRow, uint8_t *targetRow, const unsigned int targetWidth, const unsigned int channels) |
Applies a horizontal 14641 filter to each second pixel in a given row applying NEON instructions. More... | |
static void | downsampleByTwo8BitPerChannel14641Subset (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int channels, const unsigned int sourceStrideElements, const unsigned int targetStrideElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Reduces the resolution in a subregion of a given frame by two, taking 5x5 (= 25) pixel values into account. More... | |
static unsigned int | mirroredBorderLocationLeft (const int value) |
Mirrors a given value at the left border if necessary. More... | |
static unsigned int | mirroredBorderLocationRight (const unsigned int value, const unsigned int size) |
Mirrors a given value at the right border if necessary. More... | |
This class implements function to downsize a frame.
|
protected |
Definition of a function pointer allowing to down sample a block of elements by using a 11 pattern.
sourceRow0 | The upper source row, must be valid |
sourceRow1 | The lower source row, must be valid |
target | The target receiving the down sampled data |
|
protected |
Definition of a function pointer allowing to down sample a binary block of elements by using a 11 pattern.
sourceRow0 | The upper source row, must be valid |
sourceRow1 | The lower source row, must be valid |
target | The target receiving the down sampled data |
threshold | Minimal sum threshold of four pixels to result in a pixel with value 255 |
|
staticprotected |
Determines the function to down sample a block of pixel elements by two with a 11 filter pattern.
This function will return the function able to handle the largest block of elements, if any function exists.
sourceWidth | The width of the source frame in pixel, with range [2, infinity) |
channels | The number of frame channels, with range [1, infinity) |
downsampleBlockFunction | The resulting function down sampling the block of elements, nullptr if no matching function could be determined |
sourceElementsPerBlock | The resulting number of source elements which will be handled by the resulting down sampling function, 0 if no matching function could be determined |
|
static |
Reduces the resolution of a given binary mask by two, applying a 1-1 downsampling.
Each downsampled pixel is based on 2x2 (= four) corresponding pixels from the source image:
| 1 1 | | 1 1 | * 1/4
If the given source image has an odd frame dimension the last pixel row or the last pixel column is filtered together with the two valid rows or columns respectively.
If the type of the target frame does not match to the input frame the target frame (and image buffer) will be replaced by the correct one.
source | The source mask to resize, must be valid |
target | The target mask receiving the down sampled frame data, can be invalid |
threshold | The threshold of the minimal sum of the four mask pixels values to result in a downsampled pixel with value 255, with range [0, 255 * 4] |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
inlinestatic |
Reduces the resolution of a given binary mask by two, taking 2x2 (= four) mask pixel values into account.
mask | The mask to down sample, must be valid |
threshold | The threshold of the minimal sum of the four mask pixels values to result in a downsampled pixel with value 255, with range [0, 255 * 4] |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
inlinestatic |
Reduces the resolution of a given binary frame with 8bit per pixel with values 0 and 255 by two, taking four pixel values into account.
source | Binary source frame buffer to resize |
target | Binary target frame buffer |
sourceWidth | Width of the source frame in pixel, with range [2, infinity) |
sourceHeight | Height of the source frame in pixel, with range [2, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
threshold | Minimal sum threshold of four pixels to result in a pixel with value 255 |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
staticprotected |
Reduces the resolution of a given binary frame with 8bit per pixel with values 0 and 255 by two, taking four pixel values into account.
source | The binary source frame, must be valid |
target | The binary target frame, must be valid |
sourceWidth | Width of the source frame in pixel, with range [2, infinity) |
sourceHeight | Height of the source frame in pixel, with range [2, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
threshold | The threshold of the minimal sum of the four mask pixels values to result in a downsampled pixel with value 255, with range [0, 255 * 4] |
firstTargetRow | The first target row to be handled, with range [0, sourceHeight / 2 - 1] |
numberTargetRows | The number of target rows to be handled, with range [1, sourceHeight / 2 - firstTargetRow] |
|
static |
Reduces the resolution of a given frame by two, applying a 1-1 downsampling.
Each downsampled pixel is based on 2x2 (= four) corresponding pixels from the source image:
| 1 1 | | 1 1 | * 1/4
If the given source image has an odd frame dimension the last pixel row or the last pixel column is filtered together with the two valid rows or columns respectively.
If the type of the target frame does not match to the input frame the target frame (and image buffer) will be replaced by the correct one.
source | The source frame to resize, must be valid |
target | The target frame receiving the down sampled frame data, can be invalid |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
inlinestatic |
Reduces the resolution of a given frame by two, taking four pixel values into account.
If the given source image has an odd frame dimension the last pixel row or the last pixel column is filtered together with the two valid rows or columns respectively.
frame | The frame to down sample, must be valid |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
static |
Reduces the resolution of a given frame by two, applying a 1-4-6-4-1 downsampling.
Each downsampled pixel is based on 5x5 (= 25) corresponding pixels from the source image:
| 1 4 6 4 1 | | 4 16 24 16 4 | | 6 24 36 24 6 | * 1/256 | 4 16 24 16 4 | | 1 4 6 4 1 |
The filter values are determined at even pixel coordinates (0, 2, 4, ...). If the type of the target frame does not match to the input frame the target frame (and image buffer) will be replaced by the correct one.
By default, the resolution of the target frame will be set to (source.width() / 2, source.height() / 2).
source | The source frame to resize, must be valid |
target | The target frame receiving the down sampled frame data, with resolution [source.width() / 2, (source.width() + 1) / 2]x[source.height() / 2, (source.height() + 1) / 2], can be invalid |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
inlinestatic |
Reduces the resolution of a given frame by two, applying a 1-4-6-4-1 downsampling.
Each downsampled pixel is based on 5x5 (= 25) corresponding pixels from the source image:
| 1 4 6 4 1 | | 4 16 24 16 4 | | 6 24 36 24 6 | * 1/256 | 4 16 24 16 4 | | 1 4 6 4 1 |
The filter values are determined at even pixel coordinates (0, 2, 4, ...).
The resulting frame will have the resolution (frame.width() / 2, frame.height() / 2).
frame | The frame to down sample, must be valid |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
inlinestatic |
Reduces the resolution of a given frame by two, applying a 1-1 downsampling.
Each downsampled pixel is based on 2x2 (= four) corresponding pixels from the source image:
| 1 1 | | 1 1 | * 1/4
The target width and target height will be sourceWidth / 2, targetHeight / 2.
In case, the given source image has an odd frame resolution the last pixel row or the last pixel column is filtered together with the two valid rows or columns respectively.
However, in general, this function is meant to be used for images with even width and height.
source | The source frame buffer to resize, must be valid |
target | The target frame buffer receiving the down sampled image information, must be valid |
sourceWidth | Width of the source frame in pixel, with range [2, infinity) |
sourceHeight | Height of the source frame in pixel, with range [2, infinity) |
channels | The number of data channel the frames have, with range [1, infinity) |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
staticprotected |
Reduces the resolution of a given frame by two.
source | The source frame buffer to resize, must be valid |
target | The target frame buffer receiving the down sampled image information, must be valid |
sourceWidth | Width of the source frame in pixel, with range [2, infinity) |
sourceHeight | Height of the source frame in pixel, with range [2, infinity) |
channels | The number of data channel the frames have, with range [1, infinity) |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
firstTargetRow | The first target row to be handled, with range [0, sourceHeight / 2 - 1] |
numberTargetRows | The number of target rows to be handled, with range [1, sourceHeight / 2 - firstTargetRow] |
|
inlinestatic |
Reduces the resolution of a given frame by two, applying a 1-4-6-4-1 downsampling.
Each downsampled pixel is based on 5x5 (= 25) corresponding pixels from the source image:
| 1 4 6 4 1 | | 4 16 24 16 4 | | 6 24 36 24 6 | * 1/256 | 4 16 24 16 4 | | 1 4 6 4 1 |
The filter values are determined at even pixel coordinates.
source | The source frame to resize, must be valid |
target | The target frame receiving the down sampled frame data, with memory for (targetWidth * targetHeight) pixels, must be valid |
sourceWidth | The width of the source frame in pixel, with range [2, infinity) |
sourceHeight | The height of the source frame in pixel, with range [2, infinity) |
targetWidth | The width of the target frame in pixel, with range [sourceWidth / 2, (sourceWidth + 1) / 2] |
targetHeight | The height of the target frame in pixel, with range [sourceHeight / 2, (sourceHeight + 1) / 2] |
channels | The number of frame channels, with range [1, infinity) |
sourcePaddingElements | Optional padding at the end of each source row in elements, with range [0, infinity) |
targetPaddingElements | Optional padding at the end of each target row in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load to several CPU cores |
|
staticprotected |
Reduces the resolution in a subregion of a given frame by two, taking 5x5 (= 25) pixel values into account.
The filter values are determined at even pixel coordinates.
source | The source frame to resize, must be valid |
target | The target frame receiving the down sample frame data, with memory for (targetWidth * targetHeight) pixels, must be valid |
sourceWidth | The width of the source frame in pixel, with range [2, infinity) |
sourceHeight | The height of the source frame in pixel, with range [2, infinity) |
targetWidth | The width of the target frame in pixel, with range [sourceWidth / 2, (sourceWidth + 1) / 2] |
channels | The number of frame channels, with range [1, infinity) |
sourceStrideElements | The stride of the source frame in elements (sourceWidth * channels + optional padding), with range [sourceWidth * channels, infinity) |
targetStrideElements | The stride of the target frame in elements (targetWidth * channels + optional padding), with range [targetWidth * channels, infinity) |
firstTargetRow | The first target row to be handled, with range [0, targetHeight) |
numberTargetRows | The number of target rows to be handled, with range [1, targetHeight - firstTargetRow] |
|
staticprotected |
Downsamples an area of 2x3 pixels (two rows and three columns) to one pixel in a frame, applying a 1-2-1 down sampling filter.
This function is typically handling the last pixel in a frame (if the frame has an odd width).
source | The location of the top left pixel in the source frame, must be valid |
target | The location in the target frame, must be valid |
channels | The number of channels the source (and target) frame have, with range [1, infinity) |
sourceStrideElements | The number of elements between two successive rows in the source frame, in elements, with range [sourceWidth * channels, infinity) |
|
staticprotected |
Applies a horizontal 14641 filter to each second pixel in a given row not applying any SIMD instructions.
Each second pixel is skipped so that the target row has a length half of the source row.
This function can be used to down sample an image e.g., by a factor of two.
sourceRow | The source row already holding the vertical filter responses to which now the horizontal filter will be applied, must be valid |
targetRow | The target row receiving the filter results which will be normalized before assignment, must be valid |
targetWidth | The width of the target row in pixel, with range [1, infinity) |
channels | The number of channels the target row (and source row) has, with range [1, infinity) |
|
staticprotected |
Applies a horizontal 14641 filter to each second pixel in a given row applying NEON instructions.
Each second pixel is skipped so that the target row has a length half of the source row.
This function can be used to down sample an image e.g., by a factor of two.
sourceRow | The source row already holding the vertical filter responses to which now the horizontal filter will be applied, must be valid |
targetRow | The target row receiving the filter results which will be normalized before assignment, must be valid |
targetWidth | The width of the target row in pixel, with individual ranges depending on tChannels |
channels | The number of frame channels the target row (and source row) has, with range [1, infinity) |
tChannels | The number of channels the target row (and source row) has, with range [1, 4] |
|
staticprotected |
Applies a vertical 14641 filter to each pixel in a given row not applying any SIMD instructions.
This function can be used to down sample an image e.g., by a factor of two.
source | The entire source frame holding the row to which the filter is applied, must be valid |
targetRow | The target row receiving the filter results which are not normalized, must be valid |
sourceElements | The number of elements in each row (pixels * channels), with range [1, infinity) |
sourceHeight | The height of the source frame in pixel, with range [2, infinity) |
sourceStrideElements | The stride of the source frame (the number of elements in each row - may including padding at the end of each row), with range [sourceElements, infinity) |
ySource | The row within the source frame to which the filter will be applied, with range [0, sourceHeight) |
|
staticprotected |
Applies a vertical 14641 filter to each pixel in a given row using NEON instructions.
This function can be used to down sample an image e.g., by a factor of two.
source | The entire source frame holding the row to which the filter is applied, must be valid |
targetRow | The target row receiving the filter results which are not normalized, must be valid |
sourceElements | The number of elements in each row (pixels * channels), with range [16, infinity) |
sourceHeight | The height of the source frame in pixel, with range [2, infinity) |
sourceStrideElements | The stride of the source frame (the number of elements in each row - may including padding at the end of each row), with range [sourceElements, infinity) |
ySource | The row within the source frame to which the filter will be applied, with range [0, sourceHeight) |
|
staticprotected |
Applies a vertical 14641 filter to each pixel in a given row using SSE instructions.
This function can be used to down sample an image e.g., by a factor of two.
source | The entire source frame holding the row to which the filter is applied, must be valid |
targetRow | The target row receiving the filter results which are not normalized, must be valid |
sourceElements | The number of elements in each row (pixels * channels), with range [1, infinity) |
sourceHeight | The height of the source frame in pixel, with range [2, infinity) |
sourceStrideElements | The stride of the source frame (the number of elements in each row - may including padding at the end of each row), with range [sourceElements, infinity) |
ySource | The row within the source frame to which the filter will be applied, with range [0, sourceHeight) |
|
staticprotected |
Downsamples three rows to one row in a frame, applying a 2x3 [1-2-1, 1-2-1] down sampling filter.
In case the width of the source rows is 1 pixel, a 1x3 [1-2-1] is applied.
In case the width of the source rows is not a multiple of two, a 3x3 [1-2-1, 2-4-2, 1-2-1] filter is applied to the last 3 pixels.
source | The location of the left pixel in the top source row, must be valid |
target | The location in the left pixel target row, must be valid |
sourceWidth | The number of pixels in the source frame, with range [1, infinity) |
channels | The number of channels the source (and target) frame have, with range [1, infinity) |
sourceStrideElements | The number of elements between two successive rows in the source frame, in elements, with range [sourceWidth * channels, infinity) |
|
static |
Fills the buffer of a pyramid frame for frames with 1 plane and data type DT_UNSIGNED_INTEGER_8.
source | The source frame buffer to be used, must be valid |
pyramidTarget | The frame buffer of the frame pyramid, large enough for the requested layers, must be valid |
pyramidTargetSize | The size of the pyramid target memory, in bytes, with range [1, infinity) |
layers | The number of pyramid layers to be created, with range [1, infinity) |
copyFirstLayer | True, to copy the first layer before processing the next finer layers; False, to start directly with the next coarser layer (the memory for pyramidTarget can then be correspondingly smaller) |
worker | Optional worker object to distribute the computational load, nullptr otherwise |
|
static |
Fills the buffer of a pyramid frame for frames with 1 plane and data type DT_UNSIGNED_INTEGER_8 applying a 1-1 downsampling.
Each pixel of a coarser pyramid level is based on 2x2 pixels from the corresponding finer pyramid level.
source | The source frame buffer to be used, must be valid |
pyramidTarget | The frame buffer of the frame pyramid, large enough for the requested layers, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
channels | The number of data channel the frames have, with range [1, infinity) |
pyramidTargetSize | The size of the pyramid target memory, in bytes, with range [1, infinity) |
layers | The number of pyramid layers to be created, with range [1, infinity) |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
copyFirstLayer | True, to copy the first layer before processing the next finer layers; False, to start directly with the next coarser layer (the memory for pyramidTarget can then be correspondingly smaller) |
worker | Optional worker object to distribute the computational load, nullptr otherwise |
|
staticprotected |
Fills the buffer of a pyramid frame for frames with 1 plane and data type DT_UNSIGNED_INTEGER_8.
source | The source frame buffer from which the pyramid will be created, must be valid |
pyramidTarget | The frame buffer of the frame pyramid, large enough for the requested layers, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
channels | The number of frame channels the source frame has, with range [1, infinity) |
pyramidTargetSize | The size of the pyramid target memory, in bytes, with range [1, infinity) |
layers | The number of pyramid layers to be created, with range [1, infinity) |
copyFirstLayer | True, to copy the first layer before processing the next finer layers; False, to start directly with the next coarser layer |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computational load |
threads | The number of threads to be used if a valid worker is defined, with range [1u, worker->threads()] and the following must hold: threads * 2^layers <= sourceHeight |
|
staticprotected |
Fills a subset of the buffer of a pyramid frame for a given frame with 1 plane and data type DT_UNSIGNED_INTEGER_8.
source | The source frame buffer from which the pyramid will be created, must be valid |
pyramidTarget | The frame buffer of the frame pyramid, large enough for the requested layers, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
channels | The number of frame channels the source image has, with range [1, infinity) |
pyramidTargetSize | The size of the pyramid target memory, in bytes, with range [1, infinity) |
layers | The number of pyramid layers to be created, with range [1, infinity) |
copyFirstLayer | True, to copy the first layer before processing the next finer layers; False, to start directly with the next coarser layer |
sourcePaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
firstSubsetsSourceHeight | The height of the first subsets on the finest pyramid layer, with range [1, sourceHeight] |
subsets | The number of subsets which will be used in parallel (the number of threads executing the function in parallel) |
subsetIndex | The index of the subset which is handled, with range [0, subsetIndex) |
valueOne | The parameter must be 1 |