I am a freshman college student currently learning C++ programming. I am good at math and physics, so I am looking to specialize in 2D/3D graphics with OpenGL. My question is about the differences between OpenGL and OpenCV, and the amount of overlap these areas have. From what I have read, one creates graphics while the other processes them. I have many books on 3D graphics and the mathematics associated with it. What I am wondering is if the same concepts I am learning in OpenGL could be applied to OpenCV. Is it possible to become a C++ software engineer that could specialize in both OpenGL AND OpenCV, or is this an unrealistic goal?
I ask these questions because I understand that 2D/3D graphics programming requires a tremendous amount of knowledge in math and physics, but I don’t know too much about OpenCV and the prerequisite skills necessary to “get my foot in the door”.
OpenGL is a 3D graphics API. It provides APIs describe a 3D scene and render it to a framebuffer and ultimately display it on a screen. The primitives it has are vertex lists, triangle lists, normal vector lists, etc. n.b. 2D is a special case of 3D; IIRC OpenGL doesn’t have explicit 2D support (i.e. sprites and bit blit)
OpenCV is a computer vision (CV) API, and has implementations of various CV algorithms, blob detection, template matching, etc.
OpenCV generally operates on real image data, and wouldn’t operate on graphics generated by OpenGL. (unless one was trying to make an AI bot that only sees the framebuffer output of a game, but that in another tangent altogether.)
“Is it possible to become a C++ software engineer that could specialize in both OpenGL AND OpenCV, or is this an unrealistic goal?”
Sure, they are different types of systems, and you could specialize in more than one thing. As for OpenGL and 3D graphics, if you learn one you can probably use any of them.
For computer vision learing one system will certianly help with another, but probably not to the same extent as computer graphics.
n.b This question probably belongs an another board.
1
I’ve never used OpenCV, but AFAIK, it is very different from OpenGL. OpenGL is a C API constructed around a LOT of global state (hence why it is often called a state machine), while OpenCV exposes a more Object Oriented C++ interface, with heavy use of templates.
OpenGL is intended to be a thin abstraction layer of the graphics hardware, so it can also be thought of as a device driver, in a sense. The primary focus of this API is real-time rendering, not general purpose computing. So the tools provided by OpenGL are primarily focused on drawing polygons to the screen as fast and as efficiently as possible.
I cannot make a good parallel between OpenGL and OpenCV, but my understanding is that CV is much more focused on offline image processing, so it is a different concept altogether if compared to GL. I would guess though, that OpenGL is oftentimes used in conjunction with OpenCV to implement visualization of the image processing done by CV, so if you focus on CV, you might benefit from knowing a graphics API like GL. If your main interest is in real-time graphics, such as games and CG films, then OpenGL should be enough. You are not very likely to need to know computer vision tools in those areas.
Finally, you are correct in saying that 2D/3D graphics programming requires knowledge of math and physics. If you are comfortable with the maths, life becomes a lot easier. If you like this field, learn the maths first, then learn a graphics API, such as OpenGL, to implement the theory.