# Edge Detector Design Based on LS-SVR

Authors: Zhongdang Yu; Hamid Reza Karimi
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

For locating inaccurate problem of the discrete localization criterion proposed by Demigny, a new criterion expression of “good localization”  is proposed. Firstly, a discrete expression of good detection and good localization criterion of two dimension edge detection operator is employed, and then an experiment to measure optimal parameters of two dimension Canny's edge detection operator is introduced after. Moreover, a detailed performance comparison and analysis of two dimension optimal filter obtained via utilizing tensor product for one dimension optimal filter are provided which can prove that least square support vector regression (LS-SVR) is a smoothness filter and give the construct method of the derivate operator. This paper uses LS-SVR as the object function constructor and then realizes the approximation of two dimension optimal edge detection operator. This paper proposes the utility method of using singleness operator to realize multiscale edge detection by referencing the multiscale analysis technology of the wavelets theory. Experiment shows that the method has utility and efficiency.


---

## Body

## 1. Introduction

Edge detection is an important foundation of the image analysis such as image segmentation, texture feature extraction, and shape feature extraction, which is one of the most active research subjects in computer vision field. For the step edge of gray image, due to the edge position corresponding to the gradient extreme of gray function, edge detection may be resolved by solving numerical derivative. As we all know, the Roberts operator (Roberts, 1963), the Prewitt operator (Prewitt, 1970), and the Sobel operator (Sobel, 1970) are all proposed based on the above idea. Torre and Poggio [1] pointed that the image numerical derivative is an ill problem, and thus it is necessary for edge detection to use a low pass filter (LPF) to smooth image and turn it into well conditioned and then solve the derivative. Assuming that G
(
X
) is originality image, H
(
X
) is smooth operator, and S
(
x
) is the output after derivative, according to the convolution characteristic, we can have
(1)
S
(
x
)
=
[
∑
G
(
x
-
y
)
H
(
y
)
]
′
=
∑
G
(
x
-
y
)
H
′
(
y
)
,
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
x
,
y
∈
R
2
.
We can infer from (1) that edge detection may be realized by using the derivative operator of smooth filter to filter for image; clearly, the derivative operator of smooth filter, namely, the edge detection operator, determines the effect of edge detection.To judge the performance of different edge detection operators, Canny [2] proposed the distinguished 3-criterion edge detection, took the one dimension step-like edge as an example, gave each criterion mathematics expression in continuous domain, and pointed that the first derivative of the Gaussian function may be the approximation of the optimal edge detection operator. Due to the rotation invariance and two dimension partible characteristic of the Gaussian function, Canny extended this conclusion to two dimension image edge detection. On the basis of Canny’s work, Demigny [3] proposed one dimension discrete format of Canny’s 3-criterion and gave the calculation method of optimal edge detection operator under this criterion. However, the image is two dimensional and thus the edge detection should be two dimensional. Therefore some academician suggested using tensor product format [4] to generate two dimension edge detection operator through one dimension smooth operator and one dimension edge detection operator, which idealize image into separability signal of rows and columns. In fact, there is some relativity between the rows and columns of image, and in that respect the superiority of impartibility wavelet [5] in the image processing has proved that the tensor product format has bigger error. For the edge detection, taking one dimension signal as the research object could not clearly reflect the relativity of different rows and columns pixels, and thus it is necessary to go on researching the design problem of two dimension edge detection operator deeply. In fact, there are lots of other methods such as data driven [6–10] and support vector machine (SVM) which can deal with the issue.SVM is one machine study method based on statistical learning theory [11], which is especially suitable for small training set, via realizing structural risk minimization to make study machine possess stronger generalization capability. SVM gained broad application for its special superiority on pattern recognition, function estimation, and so forth. Different from standard SVM, least squares support vector machine [12] (LS-SVM) turns convex quadratic function optimization problem into linear equation solution, which increases support vector number but avoids the complicated optimizing process. Therefore, SVM has been applied widely on function fitting [13–15]. The SVM function fitting is the process of looking for the target function from the function space, and the function format is decided by the setting of SVM parameters. Therefore, parameters selecting is always the puzzle problem in the SVM tradition application. But from another point of view, this characteristic of SVM just provides a new solving project for function construction problem; that is, utilizing the same input vector, we may obtain different format function via adjusting the SVM parameters. Due to edge detection operator design being essentially function construction problem, this paper tries to utilize least squares support vector regression (LS-SVR) to construct edge detection operator of two dimension image.The paper is organized as follows. In Section2, first, the Canny continuous criteria and Demigny discrete criterion are introduced, respectively. Next, localization criterion is improved in Section 2.3, and the good detection results criterion and localization criterion are extended to two dimension in Section 2.4. In Section 3, LS-SVR is proved to be smooth filter and the derivative operator constructor method is given. In Section 4, first, the approximation ability of LS-SVR is analyzed via experiment. The approximation of the optimal two dimension edge detection operator proposed in this paper is realized via adjusting LS-SVR parameters in Section 4.2; at the same time, the optimal parameters of Canny’s edge operator are given and the LS-SVR operator in this paper is compared with Canny’s operator. Section 4.3 uses tensor product format to build two dimension edge detection operator through one dimension optimal Canny’s operator, compares the performance with two dimension optimal Canny’s operator, and validates the conclusion that one dimension optimal filter tensor product is just approximate of two dimension optimal filter. Section 5 proposes the utility method using singleness operator to realize multiscale edge detection based on multiscale analysis technology of wavelet theory. A conclusion is made in Section 6.


## 2. Edge Detection Criterion

Noise is the main factor of influence edge detection effect; in the various types of noise, especially the additive white Gaussian noise is most familiar, and thus the evaluation criterion of edge detection operator is mainly to decrease the Gaussian noise effect as the main aim.


### 2.1. Canny’s Continuous Criterion

#### 2.1.1. Good Detection

Good detection is to be a low probability of failing to mark real edge position and low probability of falsely marking nonedge position. Since both these probabilities will decrease monotonically with the increase of signal-to-noise ratio (SNR), this criterion is equivalent to maximizing the SNR of edge points after filtering by solving the smooth filter derivative operatorf
(
X
). Assuming G
(
X
) is one dimension step edge signal and N
(
X
) is the Gaussian noise signal with zero mean and variance σ
2, then after f
(
X
) filtering edge point SNR is
(2)
SNR
(
f
)
=
H
G
H
N
=
|
∫
-
W
W
G
(
-
x
)
f
(
x
)
d
x
|
σ
∫
-
W
W
f
2
(
x
)
d
x
.


#### 2.1.2. Localization Criterion

Good localization is that the edge points marked by the edge detection operator should be as close as possible to the real edge. Assuming that the real edge is centered at 0 and the edge point marked isx
0, then minimizing the expectation E
(
x
0
2
) is to maximize the following function:
(3)
Localization
(
f
)
=
[
∫
-
W
W
G
′
(
-
x
)
f
′
(
x
)
d
x
]
2
σ
2
∫
-
∝
∝
f
′
2
(
x
)
d
x
.


#### 2.1.3. Only One Response to a Single Edge

The response peak value of edge detection operator to noise is the main reason of repeat response to a single edge; thus, this criterion can be scaled by the average distance(
x
ave
) between the two peak values of noise response. Assuming that the width of filter windows is 2
W, we have
(4)
x
ave
(
f
)
=
2
π
(
∫
-
∞
+
∞
f
′
2
d
x
∫
-
∞
+
∞
f
′′
2
d
x
)
1
/
2
=
k
W
.Oncek is fixed, the peak value number of the noise response is confirmed in filter windows. It can be proved that the result of this criterion is irrelative to the filter space scale; thus, we may take the 3rd criterion as the constraint, optimize the decision function which is composed of the first two criteria, and then solve the optimal edge detection operator.


### 2.2. Canny’s Discrete Criterion

Canny obtained the results mentioned above under assuming that image and filter are all continuous function. However, images are discrete; accordingly, filters should be discrete. Therefore, in the application, only the sampling of continuous function is used to act on image, but the sampling only satisfying sampling theorem can be taken as discrete expression of continuous function; otherwise, it will produce frequency overlap. So, the optimal result of continuous domain after figure image sampling is hardly optimal; moreover, according to statistic theory, the result of formula (3) also has a certain degree of deviation. Thus, by studying deeply [16, 17], Demigny proposed the one dimension edge detection discrete criterion [3] based on Canny’s continuous criterion. Demigny found that the third criterion used by Canny may be replaced with threshold operation in the discrete domain; thus, this paper only introduces the first two criteria.Assuming thath is the discrete edge detection operator based on gradient, scale of h is 2
d
+
1, ∀
d
>
0, which should satisfy h
0
=
0, ∀
k
>
0, h
-
k
>
0, and h
-
k
=
-
h
k, and input signal is e
n
=
A
(
U
n
-
U
n
-
d
), where U
n is the discrete Heaviside sequence, then, without noise, the filter output is
(5)
s
n
=
A
∑
-
d
-
1
h
k
,
where d is the scale of the filter size.Only in the presence of noise, the variance of the filter output is(6)
σ
s
2
=
σ
2
∑
-
∞
+
∞
h
k
2
.


#### 2.2.1. Good Detection: CriterionΣ

Good detection should maximize the SNR of filter at the edge point, that is, maximize the following function:(7)
Σ
=
∑
-
d
-
1
h
k
(
∑
-
∞
+
∞
h
k
2
)
1
/
2
.It is equivalent to maximize the following function:(8)
F
=
(
∑
-
d
-
1
h
k
)
2
∑
-
∞
-
1
h
k
2
.For the formulas above, solve the partial derivative and let it be 0; thus(9)
-
d
≤
k
≤
-
1
,
h
k
=
∑
-
d
-
1
h
i
F
,
k
<
-
d
,
h
k
=
0
.We can see that the optimal edge detection filter is the box filter of size2
d
+
1, so the optimal value of formula (7) is
(10)
Σ
max
⁡
=
d
2
.Formula (9) gives a conclusion as follows: for one step edge of width d, the optimal edge detection operator should not be longer than 2
d
+
1; that is to say, for the edge filter with 2
d
+
1 coefficient, the edge would be detected reliably only when the positive and negative width are larger than d, in fact, which offers the basis for scale selection of edge detection.


#### 2.2.2. Good Localization: Criterion Λ

