Update Pinhole.cpp

master
小白逆袭 2022-03-29 10:18:17 +08:00 committed by GitHub
parent e541c12dbe
commit d09dbefb05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}