Object recognition knnmatch
Hello... I extracted features from a train image and query image using
FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
detector.detect(pic, keypoints1);
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.ORB);
extractor.compute(pic, keypoints1, featuresofqimg);
I did this for both images...i wanna match these features and i used
DescriptorMatcher matches =DescriptorMatcher.create(DescriptorMatcher.FLANNBASED);
matches.knnMatch(featuresofqimg, featuresoftrainimg, matc, 2);
but the app stops unexpectedly... pls help me over here...
I initialized matc as follows
private List<MatofDMatch> matc1;
and i don't know how to initialise it..
Also a 2-d variable is required for match...Mat is already 2d ,I wonder why List<matofdmatch> is needed..Its the syntax of the arguments in knnmatch();
pls help me over here.