face-recognition.js
face-recognition.js copied to clipboard
saveImage gives syntax Error
I am trying to import my "faces".
> image = fr.loadImage('./mydata/2018-06-15-162209.png')
ImageRGB { cols: 1280, rows: 720 }
> faceImages = detector.detectFaces(image,150)
[ ImageRGB { cols: 150, rows: 150 } ]
> faceImages.forEach((img, i) => fr.saveImage(img, `face_${i}.png`))
Error: Save_Image - Error: expected argument 0 to be of type string
at faceImages.forEach (repl:1:35)
at Array.forEach (<anonymous>)
>
You mixed up the arguments in saveImage, the file path is first, then the image.