Is there anything that you can’t do, or works poorly in one language or the other?
I’m working on a OpenCV-project in python which uses template matching and color detection. I may need some blob-analysis and such later.
I want to switch to java, but I’m unsure whether it can do the same with OpenCV? Some years ago people argued against using OpenCV with java, but is that still the case?
all those things are handled fine with opencv’s java api.
instead of collecting 3rd party opinions on SO or such, rather get your own impression from the tutorials (they’re multi-language !)
Yea you got a point. If there’s a java version in the tutorial of what I need, it’s safe to assume that those parts works well with java.
I see I forgot to include one of the sites I found, there was one who had to do a lot of additional setup to use java. But I don’t assume that’s needed anymore, I think that was 7 years ago.
I want to switch to java because it’s what my colleagues and I have the most experience with. Also, I believe python is more error-prone because it doesn’t support unsigned and private variables. Among other things.
And lastly, I saw on LinkedIn this morning which compared the energy consumption of various languages, where java ranked as one the best and python as one of the worst. However, it may not be that relevant with my application though.
Long story short, if I can switch to java, I would.
not relevant at all because all the computation is done by compiled C++ code, not java or python code.
any time you think you need to loop over a bunch of pixels, stop, and think, and look for ways to do that with library functions.
also: numba is a jit compiler for python. if you really needed to write your own pixel-touching loops in python, that would still perform well, with numba.
Thank you @crackwitz
While the heavy calculations of my application may be within the OpenCV library, it’s not the only parts. So it may still be relevant to some degree.
Currently I’m building an application which recognises colors on the screen and clicks it.
I may be going a bit of the original topic here, but I have two essential challenges to overcome before I know whether I can make the switch:
object tracking by using color-space has a great tutorial in python but not in java, OpenCV: Changing Colorspaces
The methods mentioned: cv.inrange, cv.bitwise_and and cv.imshow. Are they used in the same way in java?
When I try to look them up in java docs I get a 404: