Giter Club home page Giter Club logo

ssim's Introduction

CircleCI Test Coverage license npm

SSIM.JS

Get a 0 to 1 score on how similar two images are

The closer SSIM is to 1 the higher the similarity. It correlates better with subjective ratings than other measures like PSNR and MSE. For instance:

Original, MSE = 0, SSIM = 1 MSE = 144, SSIM = 0.988 MSE = 144, SSIM = 0.913
MSE = 144, SSIM = 0.840 MSE = 144, SSIM = 0.694 MSE = 142, SSIM = 0.662

Table extracted from http://www.cns.nyu.edu/~lcv/ssim/

πŸ–₯ Install

npm install ssim.js

You can also use the web version directly from unpkg's CDN: https://unpkg.com/ssim.js@{{version}}/dist/ssim.web.js.

πŸ“ Usage

Check out the playground for node and web usage examples.

SSIM.js takes in 2 image buffers and optional options parameter. You can find all options available here.

For examples on how to implement image loading strategies for both node and the web, check out this wiki page.

import ssim from "ssim.js";

const img1 = loadImage("./img1.jpg");
const img2 = loadImage("./img2.jpg");

const { mssim, performance } = ssim(img1, img2);

console.log(`SSIM: ${mssim} (${performance}ms)`);

πŸ“– Documentation

If you run into any issues or want a more info, check the wiki.

The code is fully documented but feel free to create an issue here if you have any questions.

🏁 Metrics

Process Status
Versioning semantic-release Commitizen friendly
Dependencies Known Vulnerabilities DavidDM

πŸ’‘ Credits

This project is a direct port of algorithms published by Wang, et al. 2004 on "Image Quality Assessment: From Error Visibility to Structural Similarity". The original Matlab scripts are available here with their datasets. To view the steps taken to validate ssim.js results, check the wiki.

The current (default) implementation uses the Weber algorithm, originally developed by Dan Weber, 2020 at notatypical.agency.

ssim's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jkeys089 avatar obartra avatar omnisip avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ssim's Issues

An in-range update of babel-cli is breaking the build 🚨

Version 6.22.2 of babel-cli just got published.

Branch Build failing 🚨
Dependency babel-cli
Current Version 6.22.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-cli is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Parameterize Ξ±, Ξ² and Ξ³

Ξ±, Ξ² and Ξ³ are combined now (as they are on the original scripts)

Parameterize for the normal (not line-by-line port) SSIM implementation

An in-range update of eslint is breaking the build 🚨

Version 3.12.1 of eslint just got published.

