From d09dbefb0517bb1c821f58bfb613f87f988e4542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD=E9=80=86=E8=A2=AD?= <741299292@qq.com> Date: Tue, 29 Mar 2022 10:18:17 +0800 Subject: [PATCH] Update Pinhole.cpp --- src/CameraModels/Pinhole.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/CameraModels/Pinhole.cpp b/src/CameraModels/Pinhole.cpp index 3300284..6b9dfeb 100644 --- a/src/CameraModels/Pinhole.cpp +++ b/src/CameraModels/Pinhole.cpp @@ -220,10 +220,14 @@ std::ostream &operator<<(std::ostream &os, const Pinhole &ph) os << ph.mvParameters[0] << " " << ph.mvParameters[1] << " " << ph.mvParameters[2] << " " << ph.mvParameters[3]; return os; } -SkewSymmetricMatrix - assert(is.good()); // Make sure the input stream is good +std::istream & operator>>(std::istream &is, Pinhole &ph) +{ + float nextParam; + for(size_t i = 0; i < 4; i++){ + assert(is.good()); //Make sure the input stream is good is >> nextParam; ph.mvParameters[i] = nextParam; + } return is; }