What are KeyPoint and MatchDpoint in OpenCV in Java -
dears 1-i know point class regarding 2 channel integer value coordinates(points): matofpoint vector of integer points. same keypoint class? know class containing salient points.is true @ them 2 channel float value coordinates(points)? @ lines below:
keypoint test; test= new float[]{x,y};
i wrote them see if interpretation regarding keypoint valid. please validate this.
2-what dmatch match.trainidx? mean trainidx?
peace
keypoint stores salient points description. stores x, y, angle, size etc. see http://docs.opencv.org/java/2.4.2/org/opencv/features2d/keypoint.html
correct way manually initialize in java be:
keypoint test = new keypoint(x, y, size);
or list of keypoints image :
mat srcimage; matofkeypoint keypoints; mat descriptors; descriptorextractor descexctractor = descriptorextractor.create(descriptorextractor.sift); descexctractor.compute(srcimage, keypoints, descexctractor); keypoint[] keypointsarray = keypoints.toarray()
dmatch constains description of matching keypoint descriptors. see http://docs.opencv.org/java/2.4.2/org/opencv/features2d/dmatch.html
returned descriptormatcher implementation (match, knnmatch, radiusmatch functions). pass matrixes querydescriptors , traindescriptors 1 of these functions.
trainidx row index in traindescriptors closest given descriptor in querydescriptors.
i'd suggest reading original opencv description , examples c++, java provides mapping c++ functionality through jni.
Comments
Post a Comment