本文介绍了实现 3d sobel 算子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在从包含体素的 MRI 数据量中去除不均匀性.我想在这些体积上应用 sobel 算子来找到梯度.我熟悉 2d sobel mask 和 2d 图像的邻域.

I am currently working on inhomogeniety removal from MRI data volume which contains voxels.I want to apply sobel operator on those volumes to find the gradient. I am familiar with 2d sobel mask and the neighbourhood of 2d images.

索贝尔面膜:1 2 10 0 0-1 -2 -11 0 -12 0 -21 0 -1

sobel mask: 1 2 1 0 0 0 -1 -2 -1 1 0 -1 2 0 -2 1 0 -1

(x,y) 的邻域:(x+1,y-1) (x+1,y) (x+1,y+1)(x,y-1) (x,y) (x,y+1)(x-1,y-1) (x-1,y) (x-1,y+1)

neighbourhood of(x,y): (x+1,y-1) (x+1,y) (x+1,y+1) (x,y-1) (x,y) (x,y+1) (x-1,y-1) (x-1,y) (x-1,y+1)

现在我想在 3d 上应用它.请建议我应该如何进行?谢谢你.

Now I want to apply it on 3d.Please suggest me how should I proceed??Thank you.

推荐答案

维基百科对此有一个很好的介绍:http://en.wikipedia.org/wiki/Sobel_operator

Wikipedia has a nice introduction about that : http://en.wikipedia.org/wiki/Sobel_operator

基本上,由于 sobel 过滤器是可分离的,您可以在 x、y 和 z 方向的每个方向上连续应用一维过滤器.这些过滤器是维基百科上给出的 h(x) 和 h'(x) .这样做将允许您在应用 h'(x) 的方向上获得边缘.
例如,如果你做 h(x)*h(y)*h'(z),你会得到 z 方向的边.

Basically, since the sobel filter is separable, you can apply 1D filters in each of x, y and z directions consecutively. Theses filters are h(x) and h'(x) as given on wikipedia. Doing so will allow you to get the edges in the direction where you applied h'(x).
For example, if you do h(x)*h(y)*h'(z), you'll get the edges in the direction z.

或者(更昂贵),您可以计算整个 3D 3x3x3 内核并在 3D 中应用卷积.z 方向的内核也在维基百科上给出.

Alternatively (and more expensively), you can compute the whole 3D 3x3x3 kernel and apply the convolution in 3D. The kernel for the z direction is given on wikipedia as well.

这篇关于实现 3d sobel 算子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-25 12:36