fix template types of Threshold::thresh and Threshold::type. remove regacy include in LabeledObject.cpp.