Socket
Socket
Sign inDemoInstall

opencv4nodejs-prebuilt

Package Overview
Dependencies
72
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.15.1-beta2 to 4.15.1-beta3

36

lib/cv.js

@@ -1,9 +0,23 @@

const path = require('path');
const { resolvePath } = require('./commons');
const path = require("path");
const { resolvePath } = require("./commons");
let winLibsPath;
if (process.env.BINDINGS_DEBUG) {
winLibsPath = "../build/Debug/opencv4nodejs";
} else {
winLibsPath = "../build/Release/opencv4nodejs";
}
// ensure binaries are added to path on windows
if (process.platform === "win32") {
// append opencv binary path to node process
if (!process.env.path.includes(winLibsPath)) {
process.env.path = `${process.env.path};${winLibsPath};`;
}
}
let cv;
if (process.env.BINDINGS_DEBUG) {
cv = require(path.join(__dirname, '../build/Debug/opencv4nodejs'));
cv = require(path.join(__dirname, "../build/Debug/opencv4nodejs"));
} else {
cv = require(path.join(__dirname, '../build/Release/opencv4nodejs'));
cv = require(path.join(__dirname, "../build/Release/opencv4nodejs"));
}

@@ -14,6 +28,16 @@

Object.keys(haarCascades).forEach(
key => cv[key] = resolvePath(path.join(__dirname, './haarcascades'), haarCascades[key]));
key =>
(cv[key] = resolvePath(
path.join(__dirname, "./haarcascades"),
haarCascades[key]
))
);
Object.keys(lbpCascades).forEach(
key => cv[key] = resolvePath(path.join(__dirname, './lbpcascades'), lbpCascades[key]));
key =>
(cv[key] = resolvePath(
path.join(__dirname, "./lbpcascades"),
lbpCascades[key]
))
);
module.exports = cv;

2

lib/dirs.js

@@ -13,3 +13,3 @@ const { join } = require("path");

const opencvInclude = join(opencvBuild, 'include');
const opencvLibDir = isWin() ? join(opencvBuild, 'lib/Release') : join(opencvBuild, 'lib');
const opencvLibDir = isWin() ? join(opencvBuild, 'bin/Release') : join(opencvBuild, 'lib');
const opencvBinDir = isWin() ? join(opencvBuild, 'bin/Release') : join(opencvBuild, 'bin');

@@ -16,0 +16,0 @@

@@ -31,6 +31,1 @@ const opencvBuild = require(`@nut-tree/opencv-build-${process.platform}`);

opencvBuild.opencvModules.filter(lib => desiredModules.includes(lib)).forEach(lib => console.log(`-lopencv_${lib}`));
if (process.env.BINDINGS_DEBUG) {
console.log('-Wl,-rpath,../build/Debug/opencv4nodejs');
} else {
console.log('-Wl,-rpath,../build/Release/opencv4nodejs');
}
{
"name": "opencv4nodejs-prebuilt",
"version": "4.15.1-beta2",
"version": "4.15.1-beta3",
"description": "This is a fork of opencv4nodejs which provides pre-built binaries",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc