Keywords

1 Introduction

Camera-based process monitoring is a recently very popular method of supervising a production process. Quality control of products [11, 12], controlling processes [14, 15], object fault detection [5, 6, 16, 18] or anomaly detection [7] are good examples.

In this paper we propose a methodology of quality monitoring for processes observed by cameras. We illustrate its applicability by monitoring a process of combustion in an industrial gas burner. Subsequent camera images of the process under consideration are used for the process analysis.

A gas burner is a device which is used to generate a flame, in order to heat up products using a gaseous fuel such as acetylene, natural gas, or propane. In the case under consideration it is a natural gas (which is mainly methane) burner. The burner has an air inlet to mix the fuel gas with air, to enable complete combustion. Burner flames depend on air flow and we can register four states of burning process:

  1. 1.

    when the air hole is closed (yellow-white, laminar and lighting flame, see Fig. 1a)

  2. 2.

    the air hole is slightly open (orange-yellow, more turbulent flame, see Fig. 1b)

  3. 3.

    the air hole is not sufficiently open (yellow-blue flame, see Fig. 1c)

  4. 4.

    the air hole fully open (roaring blue flame see Fig. 1d).

We assume that a blue flame (hardly visible on the camera image) means that the process is an in-control state.

Fig. 1.
figure 1

Different states of a gas burner. (a) Laminar and lighting flame when the air hole is closed. (b) (c) Orange-yellow turbulent flame and yellow-blue flame when the air hole is slightly open or is not sufficiently open. (d) Roaring blue flame (normal state) when the air hole is sufficiently open (Color figure online).

In contrast to the other approaches (see for example [14]) the presented method is based on computing only the energy of a set of sub-images. Energy of an image is defined as a sum of image pixel values squared. In other words, the energy of an image is the squared Frobenius norm of this image treated as a matrix, or is the squared Euclidean norm of the image if it is represented as a vector.

Thus each image frame can be considered as a set of highly multidimensional observations. In the case of an appropriate partition of every frame, the same for every image, the proposed approach can be sufficiently informative in monitoring the state of the process under consideration.

A partition of each camera image is always the same and in fact it is fully content-dependent. In this paper we assume that the image partition is given (is performed by an expert). When a large set of image data is available, designing an adequate partition can be also stated as a learning problem.

Due to the very high dimensionality of image data the dimensionality reduction is rather necessary. Random projections seems to be a good choice in the case of image energy monitoring. Random projections based approaches have been widely used in computer science and machine learning applications and in image processing [1,2,3,4, 9, 17,18,19,20].

If sub-images are sufficiently large it is possible to estimate their energy using only a part of image pixels. Sparse random projections [1, 9] allows us to retrieve only 1 / 3 of whole image pixels whilst retaining an adequate precision of computations.

In this paper we propose to use simple monitoring charts of the Shewart type [13] based on squared norms of sparse image projections in normal state (i.e., in-control).

In the next Section we provide some information about random projections. Section 3 presents the Shewart-type control chart used in our monitoring system. Section 4 describes a simulation study performed on 144 images of a working gas burner. Finally, in Sect. 5 some brief conclusions are presented.

2 Random Projections

Random projections are closely related to the Johnson-Lindenstrauss lemma [8], which states that any set of N points in an Euclidean space can be embedded in an Euclidean space of lower dimension (\( \sim O(\log N)\)) with relatively small distortion of the distances between any pair of points from the set of points. The Johnson-Lindenstrauss-lemma has been shown to be useful in many applications in computer science [1,2,3,4, 9, 20], among many others.

The main idea of a random linear projection is that we can estimate the distance between two points (two vectors), let say u and z, in a d-dimensional Euclidean space \(D^{2}(u,z)= ||u -z||^{2}=(u-z)^{T}(u-z)\), \(u, \;z \in \mathcal {R}^{d}\) from the sample squared distances as follows:

$$\begin{aligned} \hat{D}^{2}(u,z)= \frac{1}{k}\sum _{j=1}^{k}(s_{j}(u-z))^2 = \frac{1}{k}||Su-Sz||^2, \end{aligned}$$
(1)

where \(s_j\) is the j-th row of S, i.e., individual projection.

Thus, for any chosen pair of vectors \(u, v \in \mathcal {R}^{d}\) \(E(\hat{D}^{2})=D^{2}\), \(var(\hat{D}^{2})= \frac{2}{k}D^4\) and \(\frac{k \hat{D}}{D^2} \sim \chi ^{2}_{k}\). These facts lead to the conclusion that

