Ocean
|
This class implements functions to enlarge/up-sample frames. More...
Data Structures | |
class | Comfort |
The following comfort class provides comfortable functions simplifying prototyping applications but also increasing binary size of the resulting applications. More... | |
Static Public Member Functions | |
template<unsigned int tChannelsWithAlpha, bool tAlphaAtFront, bool tSourceHasAlpha, bool tTransparentIs0xFF> | |
static void | addTransparentBorder8BitPerChannel (const unsigned char *source, unsigned char *target, const unsigned int width, const unsigned int height, const unsigned int leftBorder, const unsigned int topBorder, const unsigned int rightBorder, const unsigned int bottomBorder, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Adds a transparent border to a given frame. More... | |
template<typename T , unsigned int tChannels> | |
static void | addBorder (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int borderSizeLeft, const unsigned int borderSizeTop, const unsigned int borderSizeRight, const unsigned int borderSizeBottom, const T *color, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Adds a border to a given frame while all new pixels will receive a specified border color/value. More... | |
template<typename T , unsigned int tChannels> | |
static void | addBorderNearestPixel (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int borderSizeLeft, const unsigned int borderSizeTop, const unsigned int borderSizeRight, const unsigned int borderSizeBottom, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Adds a border to a given frame while the color of the border pixels are defined by the nearest pixels of the original frame. More... | |
template<typename T , unsigned int tChannels> | |
static void | addBorderMirrored (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int borderSizeLeft, const unsigned int borderSizeTop, const unsigned int borderSizeRight, const unsigned int borderSizeBottom, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements) |
Adds a border to a given frame by mirroring the frame's content. More... | |
template<typename T , unsigned int tChannels> | |
static void | multiplyByTwo (const T *source, T *target, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Doubles the size of a given frame by a pixel repeating upsampling. More... | |
Static Private Member Functions | |
template<typename T , unsigned int tChannels> | |
static void | multiplyByTwoSubset (const T *source, T *target, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Doubles a subset of a given frame by a pixel repeating upsampling. More... | |
This class implements functions to enlarge/up-sample frames.
|
static |
Adds a border to a given frame while all new pixels will receive a specified border color/value.
source | The source image to be extended, must be valid |
target | The target image receiving the extended frame, with resolution (sourceWidth + borderSizeLeft + borderSizeRight)x(sourceHeight + borderSizeTop + borderSizeBottom), must be valid |
sourceWidth | Width of the original source image in pixel, with range [1, infinity) |
sourceHeight | Height of the original source image in pixel, with range [1, infinity) |
borderSizeLeft | The size of the border at the left image boundary, in pixel, with range [0, infinity) |
borderSizeTop | The size of the border at the top image boundary, in pixel, with range [0, infinity) |
borderSizeRight | The size of the border at the right image boundary, in pixel, with range [0, infinity) |
borderSizeBottom | The size of the border at the bottom image boundary, in pixel, with range [0, infinity) |
color | Border color/value to be used for the new border pixels, must be tChannels values |
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) |
T | The data type of a pixel channel |
tChannels | The number of data channels, with range [1, infinity) |
|
static |
Adds a border to a given frame by mirroring the frame's content.
source | The source image to be extended, must be valid |
target | The target image receiving the extended frame, with resolution (sourceWidth + borderSizeLeft + borderSizeRight)x(sourceHeight + borderSizeTop + borderSizeBottom), must be valid |
sourceWidth | Width of the original source image in pixel, with range [1, infinity) |
sourceHeight | Height of the original source image in pixel, with range [1, infinity) |
borderSizeLeft | The size of the border at the left image boundary, in pixel, with range [0, sourceWidth] |
borderSizeTop | The size of the border at the top image boundary, in pixel, with range [0, sourceHeight] |
borderSizeRight | The size of the border at the right image boundary, in pixel, with range [0, sourceWidth] |
borderSizeBottom | The size of the border at the bottom image boundary, in pixel, with range [0, sourceHeight] |
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) |
T | The data type of a pixel channel |
tChannels | The number of data channels, with range [1, infinity) |
|
static |
Adds a border to a given frame while the color of the border pixels are defined by the nearest pixels of the original frame.
source | The source image to be extended, must be valid |
target | The target image receiving the extended frame, with resolution (sourceWidth + borderSizeLeft + borderSizeRight)x(sourceHeight + borderSizeTop + borderSizeBottom), must be valid |
sourceWidth | Width of the original source image in pixel, with range [1, infinity) |
sourceHeight | Height of the original source image in pixel, with range [1, infinity) |
borderSizeLeft | The size of the border at the left image boundary, in pixel, with range [0, infinity) |
borderSizeTop | The size of the border at the top image boundary, in pixel, with range [0, infinity) |
borderSizeRight | The size of the border at the right image boundary, in pixel, with range [0, infinity) |
borderSizeBottom | The size of the border at the bottom image boundary, in pixel, with range [0, 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) |
T | The data type of a pixel channel |
tChannels | The number of data channels, with range [1, infinity) |
|
static |
Adds a transparent border to a given frame.
The color of the transparent border pixels are taken from the nearest image pixel.
source | The source frame which will be extended with a transparent border |
target | Resulting target frame with transparent border |
width | The width of the source frame in pixel, with range [1, infinity) |
height | The height of the source frame in pixel, with range [1, infinity) |
leftBorder | Size of the left frame border in pixel, with range [1, infinity) |
topBorder | Size of the top frame border in pixel, with range [1, infinity) |
rightBorder | Size of the right frame border in pixel, with range [1, infinity) |
bottomBorder | Size of the bottom frame border in pixel, with range [1, 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) |
tChannelsWithAlpha | Number of channels in the source frame (including the alpha channel) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tSourceHasAlpha | True, if not only the source frame holds an alpha channel but also the target frame, however values in a target alpha channel will be untouched |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
static |
Doubles the size of a given frame by a pixel repeating upsampling.
source | Buffer of the source frame to be upsampled |
target | Buffer of the target frame receiving the upsampled frame |
targetWidth | Width of the target buffer in pixel, with range [2, infinity) and targetWidth / 2 == sourceWidth |
targetHeight | Height of the target buffer in pixel, with range [2, infinity) and targetHeight / 2 == sourceHeight |
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 computation |
T | The data type of a pixel channel |
tChannels | The number of data channels, with range [1, infinity) |
|
staticprivate |
Doubles a subset of a given frame by a pixel repeating upsampling.
source | Buffer of the source frame to be upsampled |
target | Buffer of the target frame receiving the upsampled frame |
targetWidth | Width of the target buffer in pixel, with range [2, infinity) and targetWidth / 2 == sourceWidth |
targetHeight | Height of the target buffer in pixel, with range [2, infinity) and targetHeight / 2 == sourceHeight |
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 target row to be handled, with range [0, targetHeight) |
numberTargetRows | Number of target rows to be handled, with range [1, targetHeight] |
T | The data type of a pixel channel |
tChannels | The number of data channels, with range [1, infinity) |