fix warp image example

This commit is contained in:
Peter Braden 2014-10-15 20:04:03 +02:00
parent 18394814ab
commit 7ebb4d70de

View File

@ -1,6 +1,6 @@
var cv = require('../lib/opencv');
cv.readImage("./mona.png", function(err, im) {
cv.readImage("./examples/files/mona.png", function(err, im) {
if (err) throw err;
var width = im.width();
@ -11,6 +11,6 @@ cv.readImage("./mona.png", function(err, im) {
var dstArray = [0, 0, width * 0.9, height * 0.1, width, height, width * 0.2, height * 0.8];
var xfrmMat = im.getPerspectiveTransform(srcArray, dstArray);
im.warpPerspective(xfrmMat, width, height, [255, 255, 255]);
im.save("./warp-image.png");
im.save("./examples/tmp/warp-image.png");
console.log('Image saved to ./tmp/warp-image.png');
});