Branch Build failing 🚨
Dependency eslint
Current Version 3.12.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Release Notes v3.12.1
  • 0ad4d33 Fix: indent regression with function calls (fixes #7732, fixes #7733) (#7734) (Teddy Katz)
  • ab246dd Docs: Rules restricting globals/properties/syntax are linked together (#7743) (Kevin Partington)
  • df2f115 Docs: Add eslint-config-mdcs to JSCS Migration Guide (#7737) (Joshua Koo)
  • 4b77333 Build: avoid creating broken rule links in the changelog (#7731) (Teddy Katz)
Commits

The new version differs by 6 commits .

  • 9679daa 3.12.1
  • 8a31bc8 Build: package.json and changelog update for 3.12.1
  • 0ad4d33 Fix: indent regression with function calls (fixes #7732, fixes #7733) (#7734)
  • ab246dd Docs: Rules restricting globals/properties/syntax are linked together (#7743)
  • df2f115 Docs: Add eslint-config-mdcs to JSCS Migration Guide (#7737)
  • 4b77333 Build: avoid creating broken rule links in the changelog (#7731)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Add Contributor License Agreement

We should add a contributor license agreement for the project that all contributors can sign off on before their work is accepted. This ensures that project never runs into any licensing, ownership, or liability issues and Oscar can still lead and direct the project like he wants to.

For reference, these are the two most common CLAs I've found:

https://cla.developers.google.com/about/google-individual
https://code.facebook.com/cla/individual

They appear to be virtually identical.

Ubuntu/Canonical's is slightly different, but offers the same legal protection:
https://ubuntu.com/legal/contributors/agreement

Update assets docs

Documentation regarding assets is out of date (no longer needs polyfills on old versions of Node).

Update /assets/README.md

An in-range update of webdriverio is breaking the build 🚨

Version 4.5.1 of webdriverio just got published.

Branch Build failing 🚨
Dependency webdriverio
Current Version 4.5.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As webdriverio is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Commits

The new version differs by 20 commits .

  • 8bc17a0 v4.5.1
  • 5befca2 Update contributors
  • 391772a updated changelog
  • 2ed2434 fixed multiremote test
  • d3e4388 Merge pull request #1776 from WillLuce/patch-1
  • 02137c2 Adds TypeScript boilerplate
  • fdd20cb Merge pull request #1767 from wvankuipers/implemented-parentuid
  • 123614a Merge pull request #1771 from wvankuipers/fix-mocha-timout-messages
  • 7e37143 runner.err can be an empty object (thus lacking the message prop.) this fixes #1770
  • b7e3a6e Disabled suitestats for the β€œbefore all” hook to prevent the reporting of incorrect suite stats
  • 90389ec Merge pull request #1769 from JoshFerge/patch-1
  • 4c7c4c1 Fixed broken link to SauceLabs Connect
  • c089956 Merge pull request #1768 from jwood803/patch-1
  • 8256d19 Updated some wording and link
  • af0e482 If provided use the runner.parentUid to identify the parent, use runner.parent (title) as fallback

There are 20 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of webpack is breaking the build 🚨

Version 2.3.3 of webpack just got published.

Branch Build failing 🚨
Dependency webpack
Current Version 2.3.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As webpack is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… codeclimate/coverage 100% Details

  • ❌ ci/circleci Your tests failed on CircleCI Details

Release Notes v2.3.3

Bugfixes:

  • fix progress in multi compiler
Commits

The new version differs by 2 commits .

  • ba24c1b 2.3.3
  • 956f618 Fix ProgressPlugin for multi compiler caused by ES6 refactoring

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

Version 3.15.0 of eslint just got published.

Branch Build failing 🚨
Dependency eslint
Current Version 3.14.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Release Notes v3.15.0
  • f2a3580 Fix: no-extra-parens incorrect precedence (fixes #7978) (#7999) (alberto)
  • d6b6ba1 Fix: no-var should fix ForStatement.init (#7993) (Toru Nagashima)
  • 99d386d Upgrade: Espree v3.4.0 (#8019) (Kai Cataldo)
  • 42390fd Docs: update README.md for team (#8016) (Toru Nagashima)
  • d7ffd88 Chore: enable template-tag-spacing on ESLint codebase (#8005) (Teddy Katz)
  • f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002) (Danny Andrews)
  • df2351a Docs: Fix misleading section in brace-style documentation (#7996) (Teddy Katz)
  • 5ae6e00 Chore: avoid unnecessary feature detection for Symbol (#7992) (Teddy Katz)
  • 5d57c57 Chore: fix no-else-return lint error (refs #7986) (#7994) (Vitor Balocco)
  • 62fb054 Chore: enable no-else-return on ESLint codebase (#7986) (Teddy Katz)
  • c59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968) (Zack Argyle)
  • 5cdfa99 Chore: enable no-unneeded-ternary on ESLint codebase (#7987) (Teddy Katz)
  • fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970) (Teddy Katz)
  • c5066ce Update: add "variables" option to no-use-before-define (fixes #7111) (#7948) (Teddy Katz)
  • 09546a4 New: template-tag-spacing rule (fixes #7631) (#7913) (Jonathan Wilsson)
Commits

The new version differs by 17 commits .

  • 8ea98f9 3.15.0
  • 77b5cb7 Build: package.json and changelog update for 3.15.0
  • f2a3580 Fix: no-extra-parens incorrect precedence (fixes #7978) (#7999)
  • d6b6ba1 Fix: no-var should fix ForStatement.init (#7993)
  • 99d386d Upgrade: Espree v3.4.0 (#8019)
  • 42390fd Docs: update README.md for team (#8016)
  • d7ffd88 Chore: enable template-tag-spacing on ESLint codebase (#8005)
  • f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002)
  • df2351a Docs: Fix misleading section in brace-style documentation (#7996)
  • 5ae6e00 Chore: avoid unnecessary feature detection for Symbol (#7992)
  • 5d57c57 Chore: fix no-else-return lint error (refs #7986) (#7994)
  • 62fb054 Chore: enable no-else-return on ESLint codebase (#7986)
  • c59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968)
  • 5cdfa99 Chore: enable no-unneeded-ternary on ESLint codebase (#7987)
  • fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970)

There are 17 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

Version 3.19.0 of eslint just got published.

Branch Build failing 🚨
Dependency eslint
Current Version 3.18.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… codeclimate/coverage 100% Details

  • ❌ ci/circleci Your tests failed on CircleCI Details

Release Notes v3.19.0
  • e09132f Fix: no-extra-parens false positive with exports and object literals (#8359) (Teddy Katz)
  • 91baed4 Update: allow custom messages in no-restricted-syntax (fixes #8298) (#8357) (Vitor Balocco)
  • 35c93e6 Fix: prevent space-before-function-paren from checking type annotations (#8349) (Teddy Katz)
  • 3342e9f Fix: don't modify operator precedence in operator-assignment autofixer (#8358) (Teddy Katz)
  • f88375f Docs: clarify that no-unsafe-negation is in eslint:recommended (#8371) (Teddy Katz)
  • 02f0d27 Docs: Add soda0289 to Development Team (#8367) (Kai Cataldo)
  • 155424c Fix: ignore empty path in patterns (fixes #8362) (#8364) (alberto)
  • 27616a8 Fix: prefer-const false positive with object spread (fixes #8187) (#8297) (Vitor Balocco)
  • 8569a90 Docs: add note about git's linebreak handling to linebreak-style docs (#8361) (Teddy Katz)
  • 5878593 Chore: fix invalid syntax in no-param-reassign test (#8360) (Teddy Katz)
  • 1b1046b Fix: don't classify plugins that throw errors as "missing" (fixes #6874) (#8323) (Teddy Katz)
  • 29f4ba5 Fix: no-useless-computed-key invalid autofix for getters and setters (#8335) (Teddy Katz)
  • 0541eaf Fix: no-implicit-coercion invalid autofix with consecutive identifiers (#8340) (Teddy Katz)
  • 41b9786 Fix: no-extra-parens false positive with objects following arrows (#8339) (Teddy Katz)
  • 3146167 Fix: eslint.verify should not mutate config argument (fixes #8329) (#8334) (alberto)
  • 927de90 Fix: dot-notation autofix produces invalid syntax for integer properties (#8332) (Teddy Katz)
  • a9d1bea Fix: comma-style autofix produces errors on parenthesized elements (#8331) (Teddy Katz)
  • d52173f Fix: don't generate invalid options in config-rule (#8326) (Teddy Katz)
  • 6eda3b5 Fix: no-extra-parens invalid autofix in for-of statements (#8337) (Teddy Katz)
  • 6c819d8 Fix: dot-notation autofix produces errors on parenthesized computed keys (#8330) (Teddy Katz)
  • 2d883d7 Fix: object-shorthand autofix produces errors on parenthesized functions (#8328) (Teddy Katz)
  • cd9b774 Fix: quotes false positive with backtick option in method names (#8327) (Teddy Katz)
  • d064ba2 Fix: no-else-return false positive for ifs in single-statement position (#8338) (Teddy Katz)
  • 6a718ba Chore: enable max-statements-per-line on ESLint codebase (#8321) (Teddy Katz)
  • 614b62e Chore: update sinon calls to deprecated API. (#8310) (alberto)
  • 0491572 Chore: use precalculated counts in codeframe formatter (#8296) (Vitor Balocco)
  • 8733e6a Chore: Fix incorrect error location properties in tests (#8307) (alberto)
  • c4ffb49 Chore: Fix typos in test option assertions (#8305) (Teddy Katz)
  • 79a97cb Upgrade: devDependencies (#8303) (alberto)
  • e4da200 Upgrade: Mocha to 3.2.0 (#8299) (Ilya Volodin)
  • 2f144ca Fix: operator-assignment autofix errors with parentheses (fixes #8293) (#8294) (Teddy Katz)
  • 7521cd5 Chore: update token logic in rules to use ast-utils (#8288) (Teddy Katz)
  • 9b509ce Chore: refactor space-before-function-paren rule (#8284) (Teddy Katz)
  • ddc6350 Fix: no-param-reassign false positive on destructuring (fixes #8279) (#8281) (Teddy Katz)
  • f8176b3 Chore: improve test coverage for node-event-generator (#8287) (Teddy Katz)
  • 602e9c2 Docs: fix incorrect selector examples (#8278) (Teddy Katz)
Commits

The new version differs by 38 commits .

  • 421aab4 3.19.0
  • 26a4dd5 Build: changelog update for 3.19.0
  • e09132f Fix: no-extra-parens false positive with exports and object literals (#8359)
  • 91baed4 Update: allow custom messages in no-restricted-syntax (fixes #8298) (#8357)
  • 35c93e6 Fix: prevent space-before-function-paren from checking type annotations (#8349)
  • 3342e9f Fix: don't modify operator precedence in operator-assignment autofixer (#8358)
  • f88375f Docs: clarify that no-unsafe-negation is in eslint:recommended (#8371)
  • 02f0d27 Docs: Add soda0289 to Development Team (#8367)
  • 155424c Fix: ignore empty path in patterns (fixes #8362) (#8364)
  • 27616a8 Fix: prefer-const false positive with object spread (fixes #8187) (#8297)
  • 8569a90 Docs: add note about git's linebreak handling to linebreak-style docs (#8361)
  • 5878593 Chore: fix invalid syntax in no-param-reassign test (#8360)
  • 1b1046b Fix: don't classify plugins that throw errors as "missing" (fixes #6874) (#8323)
  • 29f4ba5 Fix: no-useless-computed-key invalid autofix for getters and setters (#8335)
  • 0541eaf Fix: no-implicit-coercion invalid autofix with consecutive identifiers (#8340)

There are 38 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Add web tests

Web tests are very slow to load images, add more tests with small images so testing is more comprehensive without affecting performance

Improve web tests stability

SauceLabs keeps timing out and it's all flukes (tests pass when manually exploring the session). This ticket is to make web tests more resilient

Add multiple builds / browser support

Generate and publish additional builds:

  • mx as an isomorphic build (works on node and on the browser) with no external dependencies that takes 3D matrices as input representing the images.
  • web as a browser-specific build that relies on the canvas element to retrieve the pixel matrices. It accepts URLs but it's subject to CORS restrictions.

That would be in addition to the current node build that would then be defined as:

  • node as a node-specific build that uses node-canvas to retrieve the 3D pixel matrix from each image and accepts Buffer, URLs or a file system path as inputs (current build)

An in-range update of jsdoc is breaking the build 🚨

Version 3.5.4 of jsdoc just got published.

Branch Build failing 🚨
Dependency jsdoc
Current Version 3.5.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As jsdoc is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ ci/circleci A command timed out during your tests Details

Release Notes JSDoc 3.5.4

This version of JSDoc includes a variety of bug fixes.

For a complete list of changes, see the changelog on GitHub.

Commits

The new version differs by 15 commits.

  • 89a6128 3.5.4
  • fc22451 upgrade Babylon
  • 1e1976d fix test breakage
  • 50fae0a 3.5.4 changelog
  • 1ccf414 prevent crash when an anonymous class is passed as a parameter (#1416)
  • a4ae289 hide the signature in the heading for classes with hidden constructors (#1397)
  • 67bd0d2 update tested Node.js versions
  • c60101f enable more Babylon options (#1411)
  • 10cd161 upgrade Babylon
  • 3baec39 update .gitignore
  • bafc538 fix problems with methods and properties in classes returned by arrow function expressions (#1409)
  • 1389c75 followup to 3b604fb7f9f10c4a4391d0d4c9bcabdea3609082
  • 4e1328f Deferred process.exit() to allow STDOUT pipe to flush (#1408)
  • 1ab8dd4 add Slack channel to README
  • 303c1c3 start 3.5.4-dev

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of core-js is breaking the build 🚨

Version 2.5.0 of core-js just got published.

Branch Build failing 🚨
Dependency core-js
Current Version 2.4.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As core-js is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ ci/circleci A command timed out during your tests Details

Commits

The new version differs by 99 commits.

  • 63ae52d 2.5.0
  • 998f32e update eslint
  • 9025b48 add .of and .from methods on collection constructors to readme
  • 20f055b add Array#flatten and Array#flatMap to readme
  • 860efb6 fix a typo
  • b9203ee update list of iterable DOM collections in readme
  • b4c2e5e remove some unused variables, update changelog
  • fc32be8 add Promise#try to readme
  • ea82fd9 remove caching Function#name, fix #296
  • fd850c3 add Promise#finally to readme
  • a41dd09 fix IE11 WeakMap frozen keys after zloirock/core-js@a69f577
  • 09f45b6 remove tests of excess DOM collections methods - FF have it, I don't think that removing those methods in core-js make sense
  • d230280 fix the list of whitespaces in the Number constructor test
  • 7c39430 move Array#flatten and Array#flatMap to stage 1 per July TC39 meeting
  • d35736f move Promise#finally to stage 3 per July TC39 meeting

There are 99 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of ngrok is breaking the build 🚨

Version 2.2.16 of ngrok just got published.

Branch Build failing 🚨
Dependency ngrok
Current Version 2.2.15
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As ngrok is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… codeclimate/coverage 100% Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Commits

The new version differs by 5 commits.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of npm-run-all is breaking the build 🚨

Version 4.0.2 of npm-run-all just got published.

Branch Build failing 🚨
Dependency npm-run-all
Current Version 4.0.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As npm-run-all is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… codeclimate/coverage 100% Details

  • ❌ ci/circleci Your tests failed on CircleCI Details

Release Notes v4.0.2

Bug fixes

  • b90575b fixed unintentional failing of the assertion check about --race option. If there is a mix of --parallel and --serial then --race option had failed always. (fixes #88).
Commits

The new version differs by 2 commits .

  • 46cfd57 4.0.2
  • b90575b Fix: it threw for --race even if --parallel exists (fixes #88)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

wasm support

Now I have a scenario to test the stability of mobile devices. The performance requirements are relatively high. It needs to complete 224 wide and high picture detection within 20 ms. can we improve the performance through wasm?

Here are my test results:[macbook pro 2018 chrome]
image

Separate performance tests

Right now performance and unit tests are mixed. Performance tests should be moved to a separate folder within /spec and have a separate package.json command to run them

An in-range update of commitizen is breaking the build 🚨

Version 2.9.3 of commitizen just got published.

Branch Build failing 🚨
Dependency commitizen
Current Version 2.9.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As commitizen is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Release Notes v2.9.3

2.9.3 (2016-12-29)

Bug Fixes

  • package: "main" property within "package.json" (#409) (2915827a)
Commits

The new version differs by 8 commits .

  • 2915827 fix(package): "main" property within "package.json" (#409)
  • 852d6f6 style: Add linting using eslint (#406)
  • 6d282be ci(appveyor): remove appveyor on finish script
  • f9a78e3 ci(appveyor): disable collection of artifacts
  • a655308 ci(tests): on windows run tests as node4/npm3
  • 02021b9 ci(travis): update semantic-release to 6.3.5 and update travis config
  • 9e88876 chore(package): update nyc to version 10.0.0 (#392)
  • ca32961 docs(install): Add documentation for installing and running locally (#300)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

yarn add ssim.js error

yarn add 'ssim.js'
yarn add v1.5.1
[1/4] πŸ” Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] πŸ”— Linking dependencies...
[4/4] πŸ“ƒ Building fresh packages...
[1/1] β ‚ canvas: '-Goutput_dir=.' ]
[-/1] β ‚ waiting...
[-/1] β ‚ waiting...
[-/1] β ‚ waiting...
error An unexpected error occurred: "/Users/axzq/essence/qb/qb-h5/node_modules/canvas: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-gyp rebuild
Directory: /Users/axzq/essence/qb/qb-h5/node_modules/canvas
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/axzq/essence/qb/qb-h5/node_modules/canvas/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/axzq/.node-gyp/9.11.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/axzq/.node-gyp/9.11.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/axzq/.node-gyp/9.11.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/axzq/essence/qb/qb-h5/node_modules/canvas',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/axzq/essence/qb/qb-h5/node_modules/canvas
gyp ERR! node -v v9.11.1

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

An in-range update of json-loader is breaking the build 🚨

Version 0.5.5 of json-loader just got published.

Branch Build failing 🚨
Dependency json-loader
Current Version 0.5.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As json-loader is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… codeclimate/coverage 100% Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Question about the ImageData type

Hi,

I'm using this lib in a nodejs environment, which means I have no access to the ImageData-class but that is fine since ssim don't use that one. But you are using the type so in order to use this lib with typescript I either need to add "lib": ["DOM"] in my tsconfig.json or copy the type from typescripts dom lib.

Have to consider creating your own type for ImageData and remove the dependency to the DOM?

Thanks for the lib,

Add Integer RGB calculation

I have this done, and will generate a pull request when I have a second, but wanted to describe what this does and what the behavior is.

I have an integer rgb calculation that produces values super close to the current floating-point version -- except it's much much faster. It can't however be used as the default/drop-in replacement unless we consider it a breaking change. The reason is that it breaks that rounding on the end to end tests by roughly +/- 0.001.

Formula is --
(77 R + 150G+29*B + 128) >>8.

By itself, without the webassembly extensions, it's so much faster than the rgb calculation for the 256x256 frames goes down to 12ms relative to say 60-70ms. However, it pales compared to the webassembly extension which can do a 1920x1080 frame in 3ms. Basically, I want to incorporate this for gradual drop-in support and automatic acceleration where possible.

Improve performance

Improve performance, potentially by providing an additional method to generate SSIM that's computationally equivalent without being a direct, line-by-line, port.

Measure performance gains of switching to a 1-D Float64Array instead of using Arrays of Arrays which are notably slow. If significant, implement.

That would also make it easier to implement item 4 of the roadmap while preserving the original scripts.

An in-range update of babel-core is breaking the build 🚨

Version 6.25.0 of babel-core just got published.

Branch Build failing 🚨
Dependency babel-core
Current Version 6.24.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-core is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… codeclimate/coverage 100% Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of webdriverio is breaking the build 🚨

Version 4.5.2 of webdriverio just got published.

Branch Build failing 🚨
Dependency webdriverio
Current Version 4.5.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As webdriverio is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Commits

The new version differs by 11 commits .

  • 17c5b60 v4.5.2
  • aa0a33d Update contributors
  • 5c76611 updated changelog
  • dc23d5f improved repl command execution
  • a4ee3d1 Merge pull request #1785 from gronke/fix/state-of-undefined
  • 71717db Revert "Disabled suitestats for the β€œbefore all” hook to prevent the reporting of incorrect suite stats"
  • f029d45 Merge pull request #1783 from micahgodbolt/patch-1
  • 9741c33 Update frameworks.md
  • 9539f4a Update frameworks.md
  • 235688c Merge pull request #1780 from brunont/touchMultiPerform-docs
  • 73bee8c fixed touchMultiPerform docs

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-core is breaking the build 🚨

Version 6.24.1 of babel-core just got published.

Branch Build failing 🚨
Dependency babel-core
Current Version 6.24.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-core is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… codeclimate/coverage 100% Details

  • ❌ ci/circleci Your tests failed on CircleCI Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of npm-install-version is breaking the build 🚨

Version 6.0.1 of npm-install-version just got published.

Branch Build failing 🚨
Dependency npm-install-version
Current Version 6.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As npm-install-version is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci A command timed out during your tests Details
Commits

The new version differs by 3 commits .

  • f0892c6 6.0.1
  • ee67339 Merge pull request #26 from andersonba/master
  • 49e6dc4 Copy npmrc to niv temp when it exists

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of npm-run-all is breaking the build 🚨

Version 4.1.1 of npm-run-all just got published.

Branch Build failing 🚨
Dependency npm-run-all
Current Version 4.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As npm-run-all is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… codeclimate/coverage 100% Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Commits

The new version differs by 3 commits.

  • 7e83545 4.1.1
  • ac9358a Chore: configure appveyor to run on only Node 8.
  • fbd4024 Fix: Use ansi-style directly instead of chalk.styles (#108)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Image Diffs (Definitely a bug with Bezkrovny)

Hi there,

I've added support to the americanexpress/jest-image-snapshot library to use this SSIM library, but am having trouble replicating the behavior of pixelmatch with respect to diffs. Ultimately I want to leverage this SSIM library as a pure/complete alternative to pixelmatch for image comparison. However, when I'm currently lacking the tools (or maybe the know-how) to generate reasonable image diffs.

Last night I wrote an algorithm that would generate a diff image based off of the ssim_map. In essence, it would return an rgba(255,0,0,255*(1-ssim)), or at least that was the intention. However, I quickly found that the aspect ratio in the ssim_map didn't match the aspect ratio found in the image itself the results were a bit confounding.

Do you have a suggestion on how I could implement such functionality? Or in the alternative, do you have any plans to add it to the library?

Thanks,
Dan

Consider using FFT for larger filters

Performance would be improved for the 2d convolution (for large kernels). Maybe we could use something like jsfft to not have to implement it directly if it performs well enough.

The default one is 11x11 which should lead to about 2x perf improvement for the 2d convolution n + 2*n*log(n) vs the current n^2.

It may not be worth the added complexity though, measure the contribution of conv2 to the total first since it's been significantly improved already.

Detect box kernels and optimize convolutions for that case

Detect box kernels for conv2 and handle that case separately (faster)

  • It would improve performance on downsizing originalSsim.js
  • It would simplify ssim.js downsizing (properly convolving the box kernel should be faster than convolving the 2 decomposed 1d filters)

Using Node.js and require rather than ES6 import

Hi I'm trying to get this to work with require but currently struggling.

Any help would be really appreciated.

var ssim = require("ssim.js");

ssim("/img1.jpg", "/img2.jpg")
  .then(function(out) {
      console.log("SSIM:", out.mssim, "(", out.performance, "ms)");
    })
    .catch(function(err) {
      console.error("Error generating SSIM", err);
    });

Error:

Error: Module version mismatch. Expected 48, got 51.
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/blah/blah/blah/blah/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


CircleCI using 'master' not configured publish branch (undefined)

Unfortunately this error doesn't have any additional information. Feel free to kindly ask the author of the condition-circle plugin to add more helpful information.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

An in-range update of eslint-plugin-import is breaking the build 🚨

Version 2.4.0 of eslint-plugin-import just got published.

Branch Build failing 🚨
Dependency eslint-plugin-import
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-plugin-import is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Commits

The new version differs by 10 commits.

  • 44ca158 update utils changelog
  • a3728d7 bump eslint-module-utils to v2.1.0
  • 3e29169 bump v2.4.0
  • ea9c92c Merge pull request #737 from kevin940726/master
  • 8f9b403 fix typos, enforce type of array of strings in allow option
  • 95315e0 update CHANGELOG.md
  • 28e1623 eslint-module-utils: filePath in parserOptions (#840)
  • 2f690b4 update CI to build on Node 6+7 (#846)
  • 7d41745 write doc, add two more tests
  • dedfb11 add allow glob for rule no-unassigned-import, fix #671

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of webpack is breaking the build 🚨

Version 3.5.0 of webpack just got published.

Branch Build failing 🚨
Dependency webpack
Current Version 3.4.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As webpack is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… codeclimate/coverage 100% Details
  • ❌ ci/circleci Your tests failed on CircleCI Details

Release Notes v3.5.0

Features:

  • add stats.excludeAssets to allow to filter assets in list (@ldrick)
  • add import(/* webpackMode: "weak" */ "module") to try to load a module without network request (@faceyspacey)
  • add 4. argument to require.context which is the context mode. Can be false, "eager", "lazy-once", "weak" and "async-weak". (@faceyspacey)
  • require.resolveWeak now support expressions (@faceyspacey)
  • generate only a single require for modules references in scope-hoisted modules (ModuleConcatenationPlugin)

Bugfixes:

  • keep correct import order when using the ModuleConcatenationPlugin
  • Generate shorter, more readable identifiers in ConcatenatedModule
  • --help output is flushed before process exit (@esbenp)
  • exit code is reliable reported for CLI validation error (@polomsky)
  • stats options are now validated by schema (@esbenp)
  • fixes problem when using the CommonsChunkPlugin in async mode without name argument
  • fixes description of --resolve-extensions (@tomek-d)
  • fixes has no internal name when using dependency variable in root of scope-hoisted modules (ModuleConcatenationPlugin)

Examples:

Commits

The new version differs by 68 commits.

  • 75a8ffe 3.5.0
  • afa28c0 Merge pull request #5453 from webpack/bugfix/import-order-scope-hoisting
  • a569764 Merge pull request #5457 from tomek-d/resolve-extensions-typo
  • 0b8023a fixes #5096
  • 29d1336 Fixed bug in --resolve-extensions parameter documentation
  • 39051df update example
  • 7619c43 generate more pretty names for nested concatenation
  • 6607cfa remove ordering in ModuleConcatenationPlugin
  • 2bbbf50 Merge pull request #5437 from esbenp/fix-help-output-test-5345
  • 9f5bffa beautify
  • 334c1c4 remove unused variable
  • 8835751 fix conflict handling
  • 7099fcc update stats test case
  • b77a52b add reserved words to avoid syntax errors
  • 16a5831 use old new Buffer api for node 4

There are 68 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.