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

opencv_js.config.py doesn't work #20989

Open
3 tasks done
uestchang opened this issue Nov 2, 2021 · 3 comments
Open
3 tasks done

opencv_js.config.py doesn't work #20989

uestchang opened this issue Nov 2, 2021 · 3 comments

Comments

@uestchang
Copy link

uestchang commented Nov 2, 2021

I wanna use opencv in my electron project, and I have set the DBUILD_calib3d = ON, and even if I set the method of opencv_js.config.py calib3d includes 'findChessboardCorners', it doesn't work and opencv.js threw an error that Uncaught TypeError: cv.findChessboardCorners is not a function. The other method met the same situation as above.
Anyone can tell me the true progress to binary the method to opencv.js? I cannot see the related tutourial in docs.

System information (version)
  • OpenCV => 4.5.1
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2015
Detailed description

I print the cv obj, and also can't see the method findChessboardCorners in it. I build the opencv.js successfully and there is no error while building. Once I try to use it in my project, The browser console mention that TypeError: cv.findChessboardCorners is not a function. The other method met the same situation as above.

  • I have tired the latest version of opencv as well as the opencv 3.4.16
  • I have tired the elder version of emsdk
  • I have setup the opencv_js.config.py and build_js.py
@uestchang
Copy link
Author

uestchang commented Nov 2, 2021

I find somone who met the same problem as me: https://forum.opencv.org/t/solvepnpransac-not-in-opencv-js-although-in-white-list/2065
It seem that it is a common bug that calib3d module is not correctly included during building progress, then the browser just say the method is not a function.

Need some help and focus, plz!

@alalek
Copy link
Member

alalek commented Nov 12, 2021

Mentioned solvePnPRansac is already recently fixed.
https://github.com/opencv/opencv/blame/4.5.4/platforms/js/opencv_js.config.py#L178

@minkyokyo
Copy link

Hello. I have the same error. -> Uncaught TypeError: cv.findChessboardCorners is not a function.

Did you find a solution?

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

No branches or pull requests

3 participants