Hi,
Just a quick question: do you have plans to add cuda? Are you open to PRs that would add the cuda bindings?
Thanks
I don't have any plans, but PRs are always highly appreciated! :)
Cool! Thanks for the quick response
I'll be starting to write cuda bindings. Is there anything I should know other then what's in CONTRIBUTING.md?
Great! Not really, the converter stuff mentioned in the contribution guide can be very helpful for creating bindings, other than that it's probably a good idea to look how other bindings are implemented. It's usually pretty straight forward I'd say.
We might have to look how to link the cuda libraries, should be as simple as modifying the install script of opencv-build.
Other than that feel free to join our slack channel if you have any questions for us :)
Got it! Thank you very much.
How do I go about joining the slack channel?
You can sign up here with your email: https://slack.bri.im/. We are in the opencv4nodejs channel :)
@jhorowitz if you need a guinea pig i have a GT 730 running with OpenCL right now, i would love to give cuda a test spin!
also thanks @justadudewhohacks you rock!
Hi, sorry about the delay. I accidentally muted notifications on this repo.
Unfortunately I have not had as much time to work on this as I would have liked. I still intend on doing this eventually but I can't say exactly when it'll get done. If someone else would like this done faster, I'd be happy to act in a supportive role.
@moeiscool That'd be great! I'll ping you when I have something for you to test.
Hello,
I was wondering if there is any progress with this issue? :)
Since I'm using this library for feature and template matching in a webapp, I'm trying to speedup the process of these algorithms. I'm pretty sure I maximized what I can on CPU level and the next step seems to be GPU (or more specifice CUDA level). I noticed that there are no CUDA bindings currently implemented, but I'm willing to implement these myself (at least for imgproc & featurematching), but since I never really programmed with C++ (except for some arduino stuff), let alone nodeJS bindings, I probably need some guidance on how to start. I read your articles about nan and read the contributing.md and I tought it would be best to just dive in and compare with the currently implemented features. After an hour or so I wrote some code to start here.
I know this will not work as is because the install script should be adjusted as stated above by @justadudewhohacks , but apart from that, what is the next thing I need to do to get closer of implementing this? I'm not really sure how to start with the canny & template matching classes and also not sure what I need to do on the typescript side. Any further tips or hints to get me started?
Thanks in advance.
Hi @jclaessens97, thanks for your effort of picking this up. The code of the branch that you linked already looks fine. As far as typings are concerned, you simply need to add the function signature to the corresponding .d.ts file under typings.
Since I am not familar with OpenCVs cuda API, I am curious though, don't you have to pass a cuda::GpuMat to these functions you just implemented the bindings for? Won't they simply run on the CPU otherwise? Probably a GpuMat wrap has to be implemented similar to the Mat wrap here.
No problem :) Yes I learned about GpuMat after I made this commit, I started to implement that locally, but haven't pushed it yet. Some things like for example hereI'm not sure yet how to implement the Allocator class or use Stream for async versions etc.