opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

TrackerKCF configured for grayscale randomly fails

Open superware opened this issue 8 months ago • 1 comments
trafficstars

Hello,

I'm on 4.11.0, think I found a critical bug in cv::TrackerKCF when configuring as follows and feeding CV_8UC1 (grayscale) frames:

cv::TrackerKCF::Params params = {
  .desc_npca = cv::TrackerKCF::GRAY,
  .desc_pca = cv::TrackerKCF::GRAY,
  .compressed_size = 1
};

In perfect conditions (perfectly still scene+target), in about 15-20% of the times, the following exact sequence occur: create() -> init() -> update() true -> update() false. When I switch to CV_8UC3 (BGR) and use the default cv::TrackerKCF::Params then everything works as expected and tracking is never lost.

Thank you.

superware avatar Feb 28 '25 23:02 superware