# Visual-Based Localization Using Pictorial Planar Objects in Indoor Environment
## 5 PicPose: A Picture-Based Pose Method
### PicPose Feature Points Extraction
#### 5.2.2 Texture Feature Point Extraction  
However, the contour of a picture may not always be detected if its edge is not clear enough to be differentiated from the background. Three common conditions may lead to a failure of corner detection. The first condition is a bluring edge which may be casued by a moving camera. The edge is also impossible to catch if a picture is captured partially from a camera. Finally, it is hard to detect if the edge of a target object is not a regular shape like square or rectangle. Therefore, using only contour deteciton technology is not good enough for extracting sufficient feature points from a moving camera for pose calculation. Our project uses the Oriented FAST and Rotated BRIEF (ORB) feature detector to extract feature points from the original picture and corresponding feature points from a captured target picture. The architecture of proposed feature point pairs extraction model is shown in Figure 9. We first build a feature point library to store the feature extracted from original picture. The feature library will use as the ORB ground truth when mathcing the feature from camera view. The ground truth library stores picture ID, resolution and features points. There are two attributes to to describe a feature point, pixel coordinate and BRIEF descriptor. In the online process, the original picture is retrieved from the library using the picture ID recognized by SSD detector. Then we extract the feature points using ORB from the captured picture with the same parameters as those configured for generating the ground truth library. The ground truth feature points can also be obtained from the library, so that we can match the feature points of captured picture with that in the ground truth library. FLANN (Fast Library for Approximate Nearest Neighbors) is employed in our project to match the feature points of the detected picture with ground truth features. Figure 8: Corner Points Extraction. To further improve feature point extraction for a better matching, we have designed two techniques. The first one is to use a bilateral filter to avoid potential noise in the captured image. The second is to use the feature point density to reduce the number of feature points to reduce the matching time. They are presented below. Feature Extraction with Noise Avoidance  
The feature points of a picture are the prominent points in the picture, such as outline points, highlights in darker areas, and dark spots in brighter areas. In order to extract the feature points from a picture, ORB is used in our work. There are two elements that can uniquely define an ORB feature point, key point and descriptor. FAST (Features from Accelerated Segment Test), which is an efficient corner point detection algorithm, is used to detect key points in ORB. The main idea of FAST is to detect the greyscale pixel value of a circle around the candidate feature point. If there are enough pixels, which have significant difference with the candidate point on greyscale value, in the circle around the candidate point can be detected, the candidate point will be considered as a feature point. In general, the radius of the circle is 3 and there are total 16 pixels on the circle. If the greyscale value of continuous N pixels on the circumference is larger or smaller than that of the candidate point P, then P is considered as a feature. Normally N is set to 12. In order to speed up the extraction of feature points as well as screen out non-feature points quickly, the greyscale values at positions 1, 9, 5 and 13 are detected first. If P is a feature point, three or more pixel at these four locations should be larger or smaller than the grey values of P. If it is not satisfied, it will be discharged directly. FAST is a pixel-sensitive corner point detection algorithm which may be affected by noises in an image. Bilateral filter is applied before FAST detection to avoid the noise. The bilateral filter adds the pixel value weight on the basis of Gaussian filtering.