File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
grid_map_cv/include/grid_map_cv Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,17 @@ class GridMapCvConverter
108108
109109 for (GridMapIterator iterator (gridMap); !iterator.isPastEnd (); ++iterator) {
110110 const Index index (*iterator);
111+ const Index imageIndex (iterator.getUnwrappedIndex ());
111112
112113 // Check for alpha layer.
113114 if (hasAlpha) {
114115 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 ];
116117 if (alpha < alphaTreshold) {continue ;}
117118 }
118119
119120 // Compute value.
120- const Type_ imageValue = imageMono.at <Type_>(index (0 ), index (1 ));
121+ const Type_ imageValue = imageMono.at <Type_>(imageIndex (0 ), imageIndex (1 ));
121122 const float mapValue = lowerValue + mapValueDifference *
122123 (static_cast <float >(imageValue) / maxImageValue);
123124 data (index (0 ), index (1 )) = mapValue;
You can’t perform that action at this time.
0 commit comments