mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-07 10:37:47 +08:00
Fixed #695 (footprint not cleared correctly when GridGlobal/OccupancyThr>0)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user