• No results found

Implementing the circularly polarized light method for determining wall thickness of cellulosic fibres

N/A
N/A
Protected

Academic year: 2022

Share "Implementing the circularly polarized light method for determining wall thickness of cellulosic fibres"

Copied!
53
0
0

Loading.... (view fulltext now)

Full text

(1)

F 12014

Examensarbete 30 hp Juni 2012

Implementing the circularly

polarized light method for determining wall thickness of cellulosic fibres

Marcus Edvinsson

(2)

Teknisk- naturvetenskaplig fakultet UTH-enheten

Besöksadress:

Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0

Postadress:

Box 536 751 21 Uppsala

Telefon:

018 – 471 30 03

Telefax:

018 – 471 30 00

Hemsida:

http://www.teknat.uu.se/student

Abstract

Implementing the circularly polarized light method for determining wall thickness of cellulosic fibres

Marcus Edvinsson

The wall thickness of pulp fibers plays a major role in the paper industry, but it is currently not possible to measure this property without manual laboratory work. In 2007, researcher Ho Fan Jang patented a technique to automatically measure fiber wall thickness, combining the unique optical properties of pulp fibers with image analysis. In short, the method creates images through the use of an optical system resulting in color values which demonstrate the retardation of a particular wave length instead of the intensity. A device based on this patent has since been developed by Eurocon Analyzer. This thesis investigates the software aspects of this technique, using sample images generated by the Eurocon Analyzer prototype.

The software developed in this thesis has been subdivided into three groups for independent consideration. First being the problem of solving wall thickness for colors in the images. Secondly, the image analysis process of identifying fibers and good points for measuring them. Lastly, it is investigated how statistical analysis can be applied to improve results and derive other useful properties such as fiber coarseness.

With the use of this technique there are several problems which need to be overcome. One such problem is that it may be difficult to disambiguate the colors produced by fibers of different thickness. This complication may be reduced by using image analysis and statistical analysis. Another challenge can be that theoretical values often differ greatly from the observed values which makes the computational aspect of the method problematic. The results of this thesis show that the effects of these problems can be greatly reduced and that the method offers promising results.

The results clearly distinguish between and show the expected characteristics of different pulp samples, but more qualitative reference measurements are needed in order to draw conclusions on the correctness of the results.

Examinator: Tomas Nyberg

Ämnesgranskare: Cris Luengo

Handledare: Thomas Storsjö

(3)

Contents

1 Introduction 4

1.1 Background . . . . 4

1.2 Purpose . . . . 4

1.3 Outline . . . . 4

2 An Introduction to Pulp Fiber Morphology and Properties 6 2.1 Anatomy of Wood Fibers . . . . 6

2.2 Variations in Fiber Properties . . . . 6

2.3 How FWT and FA Correlate with Paper Quality . . . . 7

2.3.1 Surface Texture . . . . 7

2.3.2 Mechanical Properties . . . . 7

3 Theory 9 3.1 Optical Properties of Fibers . . . . 9

3.2 Experimental Setup . . . . 9

3.3 Derivation of Equations . . . . 11

4 Solving SLT and FA for RGB Values 13 4.1 Error Estimation . . . . 14

4.1.1 Error in RGB Domain . . . . 14

4.1.2 Error in the SLT/FA Domain . . . . 14

4.1.3 Likelihood Evaluation . . . . 15

4.2 Constraints . . . . 15

4.3 Methods . . . . 16

4.3.1 Levenberg-Marquardt Algorithm . . . . 17

4.3.2 Brute-Force Search Algorithm . . . . 17

4.4 Validation . . . . 18

4.4.1 Using Theoretical Color Chart . . . . 19

4.4.2 Using Theoretical Color Chart with Added Noise . . . . . 22

4.4.3 Summary . . . . 26

5 Image Analysis 27 5.1 Where to Measure . . . . 27

5.2 Motivation for Chosen Method . . . . 28

5.3 Algorithm . . . . 29

5.3.1 General Procedure . . . . 29

5.3.2 Binary Image . . . . 30

5.3.3 Identifying Bad Regions . . . . 31

5.4 Evaluation . . . . 34

5.5 Challenges and Improvements . . . . 37

6 Results, Evaluation and Data Fitting 39 6.1 Samples . . . . 39

6.2 Results . . . . 40

6.2.1 Measured . . . . 40

6.2.2 Fitting FWT Distributions . . . . 43

6.2.3 Derived Measurements . . . . 46

6.3 Discussion and Conclusion . . . . 48

(4)

6.3.1 Evaluation . . . . 48

6.3.2 Problems . . . . 49

6.3.3 Possible Improvements . . . . 49

6.3.4 Conclusion . . . . 50

(5)

1 Introduction

1.1 Background

The wall thickness of pulp fibers has long been of great interest to the paper in- dustry. Due to the strong correlation between wall thickness and paper quality, paper mills have long since attempted to regulate this property. The separation of thick and thin walled fibers can be achieved through the process of cyclonic separation. This is possible owning to the fact that thick walled fibers have a higher density than the thin walled ones. What has been lacking in the indus- tries is a fast method for measuring a certain pulp’s distribution of fiber wall thickness. There are several methods for measuring both fiber wall thickness as well as the related fiber coarseness, which can be defined as density per length, but all of these methods require laborious analysis of samples in a lab.

It is established knowledge that fiber walls act as optical retarders, a property which can be used to determine the thickness of the fiber wall. But only recently, with the development of faster computers and improved digital cameras, has this method been suggested as an in-production real-time measuring module.

In 2007, pulp and paper researcher Ho Fan Jang received a patent [12] for a device using this principle. His patent included a more complex and accurate mathematical model than previously proposed methods which exploit the optics of fibers. The patent also included instructions on how to practically implement his device. The rights to develop this device were then bought and developed by Eurocon Analyzer.

This thesis will investigate the software aspect of the Eurocon Analyzer device. The device described in Ho Fan Jang’s patent, is intended to create images of the pulp fibers through a polarized light system. The fiber wall thickness can then be calculated from the color variations within an image. To get a good measurement of fiber wall thickness, the mean and distributions of a multitude of images are needed. The over-arching solution can be seen to consist of three stages. The first stage is to establish the fiber wall’s correct thickness value by using a color value. The second is to use image analysis to decide which points of the image should be measured. Lastly, statistical analysis is employed to present and improve the results.

1.2 Purpose

This thesis was ordered by Eurocon Analyzer who sourced an external perspec- tive in order to identify possible alternative software solutions for their device.

They hoped too, that more extensive analysis, conducted externally, would be conducive in establishing the best method for implementation of the device. The qualitative potential of Ho Fan Jang’s method, including limitations, accuracy and potential improvements, is included as an important aspect of analysis.

1.3 Outline

This thesis will initially provide the reader with background information re-

garding the morphology of pulp fibers and how such properties effect paper

making. The theory behind the used optics will then be explained. Proceeding

this background, follow the three main sections of the thesis, commencing with

(6)

how to solve fiber wall thickness from colors in the images, and consecutively the paper’s Image analysis section and a chapter on statistics and evaluation.

The content of these three main sections will be individually evaluated, whilst

the final chapter will also contain an evaluation of the thesis in its entirety.

