Hi, I have trained my own haar cascade classifier using opencv version 3.2 and after checking its performance I tried to use the cuda functions to perform some tests, however I encountered the following error:
terminate called after throwing an instance of 'cv::Exception'what(): OpenCV(4.4.0) /tmp/build_opencv/opencv_contrib/modules/cudalegacy/src/cuda/NCVHaarObjectDetection.cu:2079: error: (-215:Assertion failed) haar.ClassifierSize.height > 0 && haar.ClassifierSize.width > 0 in function 'loadFromXML'
I am currently using opencv version 4.4 on a jetson nano and applying the detectMultiScale function as follows:
cv::cuda::GpuMat gframe, obj;
std::vector<cv::Rect> rect;
std::string cascadePath = "./cascade.xml"
Ptr<cuda::CascadeClassifier> cascade = cv::cuda::CascadeClassifier::create(cascadePath);
cascade->setScaleFactor(1.8);
cascade->setMinNeighbors(10);
cascade->setMinObjectSize(cv::Size(Tmin,Tmin));
cascade->setMinObjectSize(cv::Size(Tmax,Tmax));
cascade->detectMultiScale(gframe, obj);
cascade->convert(obj, rect);
I appreciate any information.