Skip to content

Commit

Permalink
v.1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
foo123 committed Oct 11, 2024
1 parent cc2dbab commit 809c103
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
11 changes: 6 additions & 5 deletions build/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* FILTER.js
* @version: 1.11.0
* @built on 2024-10-11 12:04:06
* @built on 2024-10-11 18:32:07
* @dependencies: Asynchronous.js
*
* JavaScript Image Processing Library
Expand All @@ -12,7 +12,7 @@
*
* FILTER.js
* @version: 1.11.0
* @built on 2024-10-11 12:04:06
* @built on 2024-10-11 18:32:07
* @dependencies: Asynchronous.js
*
* JavaScript Image Processing Library
Expand Down Expand Up @@ -20342,7 +20342,7 @@ function ncc(x, y, sat1, sat2, avgt, vart, basis, w, h, tw, th, sc, ro, kk, tws0
}*/
// not convert from template rotation to image rotation (ie opposite of template rotation)
var tws = tws0, ths = ths0, tws2, ths2, roa = stdMath.abs(ro),
x0, y0, x1, y1, bk, k, K = basis.length,
x0, y0, x1, y1, bk, c0, c1, k, K = basis.length,
area, areat, areak, sum1, sum2, diff,
avgf, varf, /*vart,*/ varft, cc, f,
is_tilted = !(0 === roa || 90 === roa || 180 === roa || 270 === roa);
Expand Down Expand Up @@ -20447,8 +20447,9 @@ function ncc(x, y, sat1, sat2, avgt, vart, basis, w, h, tw, th, sc, ro, kk, tws0
}
//vart.v *= area;
cc = (((varft)/stdMath.sqrt(varf*vart.v*area)) || 0);
if (cc <= stdMath.abs(vart.c0 || 0)) return 0;
cc = (cc /*- (vart.c0 || 0)*/)/(vart.c ? (vart.c /*- (vart.c0||0)*/) : 1);
c0 = vart.c0 || 0; c1 = vart.c || 0;
if (c0 < c1 && cc <= stdMath.abs(c0)) return 0;
cc = (cc/* - (c0)*/)/(c1 ? (c1/* - (c0)*/) : 1);
if (1.01 < cc) cc = 0;
return stdMath.min(stdMath.max(cc, -1), 1);
}
Expand Down
4 changes: 2 additions & 2 deletions build/filter.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This is a library for processing images/video in pure JavaScript using HTML5 features like `Canvas`, **Web Workers, WebAssembly and WebGL** or alternatives in Node.js (eg `CanvasLite`, `node-canvas`, `node-gl`, node `processes`).


**version 1.11.0** (410 kB minified)
**version 1.11.0** (409 kB minified)


### Contents
Expand Down
7 changes: 4 additions & 3 deletions src/plugins/TemplateMatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ function ncc(x, y, sat1, sat2, avgt, vart, basis, w, h, tw, th, sc, ro, kk, tws0
}*/
// not convert from template rotation to image rotation (ie opposite of template rotation)
var tws = tws0, ths = ths0, tws2, ths2, roa = stdMath.abs(ro),
x0, y0, x1, y1, bk, k, K = basis.length,
x0, y0, x1, y1, bk, c0, c1, k, K = basis.length,
area, areat, areak, sum1, sum2, diff,
avgf, varf, /*vart,*/ varft, cc, f,
is_tilted = !(0 === roa || 90 === roa || 180 === roa || 270 === roa);
Expand Down Expand Up @@ -481,8 +481,9 @@ function ncc(x, y, sat1, sat2, avgt, vart, basis, w, h, tw, th, sc, ro, kk, tws0
}
//vart.v *= area;
cc = (((varft)/stdMath.sqrt(varf*vart.v*area)) || 0);
if (cc <= stdMath.abs(vart.c0 || 0)) return 0;
cc = (cc /*- (vart.c0 || 0)*/)/(vart.c ? (vart.c /*- (vart.c0||0)*/) : 1);
c0 = vart.c0 || 0; c1 = vart.c || 0;
if (c0 < c1 && cc <= stdMath.abs(c0)) return 0;
cc = (cc/* - (c0)*/)/(c1 ? (c1/* - (c0)*/) : 1);
if (1.01 < cc) cc = 0;
return stdMath.min(stdMath.max(cc, -1), 1);
}
Expand Down

0 comments on commit 809c103

Please sign in to comment.