(7)

2 An Introduction to Pulp Fiber Morphology and Properties

2.1 Anatomy of Wood Fibers

A wood fiber is composed of several walls and layers surrounding the fiber’s cen- tral cavity, called the lumen. The main purpose of this structure is to transport water and minerals from the roots to higher parts of the tree. This is accom- plished mainly through pressure differences due to evaporation in needles and

Primary wall S1-layer

S2-layer S3-layer

Lumen

θ

Figure 1: Principal sketch of fiber walls and layers.

leaves.[28] The structure of a fiber also serves as mechanical support for the trunk of the tree.

Fibers are made up of a primary outer wall P and and a secondary wall S, which is compiled of three layers, S 1 , S 2 and S 3 , as displayed in Figure 1. The primary wall has a thickness of 0.1 µm - 0.2 µm and is made of microfibers without any particular orientation.[28] The S 1 layer has a thickness of 0.05 µm - 0.35 µm with fibers angled at 70 - 80 , in alternating helices. The S 3 is simi- lar in its properties with a thickness of 0.05 µm - 0.15 µm and with fibers oriented close to perpendicular to the fiber axis.[23]

The S 2 layer stands for almost all varia- tion in the secondary wall, while properties of layers S 1 and S 3 remain quite constant.[28]

The thickness of the S 2 layer, which we will refer to as SLT, varies from 1 µm to 8 µm.

The fibers are arranged in a helix with an an- gle θ, which typically has values between 5 and 30 .[15] Henceforth, this angle θ will be referred to as FA and the total wall thickness will be referred to as FWT.

2.2 Variations in Fiber Properties

As mentioned above, fibers have two principal purposes; they function as both a delivery system and as mechanical support for the tree. During different seasons and stages of the trees life, these two attributes are of varying importance.

During Spring when the leaves are formed it is vital for the tree to carry lots of water and nutrition from the roots to the branches. The fibers are therefore typically broader with a thinner wall, resulting in a large lumen.[28] These fibers are called earlywood fibers, whilst those fibers formed during summer are referred to as latewood.

During Summer, when the tree does not need as much nutrition these late-

wood fibers are thinner, have a thicker wall and a smaller lumen. These types

of fibers have a higher density and provide better structural support. The same

patters occur in fast growing versus slow growing wood. A tree which grows

(8)

fast requires a larger amount of nutrition and therefore produces fibers with a larger lumen for better transportation of water and minerals.[28]

The age of the tree also correlates with fiber properties. The fibers of young trees are shorter, thinner and have thinner walls than older trees. The inner core of a older tree has therefore similar properties to juvenile wood.[28] A general rule for variations in fibers is that fast grown wood has fibers with a greater radius and thinner walls. Thin fiber walls also correlate with the microfibers in the S 2 -layer having a high orientation angle.

Table 1: Chart showing general trends in fiber properties among different wood types.

n.c. stands for “no correlation”.

Wood type FWT FA Length Radius

Early Low High n.c. Large

Late High Low n.c. Small

Juvenile Low High Short Small

Mature High Low Long Large

Fast growing Low High n.c. Large

Slow growing High Low n.c. Small

2.3 How FWT and FA Correlate with Paper Quality

The FWT property has been proven to relate to many properties of paper quality and is widely used within the paper industry. FA does not have as many useful applications, but some correlations with paper quality have been proposed.

Coarseness rather than FWT is usually what is correlated with certain paper qualities, mainly because coarseness historically has been easier to measure.

Coarseness is defined as mass per length.

2.3.1 Surface Texture

To get good printing results a smooth surface is crucial. Coarse fibers will cause an uneven surface with peaks and pits. Due to pressure on paper during printing, peaks may cause ink to spread down into surrounding lower areas. Pits in the paper may also cause ink free spots since the printer may lose contact with the paper.[27]

Another problem with coarse fibers is that they may decollapse during moist- ening. This will lead to a roughening of the paper’s surface and bad printing conditions.[27]

2.3.2 Mechanical Properties

The most important property related to tear strength is fiber length, but it has also been shown that a decreasing FWT results in higher tear strength.

Tensile strength is governed by several factors including surface area available

for bonding, fiber flexibility and degree of collapse. The impact of all of these

factors increases with a decreased FWT.[27]

(9)

It has also been shown that fibers with higher FA, for constant FWT, have

a higher elasticy modulus. As mentioned earlier this leads to the correlation

between increasing FA and an increasing tensile strength.[2]

(10)

3 Theory

3.1 Optical Properties of Fibers

A microfiber structure such as that of the secondary fiber wall is called uni- axial anisotropic. Such a structure acts as an optical retarder, since the wave components propagate faster in the microfiber direction.[8] The direction of the microfibers is called the optical and/or the fast axis.

The curled nature of the optical axis results in a very complicated system.

Therefore only light that passes through the middle of the fiber will be consid- ered. This light will always be perpendicular to the optical axis and the system can thus be viewed as a series of retarders.[8]

When light passes through the middle of a fiber it will pass through the S 2 layer twice, the first time this occurs, the fast axis will have an angle of θ and the second time an angle of−θ, with respect to the fiber direction. Since θ is less than 45 the two walls combined act as one retarder with a fast axis along the fiber direction. The S 1 and S 3 layers are much thinner and with a microfibrillar angle of approximately 90 in respect to the fiber direction. They will not greatly effect the optical characteristics of the fiber.

In conclusion, one fiber can be considered as a retarder with the fast axis along the fiber direction when light passes through the middle of the fiber per- pendicular to the fiber direction.

3.2 Experimental Setup

This section will explain why circularly polarized light and multiple color chan- nels are necessary for measuring the optical properties of fibers.

Below is the Jones matrix representation of a general retarder, where θ is the orientation of the fast axis with respect to the x-axis and ∆ is the retardation.[25]

B(∆, θ) =

 cos 2 θ + e i∆ sin 2 θ (1 − e i∆ ) cos θ sin θ (1 − e i∆ ) cos θ sin θ e i∆ cos 2 θ + sin 2 θ



(1) Hence the optical effects of the sample depend on its orientation, which complicates the measurement greatly, but with a special optical arrangement this problem can be avoided.

Consider the following Jones representations for polarizer P , analyzer A and output vector E.

P =

 p 1 p 2

 , A =

 a 11 a 12 a 21 a 22

 , E =

 e 1 e 2



(2) Multiplying them together in the order of their arrangement gives the output vector:

E = ABP (3)

The elements of the output vector E then take the following form.

e i = a i1 p 1 (cos 2 θ + e i∆ sin 2 θ)

+(a i1 p 2 + a i2 p 1 )(1 − e i∆ ) cos θ sin θ + a i2 p 2 (e i∆ cos 2 θ + sin 2 θ) (4)

(11)

If there is a polarizer and an analyzer (P , A), this results in the output light E being non-dependent on θ and non-zero. The system can thus be made orientation independent.

From the inspection of Equation 4 it is apparent that if the diagonal elements of B have equal scalars the trigonometric functions will be canceled out through the Pythagorean identity. Furthermore, the non-diagonal elements are equal and will cancel if one scalar is the negative of the other. These conditions are presented in Equation 5.

