Triqubit-State Measurement-Based Image Edge Detection Algorithm

Zhonghua Wang* and Faliang Huang**

Abstract

Abstract: Aiming at the problem that the gradient-based edge detection operators are sensitive to the noise, causing the pseudo edges, a triqubit-state measurement-based edge detection algorithm is presented in this paper. Combing the image local and global structure information, the triqubit superposition states are used to represent the pixel features, so as to locate the image edge. Our algorithm consists of three steps. Firstly, the improved partial differential method is used to smooth the defect image. Secondly, the triqubit-state is characterized by three elements of the pixel saliency, edge statistical characteristics and gray scale contrast to achieve the defect image from the gray space to the quantum space mapping. Thirdly, the edge image is outputted according to the quantum measurement, local gradient maximization and neighborhood chain code searching. Compared with other methods, the simulation experiments indicate that our algorithm has less pseudo edges and higher edge detection accuracy.

Keywords: Edge Detection , Partial Differential Equation , Pixel Saliency , Qubit State , Quantum Measurement

1. Introduction

Edge detection is a terminology in image processing and computer vision, which aims at identifying points in a digital image where the image brightness changes sharply. It is foundation of the image sharpening and image segmentation, so as to play an important role on the image processing [1,2].

The gradient operator is a known technique for extracting features from various images. For example, the Sobel operator is based on first derivative operation, which is the simplest one that is selected for the implementation on hardware device. The Laplacian operator is a second derivative operator that is used to detect the zero-crossings of image intensity and often yields more exact edge detecting result. Unfortunately, they are apt to be affected by noise. The Canny operator, which is a widely used edge detection method, has the characteristices of low error rate and good localization of edge points, but its performance is very much dependent on the high and low thresholds used in the hysteresis thresholding stage [3]. Although many scholars try to improve the Sobel, the Laplacian, and the Canny operator performances, these operators still make the partial edge details missing. The mathematical morphology is the natural area for a rigorous formulation of many problems in image analysis, however, the definition of morphological operators needs a totally ordered lattice structure [4,5].

In recent years, the quantum theory is more and more widely applied in the field of digital signal processing, quantum computing, information storage, communication, and so on [6-8]. Eldar and Oppenheim [9] presented the quantum signal processing (QSP) theory for the first time. Combined the classical image processing algorithm with the QSP, the quantum-inspired edge detection algorithm was introduced [10,12], which is not subject to physical constraints and is a new way to solve the puzzling problems. However, the research of image processing methods on quantum mechanics are still in developing stage and need to be in-depth studied [13].

Therefore, we present an image edge detection algorithm based on triqubit-state measurement, which combines the image local and global structure information. The experiment results indicate that our method can extract the edge more completely and suppress the noise more better in various defect images.

The remainder of this paper is organized as follows. Section 2 introduces the quantum image processing theory. The triqubit-state edge detection algorithm is elaborated in Section 3. After Section 4 shows the experiment results, the conclusion is given in Section 5.

2. Quantum Image Representation

The flexible representation for quantum image is similar to the pixel representation for gray image, which captures the pixel gray level information and its corresponding position information.

2.1 Qubit Concept

A qubit is a two-state quantum system, denoted by the [TeX:] $$| 0 \rangle \text { and } | 1 \rangle$$ ground states, which is defined as follows.

