Raytraced images for testing the reconstruction of ﬁbre orientation distributions

. The orientation distribution of ﬁbres is relevant to the properties of a number of different kinds of ﬁbrous materials from many ﬁelds like biology and engineering, including short ﬁbre reinforced composites. The Persistence of Vision Raytracer (PoV-Ray) is a program for creating photorealistic images using raytracing. We discuss a sort of “creative misuse” of this program in science, because it was originally developed as an artistic software. However, the ability to create virtual images of virtual parts, test the image recognition software that is used to measure the ﬁbre orientation distribution, and compare the results with the known distibution is a huge step forward. In this article the focus is on slicing/photometry, but computed-tomography-like images or microscope images could be produced as well and used to test segmentation and skeletonization algorithms.


INTRODUCTION
Many composite systems may consist of or contain different types of fibres.Such systems have found application in various fields, from biology to engineering.An example of a composite containing short fibres is fibre reinforced concrete (FRC).
Fibre reinforced concrete has recently become a most popular research subject among civil engineers and scientists.This material is rapidly turning into one of the strongest candidates as a structural material for different load-bearing structures.It belongs to cementitious composites, which are commonly made up of two components, fibres as reinforcement and concrete as a matrix.During production of the composite the fresh concrete mass and the fibres are mixed together, which in turn means that initially this material is composed of individual constituents.For reinforcement of the concrete matrix, both discontinuous (short) and continuous fibres are used.This article considers the problems associated with the use of short steel fibres (Fig. 1) as reinforcement.The main challenge of adding fibres to fresh concrete is to improve the tensile properties of concrete.Two materials (concrete matrix and steel fibres) that make up the composite are working together, i.e. the fibres take the major part of tensile stresses, while the concrete matrix takes compression and transmits the tensile stresses to the fibres.In the process of joint work, concrete also takes part in the capture of tensile stresses, but not such a significant part as the metal fibres.The stronger the bond between the matrix and the fibres, the greater strength the composite has.The bonding interface between cement matrix and fibres can be improved by mechanical or chemical means.The mechanical properties of the composite reinforced by discontinuos fibres strongly depend on the morphology of the inner structure of the system.Such composites frequently reveal anisotropic features, i.e. the properties depend on the considered direction.Steel fibre reinforced concrete (SFRC) has a strong tendency to anisotropy and the degree of anisotropy is directly connected with the orientation of fibres in the matrix.

ESTIMATING THE ORIENTATION DISTRIBUTION FUNCTION USING SLICING AND PHOTOMETRICAL ANALYSIS
One way of identifying the orientation distribution function of fibres is the use of the slicing technique and, further, photometrical analysis.For this method some part of the structure is cut into slices and pictures are taken from both sides of each slice.From the pictures the position and the orientation of the fibres can be measured using specific software, e.g.ImageJ [1].The advantages of this approach are a quite moderate price, the use of conventional equipment, and the ability to operate with quite large samples.But it has also shortcomings, such as the necessity of production of a large number of slices and the uncertainty about the precision of results.The factors that reduce accuracy are related to the cutting method of slices (loss of material and change of the cut-fibre cross section), the type of fibres (shape), and the orientation of fibres within slices.To confirm the outcomes received using the slicing and photometry technique, it is necessary to employ alternative methods such as CT (= computed tomography, 3D X-ray), MRT (= magnetic resonance tomography), AC (= alternating current) impedance spectroscopy, artificial images, etc.Since the slicing with the photometry technique is the main method used in research work (e.g. by [2]), it is discussed in more detail within this article.The slicing initially started from the procedure of sawing 12 SFRC cubes from six real-size floor slabs.Six of the cubes were sawn from the edge of the slabs and the rest from the central part of the slabs.This scheme has been chosen to make out the impact of the wall effect on the orientation of fibres within the matrix.The further steps involved taking a photo of each surface of a slice (Fig. 2a) and afterwards the implementation of image processing and analysis.The use of cubes and several slices is a major enhancement with respect to [2], as commonly only a slice is used, which results in a low amount of fibres.The photo of the cleaned and filtered surface of a slice in binary format is presented in Fig. 2.
The cut cross sections of fibres have different shapes: circle, ellipse, and quite elongated ellipse.

