Closed kalwalt closed 1 year ago
How should I be using opencv-em? Just replace opencv in my project with opencv-em?
Hi Edward, you should put the content of the opencv-em folder inside your opencv/build_wasm. :smile:
Hmm interesting. Does it still work with the normal opencv build_wasm?
Hmm interesting. Does it still work with the normal opencv build_wasm?
yes tried right now. no issue at all. Maybe i will re-run the build script (opencv-em) and clearing the project before re-trying... I will do tomorrow. Too late now here... Thank you for testing! :slightly_smiling_face:
Yeah, no problem!
For some weird reason when I cloned this repo in an opencv directory, rebuilt it, and changed my CMakeLists.txt to include opencv/opencv-em/packaging/opencv-em
instead of opencv/build_wasm
it seemed to compile fine. Changing to opencv/opencv-em/build_wasm
instead of opencv/build_wasm
also compiled fine. I don't have too much time to check why today, but it possibly might be that you just have to rebuild opencv-em?
I'm pretty sure any recent changes I made to wasm-ar would not have caused undefined symbols in compilation, especially not _ZN2cv3MatC1ERKS0_
, which I think is just a mangled name for the opencv Mat class.
Thank you @EdwardLu2018! it might be possible, i will re-try this evening.
I need also to change, in the build script, the rsync section for the modules, they are some not needed includes and other missed...
My fault!! :open_mouth: :sob: Because the opencv version that i cloned inside wasm-ar was aligned to the master branch, instead opencv-em is aligned to the 4.5.0 tag (version) so i was getting that error of course! I made some little changes in the build script and soon i will release a beta version of the built package. :partying_face: I think that will work also the script version with cmake commands not only the python...
Great to hear!
I have made some changes to the build script: added Usage intro and the possibility to choose which type of building process (python or cmake) it works both, but with cmake i was able only to build the static libs. It's enough since it is not required opencv.js. Now all the build files are wrapped inside a build_wasm
folder instead of opencv-em. You need only to unzip it inside the opencv folder and that's it.
New release is coming!
new release here: https://github.com/webarkit/opencv-em/releases/tag/0.0.2
You can try also this gist run these commands inside wasm-ar main folder. :slightly_smiling_face:
I think I still need the opencv.hpp file from opencv/include/opencv2, no?
The .zip packed all needed, think you should change your include path.
I still can't get it to compile without including the opencv.hpp file.
When I copy opencv/include
(which has the opencv.hpp file) from the main opencv repo into the unzipped build_wasm folder from the opencv-em release, it builds fine with some changes to include path in my CMakeLists.txt, but I can't get it to compile without including that file. I also don't see that file in the opencv-em release. Am I just missing something?
Edward i will check again when i have a bit of time. 😉🙂 And thank you for testing!!
I still can't get it to compile without including the opencv.hpp file. When I copy
opencv/include
(which has the opencv.hpp file) from the main opencv repo into the unzipped build_wasm folder from the opencv-em release, it builds fine with some changes to include path in my CMakeLists.txt, but I can't get it to compile without including that file. I also don't see that file in the opencv-em release. Am I just missing something?
@EdwardLu2018 you are right, i will update the opencv-em script to include opencv.hpp
in the zip file. It needs also to change the gist, to copy the opencv2/opencv.hpp file in opencv/include directory if not present.
EDIT: the gist script should also copy the include modules...
New release here: https://github.com/webarkit/opencv-em/releases/tag/0.0.3 try the updated gist It should be fine now. :slightly_smiling_face:
Awesome! It works fine (with some changes to build.sh)!
If you have used/tested the gist, the script copy the files in the required destination. See my comments. I will think what is better....
Now opencv-em
is mainly focused on serving as base for our project WebARKitLib and WebARKit so i'm not sure that will works alos for wasm-ar, probably is needed some modifications to the script or maybe some opencv libs is not needed anymore to wasm-ar. Closing because it is an outdated issue.
@EdwardLu2018 I created a build from the script with the libs, includes and opencv.js files. It use now the python command: https://github.com/webarkit/opencv-em/blob/eb3d872a04f40b5a52884318f6a6fb4dbb0f0834/build.sh#L25 as i used already (and that was fine before) but with your latest changes i receive this error:
i include the package in zip format opencv-em-4.5.0-beta.zip If you can test, i will appreciate it.