Closed qudm closed 9 years ago
That does look wrong. Thanks very much!
Fortunately (phew!), the impact of this bug is minimal. That sobel3 calculation is only used in the calculation of the focus score, which (1) doesn't rely on any fine details, just statistical summaries and (b) was chosen because it seems to work well in practice, not because of any theoretical motivation.
Please check line 573 of file card.io-dmz/cv/sobel.cpp. I think it should be: uint16_t row2_index = (row_index == (uint16_t)(src_size.height - 1)) ? src_size.height - 1 : row_index + 1; instead of: uint16_t row2_index = row_index == (uint16_t)(src_size.height - 1 ? src_size.height - 1 : row_index + 1);