( a i1 p 1 = a i2 p 2 a i1 p 2 = −a i2 p 1

(5) The definition of the Jones vectors states that p 1 ∈ R and p 2 ∈ C.[13] To use the system to calculate changes in intensity the vector P also needs to be normalized, i.e. kP k = 1.

Given the definition of the Jones vectors, the condition of normalization and Equation 5, the following solution makes the element e i of E, non zero and independent of θ. Note that it is not necessary for both elements of E to be non-zero.

 a i1 a i2



= 1

√ 2

 1

±i



, P = 1

√ 2

 1

∓i



(6) These vectors represent left and right circular polarized light.[8] To create a circular polarized system a combination of linear polarizers and quarter retarders are used.[8]

A = A 0

Q −45

=

 1 0 0 0

 i + 1 2

 1 −i

−i 1



= e

4

√ 2

 1 −i

0 0

 (7)

P = Q 45

P 90

= i + 1 2

 1 i i 1

  1 0



= e

4

√ 2

 1 i



(8) Hence the system, as shown in Figure 2, will satisfy the condition of orien- tation independence.

45

S F F 45

S

Polarizer

Quarter-wave plate

Quarter-wave plate Sample

Analyzer Multi-wavelength

unpolarized light

To multi-channel detector

Figure 2: The optical setup. F and S represent the fast and slow axis of the retarders.

(12)

Since two unknown variables exists for each measurement, more than one frequency of light needs to be analyzed to calculate these unknowns. A light source of three distinct and non-overlapping channels is therefore chosen as well as a suitable camera as a detector.

3.3 Derivation of Equations

The Jones matrix for a fiber can be obtained by multiplying the Jones matrices for each layer of the fiber that light needs to pass through. The microfiber angle of layers S1 and S2 is approximated to π 4 . Below is the expression for an unrotated fiber sample.

S 0

= B(∆ S1 , π 4 )B(∆ S2 , θ)B(∆ S3 , π 4 )

B(∆ S3 , π 4 )B(∆ S2 , −θ)B(∆ S1 , π 4 ) (9) To incorporate rotation of the sample, the Jones matrix is multiplied with rotation matrices.

S = R(ϕ)S 0

R(−ϕ) (10)

Where the rotation matrix is defined as:

R(ϕ) =

 cos ϕ − sin ϕ sin ϕ cos ϕ



(11) An expression for output light strength relative to input light strength and sample parameters, given the optical system described in the previous section, can be constructed as follows:

E = p

I in A 0

Q −45

SQ 45

P 90

(12) Where I in is the input intensity. The intensity of the output light E is given by the square of the Euclidean norm of the vector.

I out = kEk 2 (13)

Equation 14 describes the individual retardations resulting from the fiber walls, where λ is the wavelength of the light and δ n is the birefringence mag- nitude. The birefringence magnitude is a material constant and it has been determined by Page and El-Hosseiny[23] that 0.056 is a good value for pulp fibers.

S1 = (∆ kS1 − ∆ ⊥S1 ) = 2πt S1 δ nS1

λ

∆ S2 = (∆ kS2 − ∆ ⊥S2 ) = 2πt S2 δ nS2

λ

∆ S3 = (∆ kS3 − ∆ ⊥S3 ) = 2πt S3 δ nS3 λ

(14)

An expression for I out (Equation 15) has been derived by Ho Fan Jang and

presented in his patent description.[12]

(13)

I out (t S2 , θ) = I in



sin(∆ S2 ) cos(2θ) cos(∆ S1 − ∆ S3 )

− sin 2 (2θ) + cos(∆ S2 ) cos 2 (2θ) sin(∆ S1 + ∆ S3 ) +2 sin 2 2

S2

 sin 2 (2θ) cos(∆ S1 ) sin(∆ S3 ) 

(15)

To determine the input intensity I in the analyzer is turned 90 degrees and an image is taken without a sample. This image will serve as a reference when evaluating the color intensities.

As a final step Equation 15 is solved for three wavelengths and the two un- knowns t S2 and θ are determined through the resulting overdetermined system (Equation 16). The wavelengths are chosen to match digital image and camera standards, i.e. red, green and blue.

 I r 0 I g 0 I b 0

 =

I r (t S2 , θ) I g (t S2 , θ) I b (t S2 , θ)

 (16)

In Equation 16 I 0 are the measured intensities.

(14)

4 Solving SLT and FA for RGB Values

This section will deal with solving the overdetermined system that arises from Equation 15. More specifically it will examine methods for finding corresponding SLT and FA values for each RGB value and the creation of a look up table.

To save time and space the table will have the dimensions of 85x85x85 instead of the standard color size 256x256x256. The values of SLT and FA will be constrained to what are reasonable physical properties among fibers.

The problem can be formulated as a task of finding the SLT and FA values (t S2 , θ) that minimizes the error of a particular RGB value.

min ε rgb (t S2 , θ) (17)

SLT [µm]

FA [degrees]

1 2 3 4 5 6 7 8

5 10 15 20 25 30 35 40 45

Figure 3: Theoretical color chart. Each pixel represents the expected color for a (t

S2

, θ) value

Looking at the Figure 3 it can be seen that color correlates with SLT and

intensity with FA. The almost black colors span over a large region and vary

greatly in SLT/FA values, but just slightly in their RGB value. Hence it will be

difficult to get valid solutions for very dark colors.

(15)

It is also apparent that this color chart (Figure 3) only contains a small fraction of all possible colors. Since Equation 17 is to be solved for all colors, how we define the error function, ε rgb (t S2 , θ) will greatly affect the solution.

4.1 Error Estimation

4.1.1 Error in RGB Domain

There exists a potential optimal solution (t 0 S1 , θ 0 ) for a given I 0 = (I r0 , I g0 , I b0 ), which in this application will be a table value. We can calculate the correct intensities for that particular SLT/FA value by evaluating it using Equation 15. Then the error in the RGB space would be the difference between I 0 and I(t 0 S1 , θ 0 ). Since the RGB channels are orthogonal to each other, the error can be summed as an Euclidean distance.

ε rgb (t S2 , θ) = q

(I r0 − I r (t 0 S2 , θ 0 )) 2 + (I g0 − I g (t 0 S2 , θ 0 )) 2 + (I b0 − I b (t 0 S2 , θ 0 )) 2 (18) The advantage of calculating the error in this fashion is that there are many available optimization algorithms which minimizes this error. It is also notable that when the error in the RGB space approaches zero, the error in the SLT/FA space also approaches zero.

4.1.2 Error in the SLT/FA Domain

Since the aim is to find mappings from RGB values to SLT/FA values, it would be most desirable to express the error in terms of SLT and FA. An error in this space would be easier to handle through the exclusion of high error solutions.

The derivatives of each color intensity point (I r , I g , I b ), are known.

5I(t S1 , θ) =

∂I

r

∂t

S2

∂I

g

∂t

S2

∂I

b

∂t

S2

∂I

r

∂θ

∂I

g

∂θ

∂I

b

∂θ

!

(19) The error in each RGB channel is found by comparing the function value of the potential optimal solution I(t 0 S1 , θ 0 ) with the value it is trying to optimize for I 0 .

ε r (t 0 S2 , θ 0 , I r0 ) = |I r0 − I r (t 0 S2 , θ 0 )|

ε g (t 0 S2 , θ 0 , I g0 ) = |I g0 − I g (t 0 S2 , θ 0 )|

ε b (t 0 S2 , θ 0 , I b0 ) = |I b0 − I b (t 0 S2 , θ 0 )|

(20) Dividing the error with the corresponding derivatives and summing them up approximates the error in SLT or FA.

ε f wt (t 0 S2 , θ 0 , I 0 ) ≈

I r0 − I r (t 0 S2 , θ 0 )

∂I

r

∂t

S2

+

I g0 − I g (t 0 S2 , θ 0 )

∂I

g

∂t

S2

+

I b0 − I b (t 0 S2 , θ 0 )

∂I

b

∂t

S2

(21)

ε f a (t 0 S2 , θ 0 , I 0 ) ≈

I r0 − I r (t 0 S2 , θ 0 )

∂I

r

∂θ

+

I g0 − I g (t 0 S2 , θ 0 )

∂I

g

∂θ

+

I b0 − I b (t 0 S2 , θ 0 )

∂I

b

∂θ

(22)

(16)

It would also be possible to construct the error functions without taking the absolute value of the change in each channel. This would cause certain color changes to cancel out certain changes in SLT or FA, which would give good results as long as I 0 and I 0 are in a region where the derivatives remain close to constant. But in cases where I 0 and I are far from each other the error could be calculated as low when it is actually high.

The total error in the SLT/FA space can be found by adding the errors of SLT and FA.

ε f wt,f a (t 0 S2 , θ 0 , I 0 ) = q

ε f wt (t 0 S2 , θ 0 , I 0 ) 2 + ε f a (t 0 S2 , θ 0 , I 0 ) 2 (23) 4.1.3 Likelihood Evaluation

Another way to evaluate solutions is to assume that only the colors of the theo- retical color chart (Figure 3) should exist and other colors deviate due to statis- tical noise. This noise could come from damages in fibers, the approximations made in Equation 15, bad photos or rounding.

Assumed that a point on a fiber has an actual physical value (t S2 , θ) then the resulting intensities of the respective color channels could be described as stochastic variables with a mean of I(t S2 , θ). The correct distribution for these variables is not trivial, but for simplicity the normal distribution is chosen.

X r ∼ N (I r (t S2 , θ), σ r 2 ) X g ∼ N (I g (t S2 , θ), σ g 2 ) X b ∼ N (I b (t S2 , θ), σ b 2 )

(24)

If I 0 = (I r0 , I g0 , I b0 ) are the color intensities with (t S2 , θ) value considered as their solution, then the likelihood of that solution could be described as follows:

L(t S2 , θ|I 0 , σ 2 ) = P (I r0 = X r ) · P (I g0 = X g ) · P (I b0 = X b ) (25) Give σ 2 a value is not so straight forward. Observation shows that fibers with higher SLT thickness are generally brighter and therefore hold a higher standard deviation. The standard deviation for a color channel on the middle of a fiber appears to vary between 1 and 20 depending on the brightness of that channel.

Equation 25 can also be extended to include how likely the (t S2 , θ) value is.

If f (t S2 , θ) is an approximated general distribution.

L ext (t S2 , θ|I 0 , σ 2 ) = f (t S2 , θ) · P (I r0 = X r ) · P (I g0 = X g ) · P (I b0 = X b ) (26) A good model for f (t S2 , θ) would be a combination of two bivariate normal distributions, were one represents spring and the other summer fibers. The advantage of evaluating the solution as in Equation 26 is that constraints would not be necessary.

4.2 Constraints

As stated before, SLT values typically range from 1µm to 8µm and FA values

from 5 to 30 . Hence values outside this region should be disregarded. The

(17)

tolerance of the FA values should be partly extended since focal problems tend to make fibers look darker.

Since SLT and FA are negatively correlated, linear constraints could be de- fined to exclude regions. Especially the region of low FA and SLT values, since fibers in this regions are rendered very dark and their values hard to determine.

Also the region of high FA and high SLT should not be included for the same reason.

Figure 4: Constrains following the ideas of this section plotted on the theoretical color chart.

The constraints that have been chosen for the applications presented in this paper are plotted over the theoretical color chart in Figure 4 and expressed as linear inequalities in Equation 27.

 

 

 

 

20t S2 + 3.5θ ≥ 70

−t S2 − 0.75θ ≥ −26.75 0.5 ≤ t S2 ≤ 8

0 ≤ θ ≤ 35

(27)

4.3 Methods

All methods presented in this section will describe algorithms for the construc-

tion of a 85x85x85 lookup table, where each value corresponds to an RGB value

and contains the associated SLT/FA value. The table is reduced to contain only

(18)

every third RGB value and other values are approximated to this value. This practice is used to save space and computation time.

4.3.1 Levenberg-Marquardt Algorithm

The available method to solve a problem like (17) is to use an iterative opti- mization solver and,more particularly, to use the error as defined in Equation 18.

The specific algorithm chosen is the Levenberg-Marquardt Algorithm provided in the levmar C library [19], which is a least-square minimizer, and is hence only useful for errors defined as such. This paper will not look into minimizing the other types of error it proposes with iterative optimization solvers.

The code for implementing look-up table generation with this algorithm is quite straight forward. All colors of the look-up table are looped through and then solved for a set of predefined starting points. The solution that produces the smallest error for each color is put in the look-up table.

Algorithm 1 Pseudo code for the generating table with iterative optimization algorithms

1: set slt table[0. . . 85][0. . . 85][0. . . 85] to 0

2: set fa table[0. . . 85][0. . . 85][0. . . 85] to 0

3: set error table[0. . . 85][0. . . 85][0. . . 85] to 10000

4: for r = 0 → 84 do

5: for g = 0 → 84 do

6: for b = 0 → 84 do

7: for all start values (slt0,fa0) do

8: slt, f a, error ← solve(r, g, b, slt0, f a0)

9: if error < error table[85][85][85] then

10: slt table[r][g][b] ← slt

11: f a table[r][g][b] ← f a

12: error table[r][g][b] ← error

4.3.2 Brute-Force Search Algorithm

This Brute-force search algorithm takes advantage of the fact that the look-up table does not need solutions for all colors. Only the colors from the color chart (Figure 3) and colors very similar to them would be needed.

The algorithm loops through a large set of feasible SLT and FA values, and calculates the corresponding color channel intensities. It then tests how well this SLT/FA value fits with the RGB value closest to the calculated color intensities, and also how well it fits with the surrounding RGB values. The best fit for each found RGB value will be saved. Determining the best fit can be done in the different ways described in section 4.1.

This method will leave a lot of holes in the look-up table, but this can be

used as an advantage since those colors should not occur and are probably the

effect of broken or overlapping fibers.

(19)

Algorithm 2 Pseudo code for the Brute-force search algorithm

1: set slt table[0. . . 85][0. . . 85][0. . . 85] to 0

2: set fa table[0. . . 85][0. . . 85][0. . . 85] to 0

3: set error table[0. . . 85][0. . . 85][0. . . 85] to 10000

4: scope ← 5

5: for all plausible slt values do

6: for all plausible fa values do

7: r, g, b ← get intensiteis(slt, f a)

8: for i = r − scope → r + scope do

9: for j = g − scope → g + scope do

10: for k = b − scope → b + scope do

11: error ← get error(i, j, k, slt, f a)

12: if error < error table[i][j][k] then

13: slt table[i][j][k] ← slt

14: f a table[i][j][k] ← f a

15: error table[i][j][k] ← error

What in Algorithm 2 is a plausible value is defined as in section 4.2.

4.4 Validation

The solution can not be validated in entirely the same way as a typical opti- mization problem, by simply looking at the magnitude of the error. This is due to larger errors being expected for some colors. Neither is it certain that the smallest error in the traditional sense would provide the correct solution.

Excluding only solutions with high errors would not be a good way of proceed- ing either since a very substantial amount of the optimal solutions for colors occurring in the pictures have high errors.

In this section six different look-up tables will be compared. The tables are listed bellow along with the specifications of the methods used to generate them.

RGB error Using Algorithm 2 with error calculated as in Equation 18 and linear constraints as defined in section 4.2.

SLT error Using Algorithm 2 with error calculated as in Equation 21 and linear constraints as defined in section 4.2.

SLT/FA error Using Algorithm 2 with error calculated as in Equation 23 and linear constraints as defined in section 4.2.

Maximum Likelihood ] Using Algorithm 2 with error calculated as in Equa- tion 25 and linear constraints as defined in section 4.2.

