How to do a Gaussian filtering in 3D

后端 未结 2 954
慢半拍i
慢半拍i 2020-12-20 14:40

How do i do a gaussi smoothing in the 3th dimension?

I have this detection pyramid, votes accumulated at four scales. Objects are found at each peak.

2条回答
  •  情深已故
    2020-12-20 15:28

    Gaussian filters are separable. You apply 1D filter at each dimension as follows:

    for (dim = 0; dim < D; dim++)
        tensor = gaussian_filter(tensor, dim);
    

    I would recommend OpenCV for an implementation of a gaussian filter (and image processing in general) in C++.

    Note that this assumes that your pyramid levels are all of the same size. You can have your own functions that sample your scale-space pyramid on the fly while convolving the third dimension, but if you have enough memory I believe that it would be faster to scale up your coarser level to have the same size of the finest level.

提交回复
热议问题