Error in Xobjdetect (Bug #4245)
Description
In acffeature.cpp, the "void ACFFeatureEvaluatorImpl::setChannels(InputArrayOfArrays channels)" function will often overrun the right or bottom channel Mat. The code needs to be changed to something like:
for( int cell_row = row; cell_row < row + 4; ++cell_row )
for( int cell_col = col; cell_col < col + 4; ++cell_col )
{
if( cell_col < channel.cols && cell_row < channel.rows ) <--- Add this
sum += (int)channel.at<float>(cell_row, cell_col);
}
if( col / 4 < acf_channel.cols && row / 4 < acf_channel.rows ) <--- Add this
acf_channel(row / 4, col / 4) = sum;
History
Updated by Ilya Lavrenov almost 10 years ago
Hi Jay,
Could you create a merge-request with proposed changes?
Updated by Vadim Pisarevsky almost 10 years ago
- Category set to contrib/xobjdetect
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv_contrib/issues/315