Skip to content

Instantly share code, notes, and snippets.

@albjeremias
albjeremias / gist:8552a5945cdd71f38795f7d620f40479
Created March 22, 2020 12:09
some snippet of js with opencv matching
let MAX_FEATURES = 500;
let imSceneGray = new cv.Mat();
let imObjectGray = new cv.Mat();
let orb = new cv.ORB();
let kpScene = new cv.KeyPointVector();
let descriptorsScene = new cv.Mat();
let kpObject = new cv.KeyPointVector();
let descriptorsObject = new cv.Mat();
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);
}
Attaching to komga
komga | LOGBACK: No context given for c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1181815135
komga | ____ __.
komga | | |/ _|____ _____ _________
komga | | < / _ \ / \ / ___\__ \
komga | | | ( <_> ) Y Y \/ /_/ > __ \_
komga | |____|__ \____/|__|_| /\___ (____ /
komga | \/ \//_____/ \/
komga |
komga | Version: 0.14.1