fix(src): Determine the default intrinsics based on the resulution
This commit is contained in:
parent
de6dc0d712
commit
1cda60d137
|
@ -41,6 +41,13 @@ std::shared_ptr<IntrinsicsBase> getDefaultIntrinsics() {
|
|||
return res;
|
||||
}
|
||||
|
||||
std::shared_ptr<IntrinsicsBase> getDefaultIntrinsics(const StreamRequest &request) {
|
||||
auto res = getDefaultIntrinsics();
|
||||
res->resize_scale = static_cast<double>(request.width / res->width);
|
||||
res->ResizeIntrinsics();
|
||||
return res;
|
||||
}
|
||||
|
||||
std::shared_ptr<Extrinsics> getDefaultExtrinsics() {
|
||||
auto res = std::make_shared<Extrinsics>();
|
||||
double rotation[9] = {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
MYNTEYE_BEGIN_NAMESPACE
|
||||
|
||||
std::shared_ptr<IntrinsicsBase> getDefaultIntrinsics();
|
||||
std::shared_ptr<IntrinsicsBase> getDefaultIntrinsics(const StreamRequest &request);
|
||||
|
||||
std::shared_ptr<Extrinsics> getDefaultExtrinsics();
|
||||
|
||||
|
|
|
@ -66,8 +66,9 @@ void Synthetic::InitCalibInfo() {
|
|||
calib_default_tag_ = true;
|
||||
calib_model_ = CalibrationModel::PINHOLE;
|
||||
LOG(INFO) << "camera calib model: unknow, use default pinhole data";
|
||||
intr_left_ = getDefaultIntrinsics();
|
||||
intr_right_ = getDefaultIntrinsics();
|
||||
auto stream_request = api_->GetStreamRequest();
|
||||
intr_left_ = getDefaultIntrinsics(stream_request);
|
||||
intr_right_ = getDefaultIntrinsics(stream_request);
|
||||
extr_ = getDefaultExtrinsics();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user