Wiki
Getting Started with OpenCV
Existing English translations were reused. 1 current source blocks remain in Simplified Chinese, without triggering paid translation.
1.Introduction
When computer vision is mentioned, one cannot help but also mention image processing. Although there is no clear boundary between the two, image processing is usually understood as the preprocessing stage of computer vision. Therefore, before introducing computer vision, it is necessary to first introduce image processing.
Image processing generally refers to digital image processing, which uses mathematical functions, image transforms, and other means to analyze two-dimensional digital images, thereby obtaining the latent information in the image data. Its content usually includes image compression, image enhancement and restoration, as well as the three major parts of matching, description, and recognition, covering a variety of processing methods and techniques such as noise removal, image segmentation, and feature extraction.
Computer vision is a science that studies how to make machines "see," that is, using computers to simulate the mechanisms of human vision. It replaces human eyes with cameras to recognize, track, and measure targets, and obtains deeper-level information by processing visual data. For example, by analyzing video captured around a building using 3D reconstruction technology, a three-dimensional model of the building can be reconstructed in a computer; similarly, by using a camera installed on a vehicle to capture the scene ahead, it is possible to infer whether the vehicle can smoothly pass through the area ahead, thereby assisting decision-making.
For humans, obtaining environmental information through vision is a very easy task, so some people mistakenly think that implementing computer vision is also a simple task, but this is not the case. Computer vision is essentially an "inverse problem," that is, recovering information about the observed object or environment from observed information. In this process, some information is often lost, resulting in incomplete information, which increases the complexity of the problem. For example, when using a single camera to capture a scene, due to the lack of distance information, the phenomenon of "a person being taller than a building" often appears in the image. Therefore, computer vision is still a challenging research field, and there is still a long way to go in its development.
Whether in image processing or computer vision, data essentially needs to be processed in a computer. Therefore, researchers must face a thorny problem—how to implement research results through code and verify them by simulation. In this process, the problem of repeatedly writing basic functional programs is often encountered, which is what people commonly call "reinventing the wheel".
To provide researchers with "ready-made wheels," Intel proposed the concept of the Open Source Computer Vision Library (OpenCV). This library integrates a large number of general algorithms in the fields of image processing and computer vision, thereby effectively avoiding redundant and inefficient development work, and thus OpenCV was born.
OpenCV consists of a series of C language functions and C++ classes. In addition to supporting C/C++ development, it also supports programming languages such as C# and Ruby, and provides interfaces for languages such as Python, MATLAB, and Java, and can run on various operating systems such as Linux, Windows, macOS, Android, and iOS. The emergence of OpenCV has greatly optimized the process of computer vision algorithm validation, and thus it has been favored by many researchers.
After more than two decades of development, OpenCV has become one of the most important tools in the field of computer vision.
2.References
Video Teaching:https://www.bilibili.com/video/BV1jk4y1i7gN
Book teaching:https://www.epubit.com/bookDetails?id=UB7209964621702
Reference code:https://github.com/tungchiahui/OpenCV_Projects
3.Install OpenCV
详见opencv_cuda环境搭建