Bug in goodFeaturesToTrack (Feature #171)
Description
Function goodFeaturesToTrack crashes (cvfeatureselect.cpp:164) when either image.cols or image.rows is smaller than minDistance/2 (because then grid_width==0 or grid_height==0).
Solution - replace (lines 104-105):
const int grid_width = (float)w / cell_size + 0.5; // round up
const int grid_height = (float)h / cell_size + 0.5; // round up
by:
const int grid_width = (w + cell_size - 1) / cell_size;
const int grid_height = (h + cell_size - 1) / cell_size;
Associated revisions
Merge pull request #171 from asmorkalov:android_8_neon_fix
Merge pull request #171 from akarsakov:ipp_pyramids
History
Updated by anonymous - almost 15 years ago
Thank! Your patch is applied in r2814
- Status changed from Open to Done
- (deleted custom field) set to fixed