mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
15 lines
421 B
JavaScript
Executable File
15 lines
421 B
JavaScript
Executable File
var cv = require('../lib/opencv');
|
|
|
|
cv.readImage("./files/mona.png", function(err, orig) {
|
|
if (err) throw err;
|
|
|
|
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("./tmp/weighted.png");
|
|
console.log('Image saved to ./tmp/weighted.png');
|
|
});
|
|
});
|