Fixed #695 (footprint not cleared correctly when GridGlobal/OccupancyThr>0)

This commit is contained in:
matlabbe
2021-03-05 18:35:49 -05:00
parent 4f46d8e904
commit ab8f0e2b34
4 changed files with 64 additions and 18 deletions
+9 -1
View File
@@ -932,10 +932,18 @@ cv::Mat convertMap2Image8U(const cv::Mat & map8S, bool pgmFormat)
{
gray = pgmFormat?254:200;
}
else // -1
else if(pgmFormat || v == -1)// -1
{
gray = pgmFormat?205:89;
}
else if(v>50)
{
gray = double(100-v)*2/100.0*double(89);
}
else // v<50
{
gray = double(50-v)*2/100.0*double(178-89)+89;
}
map8U.at<unsigned char>(i, j) = gray;
}
}