-------------------------------------------------------------------------- */ Reads image and converts to 1 channel image.
| 596 | /* -------------------------------------------------------------------------- */ |
| 597 | // Reads image and converts to 1 channel image. |
| 598 | cv::Mat UtilsOpenCV::ReadAndConvertToGrayScale(const std::string& img_name, |
| 599 | bool equalize) { |
| 600 | cv::Mat img = cv::imread(img_name, cv::IMREAD_ANYCOLOR); |
| 601 | if (img.channels() > 1) cv::cvtColor(img, img, cv::COLOR_BGR2GRAY); |
| 602 | if (equalize) { // Apply Histogram Equalization |
| 603 | LOG(INFO) << "- Histogram Equalization for image: " << img_name; |
| 604 | cv::equalizeHist(img, img); |
| 605 | } |
| 606 | return img; |
| 607 | } |
| 608 | |
| 609 | /* -------------------------------------------------------------------------- */ |
| 610 | // reorder block entries of covariance from state: [bias, vel, pose] to [pose |
nothing calls this directly
no outgoing calls
no test coverage detected