Ocean
|
This class implements a frame transposer. More...
Data Structures | |
class | BlockTransposer |
Helper class for functions transposing blocks. More... | |
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 | |
static bool | transpose (const Frame &source, Frame &target, Worker *worker=nullptr) |
Transposes a given frame. More... | |
static bool | transpose (Frame &frame, Worker *worker=nullptr) |
Transposes a given frame. More... | |
template<typename T , unsigned int tChannels> | |
static void | transpose (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Transposes a given image buffer. More... | |
template<typename T , unsigned int tChannels> | |
static void | rotate90 (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const bool clockwise, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Rotates a given image buffer 90 degrees clockwise or counter clockwise. More... | |
template<typename T , unsigned int tChannels> | |
static void | rotate180 (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Rotates a given image buffer 180 degrees. More... | |
template<typename T , unsigned int tChannels> | |
static bool | rotate (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const int angle, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Rotates a given image with 90 degree steps. More... | |
Protected Types | |
enum | FlipDirection { FD_NONE , FD_LEFT_RIGHT , FD_TOP_BOTTOM } |
Definition of individual flip directions which can be applied to a transposed frame. More... | |
Static Protected Member Functions | |
template<typename T , unsigned int tChannels, FlipDirection tFlipDirection> | |
static void | transposeSubset (const T *source, T *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstSourceRow, const unsigned int numberSourceRows) |
Transposes the subset of a given image buffer. More... | |
template<typename TElementType , unsigned int tChannels> | |
static void | rotate90Subset (const TElementType *source, TElementType *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const bool clockwise, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstTargetRow, const unsigned int numberTargetRows) |
Rotates a subset of a given frame either clockwise or counter-clockwise by 90 degree. More... | |
This class implements a frame transposer.
|
protected |
Definition of individual flip directions which can be applied to a transposed frame.
Flipping the transposed result allows to rotate the image by 90 degree (clockwise and counter clockwise).
|
static |
Rotates a given image with 90 degree steps.
source | The source buffer to rotated, must be valid |
target | The target buffer receiving the rotated image, must not be 'source', 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) |
angle | The clockwise rotation angle to be used, must be a multiple of +/- 90, with range (-infinity, infinity) |
worker | Optional worker to distribute the computation |
sourcePaddingElements | The optional number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
T | The data type of each channel |
tChannels | The number of frame channels, with range [1, infinity) |
|
static |
Rotates a given image buffer 180 degrees.
source | The source buffer to transpose, must be valid |
target | The target buffer receiving the rotated image, must not be 'source', 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) |
worker | Optional worker to distribute the computation |
sourcePaddingElements | The optional number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
T | The data type of each channel |
tChannels | The number of frame channels, with range [1, infinity) |
|
static |
Rotates a given image buffer 90 degrees clockwise or counter clockwise.
source | The source buffer to transpose, must be valid |
target | The target buffer receiving the rotated image, must not be 'source', 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) |
clockwise | True, to rotate the source image clockwise; False, to rotate the image counter clockwise |
worker | Optional worker to distribute the computation |
sourcePaddingElements | The optional number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
T | The data type of each channel |
tChannels | The number of frame channels, with range [1, infinity) |
|
inlinestaticprotected |
Rotates a subset of a given frame either clockwise or counter-clockwise by 90 degree.
source | The source frame which will be rotated, must be valid |
target | The resulting rotated target frame, must be valid and must have the same buffer size as the source frame |
sourceWidth | The width of the source frame in pixel, with range [1, infinity) |
sourceHeight | The height of the source frame in pixel, with range [1, infinity) |
clockwise | True, to rotate the frame clockwise; False, to rotate the frame counter-clockwise |
sourcePaddingElements | Number of padding elements in the source frame, range: [0, infinity) |
targetPaddingElements | Number of padding elements in the target frame, range: [0, infinity) |
firstTargetRow | The first target row to be handled, with range [0, sourceWidth) |
numberTargetRows | The number of target rows to be handled, with range [1, sourceWidth - firstTargetRow] |
TElementType | Data type of the elements of the image pixels |
tChannels | Number of data channels, with range [1, infinity) |
|
static |
Transposes a given frame.
Beware: This function has a significantly bigger binary size impact than the corresponding template-based function.
source | The source frame to transpose, must be valid |
target | The target frame receiving the transposed image, if the frame type of the target frame does not match the transposed source frame, the target frame will be adjusted accordingly, must not be 'source' |
worker | Optional worker to distribute the computation |
|
static |
Transposes a given image buffer.
source | The source buffer to transpose, must be valid |
target | The target buffer receiving the transposed image, must not be 'source', 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) |
sourcePaddingElements | The number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
worker | Optional worker to distribute the computation |
T | The data type of each channel |
tChannels | The number of frame channels, with range [1, infinity) |
|
inlinestatic |
Transposes a given frame.
Beware: This function has a significantly bigger binary size impact than the corresponding template-based function.
frame | The frame to transpose, must be valid |
worker | Optional worker to distribute the computation |
|
staticprotected |
Transposes the subset of a given image buffer.
source | The source buffer to transpose |
target | The target buffer receiving the transposed image |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
sourcePaddingElements | The optional number of padding elements at the end of each row of the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each row of the target frame, in elements, with range [0, infinity) |
firstSourceRow | First source row to be handled |
numberSourceRows | The number of source rows to be handled |
T | The data type of each channel |
tChannels | The number of frame channels, with range [1, infinity) |
tFlipDirection | The flip direction to be applied after transposing |