Skip to content

Commit 30a8c09

Browse files
committed
Fix bug with header files of sample codes
1 parent ff5a312 commit 30a8c09

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

modules/photometric_calib/samples/response_calibration.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
#include <string>
2-
#include <iostream>
3-
#include <iomanip>
4-
#include <vector>
5-
6-
#include "opencv2/opencv.hpp"
71
#include "opencv2/core.hpp"
82
#include "opencv2/highgui.hpp"
93
#include "opencv2/photometric_calib.hpp"
10-
#include "opencv2/imgproc/imgproc.hpp"
114

125
using namespace std;
136
using namespace cv;
@@ -38,13 +31,13 @@ int main(int argc, char **argv)
3831
// The result and some intermediate data are stored in the folder ./photoCalibResult in which
3932
// pcalib.yaml is the camera response function file
4033
// Since we are using debug mode, we can visualize the response function:
41-
Mat invRes = imread("./photoCalibResult/G-10.png", CV_LOAD_IMAGE_UNCHANGED);
34+
Mat invRes = imread("./photoCalibResult/G-10.png", IMREAD_UNCHANGED);
4235
// As shown as Fig.3 in the paper from J.Engel, et al. in the paper A Photometrically Calibrated Benchmark For Monocular Visual Odometry
4336
namedWindow( "Inverse Response Function", WINDOW_AUTOSIZE );
4437
imshow("Inverse Response Function", invRes);
4538

4639
// To see the response-calibrated image, we can use GammaRemover
47-
Mat oriImg = imread(imageFolderPath + "/00480.jpg", CV_LOAD_IMAGE_UNCHANGED);
40+
Mat oriImg = imread(imageFolderPath + "/00480.jpg", IMREAD_UNCHANGED);
4841
photometric_calib::GammaRemover gammaRemover("./photoCalibResult/pcalib.yaml", oriImg.cols, oriImg.rows);
4942
Mat caliImg = gammaRemover.getUnGammaImageMat(oriImg);
5043

modules/photometric_calib/samples/vignette_calibration.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
#include <string>
2-
#include <iostream>
3-
#include <iomanip>
4-
#include <vector>
5-
6-
#include "opencv2/opencv.hpp"
71
#include "opencv2/core.hpp"
82
#include "opencv2/highgui.hpp"
93
#include "opencv2/photometric_calib.hpp"
10-
#include "opencv2/imgproc/imgproc.hpp"
114

125
using namespace std;
136
using namespace cv;
@@ -48,13 +41,13 @@ int main(int argc, char** argv)
4841
// The result and some intermediate data are stored in the folder ./vignetteCalibResult in which
4942
// vignette.png and vignetteSmoothed.png are the vignette images.
5043
// In practice, vignetteSomoothed.png is used, since it doesn't have the black boarders.
51-
Mat vigSmoothed = imread("./vignetteCalibResult/vignetteSmoothed.png", CV_LOAD_IMAGE_UNCHANGED);
44+
Mat vigSmoothed = imread("./vignetteCalibResult/vignetteSmoothed.png", IMREAD_UNCHANGED);
5245
// As shown as Fig.4 in the paper from J.Engel, et al. in the paper A Photometrically Calibrated Benchmark For Monocular Visual Odometry
5346
namedWindow( "Vignette Smoothed", WINDOW_AUTOSIZE );
5447
imshow("Vignette Smoothed", vigSmoothed);
5548

5649
// To see the vignette-calibrated image, we can use VignetteRemover
57-
Mat oriImg = imread(imageFolderPath + "/00480.jpg", CV_LOAD_IMAGE_UNCHANGED);
50+
Mat oriImg = imread(imageFolderPath + "/00480.jpg", IMREAD_UNCHANGED);
5851
photometric_calib::GammaRemover gammaRemover(gammaPath, oriImg.cols, oriImg.rows);
5952
photometric_calib::VignetteRemover vignetteRemover("./vignetteCalibResult/vignetteSmoothed.png", gammaPath, oriImg.cols, oriImg.rows);
6053
Mat resCaliImg = gammaRemover.getUnGammaImageMat(oriImg);

0 commit comments

Comments
 (0)