Since noise may cause the offset of edge position, to confirm the good localization, we should maximize thes
-
1
′
>
0 probability. If the white Gaussian noise N with variance σ
2 is added to the signal, then the total output at −1 point is
(11)
s
-
1
=
A
∑
-
d
-
1
h
k
+
∑
-
∞
+
∞
h
-
1
-
k
N
k
.Demigny use discrete difference to take place ofderivation operation; thus(12)
s
-
1
′
=
A
(
h
-
1
-
h
-
1
-
d
)
+
∑
-
∞
+
∞
h
-
1
-
k
′
N
k
.The probability to obtains
-
1
′
>
0 is then
(13)
P
(
s
-
1
′
>
0
)
=
1
2
+
erf
⁡
(
Λ
A
σ
)
,
where erf
⁡
(
x
)
=
1
/
2
π
∫
0
x
e
-
t
2
/
2
d
t and Λ is the localization criterion:
(14)
Λ
=
h
-
1
-
h
-
1
-
d
(
∑
-
∞
+
∞
h
k
′
2
)
1
/
2
=
∑
-
d
-
1
h
k
′
(
∑
-
∞
+
∞
h
k
′
2
)
1
/
2
.
We have
(15)
Λ
2
=
(
2
+
2
∑
-
d
-
1
h
k
′
2
(
∑
-
d
-
1
h
k
′
)
2
)
-
1
.
When h
k
′
=
h
k
+
1
′, -
d
≤
k
≤
-
1, formula (15) obtains the maximization, so the optimal value of the localization criterion is
(16)
Λ
max
⁡
=
d
2
(
d
+
1
)
.


### 2.3. Improved Discrete Localization Criterion

For one dimension step edge, the reason of maximization the probability to obtains
-
1
′
>
0 is that the real edge position is between −1 and 0. Demigny used discrete difference to calculate derivativeness, in fact, which gave the maximization probability to obtain s
-
1
>
s
-
2; that is to say, all the filters that satisfy s
-
1
>
s
-
2 are good localization operator, which permits the maximization of edge detection to be between −1 and −2 and lean to −1, which has one pixel deviation with the real edge. Moreover, for the less scale filter, the operator derivativeness solved by difference has been influenced largely by the borderline. Therefore, only using the derivative operator of the edge detection filter that strictly satisfies the derivative definition can solve the existing problem.Assume that width of the input signal is larger than2
d
+
1 and h
′′ is the second derivative operator of size 2
d
+
1 that is deduced via formula (1), which should satisfy
(17)
∑
-
d
d
h
k
′′
=
0
,
h
k
′′
=
h
-
k
′′
,
0
<
k
≤
d
,
h
k
′′
=
0
,
|
k
|
>
d
.
Thus,
(18)
Λ
=
∑
-
d
-
1
h
k
′′
(
∑
-
d
d
h
k
′′
2
)
1
/
2
,
Λ
2
=
(
∑
-
d
-
1
h
k
′′
)
2
∑
-
d
d
h
k
′′
2
.
For h
0
′′
=
-
2
∑
-
d
-
1
h
k
′′, we have
(19)
Λ
2
=
(
∑
-
d
-
1
h
k
′′
)
2
4
(
∑
-
d
-
1
h
k
′′
)
2
+
2
∑
-
d
-
1
h
k
′′
2
=
(
4
+
2
∑
-
d
-
1
h
k
′′
2
(
∑
-
d
-
1
h
k
′′
)
2
)
-
1
.
Obviously, the optimal h
′′ obtained by solving the maximum of formula (19) should satisfy h
k
′′
=
h
-
k
′′
=
h
k
+
1
′′, 1
≤
k
≤
d
-
1, and h
0
′′
=
-
2
d
h
k
′′, 1
≤
k
≤
d; thus, the optimal value of the localization criterion is
(20)
Λ
max
⁡
=
d
4
d
+
2
.


### 2.4. Two Dimension Optimal Filter

One two dimension smooth filter of the good space domain should have centrosymmetric characteristic; that is, the filter coefficients are symmetric according to row, column, and diagonal. This paper discusses smooth filter with the above characteristic. According to the conclusion of formula (1), edge detection operator should be the derivative of a smooth filter operator and the gradient of smoothness operator for the two dimension operator. Supposing x
=
(
r
,
c
) of formula (1), then, the response of two dimension edge detection operator should be
(21)
S
′
(
x
)




=
[
(
∑
G
(
x
-
y
)
∂
∂
r
H
(
y
)
)
2

+
(
∑
G
(
x
-
y
)
∂
∂
c
H
(
y
)
)
2

]
1
/
2
.
We can see that two dimension edge detection operator is composed of row and column directional partial derivative of smooth filter operator. Assuming that input signal G is a two dimension column directional discrete Heaviside sequence, filter window is N
×
N neighborhood, where N
=
2
d
+
1, and windows center coordinate is (
0,0
).


#### 2.4.1. Optimal Filter for Criterion Σ

Assuming thatdcH is column directional first partial derivative of formula (1) anddrHis row directional first partial derivative, we have
(22)
d
c
H
i
,
0
=
0
,
-
d
≤
i
≤
d
,
iiiiiiiiiiiiiiiiiii
d
c
H
i
,
j
=
d
c
H
-
i
,
j
=
-
d
c
H
i
,
-
j
,
-
d
≤
i
≤
d
,
-
d
≤
j
≤
-
1
,
-
d
≤
i
≤
d
,
d
c
H
=
d
r
H
T
.
SincedrH anddcH are transposing each other, to assure the column directional optimal can obtain the row directional optimal. Therefore, here only consideringdcH and according to one dimension instance, “good detection” criterion should be
(23)
Σ
=
∑
-
d
d
∑
-
d
-
1
d
c
H
i
,
j
(
∑
-
d
d
∑
-
d
d
d
c
H
i
,
j
2
)
1
/
2
.
Thus, the optimal filter may be solved, which satisfies
(24)
iiiiiiiiiiiiiiiii
d
c
H
i
,
j
=
-
d
c
H
-
i
,
-
j
=
k
,
k
>
0
,
-
d
≤
i
≤
d
,
-
d
≤
j
≤
-
1
,
d
c
H
i
,
0
=
0
,
-
d
≤
i
≤
d
.
So, the maximum of Σ is
(25)
Σ
max
⁡
=
d
(
2
d
+
1
)
2
.


#### 2.4.2. Optimal Filter for Criterion Λ

For formula (1), to introduce the Laplacian operator, we have
(26)
S
′′
(
x
)
=
∑
G
(
x
-
y
)
∂
2
∂
r
2
H
(
y
)
+
∑
G
(
x
-
y
)
∂
2
∂
c
2
H
(
y
)
.
Localization criterion demands that there is minimal deviation between the marked edge position and the real edge position. Since the input signal is a column directional Heaviside sequence, simon-pure edge position should be between (
0
,
-
1
) and (
0,0
), and here S
′′
(
0
,
-
1
)
>
0 and S
′′
(
0,0
)
<
0. Good edge detection operator should make S
′′
(
0
,
-
1
)
>
0 and S
′′
(
0,0
)
<
0 have the maximal probability; therefore we discuss the maximization problem of the probability to obtain S
′′
(
0
,
-
1
)
>
0 firstly. Assuming that d
c
c
His column directional second derivative operator of H and d
r
r
H is row directional second derivative operator, then d
c
c
H should have the symmetric characteristic according to row and column and satisfy d
c
c
H
=
d
r
r
H
T. Assuming that L is the Laplacian operator, where L
i
,
j is the coefficient, L
=
d
c
c
H
+
d
r
r
H holds. Thus, L is symmetric according to row and column and the elements of the zero row and the zero column are symmetric according to (
0,0
), and ∑
-
d
d
∑
-
d
d
L
i
,
j
=
0; we have
(27)
L
0,0
=
-
(
4
∑
-
d
-
1
L
0
,
j
+
4
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
)
.According to one dimension format, localization criterion should be(28)
Λ
=
∑
-
d
d
∑
-
d
-
1
L
i
,
j
(
∑
-
d
d
∑
-
d
d
L
i
,
j
2
)
1
/
2
.
Maximization Λ may be equivalent to the minimization of the following formula:
(29)
F
=
∑
-
d
d
∑
-
d
d
L
i
,
j
2
(
∑
-
d
d
∑
-
d
-
1
L
i
,
j
)
2
=
L
0,0
2
+
4
∑
-
d
-
1
L
0
,
j
2
+
4
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
2
(
∑
-
d
-
1
L
0
,
j
+
2
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
)
2
.
Solving partial derivative of F to coefficients and letting it be equal to 0
(30)
∂
F
∂
L
0
,
j
=
0
⟹
L
0
,
j
=
1
4
F
∑
-
d
d
∑
-
d
-
1
L
i
,
j
+
L
0,0
,
∂
F
∂
L
i
,
j
=
0
⟹
L
i
,
j
=
1
2
F
∑
-
d
d
∑
-
d
-
1
L
i
,
j
+
L
0,0
.
Thus optimal filter for criterion Λ should satisfy
(31)
1
≤
|
j
|
≤
d
,
L
0
,
j
=
L
j
,
0
=
1
-
2
d
2
k
,
L
0,0
=
-
2
d
k
.
Here, we can compute the maximal value for Λ:
(32)
Λ
max
⁡
=
1
2
d
.
It can be proved that the optimal filter for criterion Λ may assure the probability to obtain S
′′
(
0,0
)
<
0 to be maximization at the same time.To sum up the result, the design process of two dimension edge detection operator is as follows: first, to construct one smooth operator; next, to solve the first derivative operator and take it as edge detection filter and, at the same time, to solve the second derivative of smooth filter; lastly, to utilize criterion Σ and criterion Λ to construct judge function and then be on seeking the optimization.


## 2.1. Canny’s Continuous Criterion

### 2.1.1. Good Detection

Good detection is to be a low probability of failing to mark real edge position and low probability of falsely marking nonedge position. Since both these probabilities will decrease monotonically with the increase of signal-to-noise ratio (SNR), this criterion is equivalent to maximizing the SNR of edge points after filtering by solving the smooth filter derivative operatorf
(
X
). Assuming G
(
X
) is one dimension step edge signal and N
(
X
) is the Gaussian noise signal with zero mean and variance σ
2, then after f
(
X
) filtering edge point SNR is
(2)
SNR
(
f
)
=
H
G
H
N
=
|
∫
-
W
W
G
(
-
x
)
f
(
x
)
d
x
|
σ
∫
-
W
W
f
2
(
x
)
d
x
.


### 2.1.2. Localization Criterion

Good localization is that the edge points marked by the edge detection operator should be as close as possible to the real edge. Assuming that the real edge is centered at 0 and the edge point marked isx
0, then minimizing the expectation E
(
x
0
2
) is to maximize the following function:
(3)
Localization
(
f
)
=
[
∫
-
W
W
G
′
(
-
x
)
f
′
(
x
)
d
x
]
2
σ
2
∫
-
∝
∝
f
′
2
(
x
)
d
x
.


### 2.1.3. Only One Response to a Single Edge