Ext. Maximum Likelihood Using Algorithm 2 with error calculated as in Equation 26 and box constraints with SLT [0.5,8] and FA [0,35].

Levenberg-Marquardt Using Algorithm 1 with error calculated as in Equa-

tion 18 and box constraints with SLT [0.5,8] and FA [0,35].

(20)

4.4.1 Using Theoretical Color Chart

An easy validation check is to transform the theoretical color chart(Figure 3) to SLT and FA grayscale images. What occurs is that each pixel of the color chart image is transformed to its corresponding SLT and FA value.

Figure 5: Color chart used when creating SLT and FA images in this section.

Below is a series of images where SLT and FA are calculated for each pixel of the color chart (Figure 5) and then the deviation from the actual value is plotted. To the left is SLT and to the right is FA, where yellow symbolizes positive and blue negative deviation.

SLT error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−0.5

−0.4

−0.3

−0.2

−0.1 0 0.1 0.2 0.3 0.4 0.5

FA error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−5

−4

−3

−2

−1 0 1 2 3 4 5

Figure 6: SLT and FA calculated using the RGB error method.

The method using the RGB error seems to produce a very good solution for

most plausible values. The big problem area is obviously the region with low

SLT (0.5µm-1µm) and high FA (20 -30 ). This is clearly seen in Figure 6.

