• Ei tuloksia

Getting the cumulative distribution from the image data seems to be difficult task. Fast segmentation of particles will oversegment while good segmentation of particles takes too much computing time to be applicable for online detection. Particles are overlapping and

there are textured, multicoloured, arbitrary shaped and even partially transparent particles.

This makes good segmentation of the particles impossible. However perfect segmenta-tion is not needed for getting a nice estimate of the PSD. Instead of good segmentasegmenta-tion, we should learn what a specific PSD segmentation looks like. In this thesis we have ex-perimented segmentation with watershed transform, color clustering and region merging.

Also features extracted with Fourier transform are experimented.

6.7.1 Color clustering

K-means is a simple algorithm for cluster analysis. K-means takes an input vector of data points~xand the number of clustersK[32]. It returns an output vector~ywhich represents each data points assigned to one cluster. K-means algorithm goes as follows:

1. Make initial guesses forK amount cluster centroids 2. Attribute data points to the closest centroid

3. Move the cluster centroids to the mean of all data points belonging to that cluster 4. Repeat steps 2 and 3 until centroids no longer move

K-means clustering can be used for segmentation of the image by its color. Every pixel in the image is considered as a data point by their color. The location of the pixel is irrelevant. These data points are clustered with K-means clustering.

6.7.2 Statistical region merging

Statistical region merging(SRM) is a segmentation method that uses statistical basis for merging regions. It is used for remote sensing and medical image applications[33] [34].

SRM is based on the reconstruction of regions on the observed image based on unknown theoretical true image. I is an observation of a perfect sceneI∗that we do not know of.

The pixels in I∗are perfectly represented by a set of distributions, from which each of the observed color channel is sampled. Each color channel is replaced by a set of exactly Qindependent random variables. Controlling the scale of SRM segmentation is done by tuningQvariable. In 4-connective, there areN < 2|I|couples f adjacent pixels. LetSI be a real valued function, withpandp0 pixels ofI. SRM first sorts the couples ofSI in

Figure 13.Segmentation result by color clustering.

increasing order off(., .), and traverse this order only once. The for any current couple of pixels(p, p0)∈SIfor whichR(p)6=R(p0)the testP(R(p), R(p0)).R(p)stands for the current region R to which p belongs. MergeR(p)and R(p0) if the testP(R(p), R(p0)) returnstrue[35]. Figure 14 shows the segmentation result with SRM.

Figure 14.The segmentation result of SRM

6.7.3 Fourier transform

Fourier transform is used to change on image from the spatial domain to the frequency domain. The image is presented as a set of sinusoid functions. Fourier transform of a signalg(x, y)is defined as

F(g(x, y))(u, v) =

Z Z

−∞

g(x, y) exp−i2π(ux+vy)dxdy

[36]. The process takes complex valued imagesg(x, y)with zero imaginary component.

Fourier transform output consist of phase and magnitude. Figure 15 shows phase and logarithmic magnitude of fuorier transrom. The real value is the magnitude of sinusoid and the complex part is represents the phase. It is assumed that the images containing smaller particle size RDF has higher magnitude high frequencies in the fourier image.

associate with faster changes in the image. Fourier transform is applied to preprocessed images to estimate mean particle size of the image. In this experiment the ratio of low and high amplitudes in the Fourier image is used as a feature for mean particle size. The lowest frequencies are the pixels in the Fourier image that are in the center inside a circle of 6 pixel radius. Figure 16 shows an example image that is decomposed into low and high frequencies accordingly.

(a) (b) (c)

Figure 15. Fourier transform split to low and high frequencies (a) Fourier transform logarithmic magnitude (a) Fourier transform logarithmic magnitude (b) Fourier transform phase.

6.7.4 Watershed transform

Watershed transform is one method performing image segmentation originated from [37].

It is used for defining particle size distribution in river beds [38] [39]. The watershed transformation considers the image gradient magnitude as topographic surface where gray level of a pixels is interpreted as its altitude. Pixels having the highest gradient

magni-(a) (b)

Figure 16.Image split to low and high frequencies (a) Low frequency image. (b) High frequency image.

tude intensities are considered as watershed lines, which represents region boundaries. A drop of water falling on topographic relief flows along a path to local minimum. Pixels draining water to a common minimum are representing a segment. Figure 18 illustrated how watershed transform segments are formed. From each dotted line the water will be draining to a local minimum. Figure 17b illustrated how to avoid oversegmentation by suppressing insignificant minimums. The segmentation is demonstrated in figure 18.

watershed regions

(a)

M1 M2 M1

Watershed regions

(b)

Figure 17. Watershed transform illustrated in one-dimensional case (a) Watershed segmentation;

(b) Watershed segmentation with minimum suppress.

6.7.5 Superpixels

Superpixels algorithms groups pixels in perceptually meaningful pixel areas rather than rigid grid of pixels [40]. The simple linear iterative clustering(SLIC) algorithms is one of the state-of-the-art method which adapts k-means clustering to generate superpixels in

(a) (b)

Figure 18.Watershed transform result (a) Original image; (b) Watershed transform result.

similar way as [41]. Figure 19 illustrates the how image is segmented with SLIC super-pixels. Superpixels has a parameter predefined parameter which approximately defines the amount of segments in the image. There for it is not by it self application for defining particle size but may be useful as pre-processing.

(a) (b)

Figure 19.Superpixels segmentation with superpixels. (a) Original image; (b) SLIC superpixels

7 EXPERIMENTS AND RESULTS

This chapter describes the datasets and the experiments done in the thesis. Firstly The datasets are presented. Secondly tests and their results for choosing the most suitable tools for particle size analysis. Finally the results on particle size analysis are presented.

7.1 Datasets

The data for the first experiment consist of total of 48 images acquired from refuse derived fuel sample. We have acquired 16 images 3 different classes that have different particle size. Figure 20 illustrates the size difference of the particles showing one example from each class.

Figure 21 shows the cumulative distribution of each separated class of particle size. Red line is the empirical cumulative distribution(ECD) of the most bulkiest RDF in Figure 20a, green is the ECD of medium size RDF in figure20b and blue is ECD of the small size RDF in Figure 20c. ECD of each is defined by manually measuring the particles and forming a cumulative distribution of the results. These classes haved50value of 50 cm of the bulkiest RDF, 17 cm of middle size RDF and 7 cm of the small size RDF.

For testing purposes we produced also a dataset with different illumination using the camera flash of Canon EOS 450D. There are 8 pictures per class with the same ground truth as halogen light. For the mixed dataset, we mixed the previously known PSD to create new ones. Firstly, small and medium class has been mixed with equal volume from both classes. Similarly we mixed small and bulk class and also all classes in together.

The resulting PSD would be therefore a combination of the mixed PSD and the average particle size would be in between the classes where the mixture is originated from. Also 8 pictures of each mixed class has been taken using the halogen light. All the datasets are displayed in Table 2.