Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/etps_cli/main.cpp b/etps_cli/main.cpp
- index 4330734..1ad0f74 100644
- --- a/etps_cli/main.cpp
- +++ b/etps_cli/main.cpp
- @@ -32,7 +32,6 @@
- #include <fstream>
- #include <opencv2/opencv.hpp>
- #include <boost/filesystem.hpp>
- -#include <boost/timer.hpp>
- #include <boost/program_options.hpp>
- #include <boost/timer.hpp>
- #include "etps_opencv.h"
- diff --git a/lib_crs/crs_opencv.h b/lib_crs/crs_opencv.h
- index 01992f1..c035d3f 100644
- --- a/lib_crs/crs_opencv.h
- +++ b/lib_crs/crs_opencv.h
- @@ -84,7 +84,7 @@ public:
- switch (color_space) {
- default:
- case 0: // YCrCb
- - cv::cvtColor(image, image_YCrCb, CV_BGR2YCrCb);
- + cv::cvtColor(image, image_YCrCb, cv::COLOR_BGR2YCrCb);
- cv::split(image_YCrCb, image_channels);
- break;
- case 1: // RGB
- diff --git a/lib_etps/spixel.cpp b/lib_etps/spixel.cpp
- index 3e88a45..a5bbc37 100644
- --- a/lib_etps/spixel.cpp
- +++ b/lib_etps/spixel.cpp
- @@ -75,7 +75,7 @@ void ProcessFilesBatch(SPSegmentationParameters& params, const vector<string>& f
- for (const string& f : files) {
- string fileName = fileDir + f;
- - Mat image = imread(fileName, CV_LOAD_IMAGE_COLOR);
- + Mat image = imread(fileName, cv::IMREAD_COLOR);
- if (image.rows == 0 || image.cols == 0) {
- cout << "Failed reading image '" << fileName << "'" << endl;
- @@ -121,8 +121,8 @@ void ProcessFilesStereoBatch(SPSegmentationParameters& params, const vector<stri
- for (const string& f : files) {
- string fileName = fileDir + f;
- string dispFileName = dispPattern.empty() ? dispDir : ChangeExtension(dispDir + f, dispPattern);
- - Mat image = imread(fileName, CV_LOAD_IMAGE_COLOR);
- - Mat dispImage = imread(dispFileName, CV_LOAD_IMAGE_ANYDEPTH);
- + Mat image = imread(fileName, cv::IMREAD_COLOR);
- + Mat dispImage = imread(dispFileName, cv::IMREAD_ANYDEPTH);
- if (image.rows == 0 || image.cols == 0) {
- cout << "Failed reading image '" << fileName << "'" << endl;
- @@ -171,8 +171,8 @@ void ProcessFilesStereoBatchSGM(SPSegmentationParameters& params, const vector<s
- for (const string& f : files) {
- string leftFileName = leftFileDir + f;
- string rightFileName = rightIsName ? rightFileDir : rightFileDir + f;
- - Mat leftImage = imread(leftFileName, CV_LOAD_IMAGE_COLOR);
- - Mat rightImage = imread(rightFileName, CV_LOAD_IMAGE_COLOR);
- + Mat leftImage = imread(leftFileName, cv::IMREAD_COLOR);
- + Mat rightImage = imread(rightFileName, cv::IMREAD_COLOR);
- if (leftImage.empty()) {
- cout << "Failed reading left image '" << leftImage << "'" << endl;
- diff --git a/lib_eval/evaluation.cpp b/lib_eval/evaluation.cpp
- index 3555af0..929a12e 100644
- --- a/lib_eval/evaluation.cpp
- +++ b/lib_eval/evaluation.cpp
- @@ -521,7 +521,7 @@ float Evaluation::computeMeanDistanceToEdge(const cv::Mat &labels,
- }
- cv::Mat distance;
- - cv::distanceTransform(boundary, distance, CV_DIST_L2, 3);
- + cv::distanceTransform(boundary, distance, cv::DIST_L2, 3);
- float mean_distance_edge = 0;
- int count = 0;
- @@ -719,7 +719,7 @@ float Evaluation::computeContourDensity(const cv::Mat &labels) {
- void computeGradientMagnitude(const cv::Mat &image, cv::Mat &gradient_magnitude) {
- cv::Mat image_gray;
- if (image.channels() == 3) {
- - cv::cvtColor(image, image_gray, CV_BGR2GRAY);
- + cv::cvtColor(image, image_gray, cv::COLOR_BGR2GRAY);
- }
- else {
- image_gray = image.clone();
- @@ -755,7 +755,7 @@ void computeGradientMagnitude(const cv::Mat &image, cv::Mat &gradient_magnitude)
- void computeCannyEdges(const cv::Mat &image, float threshold, cv::Mat &canny) {
- cv::Mat image_gray;
- if (image.channels() == 3) {
- - cv::cvtColor(image, image_gray, CV_BGR2GRAY);
- + cv::cvtColor(image, image_gray, cv::COLOR_BGR2GRAY);
- }
- else {
- image_gray = image.clone();
- diff --git a/lib_eval/evaluation_summary.cpp b/lib_eval/evaluation_summary.cpp
- index e94762a..b37e426 100644
- --- a/lib_eval/evaluation_summary.cpp
- +++ b/lib_eval/evaluation_summary.cpp
- @@ -1188,7 +1188,7 @@ void EvaluationSummary::computeSummary(int >_max) {
- cv::Mat sp_segmentation;
- // IOUtil::readMatCSVInt(it->second, sp_segmentation, image.rows, image.cols);
- IOUtil::readMatCSVInt(it->second, sp_segmentation);
- - cv::Mat image = cv::imread(img_file.string(), CV_LOAD_IMAGE_COLOR);
- + cv::Mat image = cv::imread(img_file.string(), cv::IMREAD_COLOR);
- // cv::namedWindow("Image");
- // cv::imshow("Image", image);
- diff --git a/lib_eval/robustness_tool.cpp b/lib_eval/robustness_tool.cpp
- index 08400e9..e344edd 100644
- --- a/lib_eval/robustness_tool.cpp
- +++ b/lib_eval/robustness_tool.cpp
- @@ -512,12 +512,12 @@ BilateralFilterDriver::BilateralFilterDriver(const std::vector<int> &sizes_, con
- void BilateralFilterDriver::computeImage(const cv::Mat& image, cv::Mat& computed_image) {
- cv::Mat image_lab;
- - cv::cvtColor(image, image_lab, CV_BGR2Lab);
- + cv::cvtColor(image, image_lab, cv::COLOR_BGR2Lab);
- cv::Mat computed_image_lab;
- Transformation::applyBilateralFilter(image_lab, sizes[current], color_variances[current],
- space_variances[current], computed_image_lab);
- - cv::cvtColor(computed_image_lab, computed_image, CV_Lab2BGR);
- + cv::cvtColor(computed_image_lab, computed_image, cv::COLOR_Lab2BGR);
- }
- diff --git a/lib_eval/transformation.cpp b/lib_eval/transformation.cpp
- index 8ad2729..454b80c 100644
- --- a/lib_eval/transformation.cpp
- +++ b/lib_eval/transformation.cpp
- @@ -78,7 +78,7 @@ void Transformation::applyGaussianSamplingErrors(const cv::Mat &image, float var
- std::normal_distribution<float> g(0, variance);
- cv::Mat image_gray;
- - cv::cvtColor(image, image_gray, CV_BGR2GRAY);
- + cv::cvtColor(image, image_gray, cv::COLOR_BGR2GRAY);
- cv::Mat grad_x;
- cv::Mat grad_y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement