Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Measure differences between pixel arrays extracted from pam images. Works well with node module pipe2pam to extract pam images from an ffmpeg pipe. Supported tupltypes are rgb, rgb_alpha, and grayscale. It is currently being used for a video motion detection project.
npm install pam-diff@latest --save
{async: true}
to the pam-diff constructor.{response: "bounds"}
to the pam-diff constructor.{draw: true}
to the pam-diff constructor.const pamDiff = new PamDiff({difference: 5, percent: 5});
const region1 = {name: 'region1', difference: 12, percent: 22, polygon: [{x: 0, y: 0}, {x: 0, y: 225}, {x: 100, y: 225}, {x: 100, y: 0}]};
const region2 = {name: 'region2', difference: 14, percent: 10, polygon: [{x: 100, y: 0}, {x: 100, y: 225}, {x: 200, y: 225}, {x: 200, y: 0}]};
const regions = [region1, region2];
const pamDiff = new PamDiff({regions : regions});
const region1 = {name: 'region1', polygon: [{x: 0, y: 0}, {x: 0, y: 225}, {x: 100, y: 225}, {x: 100, y: 0}]};
const region2 = {name: 'region2', polygon: [{x: 100, y: 0}, {x: 100, y: 225}, {x: 200, y: 225}, {x: 200, y: 0}]};
const regions = [region1, region2];
const pamDiff = new PamDiff({difference: 12, percent: 10, mask: true, regions : regions});
pamDiff.on('diff', data => {
console.log(data);
});
/* callback function */
function myCallback(data) {
console.log(data);
}
/* via the constructor */
const pamDiff = new pamDiff({difference: 10, percent: 20}, myCallback);
/* via the setter */
pamDiff.callback = myCallback;
/* via the chain-able setter */
pamDiff.setCallback(myCallback).setDifference(10).setPercent(20);
/* remove the callback */
pamDiff.callback = null;
{
trigger: [
{name: 'all', percent: 13}
],
pam: <Buffer>
}
{
trigger: [
{name: 'region1', percent: 13},
{name: 'region2', percent: 22}
],
pam: <Buffer>
}
{
trigger: [
{name: 'mask', percent: 13}
],
pam: <Buffer>
}
{
trigger: [
{name: 'all', percent: 13, minX: 42, maxX: 399, minY: 113, maxY: 198}
],
pam: <Buffer>
}
View the docs, tests, or examples for more implementations.
FAQs
Measure differences between pixel arrays extracted from pam images
The npm package pam-diff receives a total of 1,046 weekly downloads. As such, pam-diff popularity was classified as popular.
We found that pam-diff 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.