![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
separated version of bilateral filter on 3d image More...
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::separatedBilateral3dImg (const image::ImageConstPtr &pInImg, const ipReal64 inSpaceSigma, const ipReal64 inRangeSigma) |
| wrapper function for separated version of bilateral filter on 3d image More... | |
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::separatedBilateral3dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inHalfKnlSize, const ipReal64 inSpaceSigma, const ipReal64 inRangeSigma) |
| wrapper function for separated version of bilateral filter on 3d image More... | |
| IPSDKIPLFILTERING_API void | ipsdk::imaproc::filter::separatedBilateral3dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inHalfKnlSize, const ipReal64 inSpaceSigma, const ipReal64 inRangeSigma, const image::ImagePtr &pOutImg) |
| wrapper function for separated version of bilateral filter on 3d image More... | |
separated version of bilateral filter on 3d image
The separated bilateral filter is an approximation of the Bilateral smoothing 3d that gives resulting images that may be close to what is obtained with the original bilateral filter with dramatically better time performance. The separated bilateral filter is executed in 3 passes: first along x-axis, then along y-axis and finally along z-axis.
Output image pixel values are given by:
where:
![$ OutImg_y[x, y, z] = \dfrac { \sum_{o_y=-n}^{n}{W_y(x, y, z, o_y)*OutImg_x[x, y+o_y, z]} } { \sum_{o_y=-n}^{n}{W_y(x, y, z, o_y)} } $](form_692.png)
![$ OutImg_z[x, y, z] = \dfrac { \sum_{o_x=-n}^{n}{W_x(x, y, z, o_x)*InImg[x+o_x, y, z]} } { \sum_{o_x=-n}^{n}{W_x(x, y, z, o_x)} } $](form_693.png)
is the weight function along x-axis; 
is the weight function along y-axis; 
is the weight function along z-axis; 
is the space function; 
![$ f_{Rx}(InImg, x, y, z, o_x)= \begin{cases} 1, & \text{if } o_x=0 \\ f_R(|InImg[x, y, z]-InImg[x+o_x, y, z]|), & \text{if } o_x > 0 \text { and } f_R(|InImg[x, y, z]-InImg[x+o_x, y, z]|) < f_{Rx}(x, y, z, o_x-1) \\ f_{Rx}(x, y, z, o_x-1), & \text{if } o_x > 0 \text { and } f_R(|InImg[x, y, z]-InImg[x+o_x, y, z]|) \geq f_{Rx}(x, y, z, o_x-1) \\ f_R(|InImg[x, y, z]-InImg[x+o_x, y, z]|), & \text{if } o_x < 0 \text { and } f_R(|InImg[x, y, z]-InImg[x+o_x, y, z]|) < f_{Rx}(x, y, z, o_x+1) \\ f_{Rx}(x, y, z, o_x+1), & \text{if } o_x < 0 \text { and } f_R(|InImg[x, y, z]-InImg[x+o_x, y, z]|) \geq f_{Rx}(x, y, z, o_x+1) \end{cases} $](form_699.png)
![$ f_{Ry}(InImg, x, y, z, o_y)= \begin{cases} 1, & \text{if } o_y=0 \\ f_R(|InImg[x, y, z]-InImg[x, y+o_y, z]|), & \text{if } o_y > 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y+o_y, z]|) < f_{Ry}(x, y, z, o_y-1) \\ f_{Ry}(x, y, z, o_y-1), & \text{if } o_y > 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y+o_y, z]|) \geq f_{Ry}(x, y, z, o_y-1) \\ f_R(|InImg[x, y, z]-InImg[x, y+o_y, z]|), & \text{if } o_y < 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y+o_y, z]|) < f_{Ry}(x, y, z, o_y+1) \\ f_{Ry}(x, y, z, o_y+1), & \text{if } o_y < 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y+o_y, z]|) \geq f_{Ry}(x, y, z, o_y+1) \end{cases} $](form_700.png)
![$ f_{Rz}(InImg, x, y, z, o_z)= \begin{cases} 1, & \text{if } o_z=0 \\ f_R(|InImg[x, y, z]-InImg[x, y, z+o_z]|), & \text{if } o_z > 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y, z+o_z]|) < f_{Rz}(x, y, z, o_z-1) \\ f_{Rz}(x, y, z, o_z-1), & \text{if } o_z > 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y, z+o_z]|) \geq f_{Rz}(x, y, z, o_z-1) \\ f_R(|InImg[x, y, z]-InImg[x, y, z+o_z]|), & \text{if } o_z < 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y, z+o_z]|) < f_{Rz}(x, y, z, o_z+1) \\ f_{Rz}(x, y, z, o_z+1), & \text{if } o_z < 0 \text { and } f_R(|InImg[x, y, z]-InImg[x, y, z+o_z]|) \geq f_{Rz}(x, y, z, o_z+1) \end{cases} $](form_701.png)
is the range function; 
is defined by InOptHalfKnlSize attribute (if this attribute is not initialized, then
equals to
)
is defined by InRangeSigma attribute
is defined by InSpaceSigma attributeInput and output images must have same size.
See Separated bilateral smoothing 2d for an illustration of separated bilateral filter applied to a 2d image.
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InImg3d | [Input] 3d image for operation | X |
| ipsdk::imaproc::attr::InRangeSigma | [Input] sigma for range gaussian function | X |
| ipsdk::imaproc::attr::InSpaceSigma | [Input] sigma for spatial gaussian function | X |
| ipsdk::imaproc::attr::InOptHalfKnlSize | [Input Optional] half kernel size (square or cubic kernel) | X |
| ipsdk::imaproc::attr::OutImg | [Output] image for processing operation | ipsdk::imaproc::duplicateInOut (_pOutImg, _pInImg3d) |
Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg3d,_pOutImg)
| IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::separatedBilateral3dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipReal64 | inSpaceSigma, | ||
| const ipReal64 | inRangeSigma | ||
| ) |
wrapper function for separated version of bilateral filter on 3d image
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::separatedBilateral3dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipUInt32 | inHalfKnlSize, | ||
| const ipReal64 | inSpaceSigma, | ||
| const ipReal64 | inRangeSigma | ||
| ) |
wrapper function for separated version of bilateral filter on 3d image
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::separatedBilateral3dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipUInt32 | inHalfKnlSize, | ||
| const ipReal64 | inSpaceSigma, | ||
| const ipReal64 | inRangeSigma, | ||
| const image::ImagePtr & | pOutImg | ||
| ) |
wrapper function for separated version of bilateral filter on 3d image
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14