# Compressed Sensing Based Apple Image Measurement Matrix Selection

Authors: Ying Xiao; Wanlin Gao; Ganghong Zhang; Han Zhang
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

The purpose of this paper is to design a measurement matrix of apple image based on compressed sensing to realize low cost sampling apple image. Compressed sensing based apple image sampling method makes a breakthrough to the limitation of the Nyquist sampling theorem. By investigating the matrix measurement signal, the method can project a higher dimensional signal to a low-dimensional space for data compression and reconstruct the original image using less observed values. But this method requires that the measurement matrix and sparse transformation base satisfy the conditions of RIP or incoherence. Real time acquiring and transmitting apple image has great importance for monitoring the growth of fruit trees and efficiently picking apple. This paper firstly chooses sym5 wavelet base as apple image sparse transformation base, and then it uses Gaussian random matrices, Bernoulli random matrices, Partial Orthogonal random matrices, Partial Hadamard matrices, and Toeplitz matrices to measure apple images, respectively. Using the same measure quantity, we select the matrix that has best reconstruction effect as the apple image measurement matrix. The reconstruction PSNR values and runtime were used to compare and contrast the simulation results. According to the experiment results, this paper selects Partial Orthogonal random matrices as apple image measurement matrix.


---

## Body

## 1. Introduction

Conventional approaches to sample signal or images include four steps: sampling, compression, transmission, and decompression. In order to reduce the cost of sensor acquisition, transmission, and storage, a large number of researchers focus on data compressing and dimension reduction and so forth. But prior studies require users to first obtain the original data and store it and then compress and transmit the data. This process brings a great burden to the sensor. In practical applications, it is hard to satisfy the demand of collecting data in real time. On the contrary, if we use “sampling and compression” technology and obtain the compressed signal directly, it will enormously reduce the time and store space demand of acquisition data. Random matrix is common and easy to analyze. The process of the signal acquisition can be projected to dimension reduction, which can greatly realize data compression. Thereby CS has gathered widespread attention from researchers. For example, Toeplitz matrix and circulant matrix were applied to the linear dynamic systems [1–4]. The block diagonal matrix was applied to the distributed sensor system [5] and the initial forecast linear systems [6]. These random matrices acquire good effects in practice.Compressed sensing is a new sampling theory proposed in recent years; this theory makes a breakthrough on the limitation of the Nyquist sampling theorem. It has been proven that using a rate which is lower than the Nyquist rate to sample the signal and reconstruct the data is feasible. Data acquisition methods based on this theory use “sampling and compression” technology and obtain the compressed signal directly. CS requires the number of samples to be far less than conventional signal processing and these samples can recover the original signal exactly. This reduces the cost of the signal’s acquisition and transmission. CS brings a revolutionary breakthrough for information acquisition and processing technology. Currently, CS is applied in many fields, especially image processing. A number of results have developed based on CS theory. For example, Rice University professor Duarte and his colleagues developed a single-pixel [7], compressive sensing camera which was based on CS theory. This design included a new camera structure and is the most famous proof of concept model for CS.Based on “sampling and compression” technology, we acquire signal by projecting the high dimension signal to the low dimension space using measurement matrix. Measurement matrix is designed according to the characteristics of the signal. The measurement matrix and the sparse base must satisfy the restricted isometry property (RIP) conditions, which can reconstruct the original signal. Toeplitz matrix and circulant matrix have been applied in the channel estimation and synthetic aperture radar and so forth [2, 8–12]. Bajwa et al. study some matrix elements that obey Bernoulli distribution system in the literature, and follow-up studies argue that the matrix element is bounded random matrix or distributed Gaussian random matrix; in this case, these matrices can meet RIP conditions of the 2k-sparse vector quantity on time domain [2, 10].As the apple is one of China’s most important fruit species, the refined management of apple’s growing process is important to improve the yield, which means that the efficiency of apple image information system is of great importance. In this paper, we introduce the compressed sensing theory to the apple image acquisition process and improve both the speed and efficiency effectively. In the process of apple’s growth, a lot of apples images need to be acquired and transferred to monitor the growth status of apple, pest control, and the robots movements. This paper researches on using Gaussian random matrices, Bernoulli random matrices, Partial Orthogonal random matrices, Partial Hadamard matrices, and Toeplitz matrix to measure the apple image. With the same quantity condition, we select the best construction matrix as the apple image measurement matrix. The apple image measurement matrix is applied to the apple’s manufacturing operations process and overcomes the traditional method limit. It can reduce the cost of data acquisition and transmission. Thus it has very important practical significance.The main contributions of this paper are as follows: we give the first trial to apply the image acquisition to the apple growing process. We use “sampling and compression” technology and obtain the compressed signal directly, and it can enormously reduce the time and store space demand of acquisition data. By conducting experiments on real life images, we figure out the best measurement matrix and demonstrate the effectiveness and efficiency of our methods.


## 2. Materials and Methods

### 2.1. Theory of Compressed Sensing

Compressed sensing can sample and compress signals at the same time. It can obtain the compressed signal directly, which includes three core problems: sparse representation of a signal, the measurement matrix, and the reconstruction algorithm [13]. The theoretical framework is shown in Figure 1.Figure 1
Signal processing framework based on compressed sensing.CS relies on two principles: sparsity and incoherence. During signal conversation process, signal is represented by several big coefficients and leave out the rest of the coefficient which is not distortion of the signal. The most practical signals (such as voice and video signal) can have sparse representation in some transform domain. A sparse representation of the signal is to change the original signal through a mathematical transformation, after which the signal is projected onto the orthogonal transformation basis. If most of the transform coefficients have an absolute value of zero, we call it a sparse signal after the transformation. If the value of most of the transform coefficients is small and few large coefficients can capture the main information about the object, we call it an approximation sparse signal.X
=
[
X
1
,
X
2
,
X
3
,
…
,
X
n
] is a one-dimensional discrete signal of length N which represents a sparse form of the original signal in a transform basis; that is, (1)X=Ψα.In this expression, the coefficientai=[x,ψi]; the coefficient vector is a=ΨTX; the number of α’s nonzero coefficients is k. The transfer matrix Ψ=[ψ1,ψ2,ψ3,…,ψn] is the basis of the orthogonal transformation. It is more flexible in choosing them according to the characteristics of the original signal. The typical frequently used sparse transformation bases are Fourier basis, DCT basis, wavelet basis (wavelet domain), and so forth.After the sparse transformation of the original signal, it is different from the traditional Nyquist sampling theorem; compressed sensing samples a signal through designing the measurement matrixΦ. Φ can make high-dimensional signals projected onto a low-dimensional space to realize the compression of data. Finally, with the measurement vector in the low-dimensional projection domain, we can reconstruct the original signal nearly lossless as a linear equation. Consider (2)y=ΦX.In the formula above,y represents linear measurement of the sparse signal X, y∈RM is an M dimensional vector, and X∈RN is the unknown signal which needs to be reconstructed. Then, plugging (1) into (2),(3)y=ΦΨα.Φ is called the measurement matrix: Φ∈RM×N(M≪N); M is the set of measurement times in the process of compressed sensing theory; and N is the length of the signal. Measured value of the unknown signal X under the measurement matrix Φ is y. The measured value y is the compressed representation of X.The coherence between the measurement matrixΦ and the representation basis Ψ is(4)μΦ,Ψ=xmax1≤k,j≤nφk,ψj,μΦ,Ψ∈1,n.The coherence measures the largest correlation between any two elements ofΦ and Ψ which contain correlated elements [14]; the coherence μ is large. Otherwise, it is small.Signal reconstruction refers to the process in which we get a sparse signal with lengthN or the original discrete signal X again [15] through obtaining the measurement vector y by M times. The measurement matrix and sparse transformation base satisfy the conditions of RIP or incoherence. We can reconstruct the original signal X accurately or approximate it precisely by solving the problem of optimal L0 norm. X meets the type shown below:(5)X=argminX0s.t.y=ΦX.Solving the above equation is an NP-hard problem. Fortunately, prior work in compressed sensing has provided us with numerically feasible alternatives to this NP-hard problem. According to the theory of functional analysis and convex optimization, one major approach is that we can solve theL0 problem approximately through the L1 norm [16, 17].Common reconstruction algorithms include the interior-point method [18], Gradient Projection for Sparse Reconstruction (GPSR) [19], Homotopy algorithm [20], MP algorithm [21], Basis Pursuit (BP) algorithm [22], and Orthogonal Matching Pursuit algorithm. The interior-point algorithm is slow but generates very precise reconstructions. GPRS exhibits rapid computational speed and reconstruction results are generally better. Homotopy algorithm is more practical for small-scale problems.MP algorithm reconstruction is fast, but the reconstruction result is bad. BP algorithm suffers from slow reconstruction speed, but the results are better. OMP algorithm uses selection criteria in the matching pursuit. In the rebuild process, every iteration gets an atom that belongs to support set ofF from x. By orthogonalization of the selected atoms collection, we ensure the optimality of the iteration and reduce the number of iterations. In this paper, we have chosen the OMP algorithm for apple image reconstruction.


### 2.2. Selection on Measurement Matrix

Another premise of compressed sensing theory is incoherence. Incoherence belongs to the sensor model. The measurement matrixΦ and sparse base Ψ are multiplied to calculate the sensing matrix. In order to reconstruct the sparse signal, Candes and Tao proved that Φ must satisfy the isometry property (RIP) conditions. For any K-sparse signal and constant, it satisfies(6)1-δkc22≤ΦTc22≤1+δkc22,∀c∈RT.T
⊂
1
,
…
,
N
,
|
T
|
≤
K; ΦT is a child of the matrix composed of the related column indicated by the index T with the size of K×T. The matrix Φ then satisfies the restricted isometry property. The limited isometric property defines an important equidistant constant δk; it indicates that as long as δk is not close to 1, it can approximately promise the Euclidean distance of the constant S-order sparse signal. This ensures the uniqueness of the reconstructed signal.Designing the measurement matrix should satisfy the following conditions: transformation matrix should satisfy RIP conditions, or the measurement matrix and transformation matrix should meet incoherence. The previous researches prove that Gaussian random matrices, partial random Fourier matrix, Partial Hadamard matrix, Toeplitz matrix, Partial Orthogonal random matrices, Bernoulli random matrix, and so forth are feasible solutions. This paper selects the Gaussian random matrices, Bernoulli random matrices, Partial Orthogonal random matrices, Partial Hadamard matrices, and Toeplitz matrices on the apple image measurement.(1) Gaussian Random Measurement Matrix. The probability density function of random variable X is(7)fx=12πσe-x-μ2/2σ2,-∞<x<∞,where μ, σ(σ>0) are called parameters of normal distribution or Gaussian distribution. X is denoted by X~Nμ,σ2. For Gaussian distribution, we have EX=μ, and DX=σ2.The elementsxi,j of Gaussian random matrices Φ are independent random variables, which obey the Gaussian distribution with the mean of 0 and the square deviation of 1/n, namely, xi,j~N(0,1/n).(2) Bernoulli Random Measurement Matrices. Bernoulli distribution is a discrete probability distribution; when the Bernoulli trial succeeds, it results in Bernoulli random variable as a value A. Otherwise, it results in Bernoulli random variable as non-A. Bernoulli random matrices are the elements of the matrix Φ with the same probability with 1/n or -1/n.(3) Partial Orthogonal Random Matrices. If N order square A meets ATA=E, A is called orthogonal matrix; the sufficient and necessary conditions of the N order square matrix A are the fact that A column vector is standard orthogonal vector group.The method of constructing Partial Orthogonal measurement is illustrated as follows. We first generateN∗N dimension orthogonal matrix T, and then we randomly select M rows from T, construct the M∗N matrix, and then unite the N columns to get the measurement matrix.(4) Partial Hadamard Matrices. Hadamard matrix is orthogonal square matrix composed by elements of +1 and 1. The method of constructing Partial Hadamard matrix is illustrated as follows. We first generate Hadamard matrix N∗N, and then we, from the generated matrix, randomly select M row vector and generate M∗N Hadamard random measurement matrix.(5) Toeplitz Matrix. Toeplitz matrix is also known as diagonal-constant matrix, elements of line parallel to main diagonal line are the same. The method of constructing Toeplitz random measurement is illustrated as follows. First, we generate a random vector and then the random vector with related functions to generate the corresponding Toeplitz matrices; second, we select the first M rows of the Toeplitz constructed as M∗N Toeplitz random measurement matrix.


## 2.1. Theory of Compressed Sensing

Compressed sensing can sample and compress signals at the same time. It can obtain the compressed signal directly, which includes three core problems: sparse representation of a signal, the measurement matrix, and the reconstruction algorithm [13]. The theoretical framework is shown in Figure 1.Figure 1
Signal processing framework based on compressed sensing.CS relies on two principles: sparsity and incoherence. During signal conversation process, signal is represented by several big coefficients and leave out the rest of the coefficient which is not distortion of the signal. The most practical signals (such as voice and video signal) can have sparse representation in some transform domain. A sparse representation of the signal is to change the original signal through a mathematical transformation, after which the signal is projected onto the orthogonal transformation basis. If most of the transform coefficients have an absolute value of zero, we call it a sparse signal after the transformation. If the value of most of the transform coefficients is small and few large coefficients can capture the main information about the object, we call it an approximation sparse signal.X
=
[
X
1
,
X
2
,
X
3
,
…
,
X
n
] is a one-dimensional discrete signal of length N which represents a sparse form of the original signal in a transform basis; that is, (1)X=Ψα.In this expression, the coefficientai=[x,ψi]; the coefficient vector is a=ΨTX; the number of α’s nonzero coefficients is k. The transfer matrix Ψ=[ψ1,ψ2,ψ3,…,ψn] is the basis of the orthogonal transformation. It is more flexible in choosing them according to the characteristics of the original signal. The typical frequently used sparse transformation bases are Fourier basis, DCT basis, wavelet basis (wavelet domain), and so forth.After the sparse transformation of the original signal, it is different from the traditional Nyquist sampling theorem; compressed sensing samples a signal through designing the measurement matrixΦ. Φ can make high-dimensional signals projected onto a low-dimensional space to realize the compression of data. Finally, with the measurement vector in the low-dimensional projection domain, we can reconstruct the original signal nearly lossless as a linear equation. Consider (2)y=ΦX.In the formula above,y represents linear measurement of the sparse signal X, y∈RM is an M dimensional vector, and X∈RN is the unknown signal which needs to be reconstructed. Then, plugging (1) into (2),(3)y=ΦΨα.Φ is called the measurement matrix: Φ∈RM×N(M≪N); M is the set of measurement times in the process of compressed sensing theory; and N is the length of the signal. Measured value of the unknown signal X under the measurement matrix Φ is y. The measured value y is the compressed representation of X.The coherence between the measurement matrixΦ and the representation basis Ψ is(4)μΦ,Ψ=xmax1≤k,j≤nφk,ψj,μΦ,Ψ∈1,n.The coherence measures the largest correlation between any two elements ofΦ and Ψ which contain correlated elements [14]; the coherence μ is large. Otherwise, it is small.Signal reconstruction refers to the process in which we get a sparse signal with lengthN or the original discrete signal X again [15] through obtaining the measurement vector y by M times. The measurement matrix and sparse transformation base satisfy the conditions of RIP or incoherence. We can reconstruct the original signal X accurately or approximate it precisely by solving the problem of optimal L0 norm. X meets the type shown below:(5)X=argminX0s.t.y=ΦX.Solving the above equation is an NP-hard problem. Fortunately, prior work in compressed sensing has provided us with numerically feasible alternatives to this NP-hard problem. According to the theory of functional analysis and convex optimization, one major approach is that we can solve theL0 problem approximately through the L1 norm [16, 17].Common reconstruction algorithms include the interior-point method [18], Gradient Projection for Sparse Reconstruction (GPSR) [19], Homotopy algorithm [20], MP algorithm [21], Basis Pursuit (BP) algorithm [22], and Orthogonal Matching Pursuit algorithm. The interior-point algorithm is slow but generates very precise reconstructions. GPRS exhibits rapid computational speed and reconstruction results are generally better. Homotopy algorithm is more practical for small-scale problems.MP algorithm reconstruction is fast, but the reconstruction result is bad. BP algorithm suffers from slow reconstruction speed, but the results are better. OMP algorithm uses selection criteria in the matching pursuit. In the rebuild process, every iteration gets an atom that belongs to support set ofF from x. By orthogonalization of the selected atoms collection, we ensure the optimality of the iteration and reduce the number of iterations. In this paper, we have chosen the OMP algorithm for apple image reconstruction.


## 2.2. Selection on Measurement Matrix

Another premise of compressed sensing theory is incoherence. Incoherence belongs to the sensor model. The measurement matrixΦ and sparse base Ψ are multiplied to calculate the sensing matrix. In order to reconstruct the sparse signal, Candes and Tao proved that Φ must satisfy the isometry property (RIP) conditions. For any K-sparse signal and constant, it satisfies(6)1-δkc22≤ΦTc22≤1+δkc22,∀c∈RT.T
⊂
1
,
…
,
N
,
|
T
|
≤
K; ΦT is a child of the matrix composed of the related column indicated by the index T with the size of K×T. The matrix Φ then satisfies the restricted isometry property. The limited isometric property defines an important equidistant constant δk; it indicates that as long as δk is not close to 1, it can approximately promise the Euclidean distance of the constant S-order sparse signal. This ensures the uniqueness of the reconstructed signal.Designing the measurement matrix should satisfy the following conditions: transformation matrix should satisfy RIP conditions, or the measurement matrix and transformation matrix should meet incoherence. The previous researches prove that Gaussian random matrices, partial random Fourier matrix, Partial Hadamard matrix, Toeplitz matrix, Partial Orthogonal random matrices, Bernoulli random matrix, and so forth are feasible solutions. This paper selects the Gaussian random matrices, Bernoulli random matrices, Partial Orthogonal random matrices, Partial Hadamard matrices, and Toeplitz matrices on the apple image measurement.(1) Gaussian Random Measurement Matrix. The probability density function of random variable X is(7)fx=12πσe-x-μ2/2σ2,-∞<x<∞,where μ, σ(σ>0) are called parameters of normal distribution or Gaussian distribution. X is denoted by X~Nμ,σ2. For Gaussian distribution, we have EX=μ, and DX=σ2.The elementsxi,j of Gaussian random matrices Φ are independent random variables, which obey the Gaussian distribution with the mean of 0 and the square deviation of 1/n, namely, xi,j~N(0,1/n).(2) Bernoulli Random Measurement Matrices. Bernoulli distribution is a discrete probability distribution; when the Bernoulli trial succeeds, it results in Bernoulli random variable as a value A. Otherwise, it results in Bernoulli random variable as non-A. Bernoulli random matrices are the elements of the matrix Φ with the same probability with 1/n or -1/n.(3) Partial Orthogonal Random Matrices. If N order square A meets ATA=E, A is called orthogonal matrix; the sufficient and necessary conditions of the N order square matrix A are the fact that A column vector is standard orthogonal vector group.The method of constructing Partial Orthogonal measurement is illustrated as follows. We first generateN∗N dimension orthogonal matrix T, and then we randomly select M rows from T, construct the M∗N matrix, and then unite the N columns to get the measurement matrix.(4) Partial Hadamard Matrices. Hadamard matrix is orthogonal square matrix composed by elements of +1 and 1. The method of constructing Partial Hadamard matrix is illustrated as follows. We first generate Hadamard matrix N∗N, and then we, from the generated matrix, randomly select M row vector and generate M∗N Hadamard random measurement matrix.(5) Toeplitz Matrix. Toeplitz matrix is also known as diagonal-constant matrix, elements of line parallel to main diagonal line are the same. The method of constructing Toeplitz random measurement is illustrated as follows. First, we generate a random vector and then the random vector with related functions to generate the corresponding Toeplitz matrices; second, we select the first M rows of the Toeplitz constructed as M∗N Toeplitz random measurement matrix.