The response peak value of edge detection operator to noise is the main reason of repeat response to a single edge; thus, this criterion can be scaled by the average distance(
x
ave
) between the two peak values of noise response. Assuming that the width of filter windows is 2
W, we have
(4)
x
ave
(
f
)
=
2
π
(
∫
-
∞
+
∞
f
′
2
d
x
∫
-
∞
+
∞
f
′′
2
d
x
)
1
/
2
=
k
W
.Oncek is fixed, the peak value number of the noise response is confirmed in filter windows. It can be proved that the result of this criterion is irrelative to the filter space scale; thus, we may take the 3rd criterion as the constraint, optimize the decision function which is composed of the first two criteria, and then solve the optimal edge detection operator.


## 2.1.1. Good Detection

Good detection is to be a low probability of failing to mark real edge position and low probability of falsely marking nonedge position. Since both these probabilities will decrease monotonically with the increase of signal-to-noise ratio (SNR), this criterion is equivalent to maximizing the SNR of edge points after filtering by solving the smooth filter derivative operatorf
(
X
). Assuming G
(
X
) is one dimension step edge signal and N
(
X
) is the Gaussian noise signal with zero mean and variance σ
2, then after f
(
X
) filtering edge point SNR is
(2)
SNR
(
f
)
=
H
G
H
N
=
|
∫
-
W
W
G
(
-
x
)
f
(
x
)
d
x
|
σ
∫
-
W
W
f
2
(
x
)
d
x
.


## 2.1.2. Localization Criterion

Good localization is that the edge points marked by the edge detection operator should be as close as possible to the real edge. Assuming that the real edge is centered at 0 and the edge point marked isx
0, then minimizing the expectation E
(
x
0
2
) is to maximize the following function:
(3)
Localization
(
f
)
=
[
∫
-
W
W
G
′
(
-
x
)
f
′
(
x
)
d
x
]
2
σ
2
∫
-
∝
∝
f
′
2
(
x
)
d
x
.


## 2.1.3. Only One Response to a Single Edge

The response peak value of edge detection operator to noise is the main reason of repeat response to a single edge; thus, this criterion can be scaled by the average distance(
x
ave
) between the two peak values of noise response. Assuming that the width of filter windows is 2
W, we have
(4)
x
ave
(
f
)
=
2
π
(
∫
-
∞
+
∞
f
′
2
d
x
∫
-
∞
+
∞
f
′′
2
d
x
)
1
/
2
=
k
W
.Oncek is fixed, the peak value number of the noise response is confirmed in filter windows. It can be proved that the result of this criterion is irrelative to the filter space scale; thus, we may take the 3rd criterion as the constraint, optimize the decision function which is composed of the first two criteria, and then solve the optimal edge detection operator.


## 2.2. Canny’s Discrete Criterion

Canny obtained the results mentioned above under assuming that image and filter are all continuous function. However, images are discrete; accordingly, filters should be discrete. Therefore, in the application, only the sampling of continuous function is used to act on image, but the sampling only satisfying sampling theorem can be taken as discrete expression of continuous function; otherwise, it will produce frequency overlap. So, the optimal result of continuous domain after figure image sampling is hardly optimal; moreover, according to statistic theory, the result of formula (3) also has a certain degree of deviation. Thus, by studying deeply [16, 17], Demigny proposed the one dimension edge detection discrete criterion [3] based on Canny’s continuous criterion. Demigny found that the third criterion used by Canny may be replaced with threshold operation in the discrete domain; thus, this paper only introduces the first two criteria.Assuming thath is the discrete edge detection operator based on gradient, scale of h is 2
d
+
1, ∀
d
>
0, which should satisfy h
0
=
0, ∀
k
>
0, h
-
k
>
0, and h
-
k
=
-
h
k, and input signal is e
n
=
A
(
U
n
-
U
n
-
d
), where U
n is the discrete Heaviside sequence, then, without noise, the filter output is
(5)
s
n
=
A
∑
-
d
-
1
h
k
,
where d is the scale of the filter size.Only in the presence of noise, the variance of the filter output is(6)
σ
s
2
=
σ
2
∑
-
∞
+
∞
h
k
2
.


### 2.2.1. Good Detection: CriterionΣ

Good detection should maximize the SNR of filter at the edge point, that is, maximize the following function:(7)
Σ
=
∑
-
d
-
1
h
k
(
∑
-
∞
+
∞
h
k
2
)
1
/
2
.It is equivalent to maximize the following function:(8)
F
=
(
∑
-
d
-
1
h
k
)
2
∑
-
∞
-
1
h
k
2
.For the formulas above, solve the partial derivative and let it be 0; thus(9)
-
d
≤
k
≤
-
1
,
h
k
=
∑
-
d
-
1
h
i
F
,
k
<
-
d
,
h
k
=
0
.We can see that the optimal edge detection filter is the box filter of size2
d
+
1, so the optimal value of formula (7) is
(10)
Σ
max
⁡
=
d
2
.Formula (9) gives a conclusion as follows: for one step edge of width d, the optimal edge detection operator should not be longer than 2
d
+
1; that is to say, for the edge filter with 2
d
+
1 coefficient, the edge would be detected reliably only when the positive and negative width are larger than d, in fact, which offers the basis for scale selection of edge detection.


### 2.2.2. Good Localization: Criterion Λ

Since noise may cause the offset of edge position, to confirm the good localization, we should maximize thes
-
1
′
>
0 probability. If the white Gaussian noise N with variance σ
2 is added to the signal, then the total output at −1 point is
(11)
s
-
1
=
A
∑
-
d
-
1
h
k
+
∑
-
∞
+
∞
h
-
1
-
k
N
k
.Demigny use discrete difference to take place ofderivation operation; thus(12)
s
-
1
′
=
A
(
h
-
1
-
h
-
1
-
d
)
+
∑
-
∞
+
∞
h
-
1
-
k
′
N
k
.The probability to obtains
-
1
′
>
0 is then
(13)
P
(
s
-
1
′
>
0
)
=
1
2
+
erf
⁡
(
Λ
A
σ
)
,
where erf
⁡
(
x
)
=
1
/
2
π
∫
0
x
e
-
t
2
/
2
d
t and Λ is the localization criterion:
(14)
Λ
=
h
-
1
-
h
-
1
-
d
(
∑
-
∞
+
∞
h
k
′
2
)
1
/
2
=
∑
-
d
-
1
h
k
′
(
∑
-
∞
+
∞
h
k
′
2
)
1
/
2
.
We have
(15)
Λ
2
=
(
2
+
2
∑
-
d
-
1
h
k
′
2
(
∑
-
d
-
1
h
k
′
)
2
)
-
1
.
When h
k
′
=
h
k
+
1
′, -
d
≤
k
≤
-
1, formula (15) obtains the maximization, so the optimal value of the localization criterion is
(16)
Λ
max
⁡
=
d
2
(
d
+
1
)
.


## 2.2.1. Good Detection: CriterionΣ

Good detection should maximize the SNR of filter at the edge point, that is, maximize the following function:(7)
Σ
=
∑
-
d
-
1
h
k
(
∑
-
∞
+
∞
h
k
2
)
1
/
2
.It is equivalent to maximize the following function:(8)
F
=
(
∑
-
d
-
1
h
k
)
2
∑
-
∞
-
1
h
k
2
.For the formulas above, solve the partial derivative and let it be 0; thus(9)
-
d
≤
k
≤
-
1
,
h
k
=
∑
-
d
-
1
h
i
F
,
k
<
-
d
,
h
k
=
0
.We can see that the optimal edge detection filter is the box filter of size2
d
+
1, so the optimal value of formula (7) is
(10)
Σ
max
⁡
=
d
2
.Formula (9) gives a conclusion as follows: for one step edge of width d, the optimal edge detection operator should not be longer than 2
d
+
1; that is to say, for the edge filter with 2
d
+
1 coefficient, the edge would be detected reliably only when the positive and negative width are larger than d, in fact, which offers the basis for scale selection of edge detection.


## 2.2.2. Good Localization: Criterion Λ

Since noise may cause the offset of edge position, to confirm the good localization, we should maximize thes
-
1
′
>
0 probability. If the white Gaussian noise N with variance σ
2 is added to the signal, then the total output at −1 point is
(11)
s
-
1
=
A
∑
-
d
-
1
h
k
+
∑
-
∞
+
∞
h
-
1
-
k
N
k
.Demigny use discrete difference to take place ofderivation operation; thus(12)
s
-
1
′
=
A
(
h
-
1
-
h
-
1
-
d
)
+
∑
-
∞
+
∞
h
-
1
-
k
′
N
k
.The probability to obtains
-
1
′
>
0 is then
(13)
P
(
s
-
1
′
>
0
)
=
1
2
+
erf
⁡
(
Λ
A
σ
)
,
where erf
⁡
(
x
)
=
1
/
2
π
∫
0
x
e
-
t
2
/
2
d
t and Λ is the localization criterion:
(14)
Λ
=
h
-
1
-
h
-
1
-
d
(
∑
-
∞
+
∞
h
k
′
2
)
1
/
2
=
∑
-
d
-
1
h
k
′
(
∑
-
∞
+
∞
h
k
′
2
)
1
/
2
.
We have
(15)
Λ
2
=
(
2
+
2
∑
-
d
-
1
h
k
′
2
(
∑
-
d
-
1
h
k
′
)
2
)
-
1
.
When h
k
′
=
h
k
+
1
′, -
d
≤
k
≤
-
1, formula (15) obtains the maximization, so the optimal value of the localization criterion is
(16)
Λ
max
⁡
=
d
2
(
d
+
1
)
.


## 2.3. Improved Discrete Localization Criterion

For one dimension step edge, the reason of maximization the probability to obtains
-
1
′
>
0 is that the real edge position is between −1 and 0. Demigny used discrete difference to calculate derivativeness, in fact, which gave the maximization probability to obtain s
-
1
>
s
-
2; that is to say, all the filters that satisfy s
-
1
>
s
-
2 are good localization operator, which permits the maximization of edge detection to be between −1 and −2 and lean to −1, which has one pixel deviation with the real edge. Moreover, for the less scale filter, the operator derivativeness solved by difference has been influenced largely by the borderline. Therefore, only using the derivative operator of the edge detection filter that strictly satisfies the derivative definition can solve the existing problem.Assume that width of the input signal is larger than2
d
+
1 and h
′′ is the second derivative operator of size 2
d
+
1 that is deduced via formula (1), which should satisfy
(17)
∑
-
d
d
h
k
′′
=
0
,
h
k
′′
=
h
-
k
′′
,
0
<
k
≤
d
,
h
k
′′
=
0
,
|
k
|
>
d
.
Thus,
(18)
Λ
=
∑
-
d
-
1
h
k
′′
(
∑
-
d
d
h
k
′′
2
)
1
/
2
,
Λ
2
=
(
∑
-
d
-
1
h
k
′′
)
2
∑
-
d
d
h
k
′′
2
.
For h
0
′′
=
-
2
∑
-
d
-
1
h
k
′′, we have
(19)
Λ
2
=
(
∑
-
d
-
1
h
k
′′
)
2
4
(
∑
-
d
-
1
h
k
′′
)
2
+
2
∑
-
d
-
1
h
k
′′
2
=
(
4
+
2
∑
-
d
-
1
h
k
′′
2
(
∑
-
d
-
1
h
k
′′
)
2
)
-
1
.
Obviously, the optimal h
′′ obtained by solving the maximum of formula (19) should satisfy h
k
′′
=
h
-
k
′′
=
h
k
+
1
′′, 1
≤
k
≤
d
-
1, and h
0
′′
=
-
2
d
h
k
′′, 1
≤
k
≤
d; thus, the optimal value of the localization criterion is
(20)
Λ
max
⁡
=
d
4
d
+
2
.


