Next to opencv

Source: Internet
Author: User

Computer Vision machine learning opencv Pattern Recognition Image Processing

Although I have written an introduction to opencv (http://blog.csdn.net/carson2005/article/details/5822149) before, but still some friends do not know much about it. Therefore, I often encounter some questions such as: Can opencv implement face recognition? Is opencv an API for vehicle detection? Is opencv a function for 3D reconstruction? I am also confused about this problem. How can we explain it to them so that they can understand that opencv is really powerful, but it is not as powerful as they think. In fact, the full name of opencv is open source computer vision library, an open source computer vision library. That is to say, it is an open-source API function library for computer vision. This means that (1) Both scientific research and commercial applications can use it for development; (2) the source code of all API functions is open, you can see the internal implementation of the program steps; (3) You can modify the opencv source code, compile and generate the specific API functions you need. However, as a library, it provides only common, classic, and popular algorithm APIs. A typical computer vision algorithm should include the following steps: (1) Data Acquisition (image for opencv); (2) preprocessing; (3) feature extraction; (4) feature selection; (5) classifier design and training; (6) classification identification; and opencv provides APIs for these six parts (remember the word. Next I will explain some common problems in these six parts separately.

For data acquisition, data in the computer vision field is nothing more than images and videos. Images, including BMP, JPG, PNG, Tiff... various compression and non-compression formats. Therefore, for compressed images, opencv must include the corresponding image extraction function (generally, it includes open-source image extraction function libraries, for example, for JPG compression formats, contains the libjpg open source library ). For videos, the following are common examples. rmvb ,. avi ,. different formats, such as ASF, represent different video compression algorithms (for AVI formats, although they are all Avi formats, their internal compression algorithms are still different. For specific reasons, please refer to my another blog: http://blog.csdn.net/carson2005/article/details/6314089), also need the corresponding decompression algorithm to decompress. Although opencv provides some APIs for reading and writing video files, it is only an interface. Internally, it still needs to call the corresponding video codec API for decoding. Common video codecs include Xvid and FFMPEG. That is to say, if you want to use opencv for video read/write operations, you need to install such video codecs. After the corresponding video decoder is installed, you can call the video-related API of opencv to read the video file. Of course, after the video file is decoded, after being converted into an image, it can be processed by opencv. In addition, data comes from cameras, including digital cameras and analog cameras. Regardless of the camera, you have to find a way to obtain the image data sent from the camera to the PC (the data received by the PC in the memory from the camera may be in JPG format, it may also be in BMP format ). If you receive JPG compression from the camera in the PC memory, you also need to decompress the image data memory. For more information about cameras and opencv, see my other blog:

Http://blog.csdn.net/carson2005/article/details/6243476

For preprocessing, it is generally used to remove or reduce noise, normalize illumination, normalize brightness, blur, sharpen, expand, corrode, and open and close the light. (For details, see "gangsps, digital image processing ). For these operations, opencv provides corresponding API functions. In light preprocessing, opencv provides a histogram equalization API, and may provide some gammar correction functions in the future.

For feature extraction, I personally think that it is the most complex and difficult part of the entire computer vision system (it is purely personal opinion. If you have any objection, please keep it). What is the feature, how can we understand this seemingly simple but all-encompassing term? In fact, it takes a lot of time to explain it carefully (if you are interested, you can check it out, Richard O. duda, Li Hongdong, pattern recognition, Mechanical Industry Press ). Simply put, a feature is a description that can separate multiple categories as much as possible. For example, if you want to classify men and women, it is obvious that you can use the description of "height and weight". However, the two descriptions do not have the "chest size" description to be more accurate, but the "chest size" description does not have the "throat or throat" description to be more accurate. Obviously, the descriptions of height and weight, chest size, and throat can be used to classify men and women. However, their descriptions of things are accurate (or comprehensive), and such descriptions have a more professional title called "Features ". Opencv provides APIs for feature description. For example, for face detection, it provides APIs for Haar features, pedestrian detection, APIs for hog features, and even, it provides an API for the texture features of a local image. However, these are far from enough. For example, if you want to perform character recognition, opencv does not provide the features corresponding to character recognition. At this time, you need to program and implement it yourself. Of course, what features should we choose to describe characters? What features are better? For these questions, I suggest you read the relevant conference, journal, magazine, master's and doctoral thesis (after all, masters and doctoral students should have been engaged in "research" work ), read the articles written by others.

Opencv does not provide specific functions for feature selection. However, there are many analysis methods to evaluate the classification ability of features. If you are interested, you can read "Machine Learning" Tom. mitchell, Zeng huajun, Machinery Industry Press;

Opencv provides SVM, cart, boost, Bayes, BDT, and Ann algorithms for classifier. These algorithms basically cover common classifiers. Therefore, what you need to do is to know how to call its interfaces and the advantages and disadvantages of various classifiers (in this section, we suggest reading "Machine Learning ).

Through the above analysis, you may have discovered that opencv is just a tool. Or, you can think of it as a building block for kindergarten children to play, while the functions in opencv can be understood as a building block, using all or part of the building blocks, you can quickly build specific computer vision applications (such as character recognition, license plate recognition, and left-behind object detection ). You must have also discovered that when using opencv to build a specific computer vision application, the true core should be these blocks. If you understand how the blocks work, so, isn't it enough to use these blocks? Completely correct! However, in some cases, we do not need to do this because opencv has already done some work for you (you have already made some blocks and used them directly ). However, for example, the feature extraction module mentioned above, opencv is powerless in many cases. At this time, you need to read the articles published in top conferences, journals, and magazines in computer vision, pattern recognition, and machine learning. Then, program and implement what you want based on the principles and methods described in these articles. In fact, it is equivalent to building a private block. In fact, every API function in opencv is like this.


Source: http://blog.csdn.net/carson2005/article/details/6979806

Here is the favorites. Offense.


Next to opencv

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.