## 3. Results and Discussion

This paper chooses an apple image represented by256∗256 RGB pixels. We use sym5 wavelet bases to represent the original apple image sparsely with random Gaussian measurement matrix (X~N(μ,σ2)), Bernoulli random matrices (X~B(n,p)), Partial Orthogonal random matrices, and Partial Hadamard matrices, and Toeplitz matrices are then used for observational measuring of the signal. Finally, the apple image is reconstructed by the OMP algorithm. The reconstructed PSNR values and runtime were used to compare and contrast the simulation results. The quality of the 5 reconstructed apple images is measured using PSNR. Figures 2–5 show time and PSNR scatter diagrams for 5 different measurement matrices used to reconstruct the apple image when the sampling point M takes different values.Figure 2
Reconstruction time and PSNR values of 5 different measurement matrices withM=150.Figure 3
Reconstruction time and PSNR values of 5 different measurement matrices withM=160.Figure 4
Reconstruction time and PSNR values of 5 different measurement matrices withM=170.Figure 5
Reconstruction time and PSNR values of 5 different measurement matrices withM=180.In this experiment, we vary the number of sampling pixels, for example,M=150, M=160, M=170, M=180, use sym5 wavelet base as sparse transformation base, sample with five different measurement matrices and reconstruct images through OMP algorithm. The experiment verified that the colorized apple image constructed by the partial orthogonal random matrices with a sym5 wavelet base had a higher quality.Figures6–9 compare the restored apple image by the CS reconstruction algorithm with the Toeplitz matrix and the Orthogonal matrix with the original apple image when the sampling point M assumes different values.Figure 6
Original image, Toeplitz matrix reconstruction image and partial orthogonal matrix reconstruction image withM=150.Figure 7
Original image, Toeplitz matrix reconstruction image and partial orthogonal matrix reconstruction image withM=160.Figure 8
Original image, Toeplitz matrix reconstruction image and partial orthogonal matrix reconstruction image withM=170.Figure 9
Original image, Toeplitz matrix reconstruction image and partial orthogonal matrix reconstruction image withM=180.The above results show the reconstruction precision of the Orthogonal measurement matrix and the Toeplitz measurement matrix. Under the condition of same sampling points, the quality of reconstruction image with the Orthogonal measurement matrix is much better than that of the reconstruction image with Toeplitz measurement matrix.In this paper, we choose the sampling points from 150 to 180. If we use too many points, that is, more than 180 points, the significance of using sampling methods is minimized. While if we use too few points, that is, less than 150 points, the effectiveness of our methods decline. Hence, between the tradeoff of effectiveness and complexity, we choose the sampling points from 150 and 180.Since PSNR is mostly commonly used to measure the quality of reconstruction images, we choose the PSNR score as measurement metric. SSIM is also a quality reconstruction metric, but it is more complicated to compute for which the formula involves a value for each pixel. We conduct experiments using SSIM metric and it demonstrates the superiority of our method, but it takes too much space in the paper; we do not list the details of the SSIM results.


## 4. Conclusion

This paper uses sym5 wavelet base as apple image sparse transformation base, and then it uses Gaussian random matrices, Bernoulli random matrices, Partial Orthogonal random matrices, Partial Hadamard matrices, and Toeplitz matrices to measure apple image, respectively. Using the same measure quantity, we select the matrix that has best reconstruction effect as the apple image measurement matrix. According to the experiment results, this paper selects Partial Orthogonal random matrices as apple image measurement matrix. This measurement matrix is used for the data processing of apple image; it can better realize image data compression and greatly reduced apple image sampling and transport cost, which has important application significance in the process of apple production operation.



---

*Source: 901073-2015-07-13.xml*