Skip to content

Commit 15ca7a9

Browse files
committed
Add imageFormat parameter for response and vignetting calibration constructor class.
1 parent f248779 commit 15ca7a9

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

modules/photometric_calib/include/opencv2/photometric_calib/ResponseCalib.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace cv { namespace photometric_calib {
1212
class CV_EXPORTS ResponseCalib
1313
{
1414
public:
15-
ResponseCalib(std::string folderPath, std::string timePath);
16-
ResponseCalib(std::string folderPath, std::string timePath, int leakPadding, int nIts, int skipFrames);
15+
ResponseCalib(std::string folderPath, std::string timePath, std::string imageFormat);
16+
ResponseCalib(std::string folderPath, std::string timePath, int leakPadding, int nIts, int skipFrames, std::string imageFormat);
1717

1818
void plotE(const double* E, int w, int h, const std::string &saveTo);
1919

modules/photometric_calib/include/opencv2/photometric_calib/VignetteCalib.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace cv { namespace photometric_calib {
1515
class CV_EXPORTS VignetteCalib
1616
{
1717
public:
18-
VignetteCalib(std::string folderPath, std::string timePath, std::string cameraFile, std::string gammaFile);
18+
VignetteCalib(std::string folderPath, std::string timePath, std::string cameraFile, std::string gammaFile, std::string imageFormat);
1919
VignetteCalib(std::string folderPath, std::string timePath, std::string cameraFile, std::string gammaFile, int imageSkip, int maxIterations, int outlierTh,
20-
int gridWidth, int gridHeight, float facW, float facH, int maxAbsGrad);
20+
int gridWidth, int gridHeight, float facW, float facH, int maxAbsGrad, std::string imageFormat);
2121

2222
virtual ~VignetteCalib();
2323

modules/photometric_calib/src/ResponseCalib.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
namespace cv { namespace photometric_calib{
1313

14-
ResponseCalib::ResponseCalib(std::string folderPath, std::string timePath) : _leakPadding(2), _nIts(10), _skipFrames(1)
14+
ResponseCalib::ResponseCalib(std::string folderPath, std::string timePath, std::string imageFormat) : _leakPadding(2), _nIts(10), _skipFrames(1)
1515
{
16-
imageReader = new Reader(folderPath, "png", timePath);
16+
imageReader = new Reader(folderPath, imageFormat, timePath);
1717
}
1818

19-
ResponseCalib::ResponseCalib(std::string folderPath, std::string timePath, int leakPadding, int nIts, int skipFrames) :
19+
ResponseCalib::ResponseCalib(std::string folderPath, std::string timePath, int leakPadding, int nIts, int skipFrames, std::string imageFormat) :
2020
_leakPadding(leakPadding), _nIts(nIts), _skipFrames(skipFrames)
2121
{
22-
imageReader = new Reader(folderPath, "png", timePath);
22+
imageReader = new Reader(folderPath, imageFormat, timePath);
2323
}
2424

2525
Vec2d ResponseCalib::rmse(const double *G, const double *E, const std::vector<double> &exposureVec, const std::vector<uchar *> &dataVec,

modules/photometric_calib/src/VignetteCalib.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
namespace cv { namespace photometric_calib{
1212

1313

14-
VignetteCalib::VignetteCalib(std::string folderPath, std::string timePath, std::string cameraFile, std::string gammaFile) :
14+
VignetteCalib::VignetteCalib(std::string folderPath, std::string timePath, std::string cameraFile, std::string gammaFile, std::string imageFormat) :
1515
_imageSkip(1), _maxIterations(20), _outlierTh(15), _gridWidth(1000), _gridHeight(1000), _facW(5), _facH(5),
1616
_maxAbsGrad(255)
1717
{
18-
imageReader = new Reader(folderPath, "png", timePath);
18+
imageReader = new Reader(folderPath, imageFormat, timePath);
1919
// check the extension of the camera file.
2020
CV_Assert(cameraFile.substr(cameraFile.find_last_of(".") + 1) == "yaml" || cameraFile.substr(cameraFile.find_last_of(".") + 1) == "yml");
2121
FileStorage cameraStorage(cameraFile, FileStorage::READ);
@@ -25,11 +25,11 @@ VignetteCalib::VignetteCalib(std::string folderPath, std::string timePath, std::
2525
}
2626

2727
VignetteCalib::VignetteCalib(std::string folderPath, std::string timePath, std::string cameraFile, std::string gammaFile, int imageSkip, int maxIterations,
28-
int outlierTh, int gridWidth, int gridHeight, float facW, float facH, int maxAbsGrad) :
28+
int outlierTh, int gridWidth, int gridHeight, float facW, float facH, int maxAbsGrad, std::string imageFormat) :
2929
_imageSkip(imageSkip), _maxIterations(maxIterations), _outlierTh(outlierTh), _gridWidth(gridWidth), _gridHeight(gridHeight),
3030
_facW(facW), _facH(facH), _maxAbsGrad(maxAbsGrad)
3131
{
32-
imageReader = new Reader(folderPath, "png", timePath);
32+
imageReader = new Reader(folderPath, imageFormat, timePath);
3333
// check the extension of the camera file.
3434
CV_Assert(cameraFile.substr(cameraFile.find_last_of(".") + 1) == "yaml" || cameraFile.substr(cameraFile.find_last_of(".") + 1) == "yml");
3535
FileStorage cameraStorage(cameraFile, FileStorage::READ);

0 commit comments

Comments
 (0)