(1)
[TeX:] $$\left\{ \begin{array} { l } { | \varphi \rangle = a | 0 \rangle + b | 1 \rangle } \\ { | a | ^ { 2 } + | b | ^ { 2 } = 1 } \end{array} \right.$$

where the a and b are the probability amplitudes of the [TeX:] $$| 0 \rangle \text { and } | 1 \rangle$$ ground states, respectively.

For a composite system [TeX:] $$| \psi \rangle$$ with n qubits, its quantum system is represented by the tensor product of the n qubits and 2n ground states, expressed by the formula (2).

(2)
[TeX:] $$\begin{aligned} | \psi \rangle & = | \varphi ^ { 1 } \rangle \otimes | \varphi ^ { 2 } \rangle \cdots \otimes | \varphi ^ { n } \rangle \\ & = a ^ { 1 } a ^ { 2 } \cdots a ^ { n } | 00 \cdots 0 \rangle + a ^ { 1 } a ^ { 2 } \cdots b ^ { n } | 00 \cdots 1 \rangle \cdots + b ^ { 1 } b ^ { 2 } \cdots b ^ { n } | 11 \cdots 1 \rangle \\ & = \sum _ { i = 0 } ^ { 2 ^ { n - 1 } } c ^ { i } | i \rangle \end{aligned}$$

where the i is the decimal number, the [TeX:] $$| i \rangle$$ indicates the ith basis vector, the ci is the probability amplitude of the [TeX:] $$| i \rangle \text { state and } \sum _ { i = 0 } ^ { 2 ^ { n - 1 } } \left| c ^ { i } \right| ^ { 2 } = 1$$ [9].

2.2 Measurement Assumption

The quantum measurement is implemented by a collection of operators {Mm} and its corresponding occurrence probability is given by the expression (3).

(3)
[TeX:] $$p ( m ) = \left\langle \psi \left| M _ { m } ^ { \dagger } M _ { m } \right| \psi \right\rangle$$

where the † indicates the conjugate transpose symbol and the [TeX:] $$\langle \psi |$$ is the conjugate transpose representation of the [TeX:] $$| \psi \rangle$$. After the quantum measurement, the quantum system collapses to one of all basis vectors, shown in the formula (4).

(4)
[TeX:] $$| \psi ^ { \prime } \rangle = \frac { M _ { i } | \psi \rangle } { \sqrt { \left\langle \psi \left| M _ { i } ^ { \dagger } M _ { i } \right| \psi \right\rangle } } = \frac { c ^ { i } } { \left| c ^ { i } \right| } | i \rangle$$

Provided that the ci is a real number,[TeX:] $$| \psi ^ { \prime } \rangle = | i \rangle$$. For n qubits system, if [TeX:] $$M _ { i } = | i \rangle \langle i |$$ is used as the measurement operator, the quantum system collapses to the specific [TeX:] $$| i \rangle$$ state with [TeX:] $$\left| c ^ { i } \right| ^ { 2 }$$ occurrence probability [10].

2.3 QSP Framework

The QSP is the signal processing method. As shown in the Fig. 1, it consists of three steps. Firstly, map the initial signal to the quantum space. Secondly, measure the quantum signal. Thirdly, remap the quantum collapse outcome to the traditional signal space [9].

Fig. 1.
QSP framework.
2.4 Quantum-Inspired Image Decomposition and Edge Detection

According to the relation between the image pixels built by means of a superposition of states in quantum mechanics, Xie and Xu [12] split an image into a series of characteristic sub-images, then a rule used to generate an operator for the image edge detection was constructed on basis of the subimage characteristics.

2.4.1 Image decomposition

Considering the pixels of three coordinates of (m, n-1), (m, n), and (m, n+1) in normalized image g , their gray levels are [TeX:] $$g _ { m , n - 1 } , g _ { m , n } , \text { and } g _ { m , n + 1 }$$, respectively. In this paper, we use the three pixels to constitute a three-qubit system, which is expressed by Eq. (5).

(5)
[TeX:] $$| g _ { m , n - 1 } g _ {m, n}g _ { m , n + 1 } \rangle = | g _ { m , n - 1 } \rangle \otimes | g _ { m , n } \rangle \otimes | g _ { m , n + 1 } \rangle = \sqrt { 1 - g _ { m, n - 1 } } \sqrt { 1 - g _ { m , n } } \sqrt { 1 - g _ { m , n + 1 } } | 000 \rangle + \\ \sqrt { 1 - g _ { m , n - 1 } } \sqrt { 1 - g _ { m , n } } \sqrt { g _ { m , n + 1 } } | 001 \rangle + \sqrt { 1 - g _ { m , n - 1 } } \sqrt { g _ { m , n } } \sqrt { 1 - g _ { m , n + 1 } } | 010 \rangle + \sqrt { 1 - g _ { m , n - 1 } } \sqrt { g _ { m , n } } \sqrt { g _ { m , n + 1 } } | 011 \rangle \\ + \sqrt { g _ { m , n - 1 } } \sqrt { 1 - g _ { m , n } } \sqrt { 1 - g _ { m , n + 1 } } | 100 \rangle + \sqrt { g _ { m , n - 1 } } \sqrt { 1 - g _ { m , n } } \sqrt { g _ { m , n + 1 } } | 101 \rangle + \sqrt { g _ { m , n - 1 } } \sqrt { g _ { m , n } } \sqrt { 1 - g _ { m , n + 1 } } | 110 \rangle \\ + \sqrt { g _ { m , n - 1 } } \sqrt { g _ { m , n } } \sqrt { g _ { m , n + 1 } } | 111 \rangle$$

where the probability of every state vector collapsed in the formula (5) is respectively used as the gray value of a new image matrix at the (m,n) pixel coordinate. Therefore, used the formula (5), the image is divided into eight sub-images.

2.4.2 Generating rule of edge detection operator

The square difference of the probability amplitude of any two sub-images, which own the same quantities of [TeX:] $$| 1 \rangle$$ ground state, constitutes the horizontal or vertical edge detection operator that is expressed by the formula (6) or (7).

(6)
[TeX:] $$\begin{array} { l } { O _ { 0 } ^ { h + } = \left( g _ { m , n + 1 } - g _ { m , n } \right) \left( 1 - g _ { m , n - 1 } \right) } \\ { O _ { 0 } ^ { h - } = \left( g _ { m , n - 1 } - g _ { m , n } \right) \left( 1 - g _ { m , n + 1 } \right) } \\ { O _ { 45 } ^ { h + } = \left( g _ { m - 1 , n + 1 } - g _ { m , n } \right) \left( 1 - g _ { m + 1 , n - 1 } \right) } \\ { O _ { 45 } ^ { h - } = \left( g _ { m + 1 , n - 1 } - g _ { m , n } \right) \left( 1 - g _ { m - 1 , n + 1 } \right) } \\ { O _ { - 45 } ^ { h + } = \left( g _ { m + 1 , n + 1 } - g _ { m , n } \right) \left( 1 - g _ { m - 1 , n - 1 } \right) } \\ { O _ { - 45 } ^ { h - } = \left( g _ { m - 1 , n - 1 } - g _ { m , n } \right) \left( 1 - g _ { m + 1 , n + 1 } \right) } \end{array}$$

(7)
[TeX:] $$\begin{array} { l } { O _ { 90 } ^ { v + } = \left( g _ { m + 1, n } - g _ { m , n } \right) \left( 1 - g _ { m -1, n } \right) } \\ { O _ {9 0 } ^ {v - } = \left( g _ { m-1 , n } - g _ { m , n } \right) \left( 1 - g _ { m+1 , n } \right) } \\ { O _ { -45 } ^ { v + } = \left( g _ { m + 1 , n - 1 } - g _ { m , n } \right) \left( 1 - g _ { m - 1 , n + 1 } \right) } \\ { O _ { -45 } ^ { v - } = \left( g _ { m - 1 , n + 1 } - g _ { m , n } \right) \left( 1 - g _ { m + 1 , n - 1 } \right) } \\ { O _ { 45 } ^ { v + } = \left( g _ { m + 1 , n + 1 } - g _ { m , n } \right) \left( 1 - g _ { m - 1 , n - 1 } \right) } \\ { O _ { 45 } ^ { v - } = \left( g _ { m - 1 , n - 1 } - g _ { m , n } \right) \left( 1 - g _ { m + 1 , n + 1 } \right) } \end{array}$$

where the superscript h and v, respectively represent the horizontal and vertical direction, the superscript plus and minus signs indicate the positive and negative jump, respectively, and the subscript numerical value shows the angle.

In the formulas (6) and (7), the six horizontal and vertical edge detection operators act on each pixel in g image respectively. For each pixel, the maximum value of the calculation results obtained by all horizontal detection operators is taken to constitute the corresponding pixel gray value of ghm image matrix, and the maximum value of the calculation results obtained by all vertical detection operators is also chosen to form the corresponding pixel gray value of gvm image matrix. Then, a new gray image matrix go is constituted by taking the maximum gray value for pixels in the same coordinate space in ghm and gvm matrices. Therefore, according to the pixel local and global characteristics in go image matrix, the image binarization processing is implemented by the conditional expression (8).

(8)
[TeX:] $$If\ \left( g _ { o } ( m , n ) > 2 \times t h \right) \text { and } \left( \left( \left( g _ { \operatorname { hm } } ( m , n ) \geq g _ { vm } ( m , n ) \right) \text { and } \left( g _ { o } ( m , n - 1 ) \leq g _ { o } ( m , n ) \right) \text { and } \left( g _ { o } ( m , n + 1 ) \leq g _ { o } ( m , n ) \right) \right)\right. \\ o r \left( \left( g _ { vm } , n \right) \geq g _ { hm } ( m , n ) \right) \text { and } \left( g _ { o } ( m - 1 , n ) \leq g _ { o } ( m , n ) \right) \text { and } \left( g _ { o } ( m + 1 , n ) \leq g _ { o } ( m , n ) \right) ) ) ) g ( m , n ) = 1; \\ else \ g ( m , n ) = 0$$

where th is the average gray level for go image.

3. Triqubit-State Measurement-Based Edge Detection Algorithm

It is known that a qubit or biqubit system merely characterizes one type or two types of information to detect image edges. Provided that more quantum bits are used to describe image information, there are rooms for improving edge detection precision. Image edges are a set of pixels whose gray levels have the feature of step change or ridge change. That is to say, there is a phenomenon that the pixel saliency change, edge statistical characteristics and gray scale contrast exist in image edge region. However, the noise appearance may cause the larger change of the pixel gray value so that it introduces the pseudo pixel saliency feature. In order to overcome the noise disturbance, the pixel’s edge statistical characteristics is used to suppress the noise. At the same time, in order to reduce the false edge caused by the perturbation of the pixel’s gray value, the gray scale contrast is adopted to improve the image edge detection accuracy.

In this paper, the information of pixel saliency, edge statistical characteristics and gray scale contrast in the various defect images is used to characterize a triqubit-state system, so as to present a novel triqubit-state measure-based edge detection algorithm to detect the image edge. Our algorithm consists of three steps. Firstly, the improved partial differential method is used to smooth the defect image. Secondly, the triqubit-state is characterized by three elements of pixel saliency, edge statistical characteristics and gray scale contrast to achieve the defect image from the gray space to the quantum space mapping. Thirdly, the edge image is outputted according to the quantum measurement, the local gradient maximization and 8-neighborhood chain code searching.

3.1 Improved Partial Differential Diffusion

Anisotropic partial differential diffusion can preserve or enhance the edge features while reduce the noise in image. The PM model is the classical partial differential diffusion method, expressed by the formulas (9) and (10). For the smooth area or edge area in image, it has ability to choose different diffusion strategies [14].