## 2.4. Two Dimension Optimal Filter

One two dimension smooth filter of the good space domain should have centrosymmetric characteristic; that is, the filter coefficients are symmetric according to row, column, and diagonal. This paper discusses smooth filter with the above characteristic. According to the conclusion of formula (1), edge detection operator should be the derivative of a smooth filter operator and the gradient of smoothness operator for the two dimension operator. Supposing x
=
(
r
,
c
) of formula (1), then, the response of two dimension edge detection operator should be
(21)
S
′
(
x
)




=
[
(
∑
G
(
x
-
y
)
∂
∂
r
H
(
y
)
)
2

+
(
∑
G
(
x
-
y
)
∂
∂
c
H
(
y
)
)
2

]
1
/
2
.
We can see that two dimension edge detection operator is composed of row and column directional partial derivative of smooth filter operator. Assuming that input signal G is a two dimension column directional discrete Heaviside sequence, filter window is N
×
N neighborhood, where N
=
2
d
+
1, and windows center coordinate is (
0,0
).


### 2.4.1. Optimal Filter for Criterion Σ

Assuming thatdcH is column directional first partial derivative of formula (1) anddrHis row directional first partial derivative, we have
(22)
d
c
H
i
,
0
=
0
,
-
d
≤
i
≤
d
,
iiiiiiiiiiiiiiiiiii
d
c
H
i
,
j
=
d
c
H
-
i
,
j
=
-
d
c
H
i
,
-
j
,
-
d
≤
i
≤
d
,
-
d
≤
j
≤
-
1
,
-
d
≤
i
≤
d
,
d
c
H
=
d
r
H
T
.
SincedrH anddcH are transposing each other, to assure the column directional optimal can obtain the row directional optimal. Therefore, here only consideringdcH and according to one dimension instance, “good detection” criterion should be
(23)
Σ
=
∑
-
d
d
∑
-
d
-
1
d
c
H
i
,
j
(
∑
-
d
d
∑
-
d
d
d
c
H
i
,
j
2
)
1
/
2
.
Thus, the optimal filter may be solved, which satisfies
(24)
iiiiiiiiiiiiiiiii
d
c
H
i
,
j
=
-
d
c
H
-
i
,
-
j
=
k
,
k
>
0
,
-
d
≤
i
≤
d
,
-
d
≤
j
≤
-
1
,
d
c
H
i
,
0
=
0
,
-
d
≤
i
≤
d
.
So, the maximum of Σ is
(25)
Σ
max
⁡
=
d
(
2
d
+
1
)
2
.


### 2.4.2. Optimal Filter for Criterion Λ

For formula (1), to introduce the Laplacian operator, we have
(26)
S
′′
(
x
)
=
∑
G
(
x
-
y
)
∂
2
∂
r
2
H
(
y
)
+
∑
G
(
x
-
y
)
∂
2
∂
c
2
H
(
y
)
.
Localization criterion demands that there is minimal deviation between the marked edge position and the real edge position. Since the input signal is a column directional Heaviside sequence, simon-pure edge position should be between (
0
,
-
1
) and (
0,0
), and here S
′′
(
0
,
-
1
)
>
0 and S
′′
(
0,0
)
<
0. Good edge detection operator should make S
′′
(
0
,
-
1
)
>
0 and S
′′
(
0,0
)
<
0 have the maximal probability; therefore we discuss the maximization problem of the probability to obtain S
′′
(
0
,
-
1
)
>
0 firstly. Assuming that d
c
c
His column directional second derivative operator of H and d
r
r
H is row directional second derivative operator, then d
c
c
H should have the symmetric characteristic according to row and column and satisfy d
c
c
H
=
d
r
r
H
T. Assuming that L is the Laplacian operator, where L
i
,
j is the coefficient, L
=
d
c
c
H
+
d
r
r
H holds. Thus, L is symmetric according to row and column and the elements of the zero row and the zero column are symmetric according to (
0,0
), and ∑
-
d
d
∑
-
d
d
L
i
,
j
=
0; we have
(27)
L
0,0
=
-
(
4
∑
-
d
-
1
L
0
,
j
+
4
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
)
.According to one dimension format, localization criterion should be(28)
Λ
=
∑
-
d
d
∑
-
d
-
1
L
i
,
j
(
∑
-
d
d
∑
-
d
d
L
i
,
j
2
)
1
/
2
.
Maximization Λ may be equivalent to the minimization of the following formula:
(29)
F
=
∑
-
d
d
∑
-
d
d
L
i
,
j
2
(
∑
-
d
d
∑
-
d
-
1
L
i
,
j
)
2
=
L
0,0
2
+
4
∑
-
d
-
1
L
0
,
j
2
+
4
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
2
(
∑
-
d
-
1
L
0
,
j
+
2
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
)
2
.
Solving partial derivative of F to coefficients and letting it be equal to 0
(30)
∂
F
∂
L
0
,
j
=
0
⟹
L
0
,
j
=
1
4
F
∑
-
d
d
∑
-
d
-
1
L
i
,
j
+
L
0,0
,
∂
F
∂
L
i
,
j
=
0
⟹
L
i
,
j
=
1
2
F
∑
-
d
d
∑
-
d
-
1
L
i
,
j
+
L
0,0
.
Thus optimal filter for criterion Λ should satisfy
(31)
1
≤
|
j
|
≤
d
,
L
0
,
j
=
L
j
,
0
=
1
-
2
d
2
k
,
L
0,0
=
-
2
d
k
.
Here, we can compute the maximal value for Λ:
(32)
Λ
max
⁡
=
1
2
d
.
It can be proved that the optimal filter for criterion Λ may assure the probability to obtain S
′′
(
0,0
)
<
0 to be maximization at the same time.To sum up the result, the design process of two dimension edge detection operator is as follows: first, to construct one smooth operator; next, to solve the first derivative operator and take it as edge detection filter and, at the same time, to solve the second derivative of smooth filter; lastly, to utilize criterion Σ and criterion Λ to construct judge function and then be on seeking the optimization.


## 2.4.1. Optimal Filter for Criterion Σ

Assuming thatdcH is column directional first partial derivative of formula (1) anddrHis row directional first partial derivative, we have
(22)
d
c
H
i
,
0
=
0
,
-
d
≤
i
≤
d
,
iiiiiiiiiiiiiiiiiii
d
c
H
i
,
j
=
d
c
H
-
i
,
j
=
-
d
c
H
i
,
-
j
,
-
d
≤
i
≤
d
,
-
d
≤
j
≤
-
1
,
-
d
≤
i
≤
d
,
d
c
H
=
d
r
H
T
.
SincedrH anddcH are transposing each other, to assure the column directional optimal can obtain the row directional optimal. Therefore, here only consideringdcH and according to one dimension instance, “good detection” criterion should be
(23)
Σ
=
∑
-
d
d
∑
-
d
-
1
d
c
H
i
,
j
(
∑
-
d
d
∑
-
d
d
d
c
H
i
,
j
2
)
1
/
2
.
Thus, the optimal filter may be solved, which satisfies
(24)
iiiiiiiiiiiiiiiii
d
c
H
i
,
j
=
-
d
c
H
-
i
,
-
j
=
k
,
k
>
0
,
-
d
≤
i
≤
d
,
-
d
≤
j
≤
-
1
,
d
c
H
i
,
0
=
0
,
-
d
≤
i
≤
d
.
So, the maximum of Σ is
(25)
Σ
max
⁡
=
d
(
2
d
+
1
)
2
.


## 2.4.2. Optimal Filter for Criterion Λ

For formula (1), to introduce the Laplacian operator, we have
(26)
S
′′
(
x
)
=
∑
G
(
x
-
y
)
∂
2
∂
r
2
H
(
y
)
+
∑
G
(
x
-
y
)
∂
2
∂
c
2
H
(
y
)
.
Localization criterion demands that there is minimal deviation between the marked edge position and the real edge position. Since the input signal is a column directional Heaviside sequence, simon-pure edge position should be between (
0
,
-
1
) and (
0,0
), and here S
′′
(
0
,
-
1
)
>
0 and S
′′
(
0,0
)
<
0. Good edge detection operator should make S
′′
(
0
,
-
1
)
>
0 and S
′′
(
0,0
)
<
0 have the maximal probability; therefore we discuss the maximization problem of the probability to obtain S
′′
(
0
,
-
1
)
>
0 firstly. Assuming that d
c
c
His column directional second derivative operator of H and d
r
r
H is row directional second derivative operator, then d
c
c
H should have the symmetric characteristic according to row and column and satisfy d
c
c
H
=
d
r
r
H
T. Assuming that L is the Laplacian operator, where L
i
,
j is the coefficient, L
=
d
c
c
H
+
d
r
r
H holds. Thus, L is symmetric according to row and column and the elements of the zero row and the zero column are symmetric according to (
0,0
), and ∑
-
d
d
∑
-
d
d
L
i
,
j
=
0; we have
(27)
L
0,0
=
-
(
4
∑
-
d
-
1
L
0
,
j
+
4
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
)
.According to one dimension format, localization criterion should be(28)
Λ
=
∑
-
d
d
∑
-
d
-
1
L
i
,
j
(
∑
-
d
d
∑
-
d
d
L
i
,
j
2
)
1
/
2
.
Maximization Λ may be equivalent to the minimization of the following formula:
(29)
F
=
∑
-
d
d
∑
-
d
d
L
i
,
j
2
(
∑
-
d
d
∑
-
d
-
1
L
i
,
j
)
2
=
L
0,0
2
+
4
∑
-
d
-
1
L
0
,
j
2
+
4
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
2
(
∑
-
d
-
1
L
0
,
j
+
2
∑
-
d
-
1
∑
-
d
-
1
L
i
,
j
)
2
.
Solving partial derivative of F to coefficients and letting it be equal to 0
(30)
∂
F
∂
L
0
,
j
=
0
⟹
L
0
,
j
=
1
4
F
∑
-
d
d
∑
-
d
-
1
L
i
,
j
+
L
0,0
,
∂
F
∂
L
i
,
j
=
0
⟹
L
i
,
j
=
1
2
F
∑
-
d
d
∑
-
d
-
1
L
i
,
j
+
L
0,0
.
Thus optimal filter for criterion Λ should satisfy
(31)
1
≤
|
j
|
≤
d
,
L
0
,
j
=
L
j
,
0
=
1
-
2
d
2
k
,
L
0,0
=
-
2
d
k
.
Here, we can compute the maximal value for Λ:
(32)
Λ
max
⁡
=
1
2
d
.
It can be proved that the optimal filter for criterion Λ may assure the probability to obtain S
′′
(
0,0
)
<
0 to be maximization at the same time.To sum up the result, the design process of two dimension edge detection operator is as follows: first, to construct one smooth operator; next, to solve the first derivative operator and take it as edge detection filter and, at the same time, to solve the second derivative of smooth filter; lastly, to utilize criterion Σ and criterion Λ to construct judge function and then be on seeking the optimization.


