Created
March 19, 2020 16:33
-
-
Save albjeremias/c50a5610d35e40f279546f8ee1d1d4ce to your computer and use it in GitHub Desktop.
Revisions
-
albjeremias created this gist
Mar 19, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ function OpencvExt() { cv.DMatchVector.prototype.sort = function () { for (let i = 0; i < this.size(); i++) { for (let j = 0; j < this.size(); j++) { if (this.get(i).distance < this.get(j).distance) { let x = this.get(i); let y = this.get(j); this.set(i, y); this.set(j, x); } } } } cv.DMatchVector.prototype.resizeMe=function(length){ let matchesResized = new cv.DMatchVector(); for (let i = 0; i < length; i++) { matchesResized.push_back(this.get(i)); } return matchesResized; } }