haar2tjs
Haar to tracking.js object tracking classifier converter
haar2tjs
Haar classifiers converter to tracking.js classifiers for object tracking.
Installation
npm install haar2tjs --save-dev
Usage & Example
./example/eye.classifier.xml
BOOST HAAR 20 20 1 0 1 1 -1.4562760591506958e+00 0 -1 0 1.2963959574699402e-01 -7.7304208278656006e-01 6.8350148200988770e-01 0 8 20 12 -1. 0 14 20 6 2. 1
Convert Script Example:
const Haar2tjs = ; const input = `./examples/eye.classifier.xml`;const output = `./examples/eye.classifier.js`; const eyeToTjs = input; eyeToTjs // Optional definition for Docblock-Comments // Save as Viola Jones classifier ;
Output:
./example/eye.classifier.js
/*** Example VJ Classifier for eyes* @author Eduardo Lundgren <[email protected]>* @version v1.0.0* @link https://trackingjs.com* @license BSD*/trackingViolaJonesclassifierseye = 2020-14562760591506958112082012-10142062012963959574699402-0773042082786560106835014820098877;
Credits
Large parts used from Ciro S. Costa's gulp-converter-tjs (License).
License
MIT License
Copyright (c) 2017 Raphael Wildhaber
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.