Using visual and haptic information for discriminating objects