Ask Your Question

Revision history [back]

Hi, I found the issue. While setting the priors I was creating a Mat() with references to the weights for my labels. auto weightMatrix = cv::Mat(1, 2, CV_32F, { 1.0, 100.0 });

and was saving the file in other function. So it was not able to find weights values.

I changed it to

auto weightMatrix = cv::Mat::zeros(1, 2, CV_32F);

and now it works fine.