$$\begin{aligned} \Pr \left\{ \frac{|\hat{D}^{2}-D^{2}|}{D^{2}} \ge \varepsilon \right\} \le 2\, \exp \left( -\frac{k}{4}\varepsilon ^{2}+ \frac{k}{6}\varepsilon ^{3}\right) , \end{aligned}$$
(2)

where \(\varepsilon \in (0,1)\) (see for example [4, 20] for details). The same inequalities one can obtain for norms of vectors defined by the set of points under consideration.

2.1 Sparse Random Projections

We do not have to use \(s_{ij} \sim \mathcal {N}(0,1)\) for dimension reduction in the space with Euclidean norm. For example, we can sample \(s_{ij}\) from any subgaussian tails distributions [2, 9]. Sparse random projections proposed by Achlioptas [1] belong to this class.

Thus, to speed up the computations, one can generate a sparse random projection matrix for data dimensionality reduction. It is proved that the entries of projection matrix S can be chosen as independent \(+1,\;0, \;-1\) random variables.

A projection matrix composed from independent entries of the form:

$$\begin{aligned} s_{ij}= \left\{ \begin{array}{ccl} 1 &{}\;\text{ with } \text{ probability }&{} \frac{1}{2c} \\ 0 &{} \;\text{ with } \text{ probability } &{} 1-\frac{1}{c}\\ -1 &{} \;\text{ with } \text{ probability } &{} \frac{1}{2c}\\ \end{array} \right. \end{aligned}$$
(3)

with common factor \(\sqrt{c}\) leads to the projection distribution with subgaussian tails (at least up to a suitable threshold) [9].

An Achlioptas variant of this result (with \(c=3\)) has the entries attaining value 0 with probability 2 / 3 and values \(+1\) and \(-1\) with probability 1 / 6 each. This setting allows for computing the projection about 3 times faster than the Gaussian projection. Since S is sparse, only about one third of the entries are nonzero numbers.

This kind of sparse projection, i.e., with \(c=3\), we have used for processing a sequence of working gas burner images. Furthermore, the rows of the projection matrix were orthonomalized. This fact is not important from the point of our goals in this work, but it will be useful in a further more theoretical research on the topic of sparse random projections.

Let \(S_{O}\) denote such an orthonormalized matrix. It is easy to show that for any vector \(x \in \mathcal {R}^{d}\)

$$\begin{aligned} E\{ ||S_{O}x||^{2}= \frac{k}{d} ||x||^{2}. \end{aligned}$$

It should be emphasized that after random construction of the projection matrix, let us say \(S_{O}\), it is treated as unique, non-random projection matrix. Thus, further in the paper \(S_{O}\) will be represented an ordinary matrix.

3 Control Charts for Monitoring a Process Using Random Projections of Camera Images

Let \(p_{1}, p_{2}, \ldots , p_{N}\), denote a sequence of historical images (sub-images) in a normal (in-control) state. Each \(p_{i} \in [0,1]^d\) is a vector consisting of pixel intensity values and d is the number of pixels forming the image under consideration.

Let

$$\begin{aligned} x_{i}= \frac{1}{k} ||S_{O} p_{i}||^{2}, \end{aligned}$$
(4)

for \( \;i=1,2, \dots ,N\).

Now \(X_{h}=(x_{1}, x_{2}, \ldots , x_{N})\) denote a sequence of historical observations in a normal (in-control) state. Each observation \(x_{i} \in [0,1]\) is a real (non-negative) value obtained according to (4).

Although we do not make any assumption about distribution of \(X_{h}\), it is presumed that \(X_{h}\) is a sequence of independent observations taken from the same distribution. However, we suppose that \(X_{i}\) (i.e., observations treated as random variables) are approximately Gaussian. It is not clear how large (or may be small) should be projection dimension k. On the one hand, if k is large we can use the Central Limit Theorem as a an argument for a Gaussianity of \(X_{i}\), but on the other hand it is postulated [10] that typical k-dimensional projections of probability measures on \(R^d\) are approximately Gaussian when k is sufficiently small. It is in our opinion an open problem.

3.1 A Shewart Type Chart for Monitoring Energy of Images

Let \(m_{h}\) denote the mean value of \(X_{h}\) and \(s_{h}\) its standard deviation. The upper control limit (UCL) is computed as

$$\begin{aligned} UCL=m_{h}+3\,s_{h} \end{aligned}$$

and the lower control limit (LCL) is given by

$$\begin{aligned} LCL=m_{h}-3\,s_{h}. \end{aligned}$$

Let p be any observed image. The Shewart control chart for individual observations [13] allows us to decide that if

$$\begin{aligned} x=\frac{1}{k} ||S_{O} p||^{2} > UCL \end{aligned}$$

or

$$\begin{aligned} x=\frac{1}{k} ||S_{O} p||^{2} < LCL, \end{aligned}$$

then the system state connected with x (i.e., with image p) is not normal (is out-of-control). This simple test will be further used for monitoring separate parts of the whole burning process image. Thus, the final decision will be in conjunction with partial tests (the logical conjunction will be used). More technical details will be provided in the next section.

4 Simulation Study

A data set used for experiments consists of 144 images similar to that shown in Fig. 1. Each image has \(120 \times 352\) pixels, i.e., its vector dimension is 42240. Each image is assigned by an expert to one of the four classes (see Fig. 1). The overall quality of images is rather poor. We decided to not rely on color representation of the images since color-based segmentation of these images is too time-consuming. It occurred that pixel intensity in the gray scale is sufficient for the images analysis. As an alternative one can use red color channel (R) as very similar in the intensity values to the gray level image representation in this particular case. Each image in the sequence is divided into four sub-images consisting of \(0--120 \times 0-88\;\) (sub-image type A), \(0-120 \times 89-176\;\) (sub-image type B), \(0-120 \times 177-264\;\) (sub-image type C) and \(0-120 \times 265-352\;\) (sub-image type D) pixels of the original image.

The first ten images from the data set, which present normal gas burner state (see Fig. 1d), was used as historical data. The first image in this set indicates the state in-between normal state and some lack of air state. It was included into the normal state learning sequence, because we want to obtain a decision system robust to a very small shortage of air. On the basis of this subset the levels of alarm for the 4-dimensional chart were computed. Furthermore, the last ten images, which present “no-air” state (see Fig. 1a), was also used for providing the additional alarm levels for this state. Thus, the remainder of images (from 11 till 134) were used as a testing sequence.

Fig. 2.
figure 2

Mean energy of images A (blue line), B (yellow line), C (green line) and D (red line) (Color figure online).

Fig. 3.
figure 3

Mean energy of images A (blue line), B (yellow line), C (green line) and D (red line) estimated using \(k=10\) sparse random projections (Color figure online).

Figure 2 shows mean energy of sub-images (A, B, C, D) for all images in the data set. Corresponding mean energy of the images estimated using 10 and 100 random projections are drawn in Figs. 3, 4 and 5, respectively. One can observe, that estimated mean energy of the images (blue lines) is very close to its true values (yellow lines) even if dimensionality of the projection k is low.

The number of case images was rather restricted, but despite this we have obtained satisfactory results. We expect that larger image data sets allow us to design decision systems which could be used in practice.

Fig. 4.
figure 4

Mean energy of images A (blue line), B (yellow line), C (green line) and D (red line) estimated using \(k=100\) sparse random projections (Color figure online).

Fig. 5.
figure 5

Mean energy of images D – true values (yellow lines) and estimated using \(k=10\) (left panel) and \(k=100\) (right panel) sparse random projections (Color figure online).

Figure 6 illustrates decisions about alarm for the whole image sequence (144 items). The red line on zero level indicates the in-control state (the air inlet is sufficiently open). The red line on 1 level shows the out-of-control state (the air hole is too small). The alarming system works almost perfectly. It does not accept as normal positions 45, 50 and 53 very similar (but slightly lighter) to the mentioned earlier position 1 in the learning sequence. Removing testing based on sub-images type A results in no alarms at positions 45, 50 and 53 (see Fig. 7).

Fig. 6.
figure 6

Mean energy of images A, B,C, D – (violet, blue, yellow and green lines respectively) and estimated using \(k=10\) sparse random projections and a global alarm decision (red line) (Color figure online).

Fig. 7.
figure 7

Mean energy of images B,C, D – (blue, yellow and green lines respectively) and estimated using \(k=10\) sparse random projections and a global alarm level (red line) (Color figure online).

In a similar way as previously we can design a decision system which produces an additional alarm signal for the no-air state (see Fig. 1a). The system based on A, B, C and partial images and the last ten images labeled by an expert as connected with no-air state (closed air hole) indicates correctly all such cases. Additionally 6 images characterized by slightly turbulent flow (positions 24, 66, 74, 75 and 120, 121 also produce this kind of alarm. In fact this occurred when the air inlet was almost closed.

5 Comments and Conclusion

The method proposed here can be applied to other processes observed using a camera when relatively large image changes are important. The proposed control chart may also be used without dimensionality reduction by random projections. Our motivation behind applying a sparse random projection are twofold. First, we want to obtain simultaneously a really simple and fast algorithm. Second, it is suggested [10] that typical k-dimensional projections of probability measures on \(R^d\) are approximately Gaussian when k is sufficiently small. The problem of obtaining an adequate statistical model of the monitored sequence of images is outside the scope of this paper.