官术网_书友最值得收藏!

  • OpenCV 4 with Python Blueprints
  • Dr. Menua Gevorgyan Arsen Mamikonyan Michael Beyeler
  • 369字
  • 2021-06-24 16:50:06

Listing the tasks performed by the app

The app will analyze each captured frame to perform the following tasks:

  • Feature extraction: We will describe an object of interest with Speeded-Up Robust Features (SURF), which is an algorithm used to find distinctive keypoints in an image that are both scale-invariant and rotation invariant. These keypoints will help us to make sure that we are tracking the right object over multiple frames because the appearance of the object might change from time to time. It is important to find keypoints that do not depend on the viewing distance or viewing angle of the object (hence, the scale and rotation invariance).
  • Feature matching: We will try to establish a correspondence between keypoints using the Fast Library for Approximate Nearest Neighbors (FLANN) to see whether a frame contains keypoints similar to the keypoints from our object of interest. If we find a good match, we will mark the object on each frame.
  • Feature tracking: We will keep track of the located object of interest from frame to frame using various forms of early outlier detection and outlier rejection to speed up the algorithm.
  • Perspective transform: We will then reverse any translations and rotations that the object has undergone by warping the perspective so that the object appears upright in the center of the screen. This creates a cool effect in which the object seems frozen in a position while the entire surrounding scene rotates around it.

An example of the first three steps, namely, the feature extraction, matching, and tracking is shown in the following screenshot:

The screenshot contains a template image of our object of interest on the left and a handheld printout of the template image on the right. Matching features in the two frames are connected with blue lines, and the located object is outlined in green on the right.

The last step is to transform the located object so that it is projected onto the frontal plane, as depicted in the following photograph:

The image looks roughly like the original template image, appearing close-up, while the entire scene seems to warp around it.

Let's first plan the application that we are going to create in this chapter.

主站蜘蛛池模板: 四平市| 建阳市| 广州市| 波密县| 乌拉特中旗| 卢湾区| 宜丰县| 永川市| 黎川县| 陕西省| 枣阳市| 缙云县| 晋中市| 罗平县| 井陉县| 山东省| 牙克石市| 阿拉善右旗| 嵊州市| 全椒县| 社会| 鹤山市| 图们市| 泾源县| 林西县| 昌平区| 安康市| 西乡县| 囊谦县| 德州市| 庄河市| 宁河县| 武定县| 安图县| 原阳县| 故城县| 内江市| 阳新县| 太谷县| 元谋县| 文登市|