1

What language would be best to use on a raspberry PI with Opencv.

Bearing in mind for each language used :

  1. Library updates
  2. Development Environment including tool kits
  3. Performance
  4. Interoperability
  5. Online support
  6. How easy it is to Debug

I see that you can use c, c++, python and Java for developing Computer Vision on Opencv. Are there any alternatives. Also I havn't explored SimpleCV yet but from what I have read I think I want to stick to Opencv.

closed as primarily opinion-based by Butters, lenik, nc4pk, Jivings Jul 28 '13 at 14:14

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This is a very opinion based question, and is likely to strike up a debate. It should be closed until revised. – syb0rg Jul 25 '13 at 16:53
  • Debates are not bad if moderated. Debates actually provide extra flow of vital information where people are able to make informed decisions. So I don't agree on closing the topic. – SpaceApple Jul 26 '13 at 9:42
2

If you by "best" you mean: "In a competition which language is going to yield the highest performing executable with the smallest footprint?" the answer is probably C, although it could be C++, and the difference between those two could be negligible. Python and java will be well behind.

If by "best" you mean: "Which language is most suited to the task from a programming perspective?" then that depends on the programmer and the specific nature of the task. Eg. I don't speak python, so it won't be suited to me doing anything. However, I know enough about it to say that someone who is comfortable in C++, java, and python is going to generally opt for python in so far as "ease of implementation" goes. Depending on the scale of the project and how many people are involved, this may well be (by far) the most important concern.

If the process is to be long-running, one factor might be what else requires the same (sharable) fundamentals be loaded into memory. The C library is required by the system in any case, but java, python, and C++ are not. If you have three long-running processes, 1 using java, 1 using C++, and 1 using python, this is going to use more memory than if they were all using the same stack of goods (since much of the memory required to run C++ or java or python apps can be shared). Minimizing the memory used by long-running background processes leaves more room for other things.

I'm guessing an opencv project is probably not a long-running background process. It also may be different from most end-user applications because it is going to be crunching a lot of numbers independent of frequent user interaction. In this case, there will be probably be a noticeable performance advantage for C/C++ over java (using the oracle 8 hardware float version), and a noticeable advantage for java over python.

However, if it does generally involve a lot of end-user interaction, then those performance differences are probably less significant.

A final consideration might be, "How stable is my software stack on this platform?". The pi is unusual, so this is important. Python would seem to be pretty well play tested already, although I have seen reports here of people having problems with certain obscure modules (they haven't been ported and they won't compile). On the pi, java has probably been tested less than python, an issue compounded by the fact that there are a number of different implementations used. Using C or C++ is no guarantee of stability, but it is by definition guaranteed to be more stable than java or python, since if you can do it in java or python, you must be able to do it in C or C++ (because that's how java and python are ultimately implemented).

  • Very nice post, It was what I was looking for. – SpaceApple Jul 26 '13 at 7:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.