(21)

SLT error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−0.5

−0.4

−0.3

−0.2

−0.1 0 0.1 0.2 0.3 0.4 0.5

FA error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−5

−4

−3

−2

−1 0 1 2 3 4 5

Figure 7: SLT and FA calculated using the SLT error method.

Compared with the RGB error method, the SLT error method appears to handle low SLT values better. As expected, FA is poorly solved in more regions than with the previous method. The solution shows some problems around 4µm-6µm associated with the local minima of the color channels.

SLT error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−0.5

−0.4

−0.3

−0.2

−0.1 0 0.1 0.2 0.3 0.4 0.5

FA error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−5

−4

−3

−2

−1 0 1 2 3 4 5

Figure 8: SLT and FA calculated using the SLT/FA error method.

From Figure 8 it can be seen that the SLT/FA error method gives quite a

similar result to the SLT error method. As expected, it provides better solutions

for FA in many regions, but surprisingly not around the minimum values of the

color channels, i.e. SLT values 4µm-6µm. Another difference from the SLT

error method is that the SLT/FA error method does not give the same good

results for low SLT values.

(22)

SLT error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−0.5

−0.4

−0.3

−0.2

−0.1 0 0.1 0.2 0.3 0.4 0.5

FA error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−5

−4

−3

−2

−1 0 1 2 3 4 5

Figure 9: SLT and FA calculated using the Maximum Likelihood method.

The SLT and FA plots of the error of Maximum Likelihood method (Figure 9) are very similar to the plots of the error of the RGB error method (Figure 6). This is to be expected since both of the methods measure the error in the RGB domain.

SLT error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−0.5

−0.4

−0.3

−0.2

−0.1 0 0.1 0.2 0.3 0.4 0.5

FA error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−5

−4

−3

−2

−1 0 1 2 3 4 5

Figure 10: SLT and FA calculated using the Extended Maximum Likelihood method.

The Extended Maximum Likelihood method seemingly produces very good

solutions for both SLT and FA.

(23)

SLT error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−0.5

−0.4

−0.3

−0.2

−0.1 0 0.1 0.2 0.3 0.4 0.5

FA error

SLT [µm]

FA [degrees]

0 2 4 6 8

0 5 10 15 20 25 30 35 40 45

−5

−4

−3

−2

−1 0 1 2 3 4 5

Figure 11: SLT and FA calculated using the Levenberg-Marquardt algorithm.

As can be seen in Figure 11 there are numerous problems with the solution produce by my attempt at this method. Surely it is possible to improve solutions using the same method, but there will always be a few of obstacles. It will, for example, be difficult to know how the algorithm will act for all colors and even if a lot of starting points are used this is no guarantee that the correct local minimum will be found.

4.4.2 Using Theoretical Color Chart with Added Noise

Basically all of the proposed methods give good results for the convenient color values, i.e. no values present in the theoretical color chart are too dark. The real challenge is to produce sound real solutions for values deviating from the theoretical ones. In the real system there is a considerable amount of noise from the photo itself and from the unevenness of the biological material. To emulate this and test how well the different methods handle this problem the following is proposed:

1. Generate a color chart

2. Add Gaussian noise to all channels of the color chart. (Figure 12) 3. Calculate the SLT and FA images from the distorted color chart.

4. Take the difference between the calculated values and the original values used to calculate the color chart in step 1.

5. Calculate the average of this difference in the plausible region, as defined in Section 4.2.

Typical standard deviation on the middle of the fibers in the photos used

in this report are between 1 and 20. In this section the effects of noise with

variance 5, 10 and 15 will be examined. The same procedure with no added

noise will also be included for reference.

(24)

Figure 12: Theoretical color chart with added gaussian noise with σ = 10.

Table 2: Table of the mean error in SLT [µm] after noise is added to the color chart.

σ of noise

Method 0 5 10 15

RGB error 0.029 0.116 0.284 0.612

SLT error 0.043 0.155 0.303 0.623

SLT/FA error 0.041 0.149 0.299 0.609

Maximum Likelihood 0.030 0.120 0.305 0.630

Ext. Maximum Likelihood 0.036 0.139 0.430 0.816

Levenberg-Marquardt 0.437 0.619 0.826 0.995

From Table 2 we can see that the RGB error method produces the smallest SLT mean error for all tested noise levels. The SLT and SLT/FA error methods improve a lot with respect to the RGB error method when the noise is increased.

The Maximum-Likelihood based methods act very similar to the RGB error, but

produce slightly worse results. The SLT/FA error method acts similarly to the

