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

Extra modules for OpenCV.js #3

Open
gosha20777 opened this issue Jun 22, 2019 · 1 comment
Open

Extra modules for OpenCV.js #3

gosha20777 opened this issue Jun 22, 2019 · 1 comment

Comments

@gosha20777
Copy link

gosha20777 commented Jun 22, 2019

I am trying to write markerless ar on js by using open CV.
I am very early in JS (I am C++/python developer).
In standart opencv.js package I don't find this Structures

  • Point3f
  • solvePnP
  • findHomogpaphy
  • Аnd etc.

As I understand I need to compile some opencv modules (features 2d, calib3d, impoc, objdetect, ml) to js. How to do it? Do you have pre-compiled modules?

@gosha20777
Copy link
Author

I'm trying to build opencv for use in my js project.

For the correct operation of the algorithm, I lack these functions:

  • Point3f
  • solvePnP
  • Rodrigues
  • findHomography

The functions I need are in these packages:

  • Calib3d
  • Features2d

But on the Internet I did not find the pre-compiled library with the functionality I needed. For this reason, I decided to build everything myself.

When assembling I am guided by https://docs.opencv.org/3.4/d5/d10/tutorial_js_root.html.

Compilation of the library was successful(!), but failed to build it.

  1. I tried to compile it in the LLVM code and got the error:
wasm-ld: error: Relocations not in offset order
  1. Next, I tried to compile it into *.so files, but to no avail: This assembly option is prohibited:
emscripten / cmake / Modules / Platform / Emscripten.cmake: set_property (GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE))
  1. The build method using static libraries in the *. ar archives format also ended with an error:
error: undefined symbol: fp $ _ZN2TH11THFile_freeEPNS

I know for sure that these packages can be compiled in some way. Can you give me a guide or pin js file with pre-compiled modules?

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

No branches or pull requests

1 participant