Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Related Functions

Related functions for Simd::Pyramid structure. More...

Functions

template<template< class > class A>
SIMD_INLINE void Fill (Pyramid< A > &pyramid, uint8_t value)
 Fills every level of a pyramid with the given 8-bit value. More...
 
template<template< class > class A>
SIMD_INLINE void Copy (const Pyramid< A > &src, Pyramid< A > &dst)
 Copies one pyramid to another pyramid. More...
 
template<template< class > class A>
SIMD_INLINE void Build (Pyramid< A > &pyramid, ::SimdReduceType reduceType, bool compensation=true)
 Builds a gray image pyramid by filling upper levels from the lowest level. More...
 
Point< ptrdiff_t > Scale (Point< ptrdiff_t > size, int scale=2)
 Scales size of an image. More...
 

Detailed Description

Related functions for Simd::Pyramid structure.

Function Documentation

◆ Fill()

void Fill ( Pyramid< A > &  pyramid,
uint8_t  value 
)

Fills every level of a pyramid with the given 8-bit value.

For each pyramid level the function calls Simd::Fill, which writes value into every byte of image pixel data of that level. Row padding after width*pixelSize is not modified.

Parameters
[out]pyramid- a pyramid to fill.
[in]value- a byte value used to fill pixel data of every pyramid level.

◆ Copy()

void Copy ( const Pyramid< A > &  src,
Pyramid< A > &  dst 
)

Copies one pyramid to another pyramid.

Note
Input and output pyramids must have the same size.
Parameters
[in]src- an input pyramid.
[out]dst- an output pyramid.

◆ Build()

void Build ( Pyramid< A > &  pyramid,
::SimdReduceType  reduceType,
bool  compensation = true 
)

Builds a gray image pyramid by filling upper levels from the lowest level.

Level 0 must already contain the source 8-bit gray image. For every next level the function calls Simd::ReduceGray so that level[i] is a half-size reduction of level[i - 1] (dst.width = (src.width + 1)/2, dst.height = (src.height + 1)/2). The reduceType argument selects the reducer: SimdReduce2x2, SimdReduce3x3, SimdReduce4x4 or SimdReduce5x5. The compensation flag is used only for SimdReduce3x3 and SimdReduce5x5.

Parameters
[in,out]pyramid- a pyramid; level 0 is an input image, levels 1..N-1 are outputs.
[in]reduceType- a type of function used for image reducing (see SimdReduceType).
[in]compensation- a flag to enable rounding compensation before division. It is relevant only for SimdReduce3x3 and SimdReduce5x5. It is equal to true by default.

◆ Scale()

SIMD_INLINE Point< ptrdiff_t > Scale ( Point< ptrdiff_t >  size,
int  scale = 2 
)

Scales size of an image.

Note
This function is useful for Pyramid structure.
Parameters
[in]size- an original image size.
[in]scale- a scale. It must be a multiple of 2. By default it is equal to 2.
Returns
scaled size.