## 3. LS-SVR Filter

### 3.1. LS-SVR

For the training database, LS-SVR can be expressed by:(33)
[
0
1
N
T
1
N
Ω
+
γ
-
1
I
N
]
[
b
α
]
=
[
0
Y
]
.Here,Y
=
[
y
1
,
…
,
y
N
]
T is input vector; 1
N
=
[
1
,
…
,
1
]
Tand α
=
[
α
1
,
…
,
α
N
]
Tare the Lagrange multipliers corresponding to each input sample; I
N is N
×
N identity matrix; Ω
∈
ℝ
N
×
N, Ω
i
j
=
K
(
x
i
,
x
j
), and K
(
x
,
y
) is kernel function; γ is penalty factorization.After solving the value of parametersα and b, least squares support vector regression (SVR) function is
(34)
y
=
f
(
x
)
=
∑
i
=
1
N
α
i
K
(
x
i
,
x
)
+
b
.The key to assure formula (34) with generalization capability is to select kernel function K
(
x
,
y
). For the problem of including little prior information, the Gaussian kernel function is a good selection [18]; the Gaussian kernel function is selected as the kernel function in this paper:
(35)
K
(
x
,
y
)
=
exp
⁡
(
-
|
x
-
y
|
2
σ
2
)
.LetΩ
¯
=
Ω
+
γ
-
1
I
N; thus Y
=
1
N
b
+
Ω
¯
α; via transforming the augmented matrices of formula (32), the solving of formula (32) is
(36)
b
=
1
N
T
Ω
¯
-
1
1
N
T
Ω
¯
-
1
1
N
Y
=
A
Y
,
(37)
α
=
Ω
¯
-
1
(
Y
-
1
N
b
)
=
Ω
¯
-
1
(
I
N
-
1
N
A
)
Y
=
M
Y
.


### 3.2. LS-SVR Filter Operator

Via analyzing LS-SVR, the following theorem can be obtained.Theorem 1.
Using LS-SVR to be fitting for the center of the equidistant discrete time sequence windows of size2
d
+
1, is equivalent to one discrete filter of size 2
d
+
1.Proof.
Assuming that window center isy
(
n
) and the output by LS-SVR fitting is f
(
n
), then the input vector of LS-SVR is Y
=
[
y
(
n
-
d
)
,
…
,
y
(
n
)
,
…
,
y
(
n
+
d
)
]
T. The fitting is only for the points which have fallen into the windows, therefore the points can be expressed by relative coordinate; that is, Y
w
=
[
y
(
-
d
)
,
…
,
y
(
0
)
,
…
,
y
(
d
)
]
T, and, obviously, Y
=
Y
w holds. Thus, in the case of the kernel function and penalty factorization γ being determined, A is a constant coefficient row vector with 2
d
+
1 elements and M is a constant coefficient matrix of [
2
d
+
1
]
×
[
2
d
+
1
]. Assuming b
i is the first element of A, m
i is the ith row of matrix M, and m
i
,
j is the jth element of the ith row, then, α
i
=
m
i
Y and -
d
≤
i
≤
d hold, and thus
(38)
f
(
n
)
=
∑
i
=
-
d
d
α
i
K
(
i
,
0
)
+
b
=
∑
i
=
-
d
d
K
(
i
,
0
)
m
i
Y
+
A
Y
=
[
∑
i
=
-
d
d
K
(
i
,
0
)
m
i
+
A
]
Y
.
Let H
=
∑
i
=
-
d
d
K
(
i
,
0
)
m
i
+
A; thus, we have f
(
n
)
=
H
Y, where H is the row vector with 2
d
+
1 constant coefficient and the jth element H
j
=
∑
i
=
-
d
d
m
i
,
j
K
(
i
,
0
)
+
b
j, and thus
(39)
f
(
n
)
=
∑
-
d
d
H
i
y
(
n
+
i
)
.
Therefore, the center pointy
(
n
) of window with size 2
d
+
1 being fitted via LS-SVR is equivalent to one discrete filter of size 2
d
+
1. This completes the proof.The meaning of the above conclusion is to use LS-SVR to be fitting discrete data points in the windows, to obtain a continuous domain function, whose value at the windows center points can be obtained via convolution of one discrete filter to each discrete point of windows, which avoid the probable arising problem of turning discrete data into continuous domain to be disposed and then sampled into discrete domain.SinceH is deduced by using LS-SVR, the first derivative operator H
′ and the second derivative operator H
′′ in strict accord with mathematics definition may be obtained as follows:
(40)
H
j
′
=
∑
i
=
-
d
d
m
i
,
j
K
′
(
i
,
0
)
,
H
j
′′
=
∑
i
=
-
d
d
m
i
,
j
K
′′
(
i
,
0
)
.The conclusion above may be extended to two dimensions easily. Assuming that the fitting window is[
2
d
+
1
]
×
[
2
d
+
1
] neighborhood and windows center point is y
(
m
,
n
), then, M of formula (37) is the matrix of row [
2
d
+
1
]
2
×
[
2
d
+
1
]
2 and A of formula (36) is the row vector of [
2
d
+
1
]
×
[
2
d
+
1
]. Assuming thatm
i,jis the corresponding row of α
i
,
j in the matrix M, m
i
,
j
(
k
,
l
) is the corresponding element of input points y
(
m
-
k
,
n
-
l
) in m
i
,
j, and b
k
,
l is the corresponding element of y
(
m
-
k
,
n
-
l
) in A, then
(41)
H
i
,
j
=
∑
k
,
l
=
-
d
d
m
i
,
j
(
k
,
l
)
K
(
(
i
,
j
)
,
(
0,0
)
)
+
b
i
,
j
.Each coefficient value of filterH given by the theorem is related to enactment of LS-SVR kernel function format and penalty factorization γ; therefore different kernel function and different penalty factorization will get the different smooth filter; in this sense, H is the function of kernel and penalty factorization; that is, H
=
f
(
K
,
γ
). For the Gaussian kernel function LS-SVR using the form of formula (35), we have
(42)
H
=
f
(
σ
,
γ
)
.It should be noted that smooth operator solved according to the theorem is a normalized operator, which may be used in application, but by which the first derivative operator is deduced and gives the first derivative value of windows center after images smoothing. When the smoothness function is stronger, the first derivative operator is less, and this is not for numerical processing. Therefore, the first derivative operator needs normalizing, and the maximal value of output is usually set as 0.5. For the first derivative operator of two dimension column direction, normalization method is(43)
h
i
,
j
=
H
i
,
j
′
(
∑
-
d
-
1
∑
-
d
-
1
H
k
,
l
′
)
.


## 3.1. LS-SVR

For the training database, LS-SVR can be expressed by:(33)
[
0
1
N
T
1
N
Ω
+
γ
-
1
I
N
]
[
b
α
]
=
[
0
Y
]
.Here,Y
=
[
y
1
,
…
,
y
N
]
T is input vector; 1
N
=
[
1
,
…
,
1
]
Tand α
=
[
α
1
,
…
,
α
N
]
Tare the Lagrange multipliers corresponding to each input sample; I
N is N
×
N identity matrix; Ω
∈
ℝ
N
×
N, Ω
i
j
=
K
(
x
i
,
x
j
), and K
(
x
,
y
) is kernel function; γ is penalty factorization.After solving the value of parametersα and b, least squares support vector regression (SVR) function is
(34)
y
=
f
(
x
)
=
∑
i
=
1
N
α
i
K
(
x
i
,
x
)
+
b
.The key to assure formula (34) with generalization capability is to select kernel function K
(
x
,
y
). For the problem of including little prior information, the Gaussian kernel function is a good selection [18]; the Gaussian kernel function is selected as the kernel function in this paper:
(35)
K
(
x
,
y
)
=
exp
⁡
(
-
|
x
-
y
|
2
σ
2
)
.LetΩ
¯
=
Ω
+
γ
-
1
I
N; thus Y
=
1
N
b
+
Ω
¯
α; via transforming the augmented matrices of formula (32), the solving of formula (32) is
(36)
b
=
1
N
T
Ω
¯
-
1
1
N
T
Ω
¯
-
1
1
N
Y
=
A
Y
,
(37)
α
=
Ω
¯
-
1
(
Y
-
1
N
b
)
=
Ω
¯
-
1
(
I
N
-
1
N
A
)
Y
=
M
Y
.


## 3.2. LS-SVR Filter Operator

Via analyzing LS-SVR, the following theorem can be obtained.Theorem 1.
Using LS-SVR to be fitting for the center of the equidistant discrete time sequence windows of size2
d
+
1, is equivalent to one discrete filter of size 2
d
+
1.Proof.
Assuming that window center isy
(
n
) and the output by LS-SVR fitting is f
(
n
), then the input vector of LS-SVR is Y
=
[
y
(
n
-
d
)
,
…
,
y
(
n
)
,
…
,
y
(
n
+
d
)
]
T. The fitting is only for the points which have fallen into the windows, therefore the points can be expressed by relative coordinate; that is, Y
w
=
[
y
(
-
d
)
,
…
,
y
(
0
)
,
…
,
y
(
d
)
]
T, and, obviously, Y
=
Y
w holds. Thus, in the case of the kernel function and penalty factorization γ being determined, A is a constant coefficient row vector with 2
d
+
1 elements and M is a constant coefficient matrix of [
2
d
+
1
]
×
[
2
d
+
1
]. Assuming b
i is the first element of A, m
i is the ith row of matrix M, and m
i
,
j is the jth element of the ith row, then, α
i
=
m
i
Y and -
d
≤
i
≤
d hold, and thus
(38)
f
(
n
)
=
∑
i
=
-
d
d
α
i
K
(
i
,
0
)
+
b
=
∑
i
=
-
d
d
K
(
i
,
0
)
m
i
Y
+
A
Y
=
[
∑
i
=
-
d
d
K
(
i
,
0
)
m
i
+
A
]
Y
.
Let H
=
∑
i
=
-
d
d
K
(
i
,
0
)
m
i
+
A; thus, we have f
(
n
)
=
H
Y, where H is the row vector with 2
d
+
1 constant coefficient and the jth element H
j
=
∑
i
=
-
d
d
m
i
,
j
K
(
i
,
0
)
+
b
j, and thus
(39)
f
(
n
)
=
∑
-
d
d
H
i
y
(
n
+
i
)
.
Therefore, the center pointy
(
n
) of window with size 2
d
+
1 being fitted via LS-SVR is equivalent to one discrete filter of size 2
d
+
1. This completes the proof.The meaning of the above conclusion is to use LS-SVR to be fitting discrete data points in the windows, to obtain a continuous domain function, whose value at the windows center points can be obtained via convolution of one discrete filter to each discrete point of windows, which avoid the probable arising problem of turning discrete data into continuous domain to be disposed and then sampled into discrete domain.SinceH is deduced by using LS-SVR, the first derivative operator H
′ and the second derivative operator H
′′ in strict accord with mathematics definition may be obtained as follows:
(40)
H
j
′
=
∑
i
=
-
d
d
m
i
,
j
K
′
(
i
,
0
)
,
H
j
′′
=
∑
i
=
-
d
d
m
i
,
j
K
′′
(
i
,
0
)
.The conclusion above may be extended to two dimensions easily. Assuming that the fitting window is[
2
d
+
1
]
×
[
2
d
+
1
] neighborhood and windows center point is y
(
m
,
n
), then, M of formula (37) is the matrix of row [
2
d
+
1
]
2
×
[
2
d
+
1
]
2 and A of formula (36) is the row vector of [
2
d
+
1
]
×
[
2
d
+
1
]. Assuming thatm
i,jis the corresponding row of α
i
,
j in the matrix M, m
i
,
j
(
k
,
l
) is the corresponding element of input points y
(
m
-
k
,
n
-
l
) in m
i
,
j, and b
k
,
l is the corresponding element of y
(
m
-
k
,
n
-
l
) in A, then
(41)
H
i
,
j
=
∑
k
,
l
=
-
d
d
m
i
,
j
(
k
,
l
)
K
(
(
i
,
j
)
,
(
0,0
)
)
+
b
i
,
j
.Each coefficient value of filterH given by the theorem is related to enactment of LS-SVR kernel function format and penalty factorization γ; therefore different kernel function and different penalty factorization will get the different smooth filter; in this sense, H is the function of kernel and penalty factorization; that is, H
=
f
(
K
,
γ
). For the Gaussian kernel function LS-SVR using the form of formula (35), we have
(42)
H
=
f
(
σ
,
γ
)
.It should be noted that smooth operator solved according to the theorem is a normalized operator, which may be used in application, but by which the first derivative operator is deduced and gives the first derivative value of windows center after images smoothing. When the smoothness function is stronger, the first derivative operator is less, and this is not for numerical processing. Therefore, the first derivative operator needs normalizing, and the maximal value of output is usually set as 0.5. For the first derivative operator of two dimension column direction, normalization method is(43)
h
i
,
j
=
H
i
,
j
′
(
∑
-
d
-
1
∑
-
d
-
1
H
k
,
l
′
)
.


## 4. LS-SVR Approximate Ability of the Optimal Operator

### 4.1. LS-SVR Approximate Ability

Our aim is to construct the required derivative operator via utilizing LS-SVR. According to SVM theory, we can obtain object function that is expressed by the radix of the high dimension space, that is, kernel function, and is one point that belongs to the whole function space. Obviously, so far we have not found this kernel function, and its finite linearity combination may express the arbitrary function in the whole function space. Therefore, LS-SVR could only give the approximation of the required function. To review the approximate ability of LS-SVR to optimal edge detection operator, this paper provides experiment examples to illustrate.Figure1 presents the approximation curve of LS-SVR filter to the optimal edge detector for one dimension criterion Σ of size 2
d
+
1 and Table 1 presents the corresponding LS-SVR parameters value; we may see that LS-SVR could only construct the optimal filter for criterion Σ with d
=
1 and d
=
2 and the approximation filter for d
≥
3 and the optimization abiltiy about the filter only reach 90% of optimal value for d
=
10. When LS-SVR obtains the maximum according to the criterion Σ, the corresponding Λ value will deviate with the optimal value largely.Table 1
Optimal parameters of LS-SVR for good detection.
d
1
2
3
4
5
6
7
8
9
10
γ
9.78
4.69
0
0
0
0
0
0
0
0
σ
2
7.001
8.889
7.780
12.413
18.211
25.171
33.293
42.575
53.018
64.621Figure 1
Curve of LS-SVR performance for good detection.Figure2 presents the approximation curve of LS-SVR filter to the optimal filter for one dimension criterion Λ and Table 2 presents the corresponding parameters of LS-SVR. We can see form Figure 2 that the approximation curve of LS-SVR coincides with the theory curve; that is, LS-SVR can realize one dimension optimal edge detection filter for criterion Λ, but at this time the value of Σ2 is around 0.5, which is widely discrepant from the optimal value.Table 2
Optimal parameters of LS-SVR for good localization.
d
1
2
3
4
5
6
7
8
9
10
γ
9.11
0.51
0.18
0.06
0.69
0.41
0.61
0.69
0.51
0.30
σ
2
9.602
0.030
0.030
0.032
0.023
0.044
0.037
0.017
0.036
0.027Figure 2
Curve of LS-SVR performance for good localization.Figure3 is the approximation curve of LS-SVR filter to the two dimension optimal filter for criterion Σ; we can see that, when d
=
2, LS-SVR can realize the optimal filter for criterion Σ basically, but, when d
≥
3, the approximation capability of LS-SVR filter will be low apparently.Figure 3
Curve of 2D LS-SVR performance for good detection.In the approximation experiment for criterion Λ, we find that LS-SVR approximation capability is the worst; whend
=
2, LS-SVR could only obtain 70% optimization ability about ideal state, moreover, when d
≥
3, the maximum of Λ could not be improved obviously via utilizing LS-SVR. In fact, the worse approximation capability of LS-SVR to the criterion Λ could not influence us to use the LS-SVR to construct edge detection filter. We can see from the experiment that Λ changes very slowly with the LS-SVR parameter modification but Λ has a larger rate of change. The final result of the decision function according to product criterion is decided by the larger entry of change rate. Therefore, we can use LS-SVR to design the edge detection operator with better performance.


### 4.2. Optimization of a Combination of Σ and Λ

Criteria Σ and Λ have the mutex characteristic; we can see from Figures1 and 2 that the localization capability of the optimal filter for criterion Σ is poor and the signal SNR of the optimal filter for criterion Λ is poor. Therefore, we can only make a trade-off on the two criteria in the real application, and the concrete method is to utilize criteria Σ and Λ to construct one decision function, so as to find the filter that makes the two criteria reach the larger value at the same time and thinks it is the optimal.


#### 4.2.1. Summation Criterion

Use the summation of criteria Σ and Λ to construct decision function; that is,(44)
J
=
Σ
+
μ
Λ
.Hereμ
>
0 is called adjustment coefficient. In the case of different scale, there is a great difference between the value of Σ and Λ, so different scale μ should choose different value.


#### 4.2.2. Product Criterion ΣΛ

In the method the decision function is(45)
J
=
Σ
·
Λ
.This method is very often used. Canny has used the decision function as (43) to compute and obtain a conclusion that the Gaussian function is the approximation of the one dimension optimal filter and extended it to two dimension edge detection. According to this method, this paper utilizes LS-SVR to approximate two dimension column directional optimal filter; Some approximation results and corresponding parameters under several common scales are shown in Table 3.Table 3
The parameters of LS-SVR for 2D optimal filter.
d
1
2
3
4
5
6
7
γ
1
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
σ
2
85.00
4.86
8.62
13.80
20.30
28.12
37.25
Σ
2
1.5000
4.5284
9.1280
15.2770
22.9654
32.1946
42.9631
Λ
2
0.2500
0.2246
0.2261
0.2267
0.2270
0.2271
0.2272In this paper, we test Canny’s edge detection operator according to the proposed two dimension discrete criterion, and in the testing the Gaussian smoothness filter function used is(46)
H
g
(
i
,
j
)
=
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
.The first derivative of the column directional and the Laplacian operator are, respectively,(47)
H
g
′
(
i
,
j
)
=
-
j
σ
2
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
,
∇
g
2
(
i
,
j
)
=
(
j
2
+
i
2
σ
4
-
2
σ
2
)
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
.Since Canny’s operator is a linear operator, formula (45) and the standard Gaussian function have the same calculation result. Table 4 is the optimal parameters of Canny’s operator of generated scale.Table 4
Optimal parameters of Canny’s edge operator.
d
1
2
3
4
5
6
7
σ
2
0.41
0.80
1.32
2.00
2.82
3.76
4.84
Σ
2
1. 0773
2.4563
4.5218
7.2343
10.5046
14.2572
18.5671
Λ
2
0.0924
0.1849
0.2061
0.2094
0.2109
0.2126
0.2133From the data of Tables3 and 4, we can see that the localization capability of Canny’s operator is poorer than that of the operator obtained by LS-SVR, but on the noise resistance ability this operator solved in this paper has the greater advantages.In order to compare the two operators’ performance, this paper utilizes the Lena image and the Cameraman image of the 256 × 256 pels to be on simulation experiment. In the experiment, the used filter window is 5 × 5 neighborhood; the edge detection algorithm is as follows.Step 1.
Solve the row and column directional derivative of image by using edge detection operator and then obtain the gradient image and angular image.Step 2.
Obtain nonmaxima suppression.Step 3 (two thresholds detection edge).
Here, assume that high threshold (Th) is 0.8 of cumulative histogram and low threshold (Tl) is 0.4 Th.Figure4 is the output result of two edge detection after adding the Gaussian noise to the Lena image and Figure 5 is the detection result of the Cameraman image. We can see from the figures that the operator proposed in this paper has the better performance.Result of Lena by LS-SVR operator and Canny operator.
(a)
Result of LS-SVR (SNR = 15 dB)
(b)
Result of Canny (SNR = 15 dB)
(c)
Result of LS-SVR (SNR = 10 dB)
(d)
Result of Canny (SNR = 10 dB)Result of 15 dB Cameraman by LS-SVR operator and Canny operator.
(a)
Result of LS-SVR
(b)
Result of Canny


### 4.3. Comparison of One Dimension and Two Dimension Operator

For the separable signal, two dimension edge detection windows operator can be obtained via one dimension edge detection operator according to tensor product format [4]. Assuming that the scale of one dimension edge detection operator H
′ educed from formula (1) is 2
d
+
1, the two dimension edge detection operator can be obtained via the following formula:
(48)
H
d
x
=
H
H
′
T
,
H
d
y
=
H
d
x
T
,
whereHdxandHdy are the column and row directional two dimension edge detection operator of size [
2
d
+
1
]
×
[
2
d
+
1
], respectively.The Gaussian function has the two dimension separability; for example, the column directional Canny’s edge detection operator may be decomposed into product of the column directional one dimension Gaussian function derivative and the row directional Gaussian smooth filter operator; that is, the two dimension optimal edge detection operator may be obtained via one dimension optimal operator according to formula (48). Just according to the characteristic of the Gaussian function, Canny extended the one dimension optimal operator to a two dimension operator. From the view of optimal filter, we think the two dimensions extend form of the one dimension optimal filter obtained via formula (48) which just only is the approximation of two dimension optimal filter. We take Canny’s edge detection operator as an example to validate the conclusion as follows.According to the improved one dimension criterion that is proposed in this paper, this paper carries out experiments for one dimension Canny’s edge detection operator according to (45), where the Gaussian function is of one dimension form as (46). Table 5 gives the optimal parameters of one dimension optimal Canny’s edge detection operator via experiment measurement. Utilizing variance presented in Table 5 to build two dimension edge detection operator via formula (48), the values of Σ and Λ obtained according to two dimension criterion are shown in Table 6. Comparing Table 4 with Table 6, we can see that the SNR of the two dimension operator built from the one dimension optimal filter declines more largely than the two dimension optimal filer; just the localization capability rises a little. But from the view of formula (45), the performance difference is larger. Therefore, we can draw a conclusion that utilizing tensor product format to extend one dimension optimal operator to two dimension operator just can obtain the approximation of two dimension optimal filter.Table 5
Optimal parameters of 1D Canny’s edge operator.
d
1
2
3
4
5
6
7
σ
2
0.33
0.73
1.07
1.50
2.04
2.66
3.34
Σ
0.7071
0.8605
0.9900
1.1069
1.2157
1.3129
1.3994
Λ
0.3774
0.4278
0.4180
0.3888
0.3610
0.3383
0.3199Table 6
2DΣ and Λ criterion value of Canny’s operator from 1D optimal filter.
d
1
2
3
4
5
6
7
σ
2
0.33
0.73
1.07
1.50
2.04
2.66
3.34
Σ
2
0.9449
2.2305
3.5903
5.3181
7.4819
9.9642
12.6860
Λ
2
0.0878
0.1977
0.2355
0.2434
0.2455
0.2467
0.2475


## 4.1. LS-SVR Approximate Ability

Our aim is to construct the required derivative operator via utilizing LS-SVR. According to SVM theory, we can obtain object function that is expressed by the radix of the high dimension space, that is, kernel function, and is one point that belongs to the whole function space. Obviously, so far we have not found this kernel function, and its finite linearity combination may express the arbitrary function in the whole function space. Therefore, LS-SVR could only give the approximation of the required function. To review the approximate ability of LS-SVR to optimal edge detection operator, this paper provides experiment examples to illustrate.Figure1 presents the approximation curve of LS-SVR filter to the optimal edge detector for one dimension criterion Σ of size 2
d
+
1 and Table 1 presents the corresponding LS-SVR parameters value; we may see that LS-SVR could only construct the optimal filter for criterion Σ with d
=
1 and d
=
2 and the approximation filter for d
≥
3 and the optimization abiltiy about the filter only reach 90% of optimal value for d
=
10. When LS-SVR obtains the maximum according to the criterion Σ, the corresponding Λ value will deviate with the optimal value largely.Table 1
Optimal parameters of LS-SVR for good detection.
d
1
2
3
4
5
6
7
8
9
10
γ
9.78
4.69
0
0
0
0
0
0
0
0
σ
2
7.001
8.889
7.780
12.413
18.211
25.171
33.293
42.575
53.018
64.621Figure 1
Curve of LS-SVR performance for good detection.Figure2 presents the approximation curve of LS-SVR filter to the optimal filter for one dimension criterion Λ and Table 2 presents the corresponding parameters of LS-SVR. We can see form Figure 2 that the approximation curve of LS-SVR coincides with the theory curve; that is, LS-SVR can realize one dimension optimal edge detection filter for criterion Λ, but at this time the value of Σ2 is around 0.5, which is widely discrepant from the optimal value.Table 2
Optimal parameters of LS-SVR for good localization.
d
1
2
3
4
5
6
7
8
9
10
γ
9.11
0.51
0.18
0.06
0.69
0.41
0.61
0.69
0.51
0.30
σ
2
9.602
0.030
0.030
0.032
0.023
0.044
0.037
0.017
0.036
0.027Figure 2
Curve of LS-SVR performance for good localization.Figure3 is the approximation curve of LS-SVR filter to the two dimension optimal filter for criterion Σ; we can see that, when d
=
2, LS-SVR can realize the optimal filter for criterion Σ basically, but, when d
≥
3, the approximation capability of LS-SVR filter will be low apparently.Figure 3
Curve of 2D LS-SVR performance for good detection.In the approximation experiment for criterion Λ, we find that LS-SVR approximation capability is the worst; whend
=
2, LS-SVR could only obtain 70% optimization ability about ideal state, moreover, when d
≥
3, the maximum of Λ could not be improved obviously via utilizing LS-SVR. In fact, the worse approximation capability of LS-SVR to the criterion Λ could not influence us to use the LS-SVR to construct edge detection filter. We can see from the experiment that Λ changes very slowly with the LS-SVR parameter modification but Λ has a larger rate of change. The final result of the decision function according to product criterion is decided by the larger entry of change rate. Therefore, we can use LS-SVR to design the edge detection operator with better performance.


## 4.2. Optimization of a Combination of Σ and Λ

Criteria Σ and Λ have the mutex characteristic; we can see from Figures1 and 2 that the localization capability of the optimal filter for criterion Σ is poor and the signal SNR of the optimal filter for criterion Λ is poor. Therefore, we can only make a trade-off on the two criteria in the real application, and the concrete method is to utilize criteria Σ and Λ to construct one decision function, so as to find the filter that makes the two criteria reach the larger value at the same time and thinks it is the optimal.


### 4.2.1. Summation Criterion

Use the summation of criteria Σ and Λ to construct decision function; that is,(44)
J
=
Σ
+
μ
Λ
.Hereμ
>
0 is called adjustment coefficient. In the case of different scale, there is a great difference between the value of Σ and Λ, so different scale μ should choose different value.


### 4.2.2. Product Criterion ΣΛ

In the method the decision function is(45)
J
=
Σ
·
Λ
.This method is very often used. Canny has used the decision function as (43) to compute and obtain a conclusion that the Gaussian function is the approximation of the one dimension optimal filter and extended it to two dimension edge detection. According to this method, this paper utilizes LS-SVR to approximate two dimension column directional optimal filter; Some approximation results and corresponding parameters under several common scales are shown in Table 3.Table 3
The parameters of LS-SVR for 2D optimal filter.
d
1
2
3
4
5
6
7
γ
1
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
σ
2
85.00
4.86
8.62
13.80
20.30
28.12
37.25
Σ
2
1.5000
4.5284
9.1280
15.2770
22.9654
32.1946
42.9631
Λ
2
0.2500
0.2246
0.2261
0.2267
0.2270
0.2271
0.2272In this paper, we test Canny’s edge detection operator according to the proposed two dimension discrete criterion, and in the testing the Gaussian smoothness filter function used is(46)
H
g
(
i
,
j
)
=
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
.The first derivative of the column directional and the Laplacian operator are, respectively,(47)
H
g
′
(
i
,
j
)
=
-
j
σ
2
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
,
∇
g
2
(
i
,
j
)
=
(
j
2
+
i
2
σ
4
-
2
σ
2
)
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
.Since Canny’s operator is a linear operator, formula (45) and the standard Gaussian function have the same calculation result. Table 4 is the optimal parameters of Canny’s operator of generated scale.Table 4
Optimal parameters of Canny’s edge operator.
d
1
2
3
4
5
6
7
σ
2
0.41
0.80
1.32
2.00
2.82
3.76
4.84
Σ
2
1. 0773
2.4563
4.5218
7.2343
10.5046
14.2572
18.5671
Λ
2
0.0924
0.1849
0.2061
0.2094
0.2109
0.2126
0.2133From the data of Tables3 and 4, we can see that the localization capability of Canny’s operator is poorer than that of the operator obtained by LS-SVR, but on the noise resistance ability this operator solved in this paper has the greater advantages.In order to compare the two operators’ performance, this paper utilizes the Lena image and the Cameraman image of the 256 × 256 pels to be on simulation experiment. In the experiment, the used filter window is 5 × 5 neighborhood; the edge detection algorithm is as follows.Step 1.
Solve the row and column directional derivative of image by using edge detection operator and then obtain the gradient image and angular image.Step 2.
Obtain nonmaxima suppression.Step 3 (two thresholds detection edge).
Here, assume that high threshold (Th) is 0.8 of cumulative histogram and low threshold (Tl) is 0.4 Th.Figure4 is the output result of two edge detection after adding the Gaussian noise to the Lena image and Figure 5 is the detection result of the Cameraman image. We can see from the figures that the operator proposed in this paper has the better performance.Result of Lena by LS-SVR operator and Canny operator.
(a)
Result of LS-SVR (SNR = 15 dB)
(b)
Result of Canny (SNR = 15 dB)
(c)
Result of LS-SVR (SNR = 10 dB)
(d)
Result of Canny (SNR = 10 dB)Result of 15 dB Cameraman by LS-SVR operator and Canny operator.
(a)
Result of LS-SVR
(b)
Result of Canny


## 4.2.1. Summation Criterion

Use the summation of criteria Σ and Λ to construct decision function; that is,(44)
J
=
Σ
+
μ
Λ
.Hereμ
>
0 is called adjustment coefficient. In the case of different scale, there is a great difference between the value of Σ and Λ, so different scale μ should choose different value.


## 4.2.2. Product Criterion ΣΛ

In the method the decision function is(45)
J
=
Σ
·
Λ
.This method is very often used. Canny has used the decision function as (43) to compute and obtain a conclusion that the Gaussian function is the approximation of the one dimension optimal filter and extended it to two dimension edge detection. According to this method, this paper utilizes LS-SVR to approximate two dimension column directional optimal filter; Some approximation results and corresponding parameters under several common scales are shown in Table 3.Table 3
The parameters of LS-SVR for 2D optimal filter.
d
1
2
3
4
5
6
7
γ
1
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
0.1
E
-
9
σ
2
85.00
4.86
8.62
13.80
20.30
28.12
37.25
Σ
2
1.5000
4.5284
9.1280
15.2770
22.9654
32.1946
42.9631
Λ
2
0.2500
0.2246
0.2261
0.2267
0.2270
0.2271
0.2272In this paper, we test Canny’s edge detection operator according to the proposed two dimension discrete criterion, and in the testing the Gaussian smoothness filter function used is(46)
H
g
(
i
,
j
)
=
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
.The first derivative of the column directional and the Laplacian operator are, respectively,(47)
H
g
′
(
i
,
j
)
=
-
j
σ
2
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
,
∇
g
2
(
i
,
j
)
=
(
j
2
+
i
2
σ
4
-
2
σ
2
)
exp
⁡
(
-
(
i
2
+
j
2
)
2
σ
2
)
.Since Canny’s operator is a linear operator, formula (45) and the standard Gaussian function have the same calculation result. Table 4 is the optimal parameters of Canny’s operator of generated scale.Table 4
Optimal parameters of Canny’s edge operator.
d
1
2
3
4
5
6
7
σ
2
0.41
0.80
1.32
2.00
2.82
3.76
4.84
Σ
2
1. 0773
2.4563
4.5218
7.2343
10.5046
14.2572
18.5671
Λ
2
0.0924
0.1849
0.2061
0.2094
0.2109
0.2126
0.2133From the data of Tables3 and 4, we can see that the localization capability of Canny’s operator is poorer than that of the operator obtained by LS-SVR, but on the noise resistance ability this operator solved in this paper has the greater advantages.In order to compare the two operators’ performance, this paper utilizes the Lena image and the Cameraman image of the 256 × 256 pels to be on simulation experiment. In the experiment, the used filter window is 5 × 5 neighborhood; the edge detection algorithm is as follows.Step 1.
Solve the row and column directional derivative of image by using edge detection operator and then obtain the gradient image and angular image.Step 2.
Obtain nonmaxima suppression.Step 3 (two thresholds detection edge).
Here, assume that high threshold (Th) is 0.8 of cumulative histogram and low threshold (Tl) is 0.4 Th.Figure4 is the output result of two edge detection after adding the Gaussian noise to the Lena image and Figure 5 is the detection result of the Cameraman image. We can see from the figures that the operator proposed in this paper has the better performance.Result of Lena by LS-SVR operator and Canny operator.
(a)
Result of LS-SVR (SNR = 15 dB)
(b)
Result of Canny (SNR = 15 dB)
(c)
Result of LS-SVR (SNR = 10 dB)
(d)
Result of Canny (SNR = 10 dB)Result of 15 dB Cameraman by LS-SVR operator and Canny operator.
(a)
Result of LS-SVR
(b)
Result of Canny


## 4.3. Comparison of One Dimension and Two Dimension Operator

For the separable signal, two dimension edge detection windows operator can be obtained via one dimension edge detection operator according to tensor product format [4]. Assuming that the scale of one dimension edge detection operator H
′ educed from formula (1) is 2
d
+
1, the two dimension edge detection operator can be obtained via the following formula:
(48)
H
d
x
=
H
H
′
T
,
H
d
y
=
H
d
x
T
,
whereHdxandHdy are the column and row directional two dimension edge detection operator of size [
2
d
+
1
]
×
[
2
d
+
1
], respectively.The Gaussian function has the two dimension separability; for example, the column directional Canny’s edge detection operator may be decomposed into product of the column directional one dimension Gaussian function derivative and the row directional Gaussian smooth filter operator; that is, the two dimension optimal edge detection operator may be obtained via one dimension optimal operator according to formula (48). Just according to the characteristic of the Gaussian function, Canny extended the one dimension optimal operator to a two dimension operator. From the view of optimal filter, we think the two dimensions extend form of the one dimension optimal filter obtained via formula (48) which just only is the approximation of two dimension optimal filter. We take Canny’s edge detection operator as an example to validate the conclusion as follows.According to the improved one dimension criterion that is proposed in this paper, this paper carries out experiments for one dimension Canny’s edge detection operator according to (45), where the Gaussian function is of one dimension form as (46). Table 5 gives the optimal parameters of one dimension optimal Canny’s edge detection operator via experiment measurement. Utilizing variance presented in Table 5 to build two dimension edge detection operator via formula (48), the values of Σ and Λ obtained according to two dimension criterion are shown in Table 6. Comparing Table 4 with Table 6, we can see that the SNR of the two dimension operator built from the one dimension optimal filter declines more largely than the two dimension optimal filer; just the localization capability rises a little. But from the view of formula (45), the performance difference is larger. Therefore, we can draw a conclusion that utilizing tensor product format to extend one dimension optimal operator to two dimension operator just can obtain the approximation of two dimension optimal filter.Table 5
Optimal parameters of 1D Canny’s edge operator.
d
1
2
3
4
5
6
7
σ
2
0.33
0.73
1.07
1.50
2.04
2.66
3.34
Σ
0.7071
0.8605
0.9900
1.1069
1.2157
1.3129
1.3994
Λ
0.3774
0.4278
0.4180
0.3888
0.3610
0.3383
0.3199Table 6
2DΣ and Λ criterion value of Canny’s operator from 1D optimal filter.
d
1
2
3
4
5
6
7
σ
2
0.33
0.73
1.07
1.50
2.04
2.66
3.34
Σ
2
0.9449
2.2305
3.5903
5.3181
7.4819
9.9642
12.6860
Λ
2
0.0878
0.1977
0.2355
0.2434
0.2455
0.2467
0.2475


## 5. Multiscale Fusion

Image edge has different local intensity characteristics for the different factors such as obstruction, shadow, highlight, peak, and veins, so Marr pointed out that, in order to reliably detect edge, multi-non-scale edge operator should be used [19], and then Witkin and others developed the idea into scale space filtering technology. For the variance σ
2 of the Gaussian filter controls the image smoothness degree, in multiscale filter technology, take σ
2 as scale gene, via altering the value of σ
2 to reach the aim of multiscale filter, and apply it into multiscale Canny’s edge detection. But we can see from Table 4 that, for the definite edge detection windows, the Gaussian function that is only σ
2 is a particular value satisfying the optimal filter for product criterion ΣΛ, so this method via altering σ
2 to carry out multiscale edge detection is improper. Therefore, from the view of the optimal edge detection operator, multiscale edge detection can be realized only via converting the size of filter windows, but for the different filter windows parameters of edge detection filter are different, which only needs using different filter operator to realize the aim of multiscale detection, and with the size of filter windows increase, operation magnitude will increase geminately, which will bring much inconvenience to us in real application. In 1992, Mallat proposed the wavelet multiscale edge detection technology [20] and realized the multiscale edge detection via using approximate 3D spline function with the Gaussian function to construct two dimension spline function and using modulus maximum method in different scales. The aim of Mallat constructing the two dimension spline function is to make the edge detection operator of wavelet domain satisfy the wavelet admitting condition, to realize the signal reconstruction after transformation. But for the edge detection, we only need to judge whether one point is edge or not, namely, whether the modulus is the maximum or not after transformation. As long as the transformation satisfies Canny’s criteria, we may think it is one good transformation and need not to consider the reconstruction after the transformation. So, we can utilize one definite optimal edge detection operator to replace the filter of wavelet transformation in order to obtain the different scale edge and then realize multiscale edge detection via multiscale fusion technology. That is to say, we can construct big scale filter windows via downsampling method and obtain different scale edge via using single edge detection operator. In order to validate the presumption, experiments are carried out in this paper. The concrete method is as follows.Step 1.
Solve the derivative of row and column direction via utilizing LS-SVR operator whose size is 5 × 5.Step 2.
Construct filtering windows via row and column directional downsampled by two for each point of the original image and utilize 5 × 5 LS-SVR operator to solve the row and column derivative of the image.Step 3.
Multiply row directional derivative by column directional derivative obtained from Steps1 and 2, to obtain row directional and column directional derivative of two kinds of scale fusion and to solve the gradient value.Step 4.
Carry out nonmaxima suppression and two-threshold edge detection.The filter windows data, which is the 4 extraction of the originality image, has been obtained by Step2. Therefore, the comparative object employed the windows size which is defined 9 × 9 operator, and the same edge extraction method as the proposed 5 × 5 filter operater method. Figure 6 presents the comparesion results under the two methods about Lena and Cameraman image with 10 dB SNR. From the image we can see that the two methods have the close detection result, but the method proposed in this paper has a faster operation speed.Fusing result of downsampling and scale-up operator.
(a)
Fusing result of Lena by downsampling operator
(b)
Fusing result of Lena by 9 × 9 operator
(c)
Fusing result of Cameraman by downsampling operator
(d)
Fusing result of Cameraman by 9× 9 operator


## 6. Conclusion

Starting from the problem that the solving numerical derivative of image is an ill problem, this paper studies the edge detection operator design criterion. For locating inaccurate problem of the discrete localization criterion proposed by Demigny, this paper puts forward a new criterion expression of “good localization,” establishes the discrete expression of good detection and good localization criterion of two dimension edge detection operator, and then introduces the experiment to measure optimal parameters of two dimension Canny’s edge detection operator. In this paper, compare the obtained two dimension optimal Canny’s edge detection operators with the two dimension extended forms of one dimension optimal Canny’s edge detection operator and validate the conclusion that one dimension optimal filter tensor product just only is the approximation of two dimension optimal filter. We prove that LS-SVR is a smoothness filter, give the construct method, and realize the approximation of two dimension optimal edge detection operator via adjusting LS-SVR parameters. This paper proposes the utility method of using singleness operator to realize multiscale edge detection by referencing the multiscale analysis technology of the wavelets theory. This paper uses LS-SVR as the object function constructor and obtains LS-SVR parameter values of the optimal edge detection filter in the case of generated scale via the experiment. These LS-SVR parameters are irrelative from concrete application object, so we need not to consider LS-SVR learning problem in different application. Utilizing the given LS-SVR parameters, we can obtain not only the better edge detection operator but also the smoothness filter with the edge-preserving capability, which has the reference meaning for the smoothness filter design. This paper uses the Gaussian kernel function as kernel function of the least squares support vector machine, that is, takes the Gaussian function as the basis of function space to construct new function. For the limitation of the Gaussian function, this paper obtains merely the approximation that needs function, so construct the better kernel function is the father research task.



---

*Source: 419792-2014-03-06.xml*