New Features of opencv2.2 (Translation)

Source: Internet
Author: User

Overall modification and improvement:

  • Reorganize the database structure and replace the cxcore, CV, cvaux, highgui, and ML libraries with more detailed and smaller modules.

    • Opencv_core-core function library (basic structure, architecture and linear algebra, DFT, XML and yam I/O interface functions)
    • Opencv_imgproc-image processing function library (filter, Gaussian blur, morphological expansion/corrosion, linear scaling image size, image ry change, color structure change, and histogram calculation)
    • Opencv_highgui-Gui, image and video interface function library
    • Opencv_ml-statistical machine learning model function library (SVM, decision tree, cascade, etc)
    • Opencv_features2d-two-dimensional Feature Detector and description sub-function library (such as surf and fast), including a new feature description sub-matching structure)
    • Opencv_video-Dynamic Analysis and object tracking function library (optical flow method, mobile template, background elimination)
    • Opencv_objdetect-Image Target Detection function library (Haar wavelet & lbface detection and recognition, hog human detection, etc)
    • Opencv_calib3d-camera calibration, Visual matching and 3D data processing function library
    • Opencv_flann-similar to the latest Domain Search Library and opencv package
    • Opencv_contrib-latest contribution but not very mature function libraries
    • Opencv_legacy-outdated code, which exists for later code compatibility
    • Opencv_gpu-use Cuda to accelerate some class libraries of opencv functions (relatively unstable, but very helpful for opencv Development)

If you use cmake or PKG-config to configure opencv, your source code compilation will be normal without any changes. Otherwise, you need to modify the connection parameters (modify the database name) and update the header file path.

# Include <cv. h> is still supported, but the remarks are changed to # include "opencv2/imgproc. HPP.

Check the new C and C ++ example files and you will find that the header files of the sample use the new reference format. For example: https://code.ros.org/svn/opencv/trunk/opencv/samples/c/blobtrack_sample.cpp (this is my own add, the original text is not, so that you can view)

  • The new lattice package covers more opencv2.x APIs. The documentation and examples will be added later. To use additional function libraries, you need numpy

Swig-Python package not included

  • Opencv now supports Android Development (gsoc 2010 Project), some examples can be found in http://opencv.willowgarage.com/wiki/Android
  • The complete new opencv_gpu accelerator module is developed and supported by nvidida. For details, see the following.

New function, feature set

  • Core:
    • CV: matx <t, m, n> can add a given type, given a size matrix.

VEC <t, n> is derived from matx <t, n, 1>. This class can be used as a small matrix for CV: When the mat overhead is too large. This operation converts matx and mat.

    • CV: mat, CV: matnd is of the same type: typedef CV: mat CV: matnd. considering that many functions do not check the matrix dimension, be careful when using opencv to process 3-dimensional, 4-dimensional and other high-dimensional matrices.
    • The experiment supports 2.x/ 3.x features (with_eigen2 is used in the cmake parameter). At the same time, EIGEN2 matrices and CV: Mat can be converted to each other. For more information, see modules/CORE/include/opencv2/CORE/eigen. HPP.
    • CV: mat supports the "<" operation. For more information, see opencv/samples/CPP/cout_mat.cpp.
    • CV: exp, CV: log faster due to sse2 Optimization
  • Imgproc:
    • The color conversion function is rewritten;
      • RGB-> Lab & RGB-> Luv improved significantly. The function assumes that sRGB inputs the color space (for example, Gamma = 2.2). If you want to convert the original linear RGB-> L **, use cv_lbgr2lab.
      • The VNG algorithm adds Bayer-> RGB. Although it is much slower than a simple iterative algorithm, more detailed image information
      • The RGB-> HSV/HLS conversion function is added to the 8-Bit Bitmap. Here, the H-channel uses the complete 0. 255 region instead of the original 0. 179 region. The conversion code is cv_rgb2hsv _full.
      • Initundistortrectifymap adds a special variable to the multi-angle camera: initwideangleprojmap ()
  • Features2d:
    • Introduce key point detection, computation description, and matching unified architecture. Some of the previous available and new monitoring and descriptions, such as surf, fast, and stardetector, are distributed in this architecture. The key feature of this architecture (in addition to the sub-Unified API for different detection and description) is that it provides high-level tools for Image Matching and texture-based object checking. For more information, see the http://opencv.willowgarage.com/documentation/cpp/features2d_common_interfaces_of_feature_detectors.html.

