Open yunishi3 opened 7 years ago
It currently supports 3D bilateral filter if you reshape your array to NCHWZ or NCZHW, where the last 3 dimensions are (height, width, spatial-depth) or (spatial-depth, height, width). The code initializes a 3D spatial grid for the last 3 dimensions (see here) in addition to the color dimensions.
However for now it will use the same filter width for the 3 spatial dimensions. If you want to have different filter widths for the 3 spatial dimensions, you would need to modify the arguments to the functions from just the 2 "stdv_color" and "stdv_space" and add another "stdv_Z" for the 3rd dimension.
I'd like to modify this code to 3D bilateral filter. So could you tell me where I should modify.