The OpenVX Specification
dba1aa3
|
Computes a Laplacian Image Pyramid from an input image.
This vision function creates the Laplacian image pyramid from the input image. First, a Gaussian pyramid is created with the scale attribute VX_SCALE_PYRAMID_HALF
and the number of levels equal to \(N+1\), where \(N\) is the number of levels in the laplacian pyramid. The border mode for the Gaussian pyramid calculation should be VX_BORDER_REPLICATE
. Then, for each \(i = 0..N-1\), the Laplacian level \(L_i\) is computed as:
\[ L_i = G_i - UpSample(G_{i+1}). \]
Here \(G_i\) is the \(i\)-th level of the Gaussian pyramid.
The \(UpSample(I)\) is computed by injecting even zero rows and columns and then convolves the result with the Gaussian 5x5 filter multiplied by 4.
\[ UpSample(I)_{x,y} = 4 \sum_{k=-2}^{2} \sum_{l=-2}^{2} I_{x-k,y-l}^{'} W_{k+2,l+2} \]
\[ I_{x,y}^{'} = \begin{cases} I_{\frac{x}{2},\frac{y}{2}} & \text{if x and y are even} \cr 0 & \text{otherwise} \end{cases} \]
\[ \mathbf{W}=\frac{1}{256} * \begin{vmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \\ \end{vmatrix} \]
\(L_0\) shall always have the same resolution as the input image. The output image is equal to \(G_N\).
The border mode for the UpSample calculation should be VX_BORDER_REPLICATE
.
Functions | |
vx_node VX_API_CALL | vxLaplacianPyramidNode (vx_graph graph, vx_image input, vx_pyramid laplacian, vx_image output) |
[Graph] Creates a node for a Laplacian Image Pyramid. More... | |
vx_status VX_API_CALL | vxuLaplacianPyramid (vx_context context, vx_image input, vx_pyramid laplacian, vx_image output) |
[Immediate] Computes a Laplacian pyramid from an input image. More... | |
vx_node VX_API_CALL vxLaplacianPyramidNode | ( | vx_graph | graph, |
vx_image | input, | ||
vx_pyramid | laplacian, | ||
vx_image | output | ||
) |
[Graph] Creates a node for a Laplacian Image Pyramid.
[in] | graph | The reference to the graph. |
[in] | input | The input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format. |
[out] | laplacian | The Laplacian pyramid with VX_DF_IMAGE_S16 to construct. |
[out] | output | The lowest resolution image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format necessary to reconstruct the input image from the pyramid. The output image format should be same as input image format. |
vx_node
. vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |
vx_status VX_API_CALL vxuLaplacianPyramid | ( | vx_context | context, |
vx_image | input, | ||
vx_pyramid | laplacian, | ||
vx_image | output | ||
) |
[Immediate] Computes a Laplacian pyramid from an input image.
[in] | context | The reference to the overall context. |
[in] | input | The input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format. |
[out] | laplacian | The Laplacian pyramid with VX_DF_IMAGE_S16 to construct. |
[out] | output | The lowest resolution image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format necessary to reconstruct the input image from the pyramid. The output image format should be same as input image format. |
vx_status
enumeration. VX_SUCCESS | Success. |
* | An error occured. See vx_status_e |