-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Availability of UMat and "Transparent API" functionality from OpenCV? #518
Comments
There's no reason why it couldn't work, but I guess we'll need to update things a bit. Adding "UMat" next to "Mat" on this line might do the trick: |
Thanks. I tried adding UMat in on that line (i.e. I edited the line to be as follows)
But after doing that, javacpp-presets no longer builds successfully - I'm not even quite sure I understand the implication of the error message Here are the last 70 lines of output that I got from running
Any ideas of what is wrong or what to try next? |
Looks like there is a problem in the way the default argument for that function gets used. I'll have to think about that... |
…e the right type (issue bytedeco/javacv#518)
I've made some changes to JavaCPP and it seems to work fine now. Let me know if you encounter other problems! Thanks |
Thanks, it seems to work to some extent now, but there are some quirks. I've found at least one change in method signatures that doesn't seem quite right.
But I can no longer call Hopefully this is an isolated problem, but I'm a bit concerned that there might be other cases of this kind of thing happening. The example from https://www.learnopencv.com/opencv-transparent-api/ doesn't work because I'm planning to convert some of the examples in https://github.com/opencv/opencv/tree/master/samples/tapi to check if the "official" examples work. |
You could try to put another "Mat" before the "UMat" in the Where in the examples are they calling |
Sorry, I got confused with the I tried adding a second "Mat" before the "UMat", and things change, but it's still a bit odd.
the signatures for
So then I got the idea of then adding another "UMat" after the first "UMat":
the signatures for
Which I think are all the expected ones. I don't know how the presets work (I haven't read up on that part yet), so I have no idea why that worked, but at least it makes some kind of sense. |
Unfortunately, when using "Mat", "Mat", "UMat","UMat", I get a new problem.
With that edit, I'm no longer able to do use |
…ypes even with duplicates (issue bytedeco/javacv#518)
Right, fixed in the commit above. Thanks for reporting! |
…UMatVector` parameters (issue bytedeco/javacv#518)
Support included in version 1.3. Thanks for the feedback! |
Does JavaCV currently support the use of the Transparent API by passing the UMat data structure in to algorithms? If so, how is this done correctly? If not, is there a large amount of work that would need to be done to make this possible?
My understanding is that with OpenCV 3.x, the preferred way to do hardware acceleration is via the Transparent API. In theory, this should only require a change in code from using the Mat data structure to the UMat data structure. But when I tried this with JavaCV 1.2, I found that the JavaCV methods expected a Mat, and would not accept a UMat, making it impossible to make use of the Transparent API to suggest hardware acceleration.
If this hasn't been implemented in JavaCV yet, is there anything that can be done to help speed the process of implementing it?
Thanks,
The text was updated successfully, but these errors were encountered: