Gaussian pyramid generator takes one input image and fills the output image pyramid with downscaled versions of the input.
Input | Output |
---|---|
![]() | ![]() ![]() ![]() ![]() |
The function is implemented by generating the Gaussian pyramid from the base (level 0) to coarser levels.
If the input image actually wraps the first level of the image pyramid, nothing is done for this level. If not, the input image contents will be copied to the first image pyramid level.
The coarser levels are generated by taking the previous level, convolving it using a clamp boundary condition with the following kernel:
\[ k = \begin{bmatrix} 1 \\ 4 \\ 6 \\ 4 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \end{bmatrix} \]
Because only 2x downscaling is supported, the result is then downsampled by keeping all pixels with even coordinates.
The algorithm repeats until all levels are generated.
For more details, consult the API reference.
Constraints for specific backends supersede the ones specified for all backends.
For further information on how performance was benchmarked, see Performance Measurement.
size | type | scale | levels | CPU | CUDA | PVA |
---|---|---|---|---|---|---|
1920x1080 | u8 | 0.5 | 4 | 0.67 ms | 0.0733 ms | n/a |
1920x1080 | u16 | 0.5 | 4 | 0.74 ms | 0.1147 ms | 1.169 ms |
size | type | scale | levels | CPU | CUDA | PVA |
---|---|---|---|---|---|---|
1920x1080 | u8 | 0.5 | 4 | 1.7 ms | 0.1478 ms | n/a |
1920x1080 | u16 | 0.5 | 4 | 2.3 ms | 0.238 ms | n/a |
size | type | scale | levels | CPU | CUDA | PVA |
---|---|---|---|---|---|---|
1920x1080 | u8 | 0.5 | 4 | 3.39 ms | 0.3404 ms | n/a |
1920x1080 | u16 | 0.5 | 4 | 3.71 ms | 0.469 ms | n/a |