fix(process): opencv2 and remove some useless include

This commit is contained in:
TinyOh 2019-01-15 14:05:11 +08:00
parent c3698b6e40
commit 41c882d0a7
2 changed files with 8 additions and 6 deletions

View File

@ -160,10 +160,15 @@ bool DisparityProcessor::OnProcess(
// It contains disparity values scaled by 16. So, to get the floating-point // It contains disparity values scaled by 16. So, to get the floating-point
// disparity map, // disparity map,
// you need to divide each disp element by 16. // you need to divide each disp element by 16.
if (type_ == SGBM) { if (type_ == DisparityProcessorType::SGBM) {
(*sgbm_matcher)(input->first, input->second, disparity); (*sgbm_matcher)(input->first, input->second, disparity);
} else if (type_ == BM) { #ifdef WITH_BM_SOBEL_FILTER
(*bm_matcher)(input->first, input->second, disparity); } else if (type_ == DisparityProcessorType::BM) {
cv::Mat tmp1, tmp2;
cv::cvtColor(input->first, tmp1, CV_RGB2GRAY);
cv::cvtColor(input->second, tmp2, CV_RGB2GRAY);
(*bm_matcher)(tmp1, tmp2, disparity);
#endif
} }
#else #else
// compute() // compute()

View File

@ -25,9 +25,6 @@
#include "mynteye/device/device.h" #include "mynteye/device/device.h"
#include <camodocal/camera_models/EquidistantCamera.h> #include <camodocal/camera_models/EquidistantCamera.h>
#include <opencv2/core/eigen.hpp> #include <opencv2/core/eigen.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/program_options.hpp>
#include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp> #include <opencv2/core/core.hpp>