This class implements functions downsizing frames that hold alpha channels.
More...
|
class | Comfort |
| The following comfort class provides comfortable functions simplifying prototyping applications but also increasing binary size of the resulting applications. More...
|
|
|
template<unsigned int tChannels, bool tAlphaAtFront, bool tTransparentIs0xFF> |
static void | divideByTwo8BitPerChannel (const uint8_t *source, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
| Divides a given 8 bit per channel frame by two, taking four pixel values into account:
| 1 1 |
| 1 1 |
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. More...
|
|
|
template<unsigned int tChannels, bool tAlphaAtFront, bool tTransparentIs0xFF> |
static void | divideByTwo8BitPerChannelSubset (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 firstTargetRow, const unsigned int numberTargetRows) |
| Divides a subset of a given 8 bit per channel frame by two, taking the average of four pixel values. More...
|
|
This class implements functions downsizing frames that hold alpha channels.
◆ divideByTwo8BitPerChannel()
template<unsigned int tChannels, bool tAlphaAtFront, bool tTransparentIs0xFF>
void Ocean::CV::FrameShrinkerAlpha::divideByTwo8BitPerChannel |
( |
const uint8_t * |
source, |
|
|
uint8_t * |
target, |
|
|
const unsigned int |
sourceWidth, |
|
|
const unsigned int |
sourceHeight, |
|
|
const unsigned int |
sourcePaddingElements, |
|
|
const unsigned int |
targetPaddingElements, |
|
|
Worker * |
worker = nullptr |
|
) |
| |
|
static |
Divides a given 8 bit per channel frame by two, taking four pixel values into account:
| 1 1 |
| 1 1 |
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.
- Parameters
-
source | The source frame buffer to resize |
target | The 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) |
worker | Optional worker object to distribute the computational load to several CPU cores |
- Template Parameters
-
tChannels | Number of channels of the frame (including the alpha channel), with range [1, infinity) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
◆ divideByTwo8BitPerChannelSubset()
template<unsigned int tChannels, bool tAlphaAtFront, bool tTransparentIs0xFF>
void Ocean::CV::FrameShrinkerAlpha::divideByTwo8BitPerChannelSubset |
( |
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 |
firstTargetRow, |
|
|
const unsigned int |
numberTargetRows |
|
) |
| |
|
staticprivate |
Divides a subset of a given 8 bit per channel frame by two, taking the average of four pixel values.
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.
- Parameters
-
source | The source frame buffer to resize |
target | The 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) |
firstTargetRow | First (including) row to halve |
numberTargetRows | Number of rows to halve |
- Template Parameters
-
tChannels | Number of channels of the frame (including the alpha channel), with range [1, infinity) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
The documentation for this class was generated from the following file: