Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"Why in the for loop they use descriptors_object.rows ? Why not using the matches vector's length ?"

that's the same. (though the size of descriptors_object and descriptors_scene will differ, the matching goes from object -> scene, so there will be as many matches than object descriptors)

"what exactly contains a descriptors_object/descriptors_scene Mat ?"

a 2d Mat. numRows == number of keypoints, numCols == length of descriptor (e.g. 32 bytes for ORB, 128 bytes for SIFT) . each descriptor is on a single row.

" I try to implement the "Features2D + Homography tutorial" in Java with OpenCV3.1"

since you cannot use SIFT or SURF from java, you'll probably have to use ORB or AKAZE instead, and a BFMAtcher instead of the flann-based matcher. have a look here and here

also , please use http://docs.opencv.org/master for 3.1 !

"Why in the for loop they use descriptors_object.rows ? Why not using the matches vector's length ?"

that's the same. (though the size of descriptors_object and descriptors_scene will differ, the matching goes from object -> scene, so there will be as many matches than object descriptors)

"what exactly contains a descriptors_object/descriptors_scene Mat ?"

a 2d Mat. numRows == number of keypoints, numCols == length of descriptor (e.g. 32 bytes for ORB, 128 bytes for SIFT) . each descriptor is on a single row.

" I try to implement the "Features2D + Homography tutorial" in Java with OpenCV3.1"

since you cannot use SIFT or SURF from java, you'll probably have to use ORB or AKAZE instead, and a BFMAtcher instead of the flann-based matcher. have a look here and here

also , please use http://docs.opencv.org/master and http://docs.opencv.org/java/3.1.0 for 3.1 !

"Why in the for loop they use descriptors_object.rows ? Why not using the matches vector's length ?"

that's the same. (though the size of descriptors_object and descriptors_scene will differ, the matching goes from object -> scene, so there will be as many matches than object descriptors)

"what exactly contains a descriptors_object/descriptors_scene Mat ?"

a 2d Mat. numRows == number of keypoints, numCols == length of descriptor (e.g. 32 bytes for ORB, 128 bytes floats for SIFT) . each descriptor is on a single row.

" I try to implement the "Features2D + Homography tutorial" in Java with OpenCV3.1"

since you cannot use SIFT or SURF from java, you'll probably have to use ORB or AKAZE instead, and a BFMAtcher instead of the flann-based matcher. have a look here and here

also , please use http://docs.opencv.org/master and http://docs.opencv.org/java/3.1.0 for 3.1 !