(9)
[TeX:] $$\left\{ \begin{array} { l } { \frac { \partial g } { \partial t } = \operatorname { div } ( c ( | \nabla g | ) \nabla g ) } \\ { g ( x , y , 0 ) = g _ { 0 } ( x , y ) } \end{array} \right.$$

(10)
[TeX:] $$c ( | \nabla g | ) = 1 / \left( 1 + \left( | \nabla g | / k ^ { 2 } \right) \right)$$

where [TeX:] $$| \nabla g |$$ represents the gradient magnitude, [TeX:] $$c ( | \nabla g | )$$ is the diffusion factor, div is the divergence operator, k is the gradient threshold and g0 is the original image.

Only considering the horizontal and vertical direction diffusion and ignoring the diagonal direction diffusion, the PM diffusion model causes the image edge blurring. In order to better preserve the edge and suppress the noise in the various defect images, the gradient magnitudes of 8 directions of 0°, 45°, 90°, 135°, 180°, -45°, -90°, and -135° are used in this paper, which are defined by Eq. (11) respectively.

(11)
[TeX:] $$\begin{array} { l } { | \nabla g | ^ { 0 } = g ( m , n + 1 ) - g ( m , n ) } \\ { | \nabla g | ^ { 45 } = g ( m - 1 , n + 1 ) - g ( m , n ) } \\ { | \nabla g | ^ { 90 } = g ( m - 1 , n ) - g ( m , n ) } \\ { | \nabla g | ^ { 135 } = g ( m - 1 , n - 1 ) - g ( m , n ) } \\ { | \nabla g | ^ { 180 } = g ( m , n - 1 ) - g ( m , n ) } \\ { | \nabla g | ^ { - 135 } = g ( m + 1 , n - 1 ) - g ( m , n ) } \\ { | \nabla g | ^ { - 90 } = g ( m + 1 , n ) - g ( m , n ) } \\ { | \nabla g | ^ { -45 } = g ( m + 1 , n + 1 ) - g ( m , n ) } \end{array}$$

In Eq. (10), the diffusion factor c is redefined and the diffusion coefficient of each direction is determined by the gradient magnitude of the direction. As seen in Eq. (12), the larger the gradient magnitude of a certain direction, the smaller the diffusion coefficient in the direction.

(12)
[TeX:] $$\left[ \begin{array} { l } { c ^ { 0 } = 1 / \left( 1 + \left( | \nabla g | ^ { 0 } / k ^ { 2 } \right) \right) } \\ { c ^ { 45 } = 1 / \left( 1 + \left( | \nabla g | ^ { 45 } / k ^ { 2 } \right) \right) } \\ { c ^ { 90 } = 1 / \left( 1 + \left( | \nabla g | ^ { 90 } / k ^ { 2 } \right) \right) } \\ { c ^ { 135 } = 1 / \left( 1 + \left( | \nabla g | ^ { 135 } / k ^ { 2 } \right) \right) } \\ { c ^ { 180 } = 1 / \left( 1 + \left( | \nabla g | ^ { 180 } / k ^ { 2 } \right) \right) } \\ { c ^ { - 135 } = 1 / \left( 1 + \left( | \nabla g | ^ { - 135 } / k ^ { 2 } \right) \right) } \\ { c ^ { -90 } = 1 / \left( 1 + \left( | \nabla g | ^ { - 90 } / k ^ { 2 } \right) \right) } \\ { c ^ { - 45 } = 1 / \left( 1 + \left( | \nabla g | ^ { - 45 } / k ^ { 2 } \right) \right) } \end{array} \right.$$

Therefore, according to the improved partial differential model, the enhanced image is obtained by using the iterative numerical equation (13).

(13)
[TeX:] $$g = g _ { 0 } + d t \times \left( c ^ { 0 } \times | \nabla g | ^ { 0 } + c ^ { 45 } \times | \nabla g | ^ { 45 } + c ^ { 90 } \times | \nabla g | ^ { 90 } + c ^ { 135 } \times | \nabla g | ^ { 135 } + c ^ { 180 } \times | \nabla g | ^ { 180 } + c ^ { -135 } \times | \nabla g | ^ { -135 } + c ^ { -90 } \times | \nabla g | ^ { -90 } + c ^ { -45 } \times | \nabla g | ^ { -45 })\right.$$

3.2 Triqubit Space Construction

As shown in Eq. (1), by using the quantum principle, each pixel in image can be mapped to a qubit state which is in 0 state, 1 state or superposition state of 0 and 1 ground states. However, in this paper, each pixel in image g is characterized by the [TeX:] $$\varphi _ { 1 } \varphi _ { 2 } \varphi _ { 3 }$$ triqubit. The [TeX:] $$\varphi _ { 1 } , \varphi _ { 2 } , \text { and } \varphi _ { 3 }$$, respectively represent the pixel saliency, edge statistical characteristics and gray scale contrast.

According to the superposition state theorem of quantum mechanics, the [TeX:] $$\varphi _ { 1 } \varphi _ { 2 } \varphi _ { 3 }$$ triqubit-state system has 8 ground states, which are the [TeX:] $$| 000 \rangle , | 001 \rangle , | 010 \rangle , | 011 \rangle , | 100 \rangle , | 101 \rangle , | 110 \rangle , \text { and } | 111 \rangle$$, then its triqubit tensor product can be described as follows.

(14)
[TeX:] $$| \psi \rangle = | \varphi _ { 1 } \rangle \otimes | \varphi _ { 2 } \rangle \otimes | \varphi _ { 3 } \rangle = \sqrt { 1 - p _ { 1 } ^ { 2 } } \sqrt { 1 - p _ { 2 } ^ { 2 } } \sqrt { 1 - p _ { 3 } ^ { 2 } } | 000 \rangle + \sqrt { 1 - p _ { 1 } ^ { 2 } } \sqrt { 1 - p _ { 2 } ^ { 2 } } p _ { 3 } | 001 \rangle \\ + \sqrt { 1 - p _ { 1 } ^ { 2 } } p _ { 2 } \sqrt { 1 - p _ { 3 } ^ { 2 } } | 010 \rangle + \sqrt { 1 - p _ { 1 } ^ { 2 } } p _ { 2 } p _ { 3 } | 011 \rangle + p _ { 1 } \sqrt { 1 - p _ { 2 } ^ { 2 } } \sqrt { 1 - p _ { 3 } ^ { 2 } } | 100 \rangle + \\ p _ { 1 } \sqrt { 1 - p _ { 2 } ^ { 2 } } p _ { 3 } | 101 \rangle + p _ { 1 } p _ { 2 } \sqrt { 1 - p _ { 3 } ^ { 2 } } | 110 \rangle + p _ { 1 } p _ { 2 } p _ { 3 } | 111 \rangle$$

where the [TeX:] $$p _ { 1 } ^ { 2 } , p _ { 2 } ^ { 2 } , \text { and } p _ { 3 } ^ { 2 }$$, respectively represent the probabilities with the quantum measure outcomes of the [TeX:] $$\varphi _ { 1 } , \varphi _ { 2 } , \text { and } \varphi _ { 3 }$$ that are all in 1 state, while the [TeX:] $$\sqrt { 1 - p _ { 1 } ^ { 2 } } , \sqrt { 1 - p _ { 2 } ^ { 2 } } , \text { and } \sqrt { 1 - p _ { 3 } ^ { 2 } }$$ show the probabilities with the quantum collapse results of the [TeX:] $$\varphi _ { 1 } , \varphi _ { 2 } , \text { and } \varphi _ { 3 }$$ that are all in 0 state, respectively.

3.2.1 1 [TeX:] $$\varphi _ { 1 }$$ qubit representation

The definitions of qubit [TeX:] $$\varphi _ { 1 }$$ that reflect the saliency of pixel’s gray level variation are shown in Eqs. (15)–(17).

(15)
[TeX:] $$| \varphi _ { 1 } \rangle = \sqrt { 1 - p _ { 1 } ^ { 2 } } | 0 \rangle + p _ { 1 } | 1 \rangle$$

where P1 is represented by the sinusoidal function, listed by Eq. (16). As shown in the formula (17), if the pixel is regarded as a salient point, we define that λ is between 0 and 1 to ensure that the sinusoidal angle in P1 function is between π/4 and π/2. Calculated by the formula (16), the salient pixel’s probability amplitude of [TeX:] $$| 1 \rangle$$ ground state is greater than 0.5 and less than or equal to 1. While the pixel is regarded as a non-salient point, we also define that λ is between -1 and 0 to ensure that the sinusoidal angle in 1 p function is between 0 and π/4. Calculated by the formula (16), the non-salient pixel’s probability amplitude of [TeX:] $$| 0 \rangle$$ ground state is distributed between 0 and [TeX:] $$\sqrt { 0.5 }$$.

(16)
[TeX:] $$p _ { 1 } ( m , n ) = \sin \left( \frac { \pi } { 4 } \lambda + \frac { \pi } { 4 } \right)$$

(17)
[TeX:] $$\lambda =\begin{cases} \frac { \frac { | \nabla g | } { g ( m , n ) + \varepsilon } - t h } { \frac { | \nabla g | } { g ( m , n ) + \varepsilon } } & \frac { | \nabla g ( m , n ) | } { g ( m , n ) + \varepsilon } > t h \\ \frac { \frac { | \nabla g | } { g ( m , n ) + \varepsilon } - t h } { t h } &\frac { | \nabla g ( m , n ) | } { g ( m , n ) + \varepsilon } \leq t h \end{cases} $$

where g(m,n) denotes the pixel’s gray scale at (m,n) coordinate in g image, [TeX:] $$| \nabla g ( m , n ) |$$ is the gradient magnitude corresponding to [TeX:] $$g ( m , n ) \text { pixel, } \frac { | \nabla g ( m , n ) | } { g ( m , n ) + \varepsilon }$$ is the pixel’s saliency value at (m,n) coordinate in g image, ε represents the any small constant and th is the image saliency threshold, distributed between 0.1 and 0.2.

Fig. 2.
A 3×3 neighborhood window.

Taking g(m,n) as the central pixel, its 3×3 neighborhood window is shown in Fig. 2, then the gradient magnitude [TeX:] $$| \nabla g ( m , n ) |$$ is calculated by Eqs. (18)–(19).

(18)
[TeX:] $$\left\{ \begin{array} { l } { a m _ { 0 } = | g ( m - 1 , n ) - g ( m + 1 , n ) | } \\ { a m _ { 45 } = | g ( m - 1 , n - 1 ) - g ( m + 1 , n + 1 ) | } \\ { a m _ { 90 } = | g ( m , n - 1 ) - g ( m , n + 1 ) | } \\ { a m _ { 135 } = | g ( m + 1 , n - 1 ) - g ( m - 1 , n + 1 ) | } \end{array} \right.$$

(19)
[TeX:] $$| \nabla g ( m , n ) | = \max \left\{ a m _ { 0 } , a m _ { 45 } , a m _ { 90 } , a m _ { 135 } \right\}$$

where [TeX:] $$a m _ { 0 } , a m _ { 45 } , a m _ { 90 } , \text { and } a m _ { 135 }$$ denote the directional gradient magnitudes of 0°, 45°, 90°, and 135°, respectively, then the maximum directional gradient magnitude is chosen as the gradient magnitude of g(m,n) pixel.

In summary, if a pixel saliency value is larger than the image saliency threshold th , it indicates that the pixel has significant gray scale change compared with its neighborhood pixels, then the pixel’s [TeX:] $$\varphi _ { 1 }$$ quantum measurement result is in 1 state and its occurrence probability [TeX:] $$p _ { 1 } ^ { 2 }$$ is distributed between 0.5 and 1. While a pixel saliency is less than or equal to th , it shows that the pixel has insignificant gray scale change compared with its neighborhood pixels, then its [TeX:] $$\varphi _ { 1 }$$ quantum collapse outcome is in 0 state and its occurrence probability [TeX:] $$p _ { 1 } ^ { 2 }$$ is between 0 and 0.5.

3.2.2 2 [TeX:] $$\varphi _ { 2 }$$ qubit representation

The [TeX:] $$\varphi _ { 2 }$$ qubit characterizes the pixel’s edge statistical characteristics and is introduced to improve the image edge detection reliability. In this paper, the probability amplitude of the pixel’s [TeX:] $$\varphi _ { 2 }$$ quantum collapse is defined by the formulas (20)–(22).

(20)
[TeX:] $$| \varphi _ { 2 } \rangle = \sqrt { 1 - p _ { 2 } ^ { 2 } } | 0 \rangle + p _ { 2 } | 1 \rangle$$

(21)
[TeX:] $$p _ { 2 } = \alpha \frac { x } { n }$$

(22)
[TeX:] $$\alpha = \begin{cases} 1 \operatorname { Min } ( \operatorname { Re } .1 ) > \operatorname { Max } ( \operatorname { Re } .2 ) \| \operatorname { Max } ( \operatorname { Re } .1 ) < \operatorname { Min } ( \operatorname { Re } .2 )\\ 0 \text { others } \end{cases}$$

where n, representing the central pixel’s neighborhood window width, is usually 3. In the central pixel’s neighborhood window, if both sides of the central pixel’s edge direction own the gray-level distribution characteristics, which the minimum value of gray scales on one side of its edge direction is larger than the maximum value of gray scales on the other side of its edge direction, α is set to 1, otherwise α is equal to 0. x is defined as the number of pixels with the same edge direction as the central pixel in the neighborhood window, containing the central pixel. Only if α=1 and x={2,3}, are satisfied, the central pixel is determined as an edge candidate pixel while it is judged as a non-edge pixel.

As shown in the Fig. 3, Re.1={95,97,92} and Re.2={75,70,76} show two regions of different gray levels, which are divided by the red solid line, indicating the central pixel’s edge direction. Since the α=1 and x={3} conditions are satisfied, the [TeX:] $$\varphi _ { 2 }$$ quantum measurement outcome is in 1 state and its occurrence probability [TeX:] $$p _ { 2 } ^ { 2 }$$ is in range of [4/9, 1] calculated by Eq. (21). Therefore, the central pixel of 82 gray value in Fig. 3 is judged as an edge candidate pixel.

Fig. 3.
Gray level distribution on both sides of the central pixel’s edge direction.
3.2.3 [TeX:] $$\varphi _ { 3 }$$ qubit representation

In order to further reduce the false edge caused by the perturbation of pixel gray scale, the pixel gray scale contrast is adopted to improve the edge detection accuracy. The qubit [TeX:] $$\varphi _ { 3 }$$ that represents the pixel’s gray scale contrast in the defect images is used to measure gray scale changing regions, shown in Eqs. (23) and (24).

(23)
[TeX:] $$| \varphi _ { 3 } \rangle = \sqrt { 1 - p _ { 3 } ^ { 2 } } | 0 \rangle + p _ { 3 } | 1 \rangle$$

(24)
[TeX:] $$p _ { 3 } = 1 - \sin \left( \frac { \pi } { 2 } \cdot e ^ { - \frac { g _ { \max } - g ( m , n ) + g ( m , n ) - g _ { min } } { 2 g ( m , n ) + \varepsilon } } \right)$$

where gmax and gmin, respectively denote the maximum gray scale and minimum gray scale in the 3×3 neighborhood window centered on (m,n) coordinate in g image, ε is any small constant.

As shown in the formula (24), if g(m,n) greatly deviates from gmax or gmin, p3 is close to 1, while g(m,n) approaches gmax and gmin, p3 is close to 0. When the [TeX:] $$\varphi _ { 3 }$$ quantum measurement result of g(m,n) pixel is in 1 state, which indicate that the pixel may be in the gray scale changing region, its occurrence probability [TeX:] $$p _ { 3 } ^ { 2 }$$ is between 0.36 and 1. On the contrary, its occurrence probability [TeX:] $$p _ { 3 } ^ { 2 }$$ is greater than or equal to 0 and less than 0.36.

3.3 Quantum Measurement

Each qubit state in the n-qubit system may be in 0 state, 1 state, or superposition state of 0 and 1 ground states. In order to determine a quantum system state at a certain time, it is necessary to carry out the quantum measurement. According to the third hypothesis of quantum mechanics theorem, if the measurement operator Mm is implemented to the quantum system, the occurrence probability with the m state can be obtained.

In the triqubit system, we construct a set of quantum measurement operators. As shown in Fig. 4 (delamination image or inclusion image), the aeronautical component image is divided into the background area and target area, and the target area is subdivided into the normal area and defect area marked with red box. The change of gray value is very small in the background area while the perturbation of gray value occurs in the target normal area, and the change of gray value in the defect area is between the background area and the target normal area. When the pixel’s [TeX:] $$\varphi _ { 3 }$$ quantum collapse outcome is in 0 state, it is indicated that the gray scales in the pixel’s neighborhood area very little. For this reason, when the pixel’s three-qubit system collapses to the [TeX:] $$| 000 \rangle , | 010 \rangle , | 100 \rangle \text { or } | 110 \rangle$$ state, it is determined to be in the background area. When the pixel’s [TeX:] $$\varphi _ { 3 }$$ quantum collapse outcome is in 1 state, the pixel’s three-qubit system collapses to the [TeX:] $$| 000 \rangle , | 010 \rangle , | 100 \rangle \text { or } | 110 \rangle$$ state, it is judged to be in the target normal and defect area. In the [TeX:] $$| 000 \rangle , | 010 \rangle , | 100 \rangle \text { or } | 110 \rangle$$ state, when the pixel’s [TeX:] $$\varphi _ { 1 }$$ quantum collapse outcome is in 1 state, indicating that the pixel has significant gray scale change compared with its neighborhood pixels, the pixel is judged as the edge pixel or the noise point. In order to overcome the noise disturbance, the pixel’s edge statistical characteristics is used to suppress the noise to improve the image edge detection accuracy. Thus when the pixel’s [TeX:] $$\varphi _ { 2 }$$ quantum collapse outcome is in 0 state, it is represented as the noise point, classified as a non-edge pixel, in the target area, while the pixel’s [TeX:] $$\varphi _ { 2 }$$ quantum collapse outcome is in 1 state, that is to say, the pixel’s quantum system collapses to the [TeX:] $$| 111 \rangle$$ state, it is labeled as an edge pixel, in the target area.

Fig. 4.
Edge detection result comparisons. (a) Edge detection in delamination image. (b) Edge detection in inclusion image.

In summary, if a pixel’s quantum measurement outcome is the [TeX:] $$| 000 \rangle , | 010 \rangle , | 100 \rangle , | 110 \rangle , | 001 \rangle$$ [TeX:] $$,| 011 \rangle \text { or } | 101 \rangle$$ state, the pixel is judged as a non-edge pixel. While a pixel’s quantum collapse outcome is the [TeX:] $$| 111 \rangle$$ state, the pixel is determined as an edge pixel. In this paper, the quantum collapse criteria of triqubit system are represented in the formula (25), where 0.5 and 0.36 are the empirical statistical values for the quantum state collapse.

(25)
[TeX:] $$ \text {Result} = | \varphi _ { 1 } \varphi _ { 2 } \varphi _ { 3 } \rangle = \begin{cases} 111 & p _ { 1 } ^ { 2 } \in ( 0.5,1 ] \& \& p _ { 2 } ^ { 2 } \in \left[ \frac { 4 } { 9 } , 1 \right] \& \& p _ { 3 } ^ { 2 } \in ( 0.36,1 ] \\ 110 & p _ { 1 } ^ { 2 } \in ( 0.5,1 ] \& \& p _ { 2 } ^ { 2 } \in \left[ \frac { 4 } { 9 } , 1 \right] \& \& p _ { 3 } ^ { 2 } \in [ 0,0.36 ]\\ 101 & p _ { 1 } ^ { 2 } \in ( 0.5,1 ] \& \& p _ { 2 } ^ { 2 } \in \left[ 0 , \frac { 4 } { 9 } \right) \& \& p _ { 3 } ^ { 2 } \in ( 0.36,1 ]\\ 100 & p _ { 1 } ^ { 2 } \in ( 0.5,1 ] \& \& p _ { 2 } ^ { 2 } \in \left[ 0 , \frac { 4 } { 9 } \right) \& \& p _ { 3 } ^ { 2 } \in [ 0,0.36 ]\\ 011 & p _ { 1 } ^ { 2 } \in [ 0,0.5 ] \& \& p _ { 2 } ^ { 2 } \in \left[ \frac { 4 } { 9 } , 1 \right] \& \& p _ { 3 } ^ { 2 } \in ( 0.36,1 ]\\ 010 & p _ { 1 } ^ { 2 } \in [ 0,0.5 ] \& \& p _ { 2 } ^ { 2 } \in \left[ \frac { 4 } { 9 } , 1 \right] \& \& p _ { 3 } ^ { 2 } \in [ 0,0.36 ]\\ 001 & p _ { 1 } ^ { 2 } \in [ 0,0.5 ] \& \& p _ { 2 } ^ { 2 } \in \left[ 0 , \frac { 4 } { 9 } \right) \& \& p _ { 3 } ^ { 2 } \in ( 0.36,1 ]\\ 000 & p _ { 1 } ^ { 2 } \in [ 0,0.5 ] \& \& p _ { 2 } ^ { 2 } \in \left[ 0 , \frac { 4 } { 9 } \right) \& \& p _ { 3 } ^ { 2 } \in [ 0,0.36 ] \end{cases} $$

3.4 Edge Connection

Through the quantum collapse process in Section 3.3, the output edges in the defect images may have an edge-over effect. In order to locate the edge position accurately, it is necessary to extract the gradient local maximum points and connect the broken edges. For the rough edge image output, remapped by the quantum collapse outcome, if a pixel gradient magnitude is greater than the gradient magnitudes of its neighborhood pixels, the pixel gray level is preserved, otherwise the pixel gray level is set to zero. Since the extraction of gradient local extremum points may lead to the edge fracture, 8-neighborhood chain code is used to connect the broken pixel, that is to say, the neighborhood pixels having the same gradient direction with the broken pixel should be added to the broken pixel set.

4. Experimental Result and Analysis

In this paper, our experiments were implemented by MATLAB 2013a on a computer with AMD Athlon II X2 240 2.80-GHz CPU, 4 GB RAM and Microsoft Windows 7 operating system.

Our algorithm consists of three steps. Firstly, the improved partial differential method is used to smooth the various defect images. Secondly, the triqubit-state is characterized by three elements of pixel saliency, edge statistical characteristics and gray scale contrast to achieve the defect images from the gray space to the quantum space mapping. Thirdly, according to the quantum measurement, local gradient maximization and 8-neighborhood chain code searching, the edge image is outputted. The output result of each process in our method is shown in Fig. 5.

Influenced by the material and manufacturing, the delamination and inclusion defects marked with red boxes are shown in Fig. 4. In this paper, the Sobel operator, Laplacian operator, Canny operator with high and low gradient thresholds, set 0.1 and 0.04, Kefu operator [12] and our method are respectively chosen to evaluate the edge detection performance, and their edge detection results are shown in Fig. 4, respectively.

As seen in Fig. 4, the experimental results show that the Sobel operators can preserve the image edge details, but also produce more pseudo edges. The Laplacian operator is sensitive to noise and makes the weak edges missing. Although the Canny operator preserves the defect region edges, it also introduces some pseudo edges. The Kefu operator causes the edge fracture or missing. However, our method effectively preserves the vast majority of the defect image edges and suppresses the noise to highlight the defect image contours clearly.

Fig. 5.
Edge detection procedure of our method. (a) Delamination image, (b) PM smoothing image, (c) triqubit edge location image, (d) local gradient maximization image, and (e) 8-neighborhood edge connection image.

In order to further validate the edge detection performance, we adopt the Pl quality factor and the GSSIM (global structural similarity index) as the objective evaluation indexes. The Pl [15] and GSSIM [16] are defined by the formulas (26) and (27).

(26)
[TeX:] $$P _ { \ell } = \frac { 1 } { \max \left\{ n _ { 0 } , n _ { d } \right\} } \sum _ { i = 1 } ^ { n _ { d } } \frac { 1 } { 1 + \partial d _ { i } ^ { 2 } }$$

(27)
[TeX:] $$G S S I M = \frac { \sum _ { x = 1 } ^ { M } \sum _ { y = 1 } ^ { N } \frac { \left( 2 \mu _ { x } \mu _ { y } + C _ { 1 } \right) \left( 2 \mu _ { x y } + C _ { 2 } \right) } { \left( \mu _ { x } ^ { 2 } + \mu _ { y } ^ { 2 } + C _ { 1 } \right) \left( \sigma _ { x } ^ { 2 } + \sigma _ { y } ^ { 2 } + C _ { 2 } \right) } } { M * N }$$

The Pl is in range of [0, 1]. The larger the Pl, the better the performance of the image edge detection. The GSSIM is also between 0 and 1. The larger the GSSIM, the smaller the image distortion.

In this paper, the Pl and GSSIM obtained by the Sobel operator, Laplacian operator, Canny operator, Kefu operator and our method are displayed in Tables 1 and 2.

Table 1.
Edge detection evaluation datum of delamination defect image
Table 2.
Edge detection evaluation datum of inclusion defect image

As seen in Tables 1 and 2, the Pl and GSSIM by adopting our algorithm are larger than that of other operators, indicating that our model can preserve more edge details and suppress more pseudo edges. For the defect image detection, though our method slightly prolongs the running time, we are more concerned with the edge detection accuracy rather than the running time.

5. Conclusion

The edge detection is the base of image segmentation, image understanding and recognition. In order to improve the edge detection precision in defect image, according to the pixel’s gray scale saliency, edge statistical characteristics and gray scale contrast in defect image, a triqubit-state measurementbased edge detection algorithm is proposed. Firstly, the improved PM model is used to smooth the defect image. Secondly, the triqubit space is constructed by the image edge regularity. Thirdly, the edge image is obtained by the quantum measurement, local gradient maximization and 8-neighborhood chain code searching. In the light of the objective evaluations of the image quality factor and global structural similarity index or the subjective visual evaluation, our algorithm can preserve more image edge details and suppress more noise.

Acknowledgement

The work is supported by the Natural Science Foundation of Province of China (No. 20132BAB201024 and 20161BAB202037), the Key Laboratory of Non-destructive Testing of Education Ministry of China (No. ZD201429005), the Science and Technology Research Project of Jiangxi Province Education Department of China (No. GJJ160696), the Jiangxi Province Key Laboratory of Water Information Cooperative Sensing and Intelligent Processing of China (No. 2016WICSIP007), and China Post-Doctoral Science Foundation (No. 2017M622108).

Biography

Zhonghua Wang
https://orcid.org/0000-0003-0265-6671

He was born in China in 1977. He received the Ph.D. degree in Control Science and Engineering from Huazhong University of Science and Technology, China, in 2011. He is currently an associate professor of Nanchang Hangkong University, China. His research interests include the image processing, pattern recognition and artificial intelligence. He has hosted or attended several National Natural Science Fund Projects of China. Triqubit-State Measurement-Based Image Edge Detection Algorithm

Biography

Faliang Huang
https://orcid.org/0000-0001-5561-4411

He was born in China in 1987. He received the Master degree in Electronic and Communication Engineering from Nanchang Hangkong University, China, in 2016. He is the engineer of Beijing Xinyihua Technology Co., Ltd. His research interests include the image processing and pattern recognition. He has attended several National Natural Science Fund Projects of China.

References

  • 1 P. Melin, C. I. Gonzalez, J. R. Castro, O. Mendoza, O. Castillo, "Edge-detection method for image processing based on generalized type-2 fuzzy logic," IEEE Transactions on Fuzzy Systems, vol. 22, no. 6, pp. 1515-1525, 2014.doi:[[[10.1109/TFUZZ.2013.2297159]]]
  • 2 C. S. Tseng, J. H. Wang, "Perceptual edge detection via entropy-driven gradient evaluation," IET Computer Vision, vol. 10, no. 2, pp. 163-171, 2016.doi:[[[10.1049/iet-cvi.2015.0030]]]
  • 3 S. Ansari, S. G. Prabhu, N. Kini, G. Hegde, Y. Haider, "A survey on conventional edge detection techniques," International Journal of Scientific Research in Computer Science Applications and Management Studies, vol. 3, no. 1, pp. 1-4, 2014.custom:[[[-]]]
  • 4 Y. X. Zhao, J. M. Han, Z. Y. Yang, W. J. Li, J. Q. Wang, "Recognition of welded joint contour by edge detection and mathematical morphology," Journal of Northeastern University, vol. 35, pp. 115-118, 2014.custom:[[[-]]]
  • 5 M. González-Hidalgo, S. Massanet, A. Mir, D. Ruiz-Aguilera, "On the choice of the pair conjunction–implication into the fuzzy morphological edge detector," IEEE Transactions on Fuzzy Systems, vol. 23, no. 4, pp. 872-884, 2015.doi:[[[10.1109/tfuzz.2014.2333060]]]
  • 6 R. S. Ingarden, Reports on Mathematical Physics, vol. 10, no. 1, pp. 43-72, 1976.custom:[[[-]]]
  • 7 P. E. Frenkel, M. Weiner, "Classical information storage in an n-level quantum system," Communications in Mathematical Physics, vol. 340, no. 2, pp. 563-574, 2015.doi:[[[10.1007/s00220-015-2463-0]]]
  • 8 C. Shukla, A. Pathak, "Hierarchical quantum communication," Physics Letters A, vol. 377, no. 19-20, pp. 1337-1344, 2013.doi:[[[10.1016/j.physleta.2013.04.010]]]
  • 9 Y. C. Eldar, A. V. Oppenheim, IEEE Signal Processing Magazine, vol. 19, no. 6, pp. 12-32, 2002.custom:[[[-]]]
  • 10 K. Xie, Research on Quantum Derivative Image Processing Method. Changsha, China: Central South University, 2007.custom:[[[-]]]
  • 11 Y. Dang, N. Jiang, H. Hu, W. Zhang, "Analysis and improvement of the quantum image matching," Quantum Information Processingarticle no. 269,, vol. 16, no. article 269, 2017.doi:[[[10.1007/s11128-017-1723-7]]]
  • 12 K. Xie, W. Xu, "Quantum-inspired image decomposition and edge detection," Jisuanji Yingyong/ Journal of Computer Applications, vol. 33, no. 4, pp. 1089-1091, 2013.doi:[[[10.3724/sp.j.1087.2013.01089]]]
  • 13 X. W. Fu, M. Y. Ding, C. P. Zhou, C. Cai, Y. G. Sun, "Research on image enhancement algorithms of medical images based on quantum probability statistics," Acta Electronica Sinica, vol. 38, no. 7, pp. 1590-1596, 2010.custom:[[[-]]]
  • 14 Z. Mbarki, H. Seddik, S. Tebini, E. B. Braiek, "A new rapid auto-adapting diffusion function for adaptive anisotropic image de-noising and sharply conserved edges," Computers Mathematics with Applications, vol. 74, no. 8, pp. 1751-1768, 2017.doi:[[[10.1016/j.camwa.2017.06.026]]]
  • 15 G. Wang, L. Xiao, A. He, "An improved computing method for the image edge detection," Chinese Optics Letters, vol. 5, no. 2, pp. 79-81, 2007.custom:[[[-]]]
  • 16 A. F. de Araujo, C. E. Constantinou, J. M. R. Tavares, "New artificial life model for image enhancement," Expert Systems with Applications, vol. 41, no. 13, pp. 5892-5906, 2014.doi:[[[10.1016/j.eswa.2014.03.029]]]

Table 1.

Edge detection evaluation datum of delamination defect image
Sobel Laplacian Canny Kefu Our method
Pl 0.549 0.490 0.579 0.539 0.795
GSSIM 0.563 0.555 0.661 0.610 0.804

Table 2.

Edge detection evaluation datum of inclusion defect image
Sobel Laplacian Canny Kefu Our method
Pl 0.708 0.411 0.579 0.905 0.936
GSSIM 0.705 0.446 0.661 0.816 0.831
QSP framework.
A 3×3 neighborhood window.
Gray level distribution on both sides of the central pixel’s edge direction.
Edge detection result comparisons. (a) Edge detection in delamination image. (b) Edge detection in inclusion image.
Edge detection procedure of our method. (a) Delamination image, (b) PM smoothing image, (c) triqubit edge location image, (d) local gradient maximization image, and (e) 8-neighborhood edge connection image.