@@ -232,16 +232,16 @@ static void computeGradientMaps( const Mat& im,
232
232
break ;
233
233
234
234
case ASSIGN_HARD_MAGN:
235
- gradMap[index].at <uchar>(i,j) = (uchar) round ( gradMagnitude );
235
+ gradMap[index].at <uchar>(i,j) = (uchar) cvRound ( gradMagnitude );
236
236
break ;
237
237
238
238
case ASSIGN_BILINEAR:
239
239
index2 = (int ) ceil ( theta / binSize );
240
240
index2 = ( index2 == orientQuant ) ? 0 : index2;
241
241
binCenter = ( index + 0 .5f ) * binSize;
242
242
weight = 1 - abs ( theta - binCenter ) / binSize;
243
- gradMap[index ].at <uchar>(i,j) = (uchar) round ( 255 * weight );
244
- gradMap[index2].at <uchar>(i,j) = (uchar) round ( 255 * ( 1 - weight ) );
243
+ gradMap[index ].at <uchar>(i,j) = (uchar) cvRound ( 255 * weight );
244
+ gradMap[index2].at <uchar>(i,j) = (uchar) cvRound ( 255 * ( 1 - weight ) );
245
245
break ;
246
246
247
247
case ASSIGN_SOFT:
@@ -251,7 +251,7 @@ static void computeGradientMaps( const Mat& im,
251
251
binCenter = ( index2 + 0 .5f ) * binSize;
252
252
weight = cos ( theta - binCenter );
253
253
weight = ( weight < 0 ) ? 0 : weight;
254
- gradMap[index2].at <uchar>(i,j) = (uchar) round ( 255 * weight );
254
+ gradMap[index2].at <uchar>(i,j) = (uchar) cvRound ( 255 * weight );
255
255
}
256
256
break ;
257
257
@@ -262,7 +262,7 @@ static void computeGradientMaps( const Mat& im,
262
262
binCenter = ( index2 + 0 .5f ) * binSize;
263
263
weight = cos ( theta - binCenter );
264
264
weight = ( weight < 0 ) ? 0 : weight;
265
- gradMap[index2].at <uchar>(i,j) = (uchar) round ( gradMagnitude * weight );
265
+ gradMap[index2].at <uchar>(i,j) = (uchar) cvRound ( gradMagnitude * weight );
266
266
}
267
267
break ;
268
268
} // end switch
0 commit comments