wg-perception / linemod

An OR pipeline based on LINE-MOD from OpenCV
47 stars 54 forks source link

Incorrect depth value (should not ignore sign) #16

Closed kektobiologist closed 9 years ago

kektobiologist commented 9 years ago

linemod_train.cpp, Line 198:

float distance = fabs(renderer_iterator.D_obj() - float(depth.at<ushort>(depth.rows/2.0f, depth.cols/2.0f)/1000.0f));

use of fabs() is incorrect, since for some objects (eg. a bowl) the distance from (0,0,0) to the object surface along the camera line of sight may be negative. Just removing fabs() seems to work.

vrabaud commented 9 years ago

@nlyubova , any comment ?

nlyubova commented 9 years ago

true about sign, so it is removed in 6e99d3c26536f231d46ef55f61004785fbf0da3d Thank you!

vrabaud commented 9 years ago

ok, fixed in #17

vrabaud commented 9 years ago

@korroktheslavemaster , thx for the analysis !