How to control a Camera from a C++ code

CAn someone offer me a light as to how to manipulate a webcam device or an imaging device from a C++ code?

I will like to control the recording and zooming of a camera attached to a computer. This is a subject of must interest but do not understand if a device such as the webcam attached to a computer may be controlled from the C++ application.

Last edited on
Thank for you feedback. Is there any other option to OpenCV? What about OpenGL and CUDA? Do they offer similar APIs?
OpenGL is a graphics API and I believe CUDA is as well although I haven't personally used it. OpenGL doesn't have the objects to interface with the camera hardware like OpenCV does.
I thank you for helping me get all this technology clarify. As I am understanding. OpenGL and CUDA are technologies dealing with the processing of graphic and the output and has no relevance in the capture of stream, video and devices that concerns the subject of my first question?
Correct, again though I would defer to literally anyone else about CUDA's abilities.
I think CUDA isn't really a graphics api, it lets you compute stuff on the GPU, while OpenGL is used for graphics, CUDA is used for computation(just search for GPGPU, but CUDA is for NVIDIA only, OpenCL would run nvidia and amd) to make use of the GPUs power instead of the CPU. you probably can use CUDA to optimize the performance by running computations on the GPU Computergeek01's link also has a topic about this:

not sure how good this tutorial is though
Last edited on
Topic archived. No new replies allowed.