File tree 1 file changed +3
-2
lines changed
grid_map_cv/include/grid_map_cv
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,17 @@ class GridMapCvConverter
108
108
109
109
for (GridMapIterator iterator (gridMap); !iterator.isPastEnd (); ++iterator) {
110
110
const Index index (*iterator);
111
+ const Index imageIndex (iterator.getUnwrappedIndex ());
111
112
112
113
// Check for alpha layer.
113
114
if (hasAlpha) {
114
115
const Type_ alpha =
115
- image.at <cv::Vec<Type_, NChannels_>>(index (0 ), index (1 ))[NChannels_ - 1 ];
116
+ image.at <cv::Vec<Type_, NChannels_>>(imageIndex (0 ), imageIndex (1 ))[NChannels_ - 1 ];
116
117
if (alpha < alphaTreshold) {continue ;}
117
118
}
118
119
119
120
// Compute value.
120
- const Type_ imageValue = imageMono.at <Type_>(index (0 ), index (1 ));
121
+ const Type_ imageValue = imageMono.at <Type_>(imageIndex (0 ), imageIndex (1 ));
121
122
const float mapValue = lowerValue + mapValueDifference *
122
123
(static_cast <float >(imageValue) / maxImageValue);
123
124
data (index (0 ), index (1 )) = mapValue;
You can’t perform that action at this time.
0 commit comments