Skip to content

img.reshape is not a function #53

@teddybee

Description

@teddybee

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",

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions