Assuming that the cascade is loaded with another plugin call earlier, the rawImage has a snapshot from a BGRA camera feed in Android, should this code work with lbp cascade files? Or am I doing something horribly wrong? (I ask because this native plugin code is not detecting anything in OpenCV 4.5.3. although I have confirmed that the rawImage is populating with what it needs to, and it’s running the code – just finding nothing / adding nothing to the referenced image count).
Mat image(height, width, CV_8UC4, *rawImage);
std::vector<Rect> faces;
Mat grayscaleFrame;
cvtColor(image, grayscaleFrame, COLOR_BGRA2GRAY);
Mat resizedGray;
resize(grayscaleFrame, resizedGray, Size(image.cols / _scale, image.rows / _scale));
equalizeHist(resizedGray, resizedGray);
_faceCascade.detectMultiScale(resizedGray, faces);