SLT error method, but with slightly better results.

(25)

Table 3: Table of the percentual mean error in SLT after noise is added to the color chart.

σ of noise

Method 0 5 10 15

RGB error 2.2% 7.5% 16.7% 30.2%

SLT error 2.5% 7.2% 14.1% 26.9%

SLT/FA error 3.1% 9.2% 16.8% 29.2%

Maximum Likelihood 2.2% 7.8% 18.5% 31.9%

Ext. Maximum Likelihood 2.4% 9.2% 26.6% 43.6%

Levenberg-Marquardt 15.3% 31.5% 45.6% 55.4%

When looking at percentile errors displayed in Table 3, the SLT error method gives better results at noise levels 5, 10 and 15, than the RGB error. This, combined with the results in Table 2, lead us to the conclusion that, the SLT error method provides better results for low SLT values and that the RGB error method gives better values for high SLT values.

It is also notable that the Extended Maximum Likelihood method gives a very good solution when no noise is applied, but the solution rapidly deteriorates with increased noise levels. The SLT and SLT/FA error methods seem to be most robust in the face of noise.

Table 4: Table of the mean error in FA [degrees] after noise is added to the color chart.

σ of noise

Method 0 5 10 15

RGB error 0.665 1.929 3.087 4.586

SLT error 0.958 2.614 3.740 5.066

SLT/FA error 0.979 2.174 3.179 4.521

Maximum Likelihood 0.685 1.965 3.126 4.561

Ext. Maximum Likelihood 0.683 1.824 3.224 4.620 Levenberg-Marquardt 13.838 13.662 13.351 13.278

From Table 4 it can be seen that that the RGB error, SLT/FA error, Maxi- mum likelihood and the Extended Maximum Likelihood methods give similarly good results. As expected, the SLT error method does not work as well for FA as it does for SLT.

To further illustrate how the different methods handle noise, the same test

as applied above can be done several times to get an average error for each

value for a particular noise level. The image below is the mean error taken on

20 images with added Gaussian noise with a standard deviation of 15.

(26)

SLT error

SLT [µm]

FA [degrees]

0 1 2 3 4 5 6 7 8

0 5 10 15 20 25 30 35 40 45

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Figure 13: Mean error of SLT thickness when Gaussian noise with a standard deviation of 15 is added. For this plot the RGB error method is used.

SLT error

SLT [µm]

FA [degrees]

0 1 2 3 4 5 6 7 8

0 5 10 15 20 25 30 35 40 45

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Figure 14: Mean error of SLT thickness when gaussian noise with a standard deviation of 15 is added. For this plot the SLT error method is used.

As can be seen from Figures 13 and 14 the big difference between the RGB

error method and SLT error method is that the SLT method works much better

for low SLT values. Otherwise the plots look very similar.

(27)

SLT error

SLT [µm]

FA [degrees]

0 1 2 3 4 5 6 7 8

0 5 10 15 20 25 30 35 40 45

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Figure 15: Mean error of SLT thickness when Gaussian noise with a standard deviation of 15 is added. For this plot the Extended Maximum Likelihood method is used.

The Extended Maximum Likelihood method, which showed great results in the error plot with no noise (Figure 10), seems to be very sensitive to noise. As can be seen in Figure 15 the low SLT areas have a very high average error.

4.4.3 Summary

Since fibers are biological material it will not be possible to produce images without statistical disturbance. Furthermore, the test used in section 4.4.2 will not account for the approximations made in Equation 15 and in reality the deviation from the values in the color chart might be even higher than the ones used in this section, which are solely based on the standard deviation observed in the color channels of the images.

Given these conditions, the most preferable method is the one which is robust against statistical noise. This has proven to be the SLT error method. The downside of this method is that it produces bad FA solutions, but the aim currently is accurate solutions for SLT. If, in the future, FA measures would be more desirable, it could also be possible to calculate FA separately using the error described in Equation 22.

Notable too is that most pulps will contain much more spring than summer

fibers, i.e. fibers with low SLT and high FA. So the SLT error method which

handles spring fibers well, as clearly seen in Figure 14, is the best choice in this

respect.

(28)

5 Image Analysis

We have now reached the section dealing with image analysis, where we will define where measurements should and should not be made, as well as how construct algorithms that reduces noise and damage related effects from the images. To achieve the latter, algorithms will be provided and described and finally the method will be evaluated.

5.1 Where to Measure

FA

FWT

Figure 16: Principal sketch of how the measured SLT and FA values vary over the cross-section of a fiber.

The measurement should be done where the fiber wall is perpendicu- lar to the camera. This is generally in the middle of the fiber, but might be somewhere else when the fiber is collapsed or in some way deformed.

Since the middle is the best measur- ing point for the large majority of fibers it should be the default. In Fig- ure 16 the principal variation of the perceived FWT and FA values across the fiber are plotted.

Below is a list of different occur- rences in the fiber images that should not be measured and a short de- scription of them. The way chosen to group and categorize these differ- ent damages and positionings is very much related to how they appear in the images used in this thesis. It is hard to see exactly what type of dam- age has occurred and therefore some generalizations will be made.

Crossing fibers Fibers that cross or overlap result in a completely different optical system than that of a single fiber. Overlapping fibers result in a color associated with a FWT value much higher than that of each of the overlapping fibers. See Figure 17a for a good example of this.

Folds Folds occur when collapsed fibers are twisted resulting in a similar color change to crossed/overlapping fibers. See Figure 17c for an example.

Twists What in this thesis will be referred to as twists might be the result of something other than the curling of a fiber. Twist can be identified by an uncollapsed fiber which has a thinner section where the FWT appears to be much greater. The twisting of fibers is a result of the processing[26].

Figure 17b shows one example of this.

Dislocations Dislocations are common in untreated wood, but can also occur

as a result of the refining process.[22] Dislocations have different appear-

ances but have in common that they are a discontinuity in the micro struc-

(29)

ture of the cell wall, i.e. they will appear as dark spots in the images.[22]

See Figure 17d for examples.

Kinks A kink is witnessed when the fiber abruptly changes direction so that it appears to be broken. Kinks usually start from a dislocation zone.[22]

See Figure 17e for an example.

Ballooning When wood fibers are treated with specific chemicals they tend to swell irregularly, this phenomena is often called ballooning.[22] As with kinks, ballooning often starts at dislocation zones. Ballooning causes the fiber to become wider with a smaller FWT. It is not common in the images used in this thesis. See Figure 17f for an example.

(a) Fibers crossing. (b) The prominent fiber shows a good example of a twist.

(c) A clear fold.

(d) The dark spots is proba- bly the result of disloca- tions.

(e) A fiber with kinks. (f) A clear case of ballooning.

Figure 17: Examples of fiber damage and positionings which might give bad measuring results.

5.2 Motivation for Chosen Method

In the above images only a small fraction of the fibers have the ideal posi-

tioning and uniformity for a perfect measurement. So when constructing an

algorithm for choosing measuring points in an image, a choice can be made be-

tween whether the quality or quantity of measuring points is desired. The risk

with a quality based method is that fibers of certain dimensions have a greater

(30)

