refactor(api): improve get sdk version and style changes

This commit is contained in:
John Zhao 2019-05-30 15:30:17 +08:00
parent 05e5552e46
commit bc7e4919e2
2 changed files with 2 additions and 12 deletions

View File

@ -332,17 +332,7 @@ std::string API::GetInfo(const Info &info) const {
} }
std::string API::GetSDKVersion() const { std::string API::GetSDKVersion() const {
std::string info_path = return MYNTEYE_API_VERSION_STR;
utils::get_sdk_install_dir();
info_path.append(MYNTEYE_OS_SEP "share" \
MYNTEYE_OS_SEP "mynteye" MYNTEYE_OS_SEP "build.info");
cv::FileStorage fs(info_path, cv::FileStorage::READ);
if (!fs.isOpened()) {
LOG(WARNING) << "build.info not found: " << info_path;
return "null";
}
return fs["MYNTEYE_VERSION"];
} }
IntrinsicsPinhole API::GetIntrinsics(const Stream &stream) const { IntrinsicsPinhole API::GetIntrinsics(const Stream &stream) const {

View File

@ -65,7 +65,7 @@ void Synthetic::InitCalibInfo() {
} else { } else {
calib_default_tag_ = true; calib_default_tag_ = true;
calib_model_ = CalibrationModel::PINHOLE; calib_model_ = CalibrationModel::PINHOLE;
LOG(INFO) << "camera calib model: unknow ,use default pinhole data"; LOG(INFO) << "camera calib model: unknow, use default pinhole data";
intr_left_ = getDefaultIntrinsics(); intr_left_ = getDefaultIntrinsics();
intr_right_ = getDefaultIntrinsics(); intr_right_ = getDefaultIntrinsics();
extr_ = getDefaultExtrinsics(); extr_ = getDefaultExtrinsics();