Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ftdlyc committed May 28, 2019
1 parent 3da0d48 commit d39f4d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcbdetect/find_corners.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void find_corners_reiszed(const cv::Mat& img, Corner& corners, const Params& par
#if CV_VERSION_MAJOR >= 4
cv::cvtColor(img_resized, img_norm, cv::COLOR_BGR2GRAY);
#else
cv::cvtColor(img_resized, img_norm, CV_GRAY2BGR);
cv::cvtColor(img_resized, img_norm, CV_BGR2GRAY);
#endif
img_norm.convertTo(img_norm, CV_64F, 1 / 255.0, 0);
} else {
Expand Down Expand Up @@ -142,9 +142,9 @@ void find_corners(const cv::Mat& img, Corner& corners, const Params& params) {
cv::Mat img_norm;
if(img.channels() == 3) {
#if CV_VERSION_MAJOR >= 4
cv::cvtColor(img, img_norm, cv::COLOR_BGRA2GRAY);
cv::cvtColor(img, img_norm, cv::COLOR_BGR2GRAY);
#else
cv::cvtColor(img, img_norm, CV_GRAY2BGR);
cv::cvtColor(img, img_norm, CV_BGR2GRAY);
#endif
img_norm.convertTo(img_norm, CV_64F, 1. / 255., 0);
} else {
Expand Down

0 comments on commit d39f4d0

Please sign in to comment.