Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
salient-image
Advanced tools
Simple salient processing on top of node-opencv
H. Xiaodi, H. Jonathan, C. Koch, Image signature: highlighting sparse salient regions, IEEE Transactions on Pattern Analysis and Machine Intelligence 34 (1) (2012) 194–200.
npm install salient-image
examples/input.jpg | examples/output.png | examples/output_with_options.png |
---|---|---|
var salient = require("salient-image");
var cv = require("opencv");
// Without any options
salient("assets/mona.png", function(err, saliency){
// saliency is an node-opencv floating-point Matrix
// maximum is 1, minium is 1
var width = saliency.width(), height = saliency.height();
var imgOutput = new cv.Matrix(width, height, cv.Constants.CV_8U);
// convert floating point to grey scale Matrix
saliency.convertTo(imgOutput, cv.Constants.CV_8U, 255);
imgOutput.save("assets/output.png");
console.log('Image saved to ./assets/output.png');
});
var cv = require("node-opencv");
// With options
salient("assets/mona.png", {
resize : [200, 200], // the resize size
sigma : 0.045, // the sigma of the gaussian kernel
gaussianKernel : [11, 11] // the size of the gaussian kernel
}, function(err, saliency){
// saliency is an node-opencv floating-point Matrix
// maximum is 1, minium is 1
var width = saliency.width(), height = saliency.height();
var imgOutput = new cv.Matrix(width, height, cv.Constants.CV_8U);
// convert floating point to grey scale Matrix
saliency.convertTo(imgOutput, cv.Constants.CV_8U, 255);
imgOutput.save("assets/output_with_options.png");
console.log('Image saved to ./assets/output_with_options.png');
});
var img = new cv.Matrix(<...>);
salient({
image : img,
resize : [200, 200], // the resize size
sigma : 0.045, // the sigma of the gaussian kernel
gaussianKernel : [11, 11] // the size of the gaussian kernel
}, function(err, saliency){ ... });
FAQs
Image signature: highlighting sparse salient regions
We found that salient-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.