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 @@ -116,16 +116,17 @@ class GridMapCvConverter
116
116
117
117
for (GridMapIterator iterator (gridMap); !iterator.isPastEnd (); ++iterator) {
118
118
const Index index (*iterator);
119
+ const Index imageIndex (iterator.getUnwrappedIndex ());
119
120
120
121
// Check for alpha layer.
121
122
if (hasAlpha) {
122
123
const Type_ alpha =
123
- image.at <cv::Vec<Type_, NChannels_>>(index (0 ), index (1 ))[NChannels_ - 1 ];
124
+ image.at <cv::Vec<Type_, NChannels_>>(imageIndex (0 ), imageIndex (1 ))[NChannels_ - 1 ];
124
125
if (alpha < alphaTreshold) {continue ;}
125
126
}
126
127
127
128
// Compute value.
128
- const Type_ imageValue = imageMono.at <Type_>(index (0 ), index (1 ));
129
+ const Type_ imageValue = imageMono.at <Type_>(imageIndex (0 ), imageIndex (1 ));
129
130
const float mapValue = lowerValue + mapValueDifference *
130
131
(static_cast <float >(imageValue) / maxImageValue);
131
132
data (index (0 ), index (1 )) = mapValue;
You can’t perform that action at this time.
0 commit comments