Diamond Search Based on Motion Search Algorithms

Source: Internet
Author: User

Preface

I wrote it many years ago.Article, Backup to DSAlgorithmIt is one of the most widely used search algorithms in motion search. In some cases, it is translated into diamond search and diamond search. Whether in hardware or software video encoder, you can see its existence. The content of the following article is mainly Excerpted from the Journal, hoping to help new users of video algorithms.

Principle

Generally, motion vectors are always highly concentrated near the center of the search window. This is more obvious for the video sequence of slow motion of objects, because static blocks and slow motion blocks are dominant. The center offset feature of the motion vector indicates that you do not need to search for all vertices in the window. You only need to search for the vertices near the center of the window to quickly find the best matching block. Therefore, search templates are symmetric in the center of the window, and their shape and size jointly determine the search speed and performance.

 

Figure 1 (ldsp and sdsp)

The DS algorithm uses two templates, as shown in table 1 (ldsp and sdsp. The template shown on the left is called the large diamond search template (ldsp); the template shown on the right is called the small diamond search template (sdsp ). In the DS algorithm, the ldsp is used repeatedly for search until the point with the smallest error in this search appears in the center of the template. Then, the minimum error point is taken as the center, use sdsp as the new search template for the last round of search, and use the point with the smallest error in the last round as the best match point. When using the diamond algorithm, pay attention to the following three points:

    1. all search points must be in the search window. When the points to be searched exceed the window boundary, these points are not used by the algorithm.
    2. when you continuously use the ldsp template for search, some of the points to be searched overlap. If the minimum error point obtained by searching with the previous ldsp template is located at the moment of the four corners of the ldsp, the next search only needs to be performed at the remaining five points of the ldsp; if the point appears on the edge of the ldsp, you only need to search for the remaining three points on the ldsp. This greatly reduces the number of search points, thus greatly improving the search speed.
    3. the algorithm does not limit the number of times ldsp is used to search. This may greatly increase the number of times of searching because the minimum error point appears in the center of the template. In this case, you can set an appropriate search border to force the search to end.

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.