# Efficient Filtering for Edge Extraction under Perspective Effect
## 2 Optimal Scale and Orientation Assignment
### Angular Accuracy with Pre-Known Localized Target Orientation  
To detect a local feature with a special orientation, the local feature detector must be sensitive to that special orientation and have invariance to orientation mismatches. To discuss the orientational performance of an oriented local feature detector, we can expand the concept of _selectivity_ and _invariance_[28]. Selectivity refers to the fact that the local feature detector should only have a high response to the local feature with that special orientation and a minimal response to all the other orientations. The invariance means that the local feature detector should have certain tolerance to orientation errors, which means it still has a rather high response to the orientations near the specified orientation. In our work, the local pattern is part of a strip with the width of \(d\) aligned along the \(y\) axis. The local feature detector is an odd linear filter with certain shape parameters. Here, we discuss the orientational performance of the FDOG and the DoB for 2D as in Equations (11) and (14), and the \(\lambda\) in both of the extractors is the shape parameter for the aspect ratio. As discussed in the previous section, the optimal scale parameter \(\sigma\) for the 2D FDOG for the local patch with the width \(d\) can be gained by solving Equation (12). Here, the dominant orientation of the filter is the positive direction of the \(y\) axis, and the dominant orientation of the local pattern is the edge direction of the strip at the original. The orientation mismatching angle is defined as the angle from the dominant orientation of the local pattern to the dominant orientation of the filter, as shown in Figure 2(a). We also plot out the response of the local edge extractor with \(\lambda=1\), while the orientation mismatching angle \(\gamma\) varies from \(-\pi\) to \(\pi\), as shown in Figure 2(b). As shown in Figure 3(a), better selectivity means the response curve should have a narrower distribution as it nears the _Response_ axis. Better invariance means the response curve should have a broad shoulder and remain almost constant at \(\gamma=0\). Intuitively, we can imagine that increasing \(\lambda\), the local filter will have a better selectivity. Figure 3(a) shows the response curves for \(\lambda=10^{-1}\), \(\lambda=10^{-\frac{1}{2}}\), \(\lambda=10^{0}\), \(\lambda=10^{\frac{1}{2}}\) and \(\lambda=10^{1}\). When \(\lambda<1\), the response curve has good invariance but very poor selectivity. With larger values of \(\lambda\), especially \(\lambda>3\), the response curve has better selectivity and worse invariance. To tune an oriented filter to a special orientation, we need to control the invariance and selectivity of the oriented filter to a certain extent. There are certain shape parameters that can be controlled to produce a tradeoff between selectivity and invariance for a special problem. Figure 3: Angular response of FDOG. [PERSON] has defined the filter's resolution by the mean width of the filter response \(g(x)\) to the ideal signal. Similarly, we define the angular selectivity \(\vartheta(h)\) by the mean width of the response \(g(\gamma)\) of filter \(h\) to the strip with orientation \(\gamma\), and this can serve as a quantitative indicator for angular resolution. The response has certain symmetries around the origin. We consider the response from \(-\frac{\pi}{2}\) to \(\frac{\pi}{2}\):  
\[\vartheta(h)=\left[\frac{\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\gamma^{2}g( \gamma)d\gamma}{\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}g(\gamma)d\gamma}\right] ^{\frac{1}{2}}. \tag{16}\]  
The angular selectivity depends on the special shape of the filter. It is a function of the aspect ratio of the filter, which can be seen in Figure 4b. In addition to many versions of the same filter, each version can be applied differently by adding small rotation to find the response of a filter at many orientations, as described in the concept of the steerable filter by [PERSON] and [PERSON] [19].