mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 21:40:49 +08:00
Fix name extraction from path in multicalib
This commit is contained in:
@@ -141,7 +141,7 @@ void MultiCameraCalibration::loadImages()
|
|||||||
for (int i = 1; i < (int)file_list.size(); ++i)
|
for (int i = 1; i < (int)file_list.size(); ++i)
|
||||||
{
|
{
|
||||||
int cameraVertex, timestamp;
|
int cameraVertex, timestamp;
|
||||||
std::string filename = file_list[i].substr(0, file_list[i].find('.'));
|
std::string filename = file_list[i].substr(0, file_list[i].rfind('.'));
|
||||||
size_t spritPosition1 = filename.rfind('/');
|
size_t spritPosition1 = filename.rfind('/');
|
||||||
size_t spritPosition2 = filename.rfind('\\');
|
size_t spritPosition2 = filename.rfind('\\');
|
||||||
if (spritPosition1!=std::string::npos)
|
if (spritPosition1!=std::string::npos)
|
||||||
@@ -777,4 +777,4 @@ void MultiCameraCalibration::writeParameters(const std::string& filename)
|
|||||||
fs << photoTimestamp << _vertexList[photoIdx].pose;
|
fs << photoTimestamp << _vertexList[photoIdx].pose;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}} // namespace multicalib, cv
|
}} // namespace multicalib, cv
|
||||||
|
Reference in New Issue
Block a user