or lesser amount of perfect measuring points. The problem with the quantitative method is that many incorrect values will be collected. The method chosen for this paper is a quantity based method since it would be difficult to weigh fewer measuring points accurately and since a greater number of measuring points will probably even out errors more effectively.

5.3 Algorithm

5.3.1 General Procedure

The procedures objective is to exclude bad measuring points without having a selection of measurements overly affected by such a selection progress. The algorithm determines a set of pixels in the image as bad measuring points. Then a Gaussian filter, with the excluded region (section 5.3.3) weighted as zero, is applied.[14] This practice fills in damaged sections of fibers and averages out each point without including points close to the edge of the fibers or damaged points. At the end the filtered image is evaluated at the points of a skeleton image.

Algorithm 3 Pseudo code for Image Analysis.

1: function EvalImage(image)

2: A ← GetBinary(image) . Finding the binary

3: A ← A ∧ ¬GetBadRegion(image) . Excluding bad values from binary

4:

5: t, θ ← EvalColors(image) . Treatment of FWT and FA images

6: t(¬A) ← 0

7: θ(¬A) ← 0

8: t ← Gaussf (t S2 )/Gaussf (¬A)

9: θ ← Gaussf (θ)/Gaussf (¬A)

10:

11: G dist. ← dt(A) . Collecting and returning measurements

12: P ← M easureP oints(image)

13: init F W T array, F A array, DT array

14: for all P do

15: add t(P ) to F W T array

16: add θ(P ) to F A array

17: add G dist. (P ) to DT array

18:

19: return F W T array, F A array, DT array

The functions gaussf and dt in Algorithm 3 are the Gaussian filter and distance transform provided in the DIPimage package.[20] The Gaussian filter has a standard deviation of 2 and a structuring element with a radius of 15.

The distance transform creates an image, where each pixel has the value of the Euclidean distance to the closest zero valued pixel of the binary image that is transformed.

The value of the distance transform equals half the width of the fiber, which

is used for calculating coarseness and is an important measurement by itself.

(31)

Algorithm 4 Pseudo code for getting measuring points.

1: function MeasurePoints(image)

2: A ← GetBinary(image)

3: S ← bskeleton(A)

4: N ← neighbour(S)

5: C ← N > 2 ∧ S . Finding branches

6: C ← bdilation(C, B) . Dilating branch points

7: S ← S ∧ ¬C . Removing branch points from S

8: return S

The algorithm for finding measuring points (Algorithm 4) works by creating a binary skeleton and removes pixels around the branch points of the skeleton.

The functions bskeleton, neighbour and bdilation are from DIPimage.[20]

bskeleton returns a binary skeleton and neighbour returns the amount of neighbors for each pixel. The function bdilation creates an elliptic binary dilation, the first argument being a binary image and the second the radius of the dilation. The value of B should be equal to the radius of an average fiber.

5.3.2 Binary Image

The binary image is quite important for the end result since a lot of fibers appear very dark. The dark fibers represent the low FWT values, hence a bad threshold would greatly affect the FWT average.

Investigating Equation 15 shows that all plausible dark values have a dom- inant blue channel. The background on the other hand should not have any tendency to a particular color. These two fact can be used to include more of the dark fibers. First a threshold of the gray scale image is taken, then a lower threshold on the blue channel is taken and added to the first threshold.

Some pixels in the background pass the blue channel threshold, but can easily be removed through binary opening. This can be seen in Figures 18b and 18c.

Algorithm 5 Pseudo code for get binary function.

1: function GetBinary(Im)

2: gs ← (Im[red] + Im[green] + Im[blue])/3

3: blue ← Im[blue]

4: Bin ← gs > A ∨ blue > B

5: Bin ← bopening(Bin, 2)

6: Bin ← bclosing(Bin, 4)

7: return Bin

The functions bopening and bclosing are from DIPimage[20] and use the standard binary opening and closing alternating between the 4 and 8 neighbor- hood to create circular structuring elements.

The constants A and B should be adjusted for the amount of background

noise.

(32)

(a) The threshold gs>A in line 4.

(b) The threshold blue>B in line 4.

(c) The binary image (after line 5 is executed).

(d) The binary image (after line 6 is executed and the end result of the algo- rithm).

Figure 18: These images show the process of generating a binary image with Algorithm 5. The image used is displayed earlier as Figure 17b.

5.3.3 Identifying Bad Regions

The idea behind identifying bad regions is to single out bad measuring points using constraints applied to the whole image.

The first constraint uses the fact that if the FWT value is higher than the distance to the measurement it is either wrong or lies outside the lumen. Both of of these cases should be disregarded. Such a condition is described by Equation 28 where r dt represents the distance as given by a distance transform, t the FWT and C is the pixel size.

t ≥ C · r dt (28)

Sometimes the binary image contains a few pixels outside the fiber, this might be due to a glow around the fiber or because of binary closing. To account for this, a lower limit for r dt is added.

r dt ≤ A (29)

The value of A should be marginally lower than the radius of the thinnest

fibers.

(33)

(a) (b) (c)

(d) (e) (f)

Figure 19: The white marks the region corresponding to conditions of Equations 28 and 29.

As can be seen in Figure 19 the edges of all fibers are considered as bad regions. The twists in Figure 19b are regarded as bad regions according to Equation 28 as well as Equation 29.

The next constraint is based on the observation that only measurements outside the lumen and twists have a combination of high FWT and FA. For the measuring points outside the lumen, Figure 16 shows the idea behind this constraint.

15t + 3θ ≥ 142.5 (30)

(34)

(a) (b) (c)

(d) (e) (f)

Figure 20: The white marks the region corresponding to conditions of Equation 30.

As can be seen from Figures 19 and 20 most of the bad points found using the FWT/FA constraint 30 is also found using the distance/FWT constraint 28.

But in some cases like the fiber in Figure 17b the FWT/FA constraint uniquely finds bad points.

When analyzing the FWT calculated from an image, it can be seen that some points are calculated as having very low values in a region which should have high values and the surrounding values are correct. This usually happens to darker values and is probably caused by a discontinuation of the microfibrillar structure. To address these points the constraint described in Equation 31 is added.

V (t)/t ≥ B (31)

To calculate the variance over these images, points outside the fiber must be disregarded. To do this the following algorithm is used:

Algorithm 6 Pseudo code for weighted variance.

1: function Variance(Im, Bin)

2: w ← unif (Bin)

3: Im(¬Bin) ← 0

4: V ar ← unif (Im · Im) − unif (Im) · unif (Im)

5: V ar(w = 0) ← 0

6: V ar(w 6= 0) ← V ar(w 6= 0)/w(w 6= 0)

7: return V ar

(35)

(a) (b) (c)

(d) (e) (f)

Figure 21: The white marks the region corresponding to conditions of Equation 31.

It might seem like the resulting bad region in Figure 21 does not work as intended. The reason for this is that color intensity changes do not affect FWT, unless FWT is very low. Hence, the fiber in Figure 21d has the same FWT on the black dots as in other areas and they are not included in the bad region by the variance constraint.

Below are the constraints that define the bad region:

 

 

 

  r dt ≤ A t ≥ Cr dt

15t + 3θ ≥ 142.5 V (t)/t ≥ 1

(32)