Determining fibre orientation by photometrical analysis
To determine the orientation of a fibre in the matrix, a spherical coordinate system is used (the convention follows [3]).This means that the orientation of a fibre in the matrix is defined by two angles: (1) inclination (out-of-plane) angle ϑ (actually the angle between the surface normal and the fibre) and (2) azimuth angle (inplane) angle ϕ.
To determine these angles, an ellipse is fitted to each cut fibre cross section.Fibre cross sections should be ellipses in the photo, because the fibres are cylindrical, which is a degenerated cone, and the intersection of a cone with a plane gives an ellipse as a closed curve.This can be done within the particle analysis of ImageJ.Here, the in-plane angle ϕ can be directly given by the orientation of the major axis (see Fig. 3).This angle has a 180 • ambiguity, as each ellipse is rotation symmetric by 180 • .
The inclination angle ϑ can be calculated from the ratio of minor to major axes of the fitted ellipse (Fig. 4): ϑ = arccos ellipse minor axis ellipse major axis or If the fibre is aligned orthogonally to the slice, the cut cross section of the fibre is a circle with diameter d f and the ratio which implies that the inclination angle ϑ is equal to 0 • .On the contrary, if the fibre is aligned within the slice surface, the ratio is which implies that the inclination angle ϑ is ≈ 90 • .The inclination angle ϑ determines the deviation of the fibre from the normal Z of the slice surface.The inplane angle ϕ determines the direction of the fibre.This direction is measured from 0 • up to 180 • .
The standard application of the photometry technique only analyses the inclination angle ϑ , although the in-plane angle is easily accessible.The disadvantages of neglecting the in-plane angle and using only the reduced information to characterize the material has been discussed in [4].
The global system of coordinates, which is indicated in Fig. 3 as X i ,Y i , determines the position of the respective fibre from the origin.

Measurement errors: similar both in the original and artificial images
During the processing of images, both original and artificial ones, a very interesting error was detected.This error concerns the minor axis of the fitted ellipse.Analytically, the minor axis of the ellipse should always remain constant, i.e. equal to the diameter of a fibre.
In the case of original images, this error was at first attributed to the cutting method of slices.The slices were produced by mechanical cutting using a diamond saw.Within this process there was a slight distortion of the cross section of fibres, due to forming a burr, i.e. spreading fibre material onto concrete.It was assumed that this error arose from the direction of the diamond saw.The error was discovered during the calibration of the scale of images: According to the calibration of the scale of images, there are 6.35 pixels/mm, therefore there should be 6.35 pixels per diameter of a fibre (fibre diameter is 1 mm), but manual counting of the pixels in fibres gave 9 pixels per diameter of a fibre.Comparing this misfeature with the artificial images, a similar problem could be detected.In the case of artificial images, the minor axes of the fitted ellipses are not constant, varying more largely than could be attributed to the resolution of the images.
An additional systematic error is that the method cannot distinguish between fibres with an in-plane angle ϕ vs. ϕ + 180 • (Fig. 5).

Distribution parameters of angles ϑ and ϕ
The statistical distributions of orientation angles ϑ and ϕ were obtained by means of a specialized statistical program R [5] and several packages [6][7][8][9][10][11][12][13][14].Relying on the results obtained by this software, several interesting features can be discovered in the behaviour of density functions of angles ϑ and ϕ (unpublished data by M. Eik, J. Puttonen, and H. Hermann).Especially, all probability density functions of angle ϑ had a tendency to bimodality, which is often a sign that the distribution is not Gaussian, and maybe a superposition of two density distributions with different maxima.
It is important to choose the slice distance so that each fibre is counted only once in order to avoid a distorted distribution (in contrast to what is needed for the enhanced reconstruction mentioned in Sec.4.2).

Why artificial images?
The distribution function of the orientation of fibres in SFRC is difficult to access.The most accurate methods, e.g.micro-computed tomography (µCT), are restricted to small samples.The method proposed by us is applicable to large samples.It is moderately accurate, but has an error that depends on the out-ofplane angle.Furthermore, different fibre types cause different errors, so the error is expected to be larger for hooked and corrugated (undulating) fibres than for straight ones.The error for hooked-end fibres will depend on the shape/size of the hooked ends compared to fibre length.For undulating fibres the error will depend on the relation between the "amplitude" and the "wavelength" of the undulation, varying from small (comparable to straight fibres) for the smallamplitude-large-wavelength case to so large that the error effectively makes the slicing method unusable for the large-amplitude-short-wavelength case.The error cannot be accurately estimated from real samples (too expensive and time-consuming to make sufficiently many experiments).Using artificial images of the cutting planes, one can compare the reconstructed orientation distribution with the known one, which was used to create the images.From this comparison the error can be accurately given.Different types of errors are caused by different influences, like the resolution or colour/structure of the matrix.In artificial images it is possible to switch the errors on and off, or vary their magnitude, so one can render directly into blackand-white pictures with high contrast, making filtering unnecessary, or use a structured matrix with low contrast to try the effect of filtering.
It is possible to produce also artificial images of slices with fibre orientation distributions estimated from real samples.This enables visual comparison and maybe additional reanalysis of samples and comparison of the measured distributions.
The focus here is on slicing/photometry.However, it is also possible to create CT-like images that can be used to test segmentation and skeletonization algorithms.

