The Pyramid structure provides storage and manipulation of pyramid images. More...
Public Types | |
typedef A< uint8_t > | Allocator |
Public Member Functions | |
Pyramid () | |
Pyramid (const Point< ptrdiff_t > &size, size_t levelCount) | |
Pyramid (size_t width, size_t height, size_t levelCount) | |
void | Recreate (Point< ptrdiff_t > size, size_t levelCount) |
void | Recreate (size_t width, size_t height, size_t levelCount) |
size_t | Size () const |
View< A > & | operator[] (size_t level) |
const View< A > & | operator[] (size_t level) const |
View< A > & | At (size_t level) |
const View< A > & | At (size_t level) const |
View< A > & | Top () |
const View< A > & | Top () const |
void | Swap (Pyramid< A > &pyramid) |
Detailed Description
template<template< class > class A>
struct Simd::Pyramid< A >
The Pyramid structure provides storage and manipulation of pyramid images.
The pyramid is a series of gray 8-bit images. Every image in the series is lesser in two times than previous. The structure is useful for image analysis.
Member Typedef Documentation
◆ Allocator
Constructor & Destructor Documentation
◆ Pyramid() [1/3]
◆ Pyramid() [2/3]
Creates a new Pyramid structure with specified size.
- Parameters
-
[in] size - a size of pyramid's base (lowest and biggest image). [in] levelCount - a number of pyramid levels.
◆ Pyramid() [3/3]
SIMD_INLINE Pyramid | ( | size_t | width, |
size_t | height, | ||
size_t | levelCount | ||
) |
Creates a new Pyramid structure with specified size.
- Parameters
-
[in] width - a width of pyramid's base (lowest and biggest image). [in] height - a height of pyramid's base (lowest and biggest image). [in] levelCount - a number of pyramid levels.
Member Function Documentation
◆ Recreate() [1/2]
SIMD_INLINE void Recreate | ( | Point< ptrdiff_t > | size, |
size_t | levelCount | ||
) |
Re-create a Pyramid structure with specified size.
- Parameters
-
[in] size - a size of pyramid's base (lowest and biggest image). [in] levelCount - a number of pyramid levels.
◆ Recreate() [2/2]
SIMD_INLINE void Recreate | ( | size_t | width, |
size_t | height, | ||
size_t | levelCount | ||
) |
Re-create a Pyramid structure with specified size.
- Parameters
-
[in] width - a width of pyramid's base (lowest and biggest image). [in] height - a height of pyramid's base (lowest and biggest image). [in] levelCount - a number of pyramid levels.
◆ Size()
SIMD_INLINE size_t Size | ( | ) | const |
Gets number of levels in the pyramid.
- Returns
- - number of levels in the pyramid.
◆ operator[]() [1/2]
SIMD_INLINE View< A > & operator[] | ( | size_t | level | ) |
Gets an image at given level of the pyramid.
- Parameters
-
[in] level - a level of the pyramid.
- Returns
- - a reference to the image at given level of the pyramid.
◆ operator[]() [2/2]
SIMD_INLINE const View< A > & operator[] | ( | size_t | level | ) | const |
Gets an image at given level of the pyramid.
- Parameters
-
[in] level - a level of the pyramid.
- Returns
- - a constant reference to the image at given level of the pyramid.
◆ At() [1/2]
SIMD_INLINE View< A > & At | ( | size_t | level | ) |
Gets an image at given level of the pyramid.
- Parameters
-
[in] level - a level of the pyramid.
- Returns
- - a reference to the image at given level of the pyramid.
◆ At() [2/2]
SIMD_INLINE const View< A > & At | ( | size_t | level | ) | const |
Gets an image at on given level of the pyramid.
- Parameters
-
[in] level - a level of the pyramid.
- Returns
- - a constant reference to the image at given level of the pyramid.
◆ Top() [1/2]
SIMD_INLINE View< A > & Top | ( | ) |
Gets an image at top level of the pyramid.
- Returns
- - a reference to the image at top level of the pyramid.
◆ Top() [2/2]
SIMD_INLINE const View< A > & Top | ( | ) | const |
Gets an image at top level of the pyramid.
- Returns
- - a constant reference to the image at top level of the pyramid.
◆ Swap()
SIMD_INLINE void Swap | ( | Pyramid< A > & | pyramid | ) |
Swaps two pyramids.
- Parameters
-
[in] pyramid - other pyramid.