C ++ example:

      • Descriptor_extractor_matcher.cpp-search for objects in a scenario using key points and descriptions
      • Generic_descriptor_matcher.cpp-using changes on objects makes it unnecessary to describe subcomputation too accurately.
      • Bagofwords_classification.cpp-an example of how to process VOC download data with this architecture, VOC Dataset: http://pascallin.ecs.soton.ac.uk/challenges/VOC/
      • Ethan rublee integrates the latest and faster key-POint Description sub-Brief proposed by Michael calonder. For more information, see opencv/samples/CPP/video_homography.cpp.
      • The surf key point detection sub-uses TBB (this module is developed by imahon and yvo2m) for parallel computing.
  • Objdetect:
    • Latentsvm object checklist, applied to the P. felzenszwalb algorithm, developed by Nizhniy Novgorod State University (nnsu) team. For details, see opencv/samples/C/latentsvmdetect. cpp.
  • Calib3d:
    • A new and reasonable calibration model:

X' = x * (1 + K1 * r2 + K2 * R4 + K3 * R6)/(1 + K4 * r2 + K5 * R4 + K6 * R6) + <tangential_distortion for x>,

Y' = y * (1 + K1 * r2 + K2 * R4 + K3 * R6)/(1 + K4 * r2 + K5 * R4 + K6 * R6) + <tangential_distortion for Y>

Introduced. It is useful for camera calibration of wide-angle lenses, because the added parameters can optimize the data you provide and increase the robustness of estimation data. Alternatively, you can initialize the distortion vector to 0 and choose to enhance or cancel some coefficients with cv_calib_rational_model + cv_calib_fix_k3 + cv_calib_fix_k4 + cv_calib_fix_k5 or other connections.

    • Added a three-eye calibration camera (the three eyes are on the same horizontal line). For details, see samples/CPP/3calibration. cpp.
  • ML:
    • Introduce the gradient cascade tree model developed by the nnsu Working Group
  • Highgui:
    • Added support for Qt Background Development, originated from the gsoc 2010 Project completed by Yannick verdie. Some new features are not reflected in background development, such as text translation using TTF fonts, independent control panel, including scroll bars, buttons, single-choice buttons, check buttons, size changes, and image display areas, highgui forms, "save", and so on. For more information, see Yannick's video demonstrating new features on YouTube: http://www.youtube.com/user/MrFrenchCookie#p/u
    • The new API is introduced: javasqt SDK (or libqt4 development kit), you can use the new API, and use QT to compile opencv (pass-DWITH_QT = on to cmake; Note the results, check that QT is compiled in the GUI background)
    • Supports 16-bit and LZW-compressed ipvs
    • Support for ieee1394 cameras in Linux
  • Contrib:
    • Added the slope matching algorithms developed by Marius muja, Antonella cascitelli, Marco Di Stefano, and Stefano Fabri. For details, see samples/CPP/chamfer. cpp.
  • GPU:
    • This part is a new part of opencv, developed and supported by NVIDIA. Note: This development kit is in the testing stage, so pay attention to and pay attention to the opencv SVN updates during development.

When using GPU, you need to install the latest NVIDIA Cuda SDK and use Cuda to compile opencv (-dwith_cuda = on cmake flag). All functions use the CV: GPU namespace. Complete functions and classes are available in opencv/modules/GPU/include/opencv2/GPU. HPP. Below are some of the main components of the API:

    • Image computing, filtering operations, morphology, geometric transformation, histogram Calculation
    • Stereo Visual matching algorithms: block matching, belief propagation and constant-space belief propagation.
    • Checks the child based on the hog object. It runs more than order of magnw.faster than the CPU version!
      • See opencv/samples/GPU
  • Python bindings:
    • A large number of opencv 2.x functions are converted to the Python language.

Numpy needs to be installed for these new sub-packages (please view the http://opencv.willowgarage.com/wiki/InstallGuide ).

The following shows how to use the opencv-provided canny method in the python environment:

Import CV

A = cv. loadimagem ('f:/removed_haze.jpg ', cv. cv_load_image_grayscale)

B = cv. loadimagem ('f:/removed_haze.jpg ', cv. cv_load_image_grayscale)

Cv. Canny (a, B, 50,100)

Cv. showimage ('test', B)

Cv. waitkey (0)

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.