I am getting this error trying to convert an image into a CvMat:
Error: Imencode - expected arg 0 to be a Buffer of Uint8 Values
This seems easy enough to fix, although I don't know how to convert an image into a Uint8Array, which is what the function is asking for. Here's my code so far:
request(url, function (error, response, body) {
let uint8Array = new Uint8Array(body);
let imageCvMat = cv.imdecode(uintArray)
})