Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add seamlessClone do openCV.js #17240

Open
trsh opened this issue May 8, 2020 · 3 comments
Open

Please add seamlessClone do openCV.js #17240

trsh opened this issue May 8, 2020 · 3 comments
Labels

Comments

@trsh
Copy link

trsh commented May 8, 2020

In mean while are there some alternatives?

@asmorkalov asmorkalov changed the title [Feature request] Please add seamlessClone do openCV.js Please add seamlessClone do openCV.js May 8, 2020
@Balkrishnavajire
Copy link

i want to work on this

@nirinsanity
Copy link

nirinsanity commented Nov 19, 2021

I tried building a custom opencv.js build by adding 'seamlessClone' to the opencv_js.config.py file and was able to get the seamlessClone method available in the browser. However, it does not work as expected.

For the sake of simplicity, all the images I used are of the same dimensions. These are the images:
Source
source1

Target
destination1

Mask
mask

This is the command I used:
cv.seamlessClone(source, target, mask, new cv.Point(215, 63), dest, cv.NORMAL_CLONE)

And these are the destination outputs I got:

From OpenCV C++ cloning_demo.cpp (✔️ correct)
cloned

From my custom built opencv.js with seamlessClone (❌ incorrect)
download

I'm not sure if I've gone wrong somewhere. If someone can help me, I'd be eternally grateful.

@kishcs
Copy link

kishcs commented Jun 12, 2023

I think NORMAL_CLONE does not work the way it works in CPP or Python. Try with MONOCHROME_TRANSFER.
Please try below one and update further.

cv.seamlessClone(source, target, mask, new cv.Point(215, 63), dest, cv.MONOCHROME_TRANSFER)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants