Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

matrix-correlation

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matrix-correlation

Node Script to calculate SAD, SSD or ZNCC between two matrices.

latest
npmnpm
Version
0.0.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Matrix Correlations

A Node.JS Script to calculate the following Matrix correlations:

  • Sum of Absolute Differences (SAD)
  • Sum of Squared Differences (SSD)
  • Zero Mean Normalized Cross-Correlation (ZNCC)

Usage

npm install matrix-correlation
var corr = require('matrix-correlation');

var A = [
  [0,0,0],
  [54,54,54],
  [0,54,0]
];

var B = [
  [0,0,0],
  [108,108,108],
  [0,108,0]
];

console.log('ZNCC(A,B) = ' + corr.ZNCC(A,B));

API

corr.SAD(A,B);
corr.SSD(A,B);
corr.ZNCC(A,B);

License

MIT

FAQs

Package last updated on 25 Aug 2014

Did you know?

Socket

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.

Install

Related posts