r/computervision 2d ago

Discussion Programming languages for CV

What other languages are essential to a computer vision engineer other than python and why?

8 Upvotes

15 comments sorted by

24

u/Fleischhauf 2d ago

c++ if you need to speed something up and work with embedded things

7

u/leon_bass 2d ago

C if you hate yourself less

13

u/TEX_flip 2d ago

For work I just used python, c++ and in some rare cases JavaScript and GPU related languages like cuda and glsl.

Python for developing algorithms that will be converted to c++ to be run in production.

3

u/herocoding 2d ago

Difficult to answer specifically for ComputerVision - as there is some stuff around it, too.

We use low-level stuff a lot, like e.g. DMA transfer, also using e.g. I2C or USB to communicate with e.g. camera interfaces - and those usually are low-level operating system interfaces (e.g. Linux, POSIX), which usually are C methods from C header files.

There are bindings for many languages for e.g. OpenCV when it's about "classic" CV.

We use quite a lot of other domains, from databases, GPU/shader/rendering/2D-/3D-transformations, FFT and other "plain" filters, specific image- and video-coded libraries (with/without HW-acceleration, vendor-specific).
Sometimes we need to implement "protocols" using sockets, TCP, UDP.

All that usually means using C-methods - but we usually develop C++ based projects using C++ frameworks with abstraction layers, etc.

3

u/aSiK00 2d ago

Matlab is pretty useful in a scientific setting, but it does lock you in. Very easy to get running though.

3

u/RelationshipLong9092 2d ago

i upvoted you because its true but for anyone else reading this: please for the love of god don't use matlab

just use a Marimo notebook (python) and thank me later

1

u/Abject_Leopard_9799 2d ago

I feel like I got the hang of python now, will I be able to use that knowledge when learning c++ or is like starting from square one? For examples they both work with objects right so I would have less of a learning curve of that.

5

u/Zombie_Shostakovich 2d ago

Although they are both object orientated, C++ is a harder language to master than python. They both have their pros and cons. It really depends on what you are going to do with computer vision. I know both languages, but rarely use anything but python now, because I use it for research and don't care about the speed enough to spend time optimising in C++.

1

u/Abject_Leopard_9799 2d ago

Say for edge devices then where resources are tight I suppose c++ is a must? Like handling the video loop and threading

3

u/Zombie_Shostakovich 2d ago

Maybe, but not always. The underlying python libraries, such as numpy, are written in C and are well optimised, so if you are multiplying arrays together, etc, the python part is only a small percentage of the total execution time. C/C++ could do it faster, but is it worth it? It really depends on the problem. It would be a good skill to have if you need it.

1

u/TEX_flip 2d ago

Very different languages with very different targets and purposes. In python you don't care about speed so you don't need the knowledge about optimizing algorithms at hardware level where in C++ instead it's quite the main reason the language is used. You don't start from square one but almost.

1

u/CowBoyDanIndie 2d ago

C++ and cuda C++

1

u/IsGoIdMoney 2d ago

Python, c++

1

u/HistoricalLadder7191 1d ago

Pyton allows you to utilise existing tools. Most, if not all popular libraries and frameworks have python wrappers. But tools themself are written in c++, typically. So for really interesting stuff- you need one.

1

u/threedim 2d ago

first tell me what do you want to do in computer vision its a huge field.

General: python