5.4 Evaluation

To see how the method handles the problems stated in the beginning of this

chapter specific fibers will be examined. The following plots show how the

FWT varies over the length of the fibers in Figure 26. In the plots the blue

line represents the FWT values on each measure point and the red dotted line

represents the value produced by the algorithm described in section 5.3. In

Figure 26 the skeleton lines used as measuring points are plotted.

(36)

20 40 60 80 100 120 2

3 4 5

SLT [µm]

Position [pxls]

Position [pxls]

Color

20 40 60 80 100 120

Figure 22: FWT variations and color on the measure point along the fiber in Figure 26a.

In Figure 22 the common problem of very low fiber values calculated on fibers with a FWT of 3.5µm - 4.5µm is evident. These fibers produces very dark colors and are therefore close to the lower FWT values which are also dark. Darker spots occur in all sizes of fibers and are usually the result of a damaged micro structure. For fibers of this size it takes a much smaller damage to make a bad measuring point.

When these sudden low points are isolated they will be removed by the variance constraint (Equation 31). As can be seen in Figure 22, the bad points have some influence, but are mostly interpolated.

20 40 60 80 100 120

3.5 4 4.5

SLT [µm]

Position [pxls]

Position [pxls]

Color

20 40 60 80 100 120

Figure 23: FWT variations and color on the measure point along the fiber in Figure 26b.

The next fiber has the opposite problem. It appears to have a FWT of about

3.5µm, but has a couple of peaks at about 4.5µm. It is hard to see what kind

(37)

of damage has caused this by looking at the fiber (Figure 26a), but these types of values are usually the result of either folds, twists or crossings. Some of the high points are removed by the high FWT and high FA constraint (Equation 30) and some by the distance constraint(Equation 28).

50 100 150 200 250

1 2 3 4

SLT [µm]

Position [pxls]

Position [pxls]

Color

50 100 150 200 250

Figure 24: FWT variations and color on the measure point along the fiber in Figure 26c.

The fiber segment plot in Figure 24 is part of the same fiber as plotted in Figure 23. By looking at the fiber (Figure 26c) it can clearly be seen that it has a kink and a fold. The kink is located at the position of 160 pixels and the fold at 220 pixels. The kink is too large to be excluded by the variance constraint (Equation 31), but this constraint handles the two other smaller low points well.

The fold raises the FWT, but is partially corrected by the filter.

20 40 60 80 100 120 140 160 180 200

1 1.5 2 2.5

SLT [µm]

Position [pxls]

Position [pxls]

Color

20 40 60 80 100 120 140 160 180 200

Figure 25: FWT variations and color on the measure point along the fiber in Figure 26d.

The last fiber is as dark as it is possible to find with the method. In Fig-

ure 26d it can be seen that the skeleton is not straight, which is the result of

(38)

an imperfect binary representation of the fiber. The FWT plot in Figure 25 is characteristic for these fibers, with uneven FWT measurements. The filter usually works very well in smoothing the values of these fibers.

(a) The FWT variations of this fiber is plotted in Figure 22.

(b) The FWT variations of this fiber is plotted in Figure 23.

(c) The FWT variations of this fiber is plotted in Figure 24. (d) Plotted in Figure 25.

Figure 26: The fiber segments evaluated in this section.

5.5 Challenges and Improvements

To summarize, the bad regions, as defined in section 5.3.3, will exclude most of the twists, small kinks and dislocations. Crossings are handled through the removal branches in the skeleton (section 5.3.1). The method does not handle larger kinks, folds or ballooning. There is no way of distinguish these dam- ages by adding additional constraints to the bad region. The next step would be to analyze the whole fiber segment and through some process remove de- viant points. This could be done because in reality fibers do not vary much in dimensions. Below is a suggestion of how to structure such an algorithm:

1. Fit FWT values to second degree polynomial function.

2. Remove point (or points) with greatest error.

3. If the fit is good enough continue, otherwise return to 1.

(39)

4. Evaluate all points at fitted functional value.

A second degree polynomial might not be a perfect fit, but it would be very

simple to implement. Fibers also peak their FWT in the middle and have lower

values at the ends, which matches the second degree polynomial well. A second

degree polynomial has been proposed and used successfully by H.F. Jang and

R.S. Seth for this purpose.[11]

(40)

6 Results, Evaluation and Data Fitting

6.1 Samples

The sample images used in this thesis are provided by Eurocon Analyzer. The images are of fiber samples manually placed in the camera prototype. Creating images in this way prevents the problem of unfocused fibers, which will be a problem later in development.

Below is a list describing the 7 samples provided by the Eurocon Analyzer.

Acacia Acacia is used for pulp in tropical regions and, as a tropical tree, it lacks clear seasonal variations. It has short and thin fibers with a low FWT.

Coastal Cedar Coastal Cedar will refer to the Cedars found in coastal British Colombia. They should exhibit the lowest mean FWT and have quite an abrupt transition between early- and latewood.

Douglas Fir Douglas Fir refers to the Douglas Firs of coastal British Colom- bia. They should show a clear distinction between early- and latewood, quite a large amount of latewood and a high FWT.

Interior SPF SPF stands for Spruce-Pine-Fir and refers to a large number of British Colombian species with similar properties which are thus grouped together. SPF have a mid-range FWT and a gradual transition from early- to latewood. Since the sample is of interior wood the FWT should be lower than a measurement of the whole stem.

Southern Pine Southern pines are a group of species of the south east USA.

They should have the largest part of latewood and highest FWT of the samples. The transition between early- and latewood should be abrupt.

Summer The sample labeled Summer consisted of the latewood of Scandina- vian Spruce and Pine, i.e. Norway Spruce and Scots Pine. The two species have similar fiber properties, with mid-range FWT.

Spring The Spring sample is the same as Summer, but containing earlywood fibers instead.

To aid the evaluation of results Ho Fan Jang has provided measurements for the distributions of Coastal Cedar, Interior SPF and Douglas Fir, using trusted methods. This data is presented in Table 5.

Table 5: Measurements provided by Ho Fan Jang.

Diameter [µm]

FWT [µm]

Coarseness [mg/m]

FA [ ] cross- section area [pm 2 ]

Coastal Cedar 28 1.45 0.135 17 107

Interior SPF 25 1.93 0.161 11 132

Coastal Douglas Fir 28 2.2 0.202 13 160

References

Related documents

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Det har inte varit möjligt att skapa en tydlig överblick över hur FoI-verksamheten på Energimyndigheten bidrar till målet, det vill säga hur målen påverkar resursprioriteringar

Detta projekt utvecklar policymixen för strategin Smart industri (Näringsdepartementet, 2016a). En av anledningarna till en stark avgränsning är att analysen bygger på djupa

Ett av huvudsyftena med mandatutvidgningen var att underlätta för svenska internationella koncerner att nyttja statliga garantier även för affärer som görs av dotterbolag som

DIN representerar Tyskland i ISO och CEN, och har en permanent plats i ISO:s råd. Det ger dem en bra position för att påverka strategiska frågor inom den internationella

Av 2012 års danska handlingsplan för Indien framgår att det finns en ambition att även ingå ett samförståndsavtal avseende högre utbildning vilket skulle främja utbildnings-,