Update addweighted.js

Corrected the example and tmp-path
This commit is contained in:
punnerud 2016-01-25 16:18:28 +01:00
parent 3d06aefe75
commit 7c37842094

View File

@ -1,14 +1,14 @@
var cv = require('../lib/opencv');
cv.readImage("./examples/files/mona.png", function(err, orig) {
cv.readImage("./files/mona.png", function(err, orig) {
if (err) throw err;
cv.readImage("./examples/files/over_text.png", function(err, over_text) {
cv.readImage("./files/over_text.png", function(err, over_text) {
if (err) throw err;
var result = new cv.Matrix(orig.width(), orig.height());
result.addWeighted(orig, 0.7, over_text, 0.9);
result.save("./examples/tmp/weighted.png");
console.log('Image saved to ./examples/tmp/weighted.png');
result.save("./tmp/weighted.png");
console.log('Image saved to ./tmp/weighted.png');
});
});