1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #8267 from umbraclet16:fixCalibSample

Solve issue #8264
This commit is contained in:
Alexander Alekhin
2017-02-28 11:47:37 +00:00
committed by GitHub
@@ -101,7 +101,7 @@ public:
}
else
{
if (readStringList(input, imageList))
if (isListOfImages(input) && readStringList(input, imageList))
{
inputType = IMAGE_LIST;
nrFrames = (nrFrames < (int)imageList.size()) ? nrFrames : (int)imageList.size();
@@ -169,6 +169,16 @@ public:
l.push_back((string)*it);
return true;
}
static bool isListOfImages( const string& filename)
{
string s(filename);
// Look for file extension
if( s.find(".xml") == string::npos && s.find(".yaml") == string::npos && s.find(".yml") == string::npos )
return false;
else
return true;
}
public:
Size boardSize; // The size of the board -> Number of items by width and height
Pattern calibrationPattern;// One of the Chessboard, circles, or asymmetric circle pattern