2013-02-20 19:59:14 -0600 | asked a question | FeatureDetector factory doesn't work I've been trying out the abstract class FeatureDetector, which has a factory method to create several child detectors. Unfortunately, this factory doesn't allow passing any parameters to the constructor, which I suspect many of the detectors need (some of the children have a member called Params). The following code caused an exception:
However, identical handling of an automatic variable constructed with the default constructor worked just fine:
I don't know what the create() method is doing, but it doesn't seem to be much good. |
2013-02-20 17:42:46 -0600 | asked a question | Matrix error in FaceRecognizer predict This is a question I've also asked on Stackoverflow.com I'm trying to make a FisherFaceRecognizer's predict() method work, but I keep getting an error I've verified that both source and training images are the same data type, full color. In fact, I even tried copying one to the other just to make sure they were the same. My code is adapted from the tutorial at http://docs.opencv.org/modules/contrib/doc/facerec/facerec_tutorial.html#fisherfaces however, my test image is larger than the training images, so I needed to work on a region of interest (ROI) of the right size. Here's how I read the images and converted sizes. I cloned the ROI matrix because an earlier error message told me the target matrix must be contiguous:
// I get an exception message at the predict statement. I know both matrices have type 16, yet somehow it still doesn't believe the matrices are the same size and data type. I've verified that both Mat's are the same dimensions (180x200) and the same elemSize() (3). Is this an internal bug? |