Find edge based on normals
1 answer
An intuitive definition of an edge in a depth image is where the surface normal is facing away from the viewer. Assuming the viewing direction [0 0 -1]
(in the XY plane), any normal with an almost vanishing component z
can be characterized as an edge.
e = abs( depth(:,:,3) ) < 1e-3; %// a nice starting point
You need to set a threshold based on your data.
After this, you may consider applying some non-maximal suppression or other morphological cleaning operations.
+2
source to share