I would like to reshape a Mat. I can see the method in typescript, but when the code runs, it throws this error:
img.reshape is not a function
const img = new cv.Mat()
cv.cvtColor(origImg, img, cv.COLOR_RGBA2RGB )
const vectorized = img.reshape(-1, 3)
What am I missing?
Packages:
"@techstark/opencv-js": "^4.9.0-release.2",
"vite": "^5.0.12",
"react": "^18.2.0",