Comments (8)
I also got same error using Emscripten 1.37.16 and OpenCV 3.1.0, using master branch of opencvjs. After opening bind.h, I found that the template base
only accepts single argument indeed. When I removed the boolean value in bindings.cpp, I got this error instead:
In file included from ../../bindings.cpp:47:
/home/leben/Labs/emsdk-portable/emscripten/1.37.16/system/include/emscripten/bind.h:1065:20: error: cannot cast 'cv::Algorithm *' to 'cv::Feature2D *' via virtual base 'cv::Algorithm'
return static_cast<To*>(ptr);
^~~~~~~~~~~~~~~~~~~~~
/home/leben/Labs/emsdk-portable/emscripten/1.37.16/system/include/emscripten/bind.h:1060:21: note: in instantiation of function template specialization
'emscripten::base<cv::Algorithm>::convertPointer<cv::Algorithm, cv::Feature2D>' requested here
return &convertPointer<BaseClass, ClassType>;
^
/home/leben/Labs/emsdk-portable/emscripten/1.37.16/system/include/emscripten/bind.h:1125:53: note: in instantiation of function template specialization
'emscripten::base<cv::Algorithm>::getDowncaster<cv::Feature2D>' requested here
auto downcast = BaseSpecifier::template getDowncaster<ClassType>();
^
../../bindings.cpp:3271:5: note: in instantiation of member function 'emscripten::class_<cv::Feature2D, emscripten::base<cv::Algorithm> >::class_' requested here
emscripten::class_<cv::Feature2D ,base<Algorithm>>("Feature2D")
^
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
Traceback (most recent call last):
File "make.py", line 183, in <module>
emscripten.Building.emcc('../../bindings.cpp', emcc_binding_args, 'bindings.bc')
File "/home/leben/Labs/emsdk-portable/emscripten/1.37.16/tools/shared.py", line 1996, in emcc
assert os.path.exists(output_filename), 'emcc could not create output file: ' + output_filename
AssertionError: emcc could not create output file: bindings.bc
Still trying to figure it out. Any help would be appreciated.
from opencvjs.
Same problem here... Any suggestions?
from opencvjs.
It turns this is due to non-successful application of the emscripten patch delivered within this repository.
Working on windows, I moreover had to disable multiprocessing and modify class FakeMultiprocessor (to support map_async) in emscripten\incoming\tools\shared.py for reasons I do not understand. Finally it worked out.
from opencvjs.
I applied the emscripten patch but still run into this issue.
from opencvjs.
Do you have the issue of the first or the second post? The issue of the first post should be fixed by the patch. The issue of the second post only appears if you modify bindings.cpp erroneously.
from opencvjs.
Sorry, I am referring to the error caused by the inner template argument in feature2d. I applied the patch and rebuild emsdk as suggested. Do I have to modify the bindings to get it running?
from opencvjs.
I'm not an expert in this, but I believe the patch didn't work.
The error you get complains about too many template arguments of base template.
The patch changes the number of arguments of the base template to 2, so it should then work.
Have a look inside the diff file, it's quite obvious.
I did actually not manage to apply the patch (on Windows) and made the changes listed inside the diff file manually, instead.
from opencvjs.
@drhouse82
Hello there, im new of this, and have same error on windows.
seems like your reply is only answer who make successfuly on window in this project.
but sadly, im newbie at programming, therefore i cannot understand what is ovbious, what line do i edit or else.
Please, can you describe little more detail?
this will help me and other people who trying to use this project in future.
cause no one give answer actually working so far guess..
Thanks.
from opencvjs.
Related Issues (20)
- Question: Support for video frame as input
- HogDescriptor
- Emscripten link issue in make.py
- Error: function matFromArray called with 4 arguments, expected 2 args
- Module is not defined
- patch_emscripten_master not working for new version of Emscripten SDK. HOT 2
- Could not work on Google Chrome HOT 1
- opencvjs is working in dev mode with react but it is not built!
- All functions except cv.imread() and cv.imshow() throw exception like " Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch. "
- Add Support for aruco Markers HOT 2
- Error while allocating new cv.Mat
- Difference between official OpenCV.js
- "fs" dependency causing compiling error HOT 3
- How can i use opencv.js with my own function build with opencv c++ HOT 1
- how to set puttext to korean?
- does opencvjs contains functions: findHomography() & decomposeHomographyMat?
- .matchTemplate with a mask fails with error HOT 1
- cant perform inRange operation on HSV image.
- detectMultiScale3 port
- opencv not compatible with vitejs bundler
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencvjs.