MCPcopy Create free account
hub / github.com/KumarRobotics/sloam / _preProcessRange

Method _preProcessRange

sloam/src/segmentation/inference.cpp:302–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void Segmentation::_preProcessRange(const cv::Mat& img, cv::Mat& pImg, float maxDist) {
303 std::vector<cv::Mat> channels(2);
304 cv::split(img, channels);
305
306 pImg = img.clone();
307
308 // Normalize
309 double minVal = 0;
310 double maxVal = 0;
311 cv::minMaxIdx(channels[1], &minVal, &maxVal);
312 float rangeMultiplier = 1.0 / 100.0;
313 float intensityMultipler = 1.0 / (float)maxVal;
314 cv::multiply(pImg, cv::Scalar(rangeMultiplier, intensityMultipler),
315 pImg);
316}
317
318void Segmentation::_argmax(const float *in, cv::Mat& maskImg){
319 std::vector<unsigned char> max;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected