# First- and Second-Order Full-Differential in Edge Analysis of Images

Authors: Dong-Mei Pu; Yu-Bo Yuan
Journal: The Scientific World Journal
 (2014)

---

## Abstract

Two concepts of first- and second-order differential of images are presented to deal with the changes of pixels. These are the basic ideas in
mathematics. We propose and reformulate them with a uniform definition framework. Based on our observation and analysis with the difference, we propose an algorithm to detect the edge from image. Experiments on Corel5K and PASCAL VOC 2007 are done to show the difference between the first order and the second order. After comparison with Canny operator and the proposed first-order differential, the main result is that the second-order differential has the better performance in analysis of changes of the context of images with good selection of control parameter.


---

## Body

## 1. Introduction

In 1920s, digital image edge detection is becoming an important technology in image processing. With the development of electronic technology, computer technology and communication technology, edge detection of digital image had become a hot issue with the high-speed development. After decades of development, edge detection of digital image processing technology has been widely applied in many important fields of industrial, microbial field, medicine, aerospace, and defense; extensive attention has been a technology powerhouse of the world [1].The development of processing technology of digital image edge detection in the recent 10 years is rapid. Many algorithms are published in each year after 1990s. Among of them, Canny, wavelet transform and log algorithms had important influence in edge detection. The same ideas are extracted from relevant knowledge of mathematics. These ideas also had been used in many important fields, such as digital signal processing, information theory and chroma and so on. Many other ideas are form neural network, genetic algorithm, artificial intelligence and fuzzy logic theory and so on [1–12].Modern digital image edge detection has three objectives: visualization, automation, and quantitative.(i)
Visualization: when the images are acquired and displayed, the image usually needs to be improved in order to be easier to the observer to explain them. The target of interest to highlight or image parts needs contrast enhancement. Since the advent of science, techniques like CT and MRI 3D imaging technique of visualization, especially the visualization of 3D structure, have attracted great attention.
(ii)
Automation: it aims to make some daily or tedious work automation. For example, according to the automatic determination system of chromosome karyotype of a chromosome distribution in the image, the system automatically generates differential leukocyte count report from a blood smear. Characteristics of these applications are the minimum human intervention, automatic complete the analysis work.By application of differential leukocyte count, commercially available systems are developed in the 1970s. But today, this task is carried out in a totally different way (by flow cytometry leukocyte count technology), that is, automatically.
(iii)
Quantitative: image edge is detected by quantitative examples, procedures for the measurement of arterial stenosis, and observing the localization and quantitation of special components in tissue sections with electron microscope (such as hemochromatosis, iron). In these applications, the aim is to allow human intervention because the processing time in these applications is not the principal contradiction.Edge detection in digital image processing carries on processing to the image edge with computer; this technology is a new field of application with the development of computer technology and opened up many aspects of the optics, electronics, mathematics convergence, photography, computer technology, and other disciplines. Edge detection of image processing as a discipline has been American Mathematical Society as a branch of applied mathematics. In its short development history, it has been successfully applied in almost all domains related to the formation of image. In recent years, image analysis and processing, realize tightly around the theory, application of three aspects of rapid development. It takes many subjects as the theoretical basis; it penetrated into many disciplines and became the theory practice, new branch occupying an important position in the field of high technology.


## 2. Concepts of Differential and of Total Differential of Images

From the views of human and machine visions, basically, we get the objection of image inR
2. Based on the fact, we redefined one image as an observation on the domain [
a
,
b
]
×
[
c
,
d
]
∈
R
2. In discrete spaces of R
2, one color image is denoted by matrix
(1)
I
=
(
P
11
P
12
⋯
P
1
n
P
21
P
22
⋯
P
2
n
⋯
⋯
⋯
⋯
⋯
P
m
1
P
m
2
⋯
P
m
n
)
,
where P is a pixel in color space of  R
3 with elementsred,green, andblue. 						(2)
P
=
(
P
R
P
G
P
b
)
.Definition 1.
In the discrete space, edgeE
∈
R
m
×
n of image I
∈
R
m
×
n is defined as the discontinuous image characteristics. In practice, it refers to the local image characteristics such as mutation, gray level, color change, and texture change. Edge widely exists in the target and objective, foreground and background, salient region and un-salient ones. It is an important feature in image segmentation, some compared images between images and their edges can be seen in Figure 1.Figure 1
Illustration of relation between image and edge.Mathematically, the basic idea of edge is the difference of neighbor pixels or the change of two points. In other words, the edge has very important relation with first- and second-order differential operators.Definition 2.
LetI
(
x
,
y
) be a continuous function in [
a
,
b
]
×
[
c
,
d
], given (
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
),(
x
0
+
Δ
x
,
y
0
+
Δ
y
)
∈
(
a
,
b
)
×
(
c
,
d
), the first difference is(3)
Δ
I
=
I
(
x
0
+
Δ
x
,
y
0
+
Δ
y
)
-
I
(
x
0
,
y
0
+
Δ
y
)
+
I
(
x
0
,
y
0
+
Δ
y
)
-
I
(
x
0
,
y
0
)
.
If
(4)
Δ
I
=
G
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
+
o
(
(
Δ
x
)
2
+
(
Δ
y
)
2
)
,
then we call that I
(
x
,
y
) is differentiable at point (
x
0
,
y
0
);
(5)
G
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
is the differential of I
(
x
,
y
) at point (
x
0
,
y
0
). We denote it as
(6)
d
I
=
G
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
.In general,(7)
d
I
=
A
(
x
0
,
y
0
)
Δ
x
+
B
(
x
0
,
y
0
)
Δ
y
.
Also, G
(
x
0
,
y
0
) is called the gradient of the image I
(
x
,
y
) at pixel (
x
0
,
y
0
), and
(8)
A
(
x
0
,
y
0
)
=
∂
I
∂
x
|
(
x
0
,
y
0
)
,
B
(
x
0
,
y
0
)
=
∂
I
∂
y
|
(
x
0
,
y
0
)
.Definition 3.
The edgeE with the first-order difference is defined as
(9)
E
(
x
0
,
y
0
)
=
{
1
,
if
∥
d
I
(
x
0
,
y
0
)
∥
>
c
1
,
(
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
)
;
0
,
if
∥
d
I
(
x
0
,
y
0
)
∥
≤
c
1
,
(
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
)
,
where ∥
·
∥ is somewhat norm which satisfied the basic rules of norm definition and c
1 is the control parameter to determine edge points.Definition 4.
LetI
(
x
,
y
) be a differentiable function in (
a
,
b
)
×
(
c
,
d
), given (
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
),(
x
0
+
Δ
x
,
y
0
+
Δ
y
)
∈
(
a
,
b
)
×
(
c
,
d
), the second difference is(10)
Δ
2
I
=
Δ
I
(
x
0
+
Δ
x
,
y
0
+
Δ
y
)
-
Δ
I
(
x
0
,
y
0
+
Δ
y
)
+
Δ
I
(
x
0
,
y
0
+
Δ
y
)
-
Δ
I
(
x
0
,
y
0
)
.
If
(11)
Δ
2
I
=
H
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
+
o
(
(
Δ
x
)
2
+
(
Δ
y
)
2
)
,
then we call that I
(
x
,
y
) is second differential at point (
x
0
,
y
0
);
(12)
H
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
is the differential of I
(
x
,
y
) at point (
x
0
,
y
0
). We denote it as
(13)
d
2
I
=
H
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
.In general,(14)
H
(
x
0
,
y
0
)
=
(
∂
2
I
∂
x
∂
x
∂
2
I
∂
x
∂
y
∂
2
I
∂
y
∂
x
∂
2
I
∂
y
∂
y
)
|
(
x
0
,
y
0
)
.Definition 5.
LetI
(
x
,
y
) be a twice differentiable function in (
a
,
b
)
×
(
c
,
d
), given (
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
), the twice differential of  I
(
x
,
y
) at point (
x
0
,
y
0
) is
(15)
d
2
I
(
x
0
,
y
0
)
=
(
Δ
x
Δ
y
)
H
(
x
0
,
y
0
)
(
Δ
x
Δ
y
)
.Definition 6.
The edgeE with the first-order difference is defined as
(16)
E
(
x
0
,
y
0
)
=
{
1
,
if
∥
d
2
I
(
x
0
,
y
0
)
∥
>
c
2
,
(
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
)
;
0
,
if
∥
d
2
I
(
x
0
,
y
0
)
∥
≤
c
2
,
(
x
0
,
y
0
)
∈
(
a
,
b
)
×
(
c
,
d
)
,
where ∥
·
∥ is somewhat matrix norm which satisfied the basic rules of matrix norm definition and c
2 is also the control parameter to determine edge points.


## 3. Algorithms

See Algorithm1.Algorithm 1:Edge Detection with First and Second Differential.
Input: Images D
=
{
I
1
,
I
2
,
I
3
,
…
,
I
N
}
,
I
i
∈
R
m
×
n and c
1
,
c
2;
Output: Edges of D, V
=
{
E
1
,
E
2
,
E
3
,
…
,
E
N
},
whereE
i
∈
R
m
×
n;
Step  1. Boundary processing D;
Step  2. Pre-processing D with rgb2gray (or rgb2hsv);
Step  3. Differential computing according to (7);
Step  4. Differential computing according to (15);
Step  5. Edge image according to (9);
Step  6. Edge image according to (16);
Step  7. End.


## 4. Experiments

In order to make our experiment convincing, we choose our experiment data from the well-known image datasets Corel5K and Pascal VOC 2007, which are widely used in image annotation.We selected some original pictures from these two databases. They are shown in Figure2. The Corel5K image corpus is a publicly available and widely used dataset in evaluating image annotation methods. It contains 5000 images from 50 themes with 100 images from each theme. Pascal VOC Challenge is a famous competition in computer vision which is run each year since 2005; the goal of this challenge is to recognize objects from a number of visual object classes in realistic scenes.Figure 2
Edge detection results with first and second differential.We employ Canny operator (a well-known edge detector) as the baseline. After employing the algorithms, we can obtain the conclusion that the twice-order differential is more effective to detect the edge from the given data sets of images. Some excellent results can be shown in Figure2.


## 5. Conclusions

The concepts of first- and second-order differential of images are proposed to deal with the changes of pixels. A uniform definition framework of them is presented. After careful observation and analysis of the difference, we employ them to study the edge detection of images. Experiments on Corel5K and PASCAL VOC 2007 can show the difference between the first order and the second order. The important is that the second-order differential has the better performance in analysis of changes of the context of images.



---

*Source: 121928-2014-06-25.xml*