You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to opencv4nodejs and enjoying a lot processing images in different and fun ways.
However, I am having an issue with cv.warpPerspective.
With opencv.js copied from the openCV website and cv.warpPerspective allows me to get warped image with transparent/white background, but for some reason, I can't get it with opencv4nodejs.
I am getting an image drawn on a canvas so I converted it to base64 in order to make it into a Mat.
like cv.imdecodeAsync(Buffer.from(canvasInBase64, 'base64'))
then I have source and destination coordinates ready with new cv.Point2()
get it transformed with cv.getPerspectiveTransform(sourceCoordinates, destinationCoordinates)
and finally, warp it with mat.warpPerspective(transformData, new cv.Size(width, height))
Is there a way to get an image warped with transparent background with the codes above?
Thanks! Happy Coding!!
The text was updated successfully, but these errors were encountered:
Hi!
I am new to opencv4nodejs and enjoying a lot processing images in different and fun ways.
However, I am having an issue with
cv.warpPerspective
.With
opencv.js
copied from the openCV website andcv.warpPerspective
allows me to get warped image with transparent/white background, but for some reason, I can't get it withopencv4nodejs
.I am getting an image drawn on a canvas so I converted it to base64 in order to make it into a Mat.
like
cv.imdecodeAsync(Buffer.from(canvasInBase64, 'base64'))
then I have source and destination coordinates ready with
new cv.Point2()
get it transformed with
cv.getPerspectiveTransform(sourceCoordinates, destinationCoordinates)
and finally, warp it with
mat.warpPerspective(transformData, new cv.Size(width, height))
Is there a way to get an image warped with transparent background with the codes above?
Thanks! Happy Coding!!
The text was updated successfully, but these errors were encountered: