find the edge based on normals

寵の児 提交于 2020-01-06 13:52:32

问题


I have a 480*640 depth image, and I got the normals (a 480*640*3 matrix) of each pixel from this depth image. Does anyone know how could I find the edge based on the normal information?

Thanks a lot!


回答1:


An intuitive definition of an edge in a depth image is where the surface normal faces away from the viewer. Assuming a viewing direction [0 0 -1] (into the XY plane) any normal that has nearly vanishing z component can be characterized as an edge.

e = abs( depth(:,:,3) ) < 1e-3; %// a nice starting point

You need to set the threshold based on your data.

After that you might consider applying some non-maximal suppression or other morphological cleaning operations.



来源:https://stackoverflow.com/questions/27241945/find-the-edge-based-on-normals

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!