About PoV-Ray
The Persistence of Vision Raytracer [15] (PoV-Ray) is a free and open-source tool to create photorealistic threedimensional pictures.The scene is described in a human readable text file using constructive solid geometry.The PoV-Ray program supports, e.g.textures, bump maps, and the height field.
From the described scene the raytracer computes an image by following light-rays in the reverse direction, starting from the camera.Reflections and refraction can be taken into account according to prescribed object properties.PoV-Ray uses by default a left-handed Cartesian coordinate system, which should and can be easily changed to a right-handed one.The fact that PoV-Ray uses human readable text files as a scene description makes it easy to create such scenes from scripts or other program output.
PoV-Ray supports a couple of basic objects like box, sphere, cylinder, cone, torus, prism, lathe.
These objects can be combined by using the constructive solid geometry operations union, intersection, difference, merge.Using these, one can construct complicated structures and create astonishing realistic images.PoV-Ray does not perform any kind of "collision detection", which means that fibres can touch or overlap/ penetrate each other.This is not a problem as long as this does not happen within the generated images (slice planes) for which the probability is relatively low for reasonable fibre densities.
The use of constructive solid geometry is the major advantage of PoV-Ray here, as it allows us to first generate the whole structure (or cube) and then "cut" the slices.
In addition to "ordinary photos" (e.g.Fig. 6), standard X-ray transmission or CT images can be simulated.This is possible by using the interior modifier and giving the object a fade_distance and fade_power, thus simulating absorption.

Other renderers
There are other free and open-source renderers or raytracers besides PoV-Ray: Blender, Art of Illusion, Pixie, Aqsis, and YafaRay.These have different input (scene description) file formats, notably Pixie and Aqsis support the RenderMan TM language and Blender has a Python-scripting interface.The major difference from PoV-Ray is that for these renderers the slices would need to be created outside the renderer, which makes the generation of the slices more complicated, as the slicefibre intersections need to be calculated separately.

ANALYSED ORIENTATION DISTRIBUTION AND COMPARISON
To test the reconstruction of fibre orientation distributions by slicing with photometry, three virtual cubes (vcubes) were generated with different fibre orientation distributions.These were "sliced" (Fig. 7) in PoV-Ray and analysed with ImageJ's particle analysis.The distance of the slices was chosen larger than fibre length, to assure that each fibre is only counted once.
The fibre orientation distributions were created from (overlapping) bivariate normal distributions.A bivariate normal distribution has the form  • 30%: µ ϕ = 250 • , µ ϑ = 45 • The latter two distributions have been chosen to generate bimodal distributions, and to test, if the photometry can distinguish between these, as the difference in µ ϕ is 180 • .It was expected that photometrical analysis cannot distinguish these two bimodal distributions, because the measured direction (angle ϕ) marks two points on a circle (Fig. 8), one of which is determined by the angle ϕ and the other is a mirror point.There is no difference between the angles ϕ and ϕ + 180 • .The data is just replicated into [180 • , 360 • ].This means the data is periodic with 180 • and one can restrict the analysis to an interval with length 180 • , e.g.[0, π] or [−π/2, π/2].However, it is important to keep this limitation of the method in mind and look for possibilities of overcoming it (see Sections 4.2 and 4.3).

Slicing with photometry
The photometrical analysis of the virtual slices was performed without knowledge of the parameters used to produce the images.One can observe that small angles in ϑ are not well represented, probably because of the resolution effect (see Fig. 9).A small deviation from the circle will cause a 1 pixel difference in shape, and the 1 pixel difference has a larger effect for small angles than for large angles.
For the in-plane angle ϕ, very small angles are overestimated while the maximum is given accurately (see Fig. 10).
As it was assumed, the distributions of vcubes 1 and 2 cannot be distinguished.For many practical applications it is, however, necessary to determine the full distribution information without disambiguity, as a difference like the one in the two cubes causes different anisotropic effects in the material.In mechanical applications, for example, the stress tensor becomes anisotropic.

Enhancing the reconstruction with optimization methods
It is possible to enhance the reconstructed data by using combined information of several pictures, i.e. trace a single fibre through the slices.By this procedure it is possible to reconstruct the correct ϕ angle and overcome the ϕ vs. ϕ + 180 • disambiguity.The first test of this method was able to correctly reconstruct 91 fibres; all recognized fibres where correct, however, not all fibres were recognized (see Fig. 12).This method -or the problem to solve -is similar to tracking temporarily hidden particles.The method does not distinguish whether the pictures are a time or space sequence.

Enhancing the reconstruction with additional information
Another possibility of removing the uncertainty about the ϕ-angle is aquiring more information, e.g. through ordinary X-ray transmission scans of the slices.One can then try to combine front, back, and X-ray picture to find the connectivity between points on the front and back of a slice and from that the ϕ ∈ [0 • , 360 • ] can be given.These kind of images can also be simulated with PoV-Ray.A simple approach is to use an orthographic camera and a transparent matrix -or remove it entirely.To be more realistic, the matrix should get an interior with fade distance and fade power, and the light source should be behind the slice.This will simulate absorption in the matrix.

CONCLUSION
The orientation distribution of fibres is relevant for the properties of many different kinds of materials, including natural and man-made ones.To assess the properties of these materials, it is necessary to measure the orientation   of fibres.This is often done with methods that include image-analysis (of 2d or 3d images).There are different ways to produce these photos, e.g.CT, microscope, photos of slices.
Testing the accuracy of these methods is important, but often difficult to do on real samples, as the "real" fibre distribution cannot be accessed.It also may be difficult to use different measurement techniques for the same sample, e.g. a CT may not be easy to find.
Slicing with photometry is a method more easily available in civil engineering than, e.g., CT, but the accuracy of this method was unclear, so a procedure to test it was necessary.In this paper a method for testing the accuracy of photometrical analysis for use in fibre orientation distribution measurements was presented.The advantage of the use of raytraced images to try image recognition and fitting software is that different influences which can cause errors can be regulated or switched on and off, like resolution, contrast or background structure.Furthermore, the result can be compared with the input distribution.The slicing with the photometry technique has enabled estimating the parameters of the distribution of angles ϑ and ϕ and making out features in the respective distributions.
Environment" (RYM-TO funded through the Academy of Finland) for M.E. is acknowledged.The experiments with the real concrete samples (e.g.Fig. 2) were made with great support from Rudus OY in Finland.
The research was compiled with the assistance of the Tiger University Program of the Estonian Information Technology Foundation.The images have been rendered on the VisPar system (EITSA grant 10-03-00-24).
H.H. thanks Jüri Engelbrecht, host for the Feodor-Lynen-Fellowship, for valuable discussions and support.This research was supported by the European Union through the European Regional Development Fund, in particular through funding for the "Centre for Nonlinear Studies" as an Estonian national centre of excellence.

Fig. 1 .
Fig. 1.Different types of fibres used in SFRC.(a) Real photo of hooked fibres.(b) Raytraced image of several kinds of fibres.

Fig. 2 .
Fig. 2. Image of a slice.(a) Filtered image of a slice; bright spots are fibres.(b) Processed image of a slice in binary format; black spots are fibres.

Fig. 3 .
Fig. 3. Definition of the in-plane angle ϕ.As can be seen, this angle has a 180 • ambiguity.This figure is available in colour at http://www.eap.ee.

Fig. 4 .
Fig. 4. Definition of the inclination angle ϑ and the in-plane angle ϕ.This figure is available in colour at http://www.eap.ee.

Fig. 5 .
Fig. 5. Two possible orientations of a fibre with the same ϑ angle (inclination) but different ϕ angles (in-plane), causing the same ellipse (fibre cut cross section).This figure is available in colour at http://www.eap.ee.

Fig. 6 .
Fig. 6.PoV-Ray image of a bunch of 500 hooked fibres generated with a Python-script.

Fig. 9 .
Fig. 9. Histogram plot of the orientation density distributions (inclination angle).The figures with the label "analysed" are the distributions obtained by photometrical analysis of the artificial images, the figures labelled "reference" are the input distributions used to create the images.Comparison of different resolutions.(a) Vcube 0: analysed (low resolution), (b) vcube 0: analysed (higher resolution), (c) vcube 0: reference.This figure is available in colour at http:// www.eap.ee.

Figures 9 -
11 clearly show an influence of the image resolution.For low resolutions the measured distribution becomes multimodal (has several local maxima).

Fig. 10 .
Fig. 10.Histogram plot of the orietation density distributions (in-plane angle).The figures with the label "analysed" are the distributions obtained by photometrical analysis of the artificial images, the figures labelled "reference" are the input distributions used to create the images.Comparison of different resolutions.(a) Vcube 0: analysed (low resolution), (b) vcube 0: analysed (higher resolution), (c) vcube 0: reference.This figure is available in colour at http:// www.eap.ee.

Fig. 11 .
Fig. 11.Isoline plot of the orietation density distributions.The figures with the label "analysed" are the distributions obtained by photometrical analysis of the artificial images, the figures labelled "reference" are the input distributions used to create the images.Comparison of different resolutions.(a) Vcube 0: analysed (low resolution), (b) vcube 0: analysed (higher resolution), (c) vcube 0: reference.

Fig. 12 .
Fig. 12. PoV-Ray image of the fibres in the cube and the ones identified by particle tracking (marked in black envelope) (reconstructed data courtesy of A. Fischer, unpublished data).