justadudewhohacks / justadudewhohacks/opencv4nodejs

Strange problem

Open
#355 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.1k
Forks
826
PR merge metrics
No merged PRs in 30d

Description

Hello justadudewhohacks!
I have a strange problem, I'll try to tell you what I have:
two computers, both Windows 7. Same folders with binaries and libs of openCV. The correct paths in OPENCV_LIB_DIR, OPENCV_DIR, OPENCV_BIN_DIR and OPENCV_INCLUDE_DIR and PATH.
Three files: 1.jpg, 2.jpg (trimmed part 1.jpg) and 3.bmp.
A test application that captures keypoints and descriptors.
On my main machine, (where I once builded opencv from the sources), all three files are fully processed. On the second machine, only 2.jpg is processed, while the remaining files are not processed. At the detect stage, the process simply ends, not reporting anything to the console. Can you tell why this can happen?
my code:
const fs = require('fs');
const cv = require('opencv4nodejs');

let buffer = fs.readFileSync('./1.jpg');
console.log('readed');
let image = cv.imdecode(buffer, 0);
let detector = new cv.SURFDetector({nFeatures: 400});
let keyPoints = detector.detect(image); //There the process simply ends
console.log(keyPoints);
let descriptors = detector.compute(image, keyPoints);
console.log(descriptors);
console.log('all done')

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.