A
A
Abbylon2018-06-21 11:02:30
Neural networks
Abbylon, 2018-06-21 11:02:30

What is the best language to work with OpenCV? Neural networks? OpenGL?

The computer science teacher let me play with OpenCV, neural networks and OpenGL for the summer.
Using OpenCV python, I wrote two scripts to recognize black and colored numbers on a white background. When I asked him about numpy (maybe play with it first, because without it in python with OpenCV it’s like without hands), he said that it’s not enough for normal tasks, then you need to move to c ++. But at the same time, he said that with debugging, I was tormented by puss.
After scouring the Internet, I gathered information about this and compiled the advantages and disadvantages of both languages ​​in development.
I concluded that python is simpler as a language, debugging and development is faster on it, there are many auxiliary libraries, work at a low level is practically not felt. But at the same time, numpy is unsuitable for serious tasks, including real-time tasks (cameras, etc.), and I will need it for my projects.
In C++, the code runs faster, OpenCV was originally made for the pros, accordingly, there will be more opportunities and useful functions, it is more convenient to work with cameras, working at a low level allows you to better understand the insides of the library and how it works, and the information with the documentation is wider and better. But at the same time, development takes longer, it is more difficult to debug, and the language itself is more difficult.
And I would love to hear other people's opinions on this.
What do you think?
I have not yet studied neural networks and OpenGL, so here I would first like to hear your opinion. What language do you think is the best to use for OpenCV and these topics? Why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2018-06-21
@sergey-gornostaev

Numpy is written in C and is very fast. It may be lacking only in real-time systems with a criticality of milliseconds, such as car autopilots.

R
res2001, 2018-06-21
@res2001

Your judgments are correct.
It is possible to implement the most bottlenecks in C/C++ as Python modules.
When using numpy, remember to always work with numpy arrays, otherwise numpy performance will be lost. Use numpy functions to work with them, not Python ones. Numpy arrays are similar to C arrays, so passing them to a C module is fairly easy (the reverse is also true). Try to minimize calculations directly in python - use the capabilities of numpy, scipy, opencv.
PS: I had experience writing a module for displaying information in python. All the main code was implemented in C - a lot of calculations with large amounts of data (not opencv).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question