Ask Your Question

Revision history [back]

unable to get keypoints in opencv.js by orb detect and compute.

here is the code

*let orig = cv.imread(canvasOutput1); let temp = cv.imread(canvasOutput2); var orb = new cv.ORB(10000); let des = new cv.Mat(); let img3 = new cv.Mat(); var noArray1 = new cv.Mat(); var kp1 = new cv.KeyPointVector(); // find the keypoints with ORB orb.detect(orig, kp1, noArray1); // compute the descriptors with ORB

var das=new cv.Mat();   
orb.compute(orig, kp1, das);

   console.log(kp1);              //the keypoint vector is not showing any keypoints like python
for (i=0;i<kp1.size();i++)
{
    console.log(kp1[i].pt);              //this is giving error when trying to print points.
}*
click to hide/show revision 2
None

updated 2019-07-20 06:28:20 -0600

berak gravatar image

unable to get keypoints in opencv.js by orb detect and compute.

here is the code

*let orig = cv.imread(canvasOutput1);

 let orig = cv.imread(canvasOutput1);
let temp = cv.imread(canvasOutput2);
 var orb = new cv.ORB(10000);
 let des = new cv.Mat();
 let img3 = new cv.Mat();
 var noArray1 = new cv.Mat();
 var kp1 = new cv.KeyPointVector();
 // find the keypoints with ORB
 orb.detect(orig, kp1, noArray1);
 // compute the descriptors with ORB

ORB
var das=new cv.Mat();
orb.compute(orig, kp1, das);
 console.log(kp1);   //the keypoint vector is not showing any keypoints like python
for (i=0;i<kp1.size();i++)
{
console.log(kp1[i].pt);  //this is giving error when trying to print points.
}*
}
click to hide/show revision 3
None

updated 2019-07-20 06:28:51 -0600

berak gravatar image

unable to get keypoints in opencv.js by orb detect and compute.

here is the code

 let orig = cv.imread(canvasOutput1);
let temp = cv.imread(canvasOutput2);
var orb = new cv.ORB(10000);
let des = new cv.Mat();
let img3 = new cv.Mat();
var noArray1 = new cv.Mat();
var kp1 = new cv.KeyPointVector();
// find the keypoints with ORB
orb.detect(orig, kp1, noArray1);
// compute the descriptors with ORB

var das=new cv.Mat();   
orb.compute(orig, kp1, das);

 console.log(kp1);   //the keypoint vector is not showing any keypoints like python
for (i=0;i<kp1.size();i++)
{
    console.log(kp1[i].pt);  //this is giving error when trying to print points.
}