The Frame structure provides storage and manipulation of frames (multiplanar images).
More...
|
| Frame () |
|
| Frame (const Frame &frame) |
|
| Frame (const View< A > &view, bool flipped_=false, double timestamp_=0) |
|
| Frame (size_t width_, size_t height_, Format format_, bool flipped_=false, double timestamp_=0) |
|
| Frame (const Point< ptrdiff_t > &size, Format format_, bool flipped_=false, double timestamp_=0) |
|
| ~Frame () |
|
Frame * | Clone () const |
|
Frame & | operator= (const Frame &frame) |
|
Frame & | Ref () |
|
void | Recreate (size_t width_, size_t height_, Format format_) |
|
void | Recreate (const Point< ptrdiff_t > &size, Format format_) |
|
Frame | Region (const ptrdiff_t &left, const ptrdiff_t &top, const ptrdiff_t &right, const ptrdiff_t &bottom) const |
|
Frame | Region (ptrdiff_t &left, ptrdiff_t &top, ptrdiff_t &right, ptrdiff_t &bottom) const |
|
Frame | Region (const Point< ptrdiff_t > &topLeft, const Point< ptrdiff_t > &bottomRight) const |
|
Frame | Region (Point< ptrdiff_t > &topLeft, Point< ptrdiff_t > &bottomRight) const |
|
Frame | Region (const Rectangle< ptrdiff_t > &rect) const |
|
Frame | Region (Rectangle< ptrdiff_t > &rect) const |
|
Frame | Flipped () const |
|
Point< ptrdiff_t > | Size () const |
|
size_t | DataSize () const |
|
size_t | Area () const |
|
size_t | PlaneCount () const |
|
|
const size_t | width |
| A width of the frame.
|
|
const size_t | height |
| A height of the frame.
|
|
const Format | format |
| A pixel format types of the frame.
|
|
View< A > | planes [PLANE_COUNT_MAX] |
| Planes of the frame.
|
|
bool | flipped |
| A flag of vertically flipped image (false - frame point (0, 0) is placed at top left corner of the frame, true - frame point (0, 0) is placed at bottom left corner of the frame.
|
|
double | timestamp |
| A timestamp of the frame.
|
|
template<template< class > class A>
struct Simd::Frame< A >
The Frame structure provides storage and manipulation of frames (multiplanar images).
Related Functions.
Creates a new empty Frame structure.
Creates a new Frame structure on the base of the other frame.
- Note
- This constructor is not create new frame! It only creates a reference to the same frame. If you want to create a copy then must use method Simd::FRame::Clone.
- Parameters
-
[in] | frame | - an original frame. |
SIMD_INLINE Frame |
( |
const View< A > & |
view, |
|
|
bool |
flipped_ = false , |
|
|
double |
timestamp_ = 0 |
|
) |
| |
Creates a new one plane Frame structure on the base of the image view.
- Note
- This constructor is not create new image frame! It only creates a reference to the same image. If you want to create a copy then must use method Simd::Frame::Clone.
- Parameters
-
[in] | view | - an original image view. |
[in] | flipped_ | - a flag of vertically flipped image of created frame. It is equal to false by default. |
[in] | timestamp_ | - a timestamp of created frame. It is equal to 0 by default. |
SIMD_INLINE Frame |
( |
size_t |
width_, |
|
|
size_t |
height_, |
|
|
Format |
format_, |
|
|
bool |
flipped_ = false , |
|
|
double |
timestamp_ = 0 |
|
) |
| |
Creates a new Frame structure with specified width, height and pixel format.
- Parameters
-
[in] | width_ | - a width of created frame. |
[in] | height_ | - a height of created frame. |
[in] | format_ | - a pixel format of created frame. |
[in] | flipped_ | - a flag of vertically flipped image of created frame. It is equal to false by default. |
[in] | timestamp_ | - a timestamp of created frame. It is equal to 0 by default. |
SIMD_INLINE Frame |
( |
const Point< ptrdiff_t > & |
size, |
|
|
Format |
format_, |
|
|
bool |
flipped_ = false , |
|
|
double |
timestamp_ = 0 |
|
) |
| |
Creates a new Frame structure with specified width, height and pixel format.
- Parameters
-
[in] | size | - a size (width and height) of created frame. |
[in] | format_ | - a pixel format of created frame. |
[in] | flipped_ | - a flag of vertically flipped image of created frame. It is equal to false by default. |
[in] | timestamp_ | - a timestamp of created frame. It is equal to 0 by default. |
SIMD_INLINE Frame< A > * Clone |
( |
| ) |
const |
Gets a copy of current frame.
- Returns
- a pointer to the new Frame structure. The user must free this pointer after usage.
SIMD_INLINE Frame< A > & operator= |
( |
const Frame< A > & |
frame | ) |
|
Creates reference to other Frame structure.
- Note
- This function is not create copy of the frame! It only create a reference to the same frame.
- Parameters
-
[in] | frame | - an original frame. |
- Returns
- a reference to itself.
SIMD_INLINE Frame< A > & Ref |
( |
| ) |
|
Creates reference to itself.
- Returns
- a reference to itself.
SIMD_INLINE void Recreate |
( |
size_t |
width_, |
|
|
size_t |
height_, |
|
|
Format |
format_ |
|
) |
| |
Re-creates a Frame structure with specified width, height and pixel format.
- Parameters
-
[in] | width_ | - a width of re-created frame. |
[in] | height_ | - a height of re-created frame. |
[in] | format_ | - a pixel format of re-created frame. |
SIMD_INLINE void Recreate |
( |
const Point< ptrdiff_t > & |
size, |
|
|
Format |
format_ |
|
) |
| |
Re-creates a Frame structure with specified width, height and pixel format.
- Parameters
-
[in] | size | - a size (width and height) of re-created frame. |
[in] | format_ | - a pixel format of re-created frame. |
SIMD_INLINE Frame< A > Region |
( |
const ptrdiff_t & |
left, |
|
|
const ptrdiff_t & |
top, |
|
|
const ptrdiff_t & |
right, |
|
|
const ptrdiff_t & |
bottom |
|
) |
| const |
Creates a new Frame structure which points to the region of current frame bounded by the rectangle with specified coordinates.
- Parameters
-
[in] | left | - a left side of the region. |
[in] | top | - a top side of the region. |
[in] | right | - a right side of the region. |
[in] | bottom | - a bottom side of the region. |
- Returns
- - a new Frame structure which points to the region of frame.
SIMD_INLINE Frame< A > Region |
( |
ptrdiff_t & |
left, |
|
|
ptrdiff_t & |
top, |
|
|
ptrdiff_t & |
right, |
|
|
ptrdiff_t & |
bottom |
|
) |
| const |
Creates a new Frame structure which points to the region of current frame bounded by the rectangle with specified coordinates.
- Parameters
-
[in,out] | left | - a left side of the required region. Returns the left side of the actual region. |
[in,out] | top | - a top side of the required region. Returns the top side of the actual region. |
[in,out] | right | - a right side of the required region. Returns the right side of the actual region. |
[in,out] | bottom | - a bottom side of the required region. Returns the bottom side of the actual region. |
- Returns
- - a new Frame structure which points to the region of frame.
SIMD_INLINE Frame< A > Region |
( |
const Point< ptrdiff_t > & |
topLeft, |
|
|
const Point< ptrdiff_t > & |
bottomRight |
|
) |
| const |
Creates a new Frame structure which points to the region of frame bounded by the rectangle with specified coordinates.
- Parameters
-
[in] | topLeft | - a top-left corner of the region. |
[in] | bottomRight | - a bottom-right corner of the region. |
- Returns
- - a new Frame structure which points to the region of frame.
SIMD_INLINE Frame< A > Region |
( |
Point< ptrdiff_t > & |
topLeft, |
|
|
Point< ptrdiff_t > & |
bottomRight |
|
) |
| const |
Creates a new Frame structure which points to the region of frame bounded by the rectangle with specified coordinates.
- Parameters
-
[in,out] | topLeft | - a top-left corner of the required region. Returns the top-left corner of the actual region. |
[in,out] | bottomRight | - a bottom-right corner of the required region. Returns the bottom-right corner of the actual region. |
- Returns
- - a new Frame structure which points to the region of frame.
SIMD_INLINE Frame< A > Region |
( |
const Rectangle< ptrdiff_t > & |
rect | ) |
const |
Creates a new Frame structure which points to the region of frame bounded by the rectangle with specified coordinates.
- Parameters
-
[in] | rect | - a rectangle which bound the region. |
- Returns
- - a new Frame structure which points to the region of frame.
Creates a new Frame structure which points to the region of frame bounded by the rectangle with specified coordinates.
- Parameters
-
[in,out] | rect | - a rectangle which bound the required region. Returns the actual region. |
- Returns
- - a new Frame structure which points to the region of frame.
SIMD_INLINE Frame< A > Flipped |
( |
| ) |
const |
Creates a new Frame structure which points to the vertically flipped frame.
- Returns
- - a new Frame structure which points to the flipped frame.
SIMD_INLINE Point< ptrdiff_t > Size |
( |
| ) |
const |
Gets size (width and height) of the frame.
- Returns
- - a new Point structure with frame width and height.
SIMD_INLINE size_t DataSize |
( |
| ) |
const |
Gets size in bytes required to store pixel data of current Frame structure.
- Returns
- - a size of data pixels in bytes.
SIMD_INLINE size_t Area |
( |
| ) |
const |
Gets area in pixels of of current Frame structure.
- Returns
- - a area of current Frame in pixels.
SIMD_INLINE size_t PlaneCount |
( |
Format |
format | ) |
|
|
static |
Gets number of planes in the frame for current pixel format.
- Parameters
-
[in] | format | - a pixel format. |
- Returns
- - a number of planes.
SIMD_INLINE size_t PlaneCount |
( |
| ) |
const |
Gets number of planes for current frame.
- Returns
- - a number of planes.
const size_t PLANE_COUNT_MAX = 4 |
|
static |
Maximal count of pixel planes in a frame.
|