UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Oblique x-ray log scanning and knot identification Omori, Conan 2020

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.

Item Metadata

Download

Media
24-ubc_2021_may_omori_conan.pdf [ 3.06MB ]
Metadata
JSON: 24-1.0394845.json
JSON-LD: 24-1.0394845-ld.json
RDF/XML (Pretty): 24-1.0394845-rdf.xml
RDF/JSON: 24-1.0394845-rdf.json
Turtle: 24-1.0394845-turtle.txt
N-Triples: 24-1.0394845-rdf-ntriples.txt
Original Record: 24-1.0394845-source.json
Full Text
24-1.0394845-fulltext.txt
Citation
24-1.0394845.ris

Full Text

Oblique X-ray Log Scanning and Knot Identification by  Conan Omori  B.Eng., The University of Sydney, 2018  A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF  MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES (Mechanical Engineering)  THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver)  October 2020  © Conan Omori, 2020   ii  The following individuals certify that they have read, and recommend to the Faculty of Graduate and Postdoctoral Studies for acceptance, a thesis entitled:  Oblique X-ray Log Scanning and Knot Identification  submitted by Conan Omori in partial fulfillment of the requirements for the degree of Master of Applied Science in Mechanical Engineering  Examining Committee: Gary Schajer, Mechanical Engineering Supervisor  Mauricio Ponga, Mechanical Engineering Supervisory Committee Member  Anasavarapu Srikantha Phani, Mechanical Engineering Supervisory Committee Member  iii  Abstract  The existence and location of knots affects the material properties and commercial value of cut lumber. Specifically, knots reduce the overall strength of lumber, with knots closer to the edge having a larger negative effect. Therefore, by determining the knot locations before cutting, and tailoring the cutting patterns to place the knots optimally within the lumber, the lumber quality and value can be increased. X-rays can image the interior of a log to detect these knots; however existing methods are either too complex and costly (Computed Tomography) or lack the ability to differentiate between knots reliably (Orthogonal Radiography). This research aims to overcome these limitations by employing a novel ‘oblique’ scanning arrangement that can determine knot orientations with both reasonable accuracy and low cost.   Image processing and detection algorithms were developed to locate and orientate the knots automatically within the X-ray scans, and different methods of calculating the knot’s circumferential angle compared. Detection metrics of Precision and Recall were used to analyse the performance of the detection algorithm. Finally, purpose-built hardware was designed and constructed to conduct scans of the logs.  Results indicate that the oblique scanning method is a viable way to detect and orientate knots within logs with both reasonable accuracy and low cost compared to existing methods. An average circumferential angle error of 15 degrees was achieved, with the detection algorithm being able to detect between 60% to 80% of the knots present within the log for ideal tuning parameters. iv  Lay Summary  Knots in lumber are formed from the interior parts of the tree branches. These knots decrease the strength of lumber, and hence the quality and value. If sawmills could know the location of the knots before cutting, they could cut the lumber in such a way that reduces this negative impact. X-rays can be used to view the internal structure of a log and locate the knots. However, existing methods are either very costly or insufficiently effective. The proposed method scans the logs at an oblique angle, which provides more ‘side-on’ information and so can improve the ability to detect and quantify the knots. This research shows that oblique scanning is a viable solution and is less costly than existing methods. v  Preface  All work presented was conducted under the supervision of Dr. Gary Schajer in the Renewable Resources Laboratory. Data collection was carried out at FPInnovations.  Conan Omori was the principal investigator, responsible for all analysis, and all data collection except for one specimen. Dr. Gary Schajer suggested the basis for the mathematical model, the image processing algorithm, and the knot detection algorithm. Conan Omori further developed these procedures.  vi  Table of Contents  Abstract ......................................................................................................................................... iii Lay Summary ............................................................................................................................... iv Preface .............................................................................................................................................v Table of Contents ......................................................................................................................... vi List of Tables ................................................................................................................................ xi List of Figures .............................................................................................................................. xii List of Symbols .......................................................................................................................... xvii List of Abbreviations ................................................................................................................. xix Acknowledgements ......................................................................................................................xx Dedication ................................................................................................................................... xxi Chapter 1: Introduction ................................................................................................................1 1.1 Current Inspection Technology....................................................................................... 3 1.1.1 Visual Observation...................................................................................................... 4 1.1.2 3D Optical Scanning ................................................................................................... 4 1.1.3 Radiography ................................................................................................................ 5 1.1.4 CT Scanning................................................................................................................ 6 1.2 Scanning Concept ........................................................................................................... 7 1.3 Research Scope ............................................................................................................... 8 Chapter 2: Radiography Principles ...........................................................................................10 2.1 Radiography basics ....................................................................................................... 10 2.2 Beer’s Law .................................................................................................................... 11 vii  2.3 Generating X-rays ......................................................................................................... 12 2.4 Beam Energy and Filtering ........................................................................................... 15 2.5 Limitations of X-ray Scanning...................................................................................... 17 Chapter 3: Oblique Scanning .....................................................................................................20 3.1 Tree Growth Characteristics ......................................................................................... 20 3.1.1 Pith to Edge Knot Growth......................................................................................... 20 3.1.2 Knot Axial Angles .................................................................................................... 21 3.1.3 Knot Growth Diameter ............................................................................................. 23 3.2 Knot Parameters ............................................................................................................ 23 3.3 Orthogonal Scanning .................................................................................................... 24 3.4 Oblique Scanning .......................................................................................................... 28 3.4.1 Advantage of Oblique Scanning ............................................................................... 29 3.4.2 Oblique Knot Orientation Derivation ....................................................................... 30 3.4.2.1 Dual Orientation Method .................................................................................. 36 3.4.2.2 Single Orientation Method ................................................................................ 38 3.4.2.3 Knot Length Method ......................................................................................... 38 3.4.2.4 Knot Method Selection ..................................................................................... 39 Chapter 4: Image Processing and Knot Detection ....................................................................42 4.1 Pre-Processing............................................................................................................... 43 4.1.1 Basis Weight Conversion .......................................................................................... 43 4.1.2 Spatial Scaling .......................................................................................................... 47 4.1.3 Pith and Radius Detection ......................................................................................... 49 4.2 Processing ..................................................................................................................... 55 viii  4.2.1 Background Subtraction............................................................................................ 55 4.3 Knot Detection .............................................................................................................. 61 4.3.1 Imaged Angle ............................................................................................................ 63 4.3.1.1 Confidence Score .............................................................................................. 67 4.3.2 Pith Intercept ............................................................................................................. 67 4.3.3 Knot Matching .......................................................................................................... 69 4.4 Measurement Metrics.................................................................................................... 72 4.4.1 Quantifying detection................................................................................................ 72 4.4.2 Precision .................................................................................................................... 74 4.4.3 Recall ........................................................................................................................ 75 4.4.4 Average Circumferential Error ................................................................................. 75 4.4.5 Precision-Recall Curves ............................................................................................ 76 Chapter 5: Experimental Setup ..................................................................................................79 5.1 X-ray Source ................................................................................................................. 79 5.2 X-ray Detector .............................................................................................................. 81 5.3 FPInnovations Setup ..................................................................................................... 82 5.4 Scanning Cart Setup ...................................................................................................... 83 5.4.1 Cart function ............................................................................................................. 85 5.4.2 Radiation and Shielding ............................................................................................ 87 5.4.3 Control and Movement ............................................................................................. 88 5.5 Test Logs ....................................................................................................................... 90 Chapter 6: Experimental Data and Results...............................................................................93 6.1 Oblique Scans ............................................................................................................... 93 ix  6.2 Hand Measurements...................................................................................................... 96 6.3 Result Computation ...................................................................................................... 97 6.3.1 One View Results ..................................................................................................... 98 6.3.2 Two View Results ................................................................................................... 100 6.3.3 Two View Results vs One View Results ................................................................ 102 6.3.4 Effect of Log Moisture Content and Detector Calibration ..................................... 103 Chapter 7: Discussion ................................................................................................................105 7.1 Result Analysis ........................................................................................................... 105 7.1.1 One View Results Curve Behaviour ....................................................................... 105 7.1.2 Two View and One View Calculation Methods ..................................................... 107 7.1.3 KLM Performance .................................................................................................. 109 7.1.4 Single Orientation Method Sensitivity Analysis..................................................... 110 7.1.5 Effects of Log Moisture .......................................................................................... 112 7.1.6 Physical Hand Measurements ................................................................................. 113 7.1.7 Log Samples............................................................................................................ 114 7.1.8 Detector Calibration and Saturation........................................................................ 115 7.2 Limitations .................................................................................................................. 116 7.2.1 Green Logs .............................................................................................................. 116 7.2.2 Sawmill Implementation ......................................................................................... 116 7.2.3 Circumferential Angle Accuracy ............................................................................ 117 7.2.4 Axial Angle Assumption......................................................................................... 118 7.2.5 Scanning Thickness ................................................................................................ 119 Chapter 8: Conclusion ...............................................................................................................120 x  8.1 Conclusion .................................................................................................................. 120 8.2 Future Work ................................................................................................................ 122 Bibliography ...............................................................................................................................125  xi  List of Tables  Table 3.1 Branch insertion angles used to infer knot axial angles. *Note: Actual measurements provided in the literature are referenced to the vertical, however these values have been converted to the axial angle perpendicular to the pith reference. ................................................. 22 Table 5.1 Teledyne CP160D specifications. ................................................................................. 80 Table 5.2 X-Scan XI8816 detector specifications. ....................................................................... 82 Table 5.3 Summary of test logs scanned and properties. .............................................................. 91 Table 6.1 Tuned parameter values for scanning. .......................................................................... 98 Table 6.2 Average circumferential error for the three One View calculation methods. ............. 100 Table 6.3 Average circumferential error for the three Two View calculation methods. ............ 101  xii  List of Figures  Figure 1.1 Examples of knots in cut lumber [4]. ............................................................................ 2 Figure 2.1 Industrial radiography setup with line detector [14]. .................................................. 10 Figure 2.2 Raw intensity output from line detector. ..................................................................... 11 Figure 2.3 Beer's law visualised [15]. ........................................................................................... 12 Figure 2.4 X-ray tube diagram. ..................................................................................................... 13 Figure 2.5 Bremsstrahlung with characteristic peaks for a 150 keV tube voltage [16]. ............... 14 Figure 2.6 Attenuation coefficient β for pine [18]. ....................................................................... 16 Figure 2.7 Comparison of unfiltered and filtered X-ray beam for a 100 kV tube voltage [19]. ... 17 Figure 2.8 Attenuation of X-rays through an object [15]. ............................................................ 18 Figure 3.1 Depiction of knot growing from pith to the outer edge with axial angle [21]............. 21 Figure 3.2 Knot parameters. (a) Side view, (b) axial view. .......................................................... 24 Figure 3.3 Knot model reference diagram with three views.  1 = plan view, 2 = axial view, 3 = image view. ................................................................................................................................... 25 Figure 3.4 A single knot observed using an orthogonal scanner.  (a) Axial View 2, (b) image View 3. .......................................................................................................................................... 26 Figure 3.5 Orthogonal scan with 4 clustered knots....................................................................... 27 Figure 3.6 Plan views of (a) orthogonal scanning and (b) oblique scanning. ............................... 28 Figure 3.7 Simulated cluster with 4 knots with an oblique view. ................................................. 29 Figure 3.8 Plan view of a log (View 1). (a) general view, (b) detail around knot.  The red arrow indicates a knot. ............................................................................................................................ 31 Figure 3.9 View along the log axis (View 2). ............................................................................... 33 xiii  Figure 3.10 View in direction of oblique scan (View 3). ............................................................. 35 Figure 3.11 Scans from 2 orientations 90 degrees apart with separate X-ray sources and detectors. ....................................................................................................................................... 40 Figure 4.1 Knot orientation calculation process. .......................................................................... 42 Figure 4.2 Unattenuated and background intensity plots for a vertical column of pixels from a 480 pixel length detector. (a) Unattenuated X-rays and (b) background noise. Note: The horizontal axis of the plots is a vertical column from the scan. .................................................... 45 Figure 4.3 X-ray scans of a log. (a) Raw captured image, (b) corresponding basis weight conversion using equation 4.2....................................................................................................... 46 Figure 4.4 Determining the scaled detector pitch at the log center from the actual detector pitch. Pixels are represented in green. .................................................................................................... 48 Figure 4.5 Effect of image scaling. (a) raw image with unequal spatial resolution,  (b) scaled image with equal spatial resolution............................................................................................... 49 Figure 4.6 Basis weight with a single column of pixels. .............................................................. 50 Figure 4.7 Pith detection using mass centroid method. ................................................................ 50 Figure 4.8 Radon transform of an ellipse. The black profile is that of an ellipse, with the red profile taken from a sample measurement. ................................................................................... 52 Figure 4.9 Semi-elliptical profile from the Radon transform with centroid height y for column i........................................................................................................................................................ 53 Figure 4.10 Basis weight image with detected outside surface boundary overlaid in red. ........... 54 Figure 4.11 Final image after pre-processing with straightening, and pith and radius in red. ..... 55 Figure 4.12 Background subtraction method. (a) Horizontal moving average, (b) basis weight with subtracted moving average. Edge artifacts highlighted in red. ............................................. 57 xiv  Figure 4.13 Comparison of different averaging window sizes. (a) 65 pixel window, (b) 300 pixel window, and (c) 1000 pixel window. ............................................................................................ 59 Figure 4.14 Background subtraction method with a 300 pixel window size. (a) Constant moving average windows, (b) variable moving average window. ............................................................. 60 Figure 4.15 Knot detection for top half. (a) Intensity profile from green dashed line. (b) Location of row 1/3 the radius from the pith in dashed green, with pith and outer edge in red. ................. 62 Figure 4.16 Angle detection method by taking a line of pixels (yellow line) and rotating about the detected position. .................................................................................................................... 64 Figure 4.17 Comparison of angle detection methods, with a difference in results for the top knot angle. (a) Calculates only maximum average value, (b) calculates maximum average and quantity of pixels above the threshold value, resulting in more accurate detection. .................... 66 Figure 4.18 Determining the pith intercept x of a knot from the 1/3rd radius point x’ and β angle........................................................................................................................................................ 68 Figure 4.19 Sample knot plot for a log with 0 degree and 90 degree orientation results. ............ 69 Figure 4.20 Knot map close-up of two detected knots from adjacent orientations. The 90-deg knot is considered a match with the 0-deg as it lays within the bounding box............................. 71 Figure 4.21 Sample log for Two View Single Orientation Method (SOM) results compared to the physical measurements. A red bounding box is centered on one of the known knot locations. ... 74 Figure 4.22 Precision-Recall Curve for a sample log (blue) compared to a perfect detection algorithm (yellow). ....................................................................................................................... 77 Figure 5.1 Teledyne CP160D portable X-ray tube [30]. .............................................................. 80 Figure 5.2 X-Scan XI8816 linear detector. Power, trigger, and ethernet ports are visible at the bottom. .......................................................................................................................................... 81 xv  Figure 5.3 Scanning setup at FPInnovations. A test log is mounted in the support structure on the convey system. .............................................................................................................................. 83 Figure 5.4 Computer rendering of the scanning cart taking an oblique measurement. ................ 84 Figure 5.5 Constructed scanning cart operating on site. ............................................................... 85 Figure 5.6 Cross Section of the scanning cart illustrating the arrangement of X-ray source, detector, and beam. ....................................................................................................................... 86 Figure 5.7 Plan view diagram of FPInnovation’s yard. Restricted areas are bounded in yellow, scanning cart location in red, and operating location in green. .................................................... 88 Figure 5.8 Wiring diagram outlining all components and wiring arrangements. ......................... 89 Figure 5.9 End view of scanning cart with source, log, belt, and stepper motor visisble............. 90 Figure 6.1 Four scans of a single log, rotating the log 90 degrees between each scan. Red lines are the detected log edges, and green lines detected knots. .......................................................... 93 Figure 6.2 Two sets of images collected for a specimen. (a) Correctly calibrated detector with no saturated pixels, (b) detector saturated in the background. ........................................................... 95 Figure 6.3 Hand measurement process for knots. (a) Measuring knot pith position, (b) measuring knot circumferential angle. ........................................................................................................... 97 Figure 6.4 Precision Recall Curve for Single Orientation Method (SOM), Knot Length Method (KLM), and a combination of both (SOM-KLM), only utilising one orientation (One View). ... 99 Figure 6.5 Precision-Recall curve for SOM, KLM, SOM-KLM, and averaging results between two adjacent orientations (Two View). ....................................................................................... 101 Figure 6.6 Comparison between One View and Two View SOM results. ................................. 103 Figure 6.7 Precision-Recall curve for SOM with logs of different moisture content, and saturated and unsaturated detectors for dry logs. ....................................................................................... 104 xvi  Figure 7.1 SOM One View result zoomed in. The expected range of curve direction in red, and the actual direction of the curve in blue. ..................................................................................... 106 Figure 7.2 Reduction in Precision by considering two orientations. The circles are calculated positions, green filled are correctly identified knots, red filled are erroneous detections. ......... 108 Figure 7.3 SOM One View and Two View results. Red bounding box is the more suitable region of operation for the algorithm. .................................................................................................... 109 Figure 7.4 Inconsistent knot length calculation, with estimated knot length in green. (a) Longer green line indicating overestimating knot length, (b) Green line indicating underestimating knot length........................................................................................................................................... 110 Figure 7.5 Sensitivity of circumferential angle for assumed axial angles, for given 𝜷 angles. .. 112 Figure 7.6 Comparison between dry log and green log. (a) Dry log and (b) green log. ............. 113 Figure 7.7 Effect of circumferential error 𝝐 on lateral error. Lateral error 𝒙𝟏 is less than 𝒙𝟐 for the same circumferential error as its closer to the pith. .............................................................. 118 Figure 8.1 Example of 'mushrooming' effect at the end of the knot where it bulges out the side, and the knot center is removed. .................................................................................................. 123  xvii  List of Symbols  𝐴 Source to log center distance 𝐴′ Corrected source to log center distance 𝐵 Source to detector distance 𝐵′ Corrected source to detector distance 𝐵𝑊 Basis Weight 𝐶 Pith to knot end length along beam direction 𝐶′ Corrected pith to knot end length along beam direction 𝐷 Oblique angle knot offset 𝐸 Projected knot height 𝐹 Knot height ℎ Ellipse height ℎ̅ Pixel height of image ℎ𝑖  ith Pixel from pixel height array 𝐼 Attenuated X-ray intensity 𝐼0 Unattenuated X-ray intensity 𝐼𝑍 Background detector pixel intensity 𝑛 Number of knots 𝑷 Array of pixel values for a given 𝛽 angle xviii  ?́? Number of pixels in 𝑷 are above the threshold value ?̅? Average value of all the pixels in 𝑷 ?́?𝑛𝑜𝑟𝑚 ?́? normalized between 0 and 1 ?̅?𝑛𝑜𝑟𝑚 ?̅? normalized between 0 and 1 𝑟 Ellipse radius 𝑅 Log radius 𝑆 Confidence score 𝑥 Path length or Knot pith location 𝑥′ Pith intercept at 1/3 radius 𝑥1 Lateral error 1 𝑥2 Lateral error 2 ?̅? Ellipse centroid 𝑦𝑖 Centroid of single column in ellipse 𝛽 Attenuation coefficient or angle of knot on image 𝜃 Oblique angle 𝜌 Density 𝜓 Knot axial angle 𝜖 Average circumferential error 𝜙 Knot circumferential angle 𝜙𝑖,𝑐𝑎𝑙𝑐 Calculated circumferential angle of ith knot 𝜙𝑖,𝑘𝑛𝑜𝑤𝑛 Measured circumferential angle of ith knot xix  List of Abbreviations  CAD Canadian Dollars CT Computer Tomography FN False Negative FP False Positive GDP Gross Domestic Product GUI Graphical User Interface kV Kilovolts keV Kiloelectronvolts  KLM Knot Length Method LOWESS Locally Weighted Scatterplot Smoothing SOM Single Orientation Method TP True Positive   xx  Acknowledgements  I extend my gratitude and appreciation to my supervisor Dr. G. Schajer for his wisdom, support, and expert guidance, but most importantly his welcoming nature which allowed me to feel at place within the lab and with my own research.  A special thank you to Yuntao (Anthony) An, Gabor Szathmary, Zarin Pirouz, and FPInnovations for their resources, time, and knowledge. Your willingness to spend your time answering my questions and helping me to collect data was paramount to me completing my research.  Thank you to my lab colleagues Juuso Heikkinen and Allan Walsh for your feedback during seminar practices, suggestions for image processing, and for the friendship.   My appreciation to the faculty, administration staff, and workshop staff for providing me with the facilities to complete my research.  xxi  Dedication  Dedicated to my parents Elizabeth and Masaharu Omori for all the years of love and support, and to my sister Naomi Omori for all the years of encouragement, and proof reading. 1  Chapter 1: Introduction  The Canadian lumber manufacturing sector is a major industry, that generated $8.7 billion to the Canadian GDP in 2013 [1] and employs over 90,000 workers [2]. Logs constitute the largest operating expense to a sawmill and can make up 60% to 75% of its entire operating cost [3]. Consequently, sawmills have a strong incentive to use this raw material as effectively as possible to produce lumber with the highest yield, quality, and value [4]. Moreover, the ability to utilise this raw material more efficiently reduces waste, and so decreases the need for the excess logging to compensate for waste loss. Thus, the development of enhanced wood processing techniques also has the potential to reduce the environmental demand on forests.  Sawn lumber quality depends on several factors, most notably knot size and placement. Knots are the ‘roots’ of branches grown within the trunk of the tree. They provide support to the branch and strength to the overall tree. However, knots negatively impact the mechanical properties of cut lumber because of their associated distortions and discontinuity in the wood fibres [5]. The presence of knots can have an adverse effect on the wood’s mechanical properties, with one study indicating a reduction in bending strength by 75% [6] and reduce visual appeal of the lumber. The placement of knots has a major influence on lumber properties, so knots located on the edge are more damaging than centrally located knots.   The number and arrangements of knots within a log is a “given”, so cannot be changed. However, it is possible to improve lumber quality significantly by carefully choosing the cutting patterns to place these knots optimally within the lumber. Knot placement plays a crucial role in 2  their final quality, where an even distribution of knots located centrally on the lumber is desirable [7]. Figure 1.1 shows examples of benign knot placement compared to damaging knot placement and orientation. If sawmills could make more strategic decisions about their cutting process by knowing the knot orientations in raw logs, they could increase product quality and value.    Figure 1.1 Examples of knots in cut lumber [4].  The material of a knot is much denser than the surrounding clear wood so that the knot can fulfil its function to support the weight of the exterior branch. This density increase causes knots to be visible in an X-ray image in much the same way as bones in a chest X-ray. Industrial X-ray imaging can therefore be used to determine the location and orientation of knots. Existing methods of X-ray scanning include radiography and Computed Tomography (CT). Radiography is the more common technique and is frequently used in medical diagnosis and industrial inspection to give a 2-D image of the internal structure of the scanned material. CT is a more sophisticated technique and can provide 3-D interior information. CT scanning provides great detail but requires complex and costly rotating setups to make X-ray images from hundreds of Benign Damaging Circle Splay Edge Knot 3  orientations. This sort of sensitive equipment is a challenge to operate and maintain in medical setting. For use with logs it can be justified only in the largest or most sophisticated sawmills.   This research aims to develop a system that takes advantage of the simplicity and low cost of radiography, and to use novel geometric arrangements and computational approaches to provide the additional information to provide a 3-D result. Such a system would be much less complex and costly and would significantly lower the barrier of entry for small to medium sized sawmills. It would allow them to improve productivity and profitability, while at the same time reducing the environmental impact of the logging.  1.1 Current Inspection Technology  Sawmills face a unique challenge to process a highly variable natural material. Unlike in a conventional industrial production line where there is high uniformity of the raw material, sawmills must measure each log individually, and tailor each cut.   X-ray imaging the logs before cutting would enable sawmills to improve the grades and yields of the lumber by picking more ideal cutting patterns. If sawmills could determine the internal structure of the log before cutting and optimally orient the log, they could potentially increase product value from 4% to 20% [8]. Currently, sawmills employ a variety of methods to image both the external and internal features of the logs.   4  1.1.1 Visual Observation  Visual observation employs the use of skilled workers to inspect the logs whilst on the conveyor based on a variety of factors. Skilled graders inspect the exterior of the log prior to cutting, make judgement about the interior information, and then choose how to orient the log to achieve the most advantageous cutting pattern.   However as visual observation is very subjective, it lends itself to inconsistencies between inspectors, sawmills, or regions even if inspection standards are being followed. This effect leads to substantial to inconsistencies in lumber quality. Studies have shown there can be poor agreement of up to 57% between graders when looking at the same logs [9]. Moreover, visual inspection does not provide the crucial internal information required to determine knot orientations and positions.  1.1.2 3D Optical Scanning  3D optical scanning is a modern method that uses sophisticated optical scanners to image the exterior surface shape of each log. The scanners operate at high speeds and can measure geometric features such as log shape, volume, straightness, and taper [10]. Using 3D optical scanners, sawmills are able to identify cutting patterns that maximise product yields with low upfront and operational costs.  5  However, optical shape scanners cannot provide interior information of a log such as knot locations or the presence of rot. Thus, are limited in their ability to provide information on the choice of cutting patterns with advantageous placement of knots.   1.1.3 Radiography  X-rays are an effective method of determining the presence of knots within logs, and the process of taking 2-D images with X-rays is called radiography. Radiography is used heavily in the medical sector and has started to see limited application by the lumber industry to image the internal features of logs [11].   X-rays are captured by a detector, which can be in the form of a panel or line detectors. Panel detectors are similar in function to a camera sensor, in that they capture the incoming X-rays on a 2-D rectangular detector. They are suitable for individual image capture such as a chest X-ray but have longer processing times due to the number of pixels and are available only in compact sizes.   Line detectors are used in production lines where a linear movement occurs. They are placed perpendicular to the movement of the conveyor and scan the material as it passes across the sensor. The individual lined are then stitched together to form a continuous image. As line detectors only contain a single row of pixels, they are generally much faster than panel detectors and are available in sizes suitable for sawmill use.  6  Radiography is a 2-D technique; it can make a plan view of an object but cannot distinguish depth information. This characteristic makes it very difficult for the technique to differentiate between features in a log. It is particularly challenging to identify knots because, in many tree species, the knots grow in clusters (whorls) [12] and so overlap each other on the image. This makes it very difficult to differentiate between one or multiple knots, or knot orientations.   1.1.4 CT Scanning   Full Field Computed Tomography (CT) is an extension of the X-ray scanning technique where the internal structure of the log is completely reconstructed in 3-D. Developed heavily in the medical industry, CT scanning has started to find its place in the forestry industry because of its detailed reconstruction of logs [13]. Either the source and detector, or log are rotated while images from hundreds of orientations are taken to capture all the interior information of the log.  While it gives comprehensive information, CT scanning still has limited applications in the sawmill industry. Sawmills may run their conveyers at of 3m/s or higher, and the precise and synchronised motions required in CT scanning do not lend themselves to this environment. Moreover, the high initial and ongoing costs of operating a CT scanner inhibit small to medium sawmills from implementing such a system. For such users, a more economical and easier to operate solution is better suited, even if with less detailed results.   7  1.2 Scanning Concept  The research concept proposed here aims to extend the application of the radiography method to measure the locations and orientations of knots in logs. The ability to use this relatively simple technology would avoid the need for costly and difficult to maintain CT equipment and so make log measurements also accessible to medium sized sawmills. The idea is to use prior knowledge of the way in which trees grow and to modify the physical scanning arrangements so as to reveal the internal structure more clearly. With these modifications it is possible to add to the radiography technique so that it can reliably determine knot positions and orientations.  While each log is unique, they all follow similar growth characteristics that can be exploited to simply the knot identification process. In the coniferous species used for structural lumber, all knots grow radially outwards from the center line of the log (pith) to the outer surface. Knowledge of this feature greatly facilitates interpretation of radiograph images.  A fundamental change to the geometrical arrangement used for the X-ray scanning greatly enhances the information content of the X-ray images. Conventionally, X-ray scanning of logs is done using an X-ray fan beam that is aligned perpendicular to the log central axis. Since the knots are oriented approximately perpendicularly to the central axis, they lie mostly within the plane of the X-ray fan beam, so the resulting radiograph contains essentially no orientation information. The scanning arrangement proposed here is to realign the X-ray scanning direction so that it is oblique to the log central axis. The knots then occur in planes significantly different from that of the X-ray beam. Thus, significant orientation information is seen. When combined 8  with the knowledge of the radial arrangement of knots within a log, the oblique radiographs can provide sufficient information to identify the knot locations and orientations reliably.  1.3 Research Scope  To understand how knots can be detected within a log, it is first necessary to understand the fundamentals of imaging with X-rays. Indeed, the principles of imaging with X-rays are very similar to imaging with visible light, but with more specialised equipment. X-ray parameters such as energy and current will be investigated, and their effects on image contrast and measurement noise will be explored.  Once the benefits and challenge of radiography have been investigated, tree growth characteristics and their influence on scanning results will be explored. To fully capture the knot orientation, the three parameters of pith intercept, axial angle, and circumferential angle will be defined. Then, an oblique scanning model will be derived, which will determine these three parameters from a 2-D scan.  For practical industrial use, the developed scanning technique must be robust and autonomous; it should be able to proceed continuously, reliably, and without need for human intervention. The detection algorithms should be fast, and tolerant of the large natural variability of the raw material and the non-ideal measurement conditions present in the harsh environment of a sawmill.  9  Once the theoretical foundation for imaging, processing, and detecting these knots has been established, the physical scanning arrangements will be developed. A portable scanning device was prototyped as a proof of concept for industrial application and for testing purposes. This, along with equipment used at the industry partner FPInnovations will be detailed.  Finally, scans will be collected and the oblique measurement system results with be compared to accurate CT data to assess its accuracy and reliability.   10  Chapter 2: Radiography Principles  2.1 Radiography basics  Due to their high penetrating ability, X-rays can pass through solid objects. As they pass through, they are absorbed and attenuated by an amount depending on the material density and thickness. This attenuation decreases the X-ray intensity received by the detector. Therefore, within an X-ray image of a solid object, areas of higher density will appear darker. In logs, Knots are denser than the surrounding wood. Thus, the presence of knots in the logs can be detected from the darker regions in the X-ray images.   Figure 2.1 Industrial radiography setup with line detector [14].  The presence of these darkened areas picked up by the detector are effectively the ‘shadows’ of the denser regions. X-ray detectors generally measure the difference in intensity using photodiodes and scintillators. The scintillator material emits light when in the presence of X-11  rays, and the light intensity it proportional to the incoming X-ray intensity. The scintillator is placed in front of photodiodes that measure the generated light intensity. Figure 2.1 shows a conventional industrial radiography setup with source, sample, and line detector. Figure 2.2 shows the output from a line detector. Notice how the denser knots appear darker due to the increased attenuation of the X-rays.   Figure 2.2 Raw intensity output from line detector.  2.2 Beer’s Law  The reduction in X-ray intensity with increasing thickness and density can be quantified using Beer’s Law.  12   Figure 2.3 Beer's law visualised [15].   ∫ 𝜌(𝑥)𝑑𝑥 = −𝛽 ln𝐼𝐼0 2.1  The first term represents the line integral of the volumetric density ρ along the X-ray path x through the measured object. The numerical value of the line integral has units of mass per unit area and is referred to as the basis weight. β is the linear attenuation coefficient and describes the fraction of X-rays that are absorbed per unit basis weight. This value varies depending on the material and on the X-ray energy being used. I and I0 respectively are the intensity values of the unattenuated and attenuated X-rays as viewed by the detector. Beer’s law is useful because it enables material density to be evaluated from X-ray attenuation measurements.  2.3 Generating X-rays  The method and parameters used to generate X-rays have a profound effect of the quality of the resultant radiographic image. X-ray tubes are the most common source used for medical and industrial applications. X-rays tubes work with a high voltage placed across an anode and 13  cathode in a vacuum. In medical and industrial applications, this ‘tube voltage’ in keV is used as a measure of X-ray energy rather than wavelength or frequency.  The tube voltage causes electrons to be emitted from the cathode and strike the anode, which in turn causes the emission of X-rays. The production of these X-rays occurs due to bremsstrahlung and characteristic emission phenomenon [16].   Figure 2.4 X-ray tube diagram.  Bremsstrahlung, which translates from German to ‘braking radiation’, is the emission of electromagnetic radiation when an electron undergoes deceleration. As an electron emitted from the cathode approaches the anode, the positive nuclei of the anode atoms cause it to be deflected. The electron loses kinetic energy during this deflection and is converted into radiation called bremsstrahlung radiation. This radiation has two characteristics. First, the maximum possible X-ray energy produced cannot exceed the tube voltage. This is known as the Duane-Hunt law. Second, the radiation emitted covers a range of energies. As the electron is deflected, it is likely to emit a higher number of lower energy X-rays rather than a single high energy X-ray. For this Cathode Anode Electrons X-rays 14  reason, bremsstrahlung is also referred to as continuous X-rays [17]. In Figure 2.5, this is the continuous line.  The second method in which X-rays are produced is through characteristic radiation. As the electron emitted from the cathode hits the atoms that make up the anode, it may knock an electron away. This will then cause the electrons in higher orbits to replace the ejected electron, producing X-rays in the process. This form of radiation is unique for the anode material, and thus appears as distinct spikes on the X-ray spectrum, hence the name characteristic radiation.   Figure 2.5 Bremsstrahlung with characteristic peaks for a 150 keV tube voltage [16].    Tungsten characteristic X-rays Bremsstrahlung 15  2.4 Beam Energy and Filtering  Beer’s Law, as stated in Equation 2.1 only applies to monochromatic X-rays, which are X-rays of a single uniform energy level. Figure 2.5 makes it clear that this is not the case for X-rays produced from an X-ray tube. Thus, substantial non-linearities occur in the application of Beer’s Law.  This non-linearity in X-ray absorption is due to the variation in attenuation coefficients. Lower energies are attenuated more compared to higher energies. Thus, when passing through an object, a greater fraction of low energy X-rays is attenuated compared to higher energy X-rays. This issue is exacerbated by the fact that X-ray tubes produce a large portion of the overall X-rays in the lower energy ranges, effecting the spectrum disproportionately.  16   Figure 2.6 Attenuation coefficient β for pine [18].  This non-linearity produces difficulties with calculating basis weight for large densities. In the case of a log, a large portion of the low energy X-rays are absorbed by the low-density clear wood, leaving a lesser portion of the high-energy X-rays remaining for the higher density knots. Ideally, the attenuation coefficient of all the X-rays being used would be approximately the same, thus reducing this non-linearity.  One method to achieve this is to filter out lower energy X-rays and retain only the higher energy X-rays. Filtering can be accomplished by placing thin sheets of material in front of the X-ray source. Common filtering materials include aluminium and copper.   0.010.11100 20 40 60 80 100 120 140 160Attenuation Coeff (1/cm)X-ray Energy (keV)Linear Attenuation Coefficient of Pine Sapwood17   Figure 2.7 Comparison of unfiltered and filtered X-ray beam for a 100 kV tube voltage [19].  This filtering process is said to ‘harden’ the beam, keeping only the high energy X-rays that have relatively similar attenuation coefficients. Such filtering reduces the range of energies present in the X-ray beam, but at the expense of reducing the overall beam intensity, see Figure 2.7. This effect can be compensated for by increasing the tube current or increasing the exposure time of the detector. Figure 2.7 also shows that the main filtering effect is at the lower energies, with minimal attenuation at higher energies. The resulting X-ray beam is said to be ‘harder’ because it is more resistant to attenuation.   2.5 Limitations of X-ray Scanning  Figure 2.8 shows how a reduction in X-ray intensity is seen on the detector as it passes through the two denser regions of the object. In this figure, there are two important things to note what hold true for most radiography scanning systems. First, X-rays cannot be oriented in the same 18  way as visible light using lenses or mirrors, thus the direct imaging scheme shown in Figure 2.8 is the only practical choice. Second, the depth location of denser regions with equivalent thicknesses within the object have no effect on the reduction in intensity. As illustrated in Figure 2.8, the same object placed either close or far from the source will cause the same reduction in X-ray intensity.  The insensitivity to depth location can be explained mathematically using Beer’s Law. The line integral at the left side of Equation 2.1 depends only on the sum of the material density along the X-ray path; it does not depend on the particular sequence of the local densities. Thus, all depth information along the X-ray path is lost when taking an X-ray image. This is a particularly challenging limitation when trying to determine the location of knots, where 3D orientations are required.    Figure 2.8 Attenuation of X-rays through an object [15]. Object Source Detector Intensity 19   The ability for X-ray imagining to identify knots is strongly affected by its orientation. If a knot is orientated directly in line with the detector, the imaged footprint is decreased making it difficult to detect its position and orientation. This difficulty can be overcome by taking images from multiple orientations, but this solution requires multiple scanners and detectors, which greatly increases cost and complexity.  Another consideration is the ability of a detector to distinguish between X-ray intensities through a knot and the surrounding clear wood. Knots have much higher densities than clear wood and can be on average 2.4 times denser than the surrounding wood in dry logs [20]. This difference in density is much less for freshly cut ‘green’ logs. However, as this knot only makes up a small thickness of the entire log’s diameter, the imaged knot only shows a slight increase in the observed basis weight. Consequently, careful measurements and sophisticated image processing is necessary to be able to identify knots reliably.  To perform this image processing, it is necessary to take advantage of the unique and consistent growth characteristics of coniferous trees. By understanding these growth characteristics, it is possible to tailor the image processing methods to increase greatly the contrast between the knots and the surrounding wood. This substantially aids the detection process. 20  Chapter 3: Oblique Scanning  3.1 Tree Growth Characteristics  Coniferous trees produce the softwood lumber commonly used for structural applications. This broad class of trees shares some very distinctive growth characteristics, knowledge of which can be used to interpret 2-D radiographic images of logs and infer 3-D information. Appreciation of these unique growth characteristics of coniferous trees enables knot orientations to be determined using specially designed detection algorithms. The following Sections describe some tree characteristics that can be used to infer knot orientations.  3.1.1 Pith to Edge Knot Growth  A particular feature of the growth of branches in coniferous trees is that they typically start as buds at the top of the growing tree, either individually or in clusters. The buds grow out into branches, small at first, then getting larger both in diameter and length as the tree grows. In addition, the main tree also grows in diameter to form the tree trunk, which becomes the log when the tree is eventually harvested. The growing tree trunk expands to enclose the initial parts of the branches, leaving a pattern of knots within the log interior. Because of this sequence, it always happens that all the knots within a log start from the pith and grow radially outward towards the outer edge.   21  While all knots must start at the pith and grow radially outward, it may happen that some may not reach the outer edge. This circumstance occurs when a branch is broken off at an early stage and the growing tree trunk grows beyond the broken end of the branch, thereby totally enclosing it. This circumstance occurs near the bottom of trees, where the young branches become shaded by the higher branches and die. Higher up in the tree, the branches remain in the light and continue to live and thrive. Figure 3.1 illustrates the growth of a branch from the pith, with the interior region creating a knot within the trunk Section.    Figure 3.1 Depiction of knot growing from pith to the outer edge with axial angle [21].  3.1.2 Knot Axial Angles  Another observation made in conifers such as spruce, pine, or fir species is that branches tend to grow slightly upwards. While each branch exhibits variation during its growth, an average Axial Angle Insertion Angle 22  upwards trend is observed that can be used for data interpretation. The angle the knot creates with the perpendicular of the log axis is called the axial angle and is illustrated in Figure 3.1.  The measurement of tree features is common within the forestry industry as they can act as indicators for forest health. One measurement is the branch insertion angle, which is the angle at which the branch meets the tree trunk relative to the vertical. The knot axial angle can be inferred from this, as the knot is simply the branch within the clear wood. Table 3.1 summarises these branch insertion angles, converted from a vertical reference.  Axial Angle* Tree Species Author 25o Scots pine Pyorala et al [22] 23o Jack pine Beaulieua et al [23] 25o Douglas-fir Roeh & Maguire [24] 22o Douglas-fir (Juvenile) Osborne & Maguire [25] 15o Douglas-fir (Commercial Thinning) Osborne & Maguire [25] 10o Sitka spruce (within clusters) Auty et al [26] 5o Sitka spruce (between clusters) Auty et al [26] 13o Sitka spruce (within clusters) Achim et al [12] 5o Sitka spruce (between clusters) Achim et al [12] Table 3.1 Branch insertion angles used to infer knot axial angles. *Note: Actual measurements provided in the literature are referenced to the vertical, however these values have been converted to the axial angle perpendicular to the pith reference. 23   3.1.3 Knot Growth Diameter  When detecting knot locations within an X-ray image, the ability to filter potential results based on various parameters is crucial to reliable detection. One parameter that can be used to filter potential knot locations is the diameter of the knot.   The diameter of a knot is factored into the lumber grading procedure, which is the process of determining the quality of cut lumber and categorising them into select groups for different applications. An absolute minimum knot size of 3/8” (10mm) is considered during this process [27]. Therefore, setting this as a lower bound for detecting features will consider only knots that have an impact on the overall grade of the cut lumber. Knots smaller than this diameter may still exist, however ultimately do not have a significant effect of the quality of the final product. This parameter will also filter out small artifacts.   3.2 Knot Parameters  Three main parameters define the location of a knot within a log. They are the pith intercept (𝑥), the axial angle (𝜓), and the circumferential angle (𝜙). Figure 3.2 illustrated these quantities. Pith intercept is defined as the location along the center pith where the knot starts. It is referenced from the leading end of the log, measured in the direction of scanning along the log (the left end in Figure 3.2). The axial angle is the angle between the knot and the outward radial line from the pith. The circumferential angle is the angle of the knot around the circumference of the log when 24  looking along the pith from the leading end. The top position in this view is taken as the reference 0-degree position.    Figure 3.2 Knot parameters. (a) Side view, (b) axial view.   3.3 Orthogonal Scanning  Orthogonal scanning places the source and detector perpendicular to the log movement to take images. This is the conventional log scanning arrangement.  Log Log View View (a) (b) + − + − 25    Figure 3.3 Knot model reference diagram with three views.  1 = plan view, 2 = axial view, 3 = image view.  Figure 3.3 is a reference diagram for a scanning setup. ‘View 1’ provides a plan view, observing the interaction between the knot, X-ray beam, and detector. ‘View 2’ provides a hypothetical view along the axis of the log, where the knot’s circumferential angle can be clearly seen. ‘View 3’ is the image view as read from the detector. 21X-ray beam Detector Knot 26    Figure 3.4 A single knot observed using an orthogonal scanner.  (a) Axial View 2, (b) image View 3.   Figure 3.4 schematically shows the axial ‘View 1’ and the image ‘View 3’.   The primary limitation faced with orthogonal scanning is that knot measurements are made in mostly the same plane that the knots grow. With conifers exhibiting only small axial angles, the knot axes will lie mostly within the place perpendicular to the pith. Under these conditions, knot circumferential angle has little effect on the observed knot shadow, as it only changes length while maintaining the same perpendicular orientation in the measured image. In general, an X-ray image gives a 2-D projection of a 3-D object, but orthogonal scanning has the effect of reducing the projection to a 1-D result. This characteristic makes it very difficult to identify knot circumferential angles from an orthogonal X-ray scan. (a) (b) 27      Figure 3.5 Orthogonal scan with 4 clustered knots.  This limitation is amplified when multiple knots are present. Consider the arrangement in Figure 3.5 that has four knots in a single cluster. The knots are close to the same measurement plane, so their shadows overlap each other and cannot be separated. For clarity, Figure 3.5 depicts the knots with defined edges, but in reality, the shadows of the knots in practical X-ray scans have very diffuse edges. These soft edges make it very difficult to separate knot shadows that either overlap or are within close proximity to each other. Due to these limitations, it is clear that Log Detector Source 28  orthogonal scanning has limited applications in determining knot circumferential angles and can only reliably determine axial locations along the length of the log. An alternative approach is needed that can reliably reveal the knot shadows to better determine the circumferential and axial angle.   3.4 Oblique Scanning  To overcome the limitations faced in orthogonal scanning, the source and detector can be placed at an oblique angle to the log to provide a more ‘side on’ view of the knots. This spreads the X-ray image horizontally and enlarges the 1-D view obtained with an orthogonal scan into a 2-D view. Figure 3.6 shows a comparison of oblique and orthogonal scanning setups. In the oblique scanner, the source and detector are placed at an angle θ to the log axis perpendicular.   Figure 3.6 Plan views of (a) orthogonal scanning and (b) oblique scanning.  X-ray source Log Detector θ (a) (b) Detector Log X-ray source 29  3.4.1 Advantage of Oblique Scanning  Figure 3.7 shows the same simulated cluster of knots from Figure 3.5, but now viewed at a 45-degree oblique angle.   Figure 3.7 Simulated cluster with 4 knots with an oblique view.  In the oblique view, the knots lie significantly outside the measurement plane and so their shadows move out of the vertical radial plane, spreading horizontally (axially) depending on their circumferential orientation. Most significantly, the shadows of the knots are now spread out more in two dimensions, so overlapping is greatly reduced. There are now clear distinctions among the four knots, which makes it much more practical to identify their orientations. The next Section describes the mathematical procedure for doing so.   30  3.4.2 Oblique Knot Orientation Derivation  A geometrical model is required to determine the 3-D orientations of the knots from the 2-D images. To derive this model, three views of the log scanning setup will be considered; a plan view of the detector (View 1), along the axis of the log (View 2), and in the direction of the scan as taken from the detector (View 3). Figure 3.3 schematically illustrates these views.   Figure 3.8 shows a plan view of the log, with the X-ray source on the right, and detector on the left. In this diagram, the red arrows represent a knot, with the arrow tip being the end of the knot at the outside surface. Figure 3.8(b) shows a close-up of the knot shown in Figure 3.8(a). Dimension A represents the source to log center distance, B the source to detector distance, C the horizontal length of the knot, and R the radius of the log.   31   Figure 3.8 Plan view of a log (View 1). (a) general view, (b) detail around knot.  The red arrow indicates a knot.   Figure 3.8(a) depicts the X-rays as coming out as a parallel series of beams. The fan beam coming from the X-ray source is aligned in the plane perpendicular to plan view. Thus, the C D R tan(𝜓) R sin(𝜙) (b) 𝜃 (a) A C 𝜃 B X-ray source Detector Log A’ C’ B’ 32  edgewise view of the X-ray fan beam appears as a single line. As the log moves forward during the scanning process, successive fan beam measurements are made at regular intervals. Relative to the log, the planes of these successive fan beams appear as the parallel X-ray lines shown in Figure 3.8(a).   In Figure 3.8(b) the vertical component 𝑅 tan(𝜓) + 𝐷 is the projected axial component of the knot within the log.    tan(𝜃) =𝐷𝑅 sin(𝜙) 3.1  ∴ 𝐷 = 𝑅 sin(𝜙) tan(𝜃) 3.2  Thus, the axial component of the knot is 𝑅 tan(𝜓) + 𝑅 sin(𝜙) tan(𝜃).  Next, considering Figure 3.9, the axial view down the length of the log, R is the radius of the log, F is the vertical height of the knot, and E is the projected height of the knot. 𝜙 is the circumferential angle of the knot, which is one of the unknowns to be determined.  33   Figure 3.9 View along the log axis (View 2).  As shown in Figure 3.8(a) the scanning dimensions A, B, and C lie within the oblique plane. Therefore, it is necessary to adjust these components to the log cross-Section plane to A’, B’, and C’ by factoring the oblique angle 𝜃, as illustrated in Figure 3.8(a).    𝐴′ = 𝐴 cos(𝜃) 3.3  𝐵′ = 𝐵 cos(𝜃) 3.4  𝐶′ = 𝐶 cos(𝜃) 3.5  The horizontal and vertical components that make up the knot F and C’ are:  𝜙 E A’ B’ F C’R X-ray source Log Surface Detector 34   𝐹 = 𝑅 cos(𝜙) 3.6  𝐶′ = R sin(𝜙) 3.7   By considering similar triangles, the projected height of the knot E can be determined using:  𝐴′ + 𝐶′𝐹=𝐵′𝐸 3.8  Inserting equations 3.3, 3.4, 3.5 gives:  𝐴 cos(𝜃) + 𝐶 cos(𝜃)𝐹=𝐵 cos(𝜃)𝐸 3.9  𝐴 + 𝐶𝐹=𝐵𝐸 3.10  𝐸 =𝐵𝐹𝐴 + 𝐶 3.11  Inserting equations 3.6, 3.7.  𝐸 =𝐵𝑅 cos(𝜙)𝐴 +𝑅 sin(𝜙)cos(𝜃)  3.12  This equation considers the projected and enlarged log image on the detector at a distance from the source of B. The ratio 𝐵𝐴 represents the scaling factor of the projected log image measured on the detector relative to the actual size at the log centre. This ratio can be factored from equation 3.12 to give:  35   𝐸 =  𝐵𝐴𝑅 cos(𝜙)1 +𝑅 sin(𝜙)𝐴 cos(𝜃) 3.13  Figure 3.10 shows the imaged log as seen from the detector. The vertical radial component of the knot was determined from Figure 3.9, and the horizontal axial component was determined Figure 3.8. The knot is made up of two components along the axial and radial directions in this view, and creates an angle β, with an imaged length L.   Figure 3.10 View in direction of oblique scan (View 3).  In Figure 3.10 it is now possible to calculate the circumferential angle 𝜙 and axial angle 𝜓 by using only the 2-D image features of knot angle β and length L. By taking the tangent of β, it is Log 𝛽 𝑅 tan(𝜓) + 𝐷 = 𝑅 tan(𝜓) + 𝑅 sin(𝜙) tan(𝜃)  𝐸 =𝐵𝐴𝑅 cos(𝜙)1 +𝑅 sin(𝜙)𝐴 cos(𝜃) L 36  possible to combine the axial and radial components of the knot to determine the circumferential and axial angle.  tan(𝛽) =𝑅 tan(𝜓) + 𝑅 sin(𝜙) tan(𝜃)𝐵𝐴𝑅 cos(𝜙)1 +𝑅 sin(𝜙)𝐴 cos(𝜃) 3.14  ∴  tan(𝛽) =𝐴𝐵(𝑅 tan(𝜓) + 𝑅 sin(𝜙) tan(𝜃)) (1 +𝑅 sin(𝜙)𝐴 cos(𝜃))𝑅 cos(𝜙) 3.15  Equation 3.15 derives the circumferential angle 𝜙 from the projected knot angle 𝛽 and the tangent function. Note that for this equation there are two unknowns of 𝜙 and 𝜓, which can be determined in different ways. One method is by taking another scan of the log rotated 90 degrees around the log axis and simultaneously solving the resulting equations to derive both unknowns. Another method is by assuming a typical value for the axial angle 𝜓 and then solving for the circumferential angle 𝜙. The two methods will be called the ‘dual orientation method’ and ‘single orientation method’ respectively. One final way to calculate the circumferential angle 𝜙 is to utilise the length of the knot which will be called the ‘knot length method’.  3.4.2.1 Dual Orientation Method  The dual orientation method requires two scans of the log to be made 90 degrees apart around the log axis. By considering this second view with its own equation 3.15, it is possible to solve both equations simultaneously to determine the two unknowns of axial angle 𝜓 and 37  circumferential angle 𝜙. In theory this method could work, however, in practice this method is not effective because:  1. It assumes the knot is reliably detected in both orientations. However, because the two measurement orientations are perpendicular to each other, a knot that is favourably placed in one measurement, i.e., perpendicular to the X-ray beam, will be unfavorably placed in the other measurement, i.e., parallel to the X-ray beam. Thus, it will be very common for a knot to be reliably identified in only one of the measurement orientations and “missing” from the other measurement orientation.  2. Even if a knot is detected in both images, it must be reliably matched between the two orientations. In the case of tree species whose branches grow from the trunk one at a time, such knot matching can be accomplished straightforwardly by comparing knot pith locations. However, when working with the large number of tree species whose knots grow in clusters, knot pith location is no longer sufficient, and it become necessary to compare the angular positions of several closely spaced knots. This is very difficult to do reliably, especially when working with knot images made in the “unfavorable” direction.  3. The knot angle computation method is mathematically valid, but it is very ill-conditioned. Small errors in identification of the 𝛽 angle lead to proportionally much larger errors in the computed circumferential angle 𝜙 and axial angle 𝜓. So even if the previous two limitations were overcome, the calculations would provide poor results. Thus, alternative approaches need to be explored.  38  3.4.2.2 Single Orientation Method  Instead of using two orientations to solve for the two angles simultaneously, an assumption for the axial angle 𝜓 can be used. As mentioned in Section 3.1.2, coniferous trees have consistent growth patterns, and so an assumption of this axial angle can be made with reasonable accuracy. First take equation 3.15 and rearrange in terms of 𝜙 to make derive equation 3.16. Then substituting an axial angle 𝜓 into equation 3.16, the circumferential angle can be determined.    tan(𝜙) =𝐵𝐴tan(𝛽1)1 +𝑅𝐴sin(𝜙)cos(𝜃)−tan(𝜓)cos(𝜙)tan(𝜃)  3.16  This method assumes a more compact axial angle range compared to the dual orientation method, which has no bounds. So even an error in the assumption may be less than the error in the calculation in the dual orientation method due to measurement sensitivity.  3.4.2.3 Knot Length Method  The length of the knot can also be used to determine the circumferential angle. As the radial and axial components of the imaged knot contains circumferential angle information, the sine and cosine function can be utilised.   39   cos(𝛽) =𝐸𝐿=𝐵𝐴𝑅 cos(𝜙)1 +𝑅 sin(𝜙)𝐴 cos(𝜃)𝐿 3.17  ∴ cos(𝜙) =𝐴𝐿𝐵𝑅cos(𝛽) (1 +𝑅𝐴sin(𝜙))  3.18   sin(𝛽) =𝑅(tan(𝜓) + sin(𝜙) tan(𝜃))𝐿 3.19  ∴ sin(𝜙) =𝐿 sin(𝛽) − 𝑅 tan(𝜓)𝑅 tan(𝜃) 3.20  Equations 3.18 and 3.20 derive the circumferential angle 𝜙 from the angle 𝛽 and the length of the knot. Equations 3.16, and 3.18 are non-linear simultaneous equations, so an iterative solution must be used to solve them. By first assuming a circumferential angle 𝜙 of 0, equations 3.16, and 3.18 are looped to determine the final value after convergence, which generally occurs after only a few iterations.   Calculating the angle 𝛽 is generally more reliable than determining the length of the knot. Thus, determining the circumferential angle 𝜙 by using the knot length is possible but is limited in the ability to accurately determine the knot length, which should be factored into this method.  3.4.2.4 Knot Method Selection  The derived equations 3.16, 3.18, and 3.20 are all potential ways of determining the circumferential angle of the knot. While all mathematically equivalent, the various methods will respond to input errors in different ways. Also, the image processing program may be able to 40  calculate the knot angle and length more accurately in some configurations than others. As such, it may be advantageous to consider each calculation method for each knot imaged and select the most suitable one for that particular case. It is also possible to determine the orientation using multiple methods and average between the results; however, care must be taken not to try to ‘improve’ superior results by averaging them with inferior results.    Figure 3.11 Scans from 2 orientations 90 degrees apart with separate X-ray sources and detectors.  Figure 3.11 is an arrangement with two sources and two detectors with their orientations rotated by 90 degrees. This setup allows multiple results to be calculated and averaged. It also ensures X-ray source 2 Detector 2 X-ray source 1 Log Detector 1 41  that a poorly imaged knot in one orientation, such as a knot directly in line with the source and detector, can still be captured well in the perpendicular direction.  The quality of any computation depends on the quality of the input data. Thus, independent of the particular equations above that are used, it is critical that identification of the locations and orientations of the knots is accurate and reliable. To achieve this, sophisticated image processing is necessary to highlight and locate the knots. This will be explored in the following chapter.  42  Chapter 4: Image Processing and Knot Detection  Once a log has been scanned, the next step is to detect the location and orientation of the knots from within the measured X-ray images. Figure 4.1 outlines the proposed process. This chapter describes the various steps required to process the scanned images.   Figure 4.1 Knot orientation calculation process.  Collect Image•X-ray scan4.1 Pre-Processing•4.1.1 Basis Weight Conversion•4.1.2 Spatial Scaling•4.1.3 Pith and Radius Detection4.2 Processing•4.2.1 Background Subtraction4.3 Knot Detection•4.3.1 Imaged Angle•4.3.2 Pith Intercept•4.3.3 Knot MatchingInferring Orientation•3.4.2.2 Single orientation method•2.4.2.3 Knot length method43  4.1 Pre-Processing  Knots comprise only a small fraction of a cross-Section of a log, so they contribute only a modest increase to the measured basis weight in the X-ray image. Thus, the knot shadows have very low contrast relative to the surrounding material. Sophisticated image processing must therefore be applied to increase the contrast of the knot shadows in an intelligent way to enable their presence and location to be identified reliably.   4.1.1 Basis Weight Conversion  First the raw images are converted from X-ray intensity values to basis weight values. As discussed in Chapter 2.2, the conversion of X-ray intensity to basis weight can be accomplished by using Beer’s Law (repeated from equation 2.1).   ∫ 𝜌(𝑥)𝑑𝑥 = −𝛽 ln𝐼𝐼0 4.1  Beer’s Law applies to the ratio of X-ray intensities 𝐼/𝐼0, where 𝐼 is the attenuated X-ray intensity after passage through the measured material, and 𝐼0 is the unattenuated X-ray intensity measured without any material present. Thus, a basis weight evaluation requires measurement of both the attenuated X-ray intensity 𝐼 and the unattenuated intensity 𝐼0. In addition, radiation detectors typically show a small zero offset ‘dark current’, partly due to background radiation. This zero-44  offset can be accounted for by also measuring the detector reading 𝐼𝑧 when there is no incident radiation. Combining these three measurements and substituting in equation 2.1 gives:   𝐵𝑊 = − ln𝐼 − 𝐼𝑧𝐼0 − 𝐼𝑧  4.2  The unattenuated X-ray intensity 𝐼0 and the zero-offset reading 𝐼𝑧 vary for each pixel because of individual variations in the calibration of the various pixels. In addition, 𝐼0 varies significantly across the scanner length because the X-ray beam is non-uniform, typically with maximum intensity at the centre and diminishing toward the sides. Figure 4.3 shows typical measured profiles of 𝐼0 and 𝐼𝑧 in a practical experimental measurement. In practice, the unattenuated X-ray intensities 𝐼0 would be measured during the gaps between logs and the zero offsets 𝐼𝑧 would be measured before the X-ray tube is energized.   45   Figure 4.2 Unattenuated and background intensity plots for a vertical column of pixels from a 480 pixel length detector. (a) Unattenuated X-rays and (b) background noise. Note: The horizontal axis of the plots is a vertical column from the scan.   Figure 4.3(a) shows the X-ray intensity (𝐼) image for an example log scan. When combined with the data in Figure 4.3 and substituted in equation 4.2, the basis weight image in Figure 4.3(b) is obtained. The reversal in the greyscale sequence occurs because high basis weight (bright image) corresponds to high attenuation and therefore to low measured X-ray intensity (dark image). Of note is that the background area in Figure 4.3(a) is bright, indicating high X-ray intensity, while the corresponding area in Figure 4.3(b) is black, indicating zero density, i.e., no wood present.                                  e  i a   i e     i i n                            i e  in en i                                                     e  i a   i e     i i n                             i e  in en i                            (a) (b) 46   Figure 4.3 X-ray scans of a log. (a) Raw captured image, (b) corresponding basis weight conversion using equation 4.2.  Beer’s Law holds for X-rays of a single energy, also described as ‘monochromatic’. However, X-ray tubes produce a polychromatic spectrum of X-ray energies, with each energy corresponding to a different attenuation coefficient. For purposes of this work, the approximation of a single attenuation coefficient is sufficient in providing approximate basis weight values because only relative basis weight values are used in the subsequent calculations. Knot locations are identified by observing localized areas of basis weight increase, without reference to absolute values. If exact basis weight values are desired, then further testing to develop an empirical relationship between pixel intensity and basis weight would be needed.  (a) (b) 47  4.1.2 Spatial Scaling  When capturing images with a linear detector, the vertical and horizontal pixel spacings depend on various setup parameters. The horizontal pixel spacing depends on the speed of the log motion and the integration time of the of the detector. The integration time is the repetition speed at which lines of pixels are measured. The horizontal pixel spacing equals the log speed multiplied by the integration time.  𝐿𝑜𝑔 𝑆𝑝𝑒𝑒𝑑 (𝑚𝑚𝑠) ∙ 𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑇𝑖𝑚𝑒 (𝑠𝑓𝑟𝑎𝑚𝑒) = 𝐻𝑜𝑟𝑖𝑧𝑜𝑛𝑡𝑎𝑙 𝑆𝑐𝑎𝑙𝑒 (𝑚𝑚𝑓𝑟𝑎𝑚𝑒) 4.3  The vertical pixel spacing can be determined by scaling the detector pitch from the detector location to the centre of the log using the inverse of the B/A factor (as the measurements are being reduced) being described for equation 3.13. The detector pitch is the distance between pixels on the detector. This factor corresponds to the ratio of source to log and source to detector distances. 48   Figure 4.4 Determining the scaled detector pitch at the log center from the actual detector pitch. Pixels are represented in green.   𝐴𝐵∙ 𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟 𝑃𝑖𝑡𝑐ℎ (𝑚𝑚𝑝𝑖𝑥𝑒𝑙) = 𝑆𝑐𝑎𝑙𝑒𝑑 𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟 𝑃𝑖𝑡𝑐ℎ (𝑚𝑚𝑝𝑖𝑥𝑒𝑙) 4.4  By knowing both the horizontal and vertical pixel spacings, it is possible to represent the pixels as rectangular in shape in the image to ensure a consistent visual scale. When seeking to represent the measurements in the correct proportions using a regular square grid, for example on a computer screen, it is necessary to use several square pixels for form each rectangular pixel in the original scan. Figure 4.5 shows the resulting “stretching” of the image height to ensure the scan has the same spatial scale both horizontally and vertically.   A B Detector Pitch Scaled Detector Pitch 49   Figure 4.5 Effect of image scaling. (a) raw image with unequal spatial resolution,  (b) scaled image with equal spatial resolution.  4.1.3 Pith and Radius Detection  In preparation for identifying knot locations, it is necessary to determine the pith of each scanned log. One method to accomplish this is to assume that the pith occurs at the mass centroid within each vertical column of pixels. This will result in a line spanning horizontally across the scan with the predicted center of the log.   Equation 4.5 determines the vertical height ℎ̅ in the scan that is column center. ℎ𝑖 is the vertical location of the pixel in the column, while 𝐵𝑊𝑖 is the pixel value intensity. (a) (b) 50    ℎ̅ =∑ ℎ𝑖𝐵𝑊𝑖∑ 𝐵𝑊𝑖 4.5  Figure 4.6 shows the basis weight image with a single column of pixels illustrated to the right, depicting the mass centroid method. Figure 4.7 shows the calculated pith in red overlaid on the basis weight image.  Figure 4.6 Basis weight with a single column of pixels.   Figure 4.7 Pith detection using mass centroid method.  ℎ𝑖51  In preparation to the subsequent background subtraction process (discussed in Section 4.2.1), it is necessary to straighten the image shown in Figure 4.7 so that the central pith line lies along the horizontal centerline of the image. This alignment removes localized curvatures in the image and causes the various features to be arranged in an orderly way horizontally across the image. This straightening can be accomplished by simply shifting each column of the image up or down to place the calculated pith onto the horizontal centerline of the image. If the calculated pith location is not a whole integer, the column is interpolated and shifted by fractions of a pixel to ensure a best fit to the centerline of the image.   The radius of the log is calculated by sequentially considering each column of pixels across the image. Figure 4.8 shows an example intensity profile from a single column in the image. The profile can be approximated as a semi-ellipse, which is the Radon transform corresponding to the round shape of the log. In Figure 4.8, the red line represents the column data, while the black line represents the best-fit semi-ellipse    52   Figure 4.8 Radon transform of an ellipse. The black profile is that of an ellipse, with the red profile taken from a sample measurement.  By taking the mass centroid equations for a semi-ellipse, with manipulation it is possible to determine the radius r. Equation 4.6 calculates the area 𝐴 of the ellipse from radius 𝑟 and height ℎ. Equation 4.7 determines the centroid ?̅?, and equation 4.8 and 4.9 determine the semi-ellipse radius from the values 𝐴 and ?̅?.  𝐴 =𝜋𝑟ℎ2 4.6  ?̅? =4ℎ3𝜋 4.7  𝐴?̅?=3𝜋2𝑟8 4.8   ∴ 𝑟 =8𝐴3𝜋2?̅? 4.9  53  Because this semi-ellipse is actually a series of discrete basis weight values, the area under the curve is simply the summation of each pixel’s value, shown in equation 4.10.  𝐴 = ∑ 𝐵𝑊𝑖 4.10  The centroid height of the semi-ellipse can be determined by summing the height of each individual pixel’s centroid. Equation 4.11 calculates the centroid 𝑦𝑖 of a single basis weight column 𝐵𝑊𝑖. Equation 4.12 calculates the centroid ?̅? through the summation of the individual column centroid.   Figure 4.9 Semi-elliptical profile from the Radon transform with centroid height y for column i.  𝑦𝑖 =𝐵𝑊𝑖2 4.11  ?̅? =∑ 𝑦𝑖𝐴𝑖∑ 𝐴𝑖 4.12  ?̅? =∑ 𝐵𝑊𝑖22 ∑ 𝐵𝑊𝑖 4.13 𝑦 𝑖 54   Therefore, substituting these values back into equation 4.9, the radius of the log can be determined from the basis weight image, shown in equation 4.14. Figure 4.10 depicts the calculated radius on the basis weight image.  𝑟 =163𝜋2(∑ 𝐵𝑊𝑖)2∑ 𝐵𝑊𝑖2  4.14   Figure 4.10 Basis weight image with detected outside surface boundary overlaid in red.  This method of radius detection is preferred over more conventional edge detection techniques because it involves an average of many pixels spread over a large area. In contrast, edge detection methods generally rely on a small Section of surrounding pixels, which can be heavily influenced by noise, bark, and measurement artifacts.  Figure 4.11 shows the combination of all the pre-processing steps, including basis weight conversion, scaling, pith detection, straightening, and outside surface detection. After completion of pre-processing, further image processing can be done to highlight and detect knot positions. 55    Figure 4.11 Final image after pre-processing with straightening, and pith and radius in red.  4.2 Processing  Pre-processing places the X-ray scan into a state where more sophisticated image manipulation methods can be employed. Primary objectives are to increase the contrast and highlight knot locations. These features will greatly improve knot location and angle detection. Increasing the contrast of the knots is the first step in this process, for which a background subtraction method will be developed.   4.2.1 Background Subtraction  As seen in Figure 4.11, the increase in basis weight at the location of knots is only slightly greater than that of the surrounding clear wood, on average by only around 15%, and can be as low as 4%. As such, it is necessary to increase the contrast between the knots and the clear wood to allow reliable knot detection. Conventional contrast enhancement techniques generally do not 56  perform well in this regard because they substantially multiply measurement noise and so create very grainy images and exaggerated measurement artifacts.   Common contrast enhancement techniques simply rescale the image values, without reference to the actual content of the image. This is a useful general-purpose approach for unstructured images. However, the log images measured here have a very specific structure, where the log extends horizontally with a mostly uniform pattern corresponding to the clear wood. Occasionally this uniform pattern is interrupted by a knot. What is desired here is to distinguish the knots from the clear wood. An effective approach to doing this is to subtract the clear wood pattern from the basis weight image. This process removes the clear wood areas and leaves remaining the knots.   As can be seen from Figure 4.11, the clear wood area is characterized by the region enclosed by the outer red boundary lines, excluding the knots. The purpose of the image straightening done during the pre-processing step was to allow this region to become as straight and horizontal as possible. This allows accurate identification of the clear wood areas by taking a moving average within an axial averaging window of the log. The axial window length was chosen to be significantly wider than a knot so that the adjacent clear wood always dominates, but not too long that the local clear wood variation is washed out.   Figure 4.12 provides an example of a horizontal moving average with an averaging window of 300 pixels, and the resultant basis weight image subtracted from the moving average. Pixel values that become negative during this process are set as a 0 value.  57    Figure 4.12 Background subtraction method. (a) Horizontal moving average, (b) basis weight with subtracted moving average. Edge artifacts highlighted in red.  During this subtraction process, the basis weight image has a mild gaussian blur applied to it. Counterintuitively, this provides better background subtraction results, as the blurring removes noise that is amplified during this background subtraction process. Also, because edge detection methods are avoided, a loss in image detail from the gaussian blur does not negatively impact further processes.  The primary variable in this method is the size of the averaging window used. It is helpful to think of this background subtraction method as highlighting the difference in the local area. A (a) (b) 58  small averaging window highlights the difference in the immediate horizontal surrounding area, while a large averaging window tends to highlight the difference compared to the wider clear wood. Thus, in general terms smaller averaging windows produce fewer highlighted areas, as the immediate surrounding area is often very similar. Figure 4.13 illustrates the effect of different window averaging sizes. Figure 4.13(a) has a moving average of 65 pixels and fails to capture the knots properly, instead highlighting the edges of the knots rather than the body of the knot. Figure 4.13(c) has a moving average of 1000 pixels. This choice highlights the knot, but tends to blur the edges, so reducing the intensity of smaller knots and introducing larger artifacts. Figure 4.13(b) has a moving average of a more modest 300 pixels and is a good compromise choice that gives good detail without excess introduction of artifacts, while maintaining knot intensities.   59   Figure 4.13 Comparison of different averaging window sizes. (a) 65 pixel window, (b) 300 pixel window, and (c) 1000 pixel window.  One common source of artifacts is along the edges of the logs, where a bump on the edge will be subtracted from the black background, causing it to be highlighted. Examples of these can be seen highlighted in red in Figure 4.12. By using smaller averaging windows along the edges, and larger averaging windows in the middle, it is possible to remove these edge artifacts while maintaining the primary highlighting method in the area of concern.  (a) (b) (c) 60   Figure 4.14 Background subtraction method with a 300 pixel window size. (a) Constant moving average windows, (b) variable moving average window.  To accomplish this, a rectangular function is generated, with the same width as the log diameter, and peak height corresponding to the averaging window. Then the edges are smoothed slightly to prevent hard edges in the image. Smoothing is achieved through a locally weighted scatterplot smoothing (LOWESS), which was found to remove hard edges in the variable moving average window in comparison to more basic moving average smoothing methods. Each row of the image then has a moving average applied with the corresponding window size from the rectangular function. Figure 4.14 illustrates this concept with a moving average window of 300. Notice how the bottom figure has noticeably less erroneous highlighting along the edge.   Moving average window size 300 (a) (b) 300 61  The values used for the moving average window are not exact, which makes is robust over a wide range of values. A window size of 300 pixels is utilised for this analysis, however values ranging between 100 to 500 have also shown provide adequate results with slight differences in knot highlighting capability.   As shown, with a simple method the knot positions can highlighted. This now allows the knot detection process to begin to determine their location and orientation.  4.3 Knot Detection  Using the background subtraction method, the knots become sufficiently highlighted to allow them to be detected effectively. The following Section outlines how the knots are detected, and how their orientations determined.   First, a rough determination of the knot’s location is done. The scanned image of the log is divided into the top half above the pith, and the bottom half below the pith. Each detection process occurs twice, once for each half. A row of pixels 1/3rd the radius from the pith is taken as the location to perform a detection of the knot locations, which is illustrated in Figure 4.15. The same process is applied to the bottom half.   62   Figure 4.15 Knot detection for top half. (a) Intensity profile from green dashed line. (b) Location of row 1/3 the radius from the pith in dashed green, with pith and outer edge in red.  The distance from the pith is set to 1/3rd the radius, as selecting a location too far from the pith may miss knots that do not appear to reach the outer edge in the scan, while selecting too close to the pith may lead to interference from other clustered knots.  The location of the knots is then determined by detecting the location of the peaks. Potential knot locations are checked to remove artifacts. The peaks are expected to have a minimum intensity, which is determined by a threshold value. This threshold value is determined automatically using “Otsu’s Method” and is used to split the image into light regions and dark regions [28] [29]. The advantage of using Otsu’s Method is that this threshold value is determined for each image, and so is robust in dealing with variations between images.  The threshold value is easily determined, because the knots and background have such different intensities. Peaks that have an amplitude below this threshold value are rejected. It is also (a) (b) 63  possible to multiply this threshold value by a factor to change the detection sensitivity. Increasing the threshold value will only accept brighter knots, while reducing the value will accept more potential knot positions.   Once these peaks have been detected based on the filtering process, the axial location at the 1/3 radius position is stored. If a knot has been detected, it is necessary to determine the orientation (also referred to as the 𝛽 angle), which can then be used to determine the pith intercept location.   4.3.1 Imaged Angle  Determining the imaged angle 𝛽 of the knot is critical to calculating the circumferential angle 𝜙 of the knot (as discussed in Section 3.4.2), and determining the pith intercept location. To stabilize the identification, a slight gaussian blur is applied to remove hard edges and noise. This also averages the surrounding pixels. A line of pixels ?̂? with length radius is taken at an angle 𝛽 that intersects the detected knot position at 1/3rd the radius location.   64   Figure 4.16 Angle detection method by taking a line of pixels (yellow line) and rotating about the detected position.  The 𝛽 angle is then increased incrementally, rotating the calculated line of pixels around the detected knot position. At each trial 𝛽 angle, the average pixel value from the line is taken. The position with the highest average value indicates the line of pixels passes through areas of high intensity, which indicates a knot. Figure 4.16 depicts this process with the yellow line representing the array of pixels 𝑷 rotating clockwise about the red circle.  In some instances, it is possible for the line to pass through an orientation of a knot that happens to have a high mean intensity but is not in line with the actual knot. To account for this, the number of pixels above the threshold value (discussed in Section 4.3) are counted along this line. It is desirable to have the line pass through a longer continuous Section of lower intensity values, 𝛽 𝑷 65  than a short region of higher intensity, as a longer continuous section is more indicative of a knot.  It is desirable to seek a combination of high average pixel values, and a high quantity of pixels above the threshold value. Equation 4.17 expresses this combination, where 𝑆 is the combined value used to determine knot angles, and 𝑷 is the array of pixel values for a given 𝛽 angle. ?̅? is the average value of all the pixels in 𝑷, and ?́? is how many pixels in 𝑷 are above the threshold value.  Both the mean pixel value ?̅? and pixel quantity value ?́? are normalised between 0 and 1 by dividing by their maximum respective values found in each orientation, as calculated in equation 4.15 and 4.16. The ideal knot angle 𝛽 is when the value of 𝑆 is at a maximum.   ?̅?𝑛𝑜𝑟𝑚 =?̅??̅?𝑚𝑎𝑥 4.15  ?́?𝑛𝑜𝑟𝑚 =?́??́?𝑚𝑎𝑥 4.16  𝑆 =2?̅?𝑛𝑜𝑟𝑚?́?𝑛𝑜𝑟𝑚?̅?𝑛𝑜𝑟𝑚 + ?́?𝑛𝑜𝑟𝑚 4.17  This combined value is the harmonic mean of the two values. The harmonic mean is preferred over the arithmetic mean as it favours combinations of values that are equally high and penalises combinations of values with a large difference. The arithmetic mean is unable to distinguish between these two cases. 66   Figure 4.17 provides an example of the two angle detection methods. Figure 4.17(a) determines the knot angle based on only the maximum average value of the line. Figure 4.17(b) calculates the knot angle based on the maximum value of the line average and the number of pixels above the threshold value. Notice how the knot in the top half of the log in Figure 4.17(b) has it’s angle correctly determined by factoring both values, while the determined knot angle in Figure 4.17(a) incorrectly passes through the knot.    Figure 4.17 Comparison of angle detection methods, with a difference in results for the top knot angle. (a) Calculates only maximum average value, (b) calculates maximum average and quantity of pixels above the threshold value, resulting in more accurate detection.  (a) (b) 67  4.3.1.1 Confidence Score  Another use for the value 𝑆 calculated in equation 4.17 is as a confidence score. Each detected knot has a maximum value of S used to determine its orientation on the image. In addition, this maximum value also provides an indication of how well a knot is imaged. Detected knot positions with large S values indicate knots that are well captured. A small 𝑆 value generally indicates a poorly imaged knot, or perhaps a false detection. By using this value as a confidence score, low 𝑆 value positions can be rejected as erroneous detections, so reducing the number of false positives. This cut-off score is called the ‘confidence threshold’ and is a manually tuned a parameter between 0 and 1. A high confidence threshold only accepts potential knots that are very well imaged, at the possible expense of rejecting real but poorly imaged knots. A low confidence threshold accepts more potential knot positions, at the expense of accepting more artifacts. Ultimately, the end user has the ability to tune this parameter to meet their detection requirements, as will be investigated further in Section 4.4.5.  4.3.2 Pith Intercept  The pith intercept is the distance along the log axis at which the knot meets the pith, with the 0 position being the leading edge of the log. The pith intercept not only acts to locate the knot within the log but also allows matching of knots from multiple orientations. This will be discussed in Section 4.3.3.  68  Figure 4.18 depicts the same knot as in Figure 4.16, with a known 1/3rd radius position and 𝛽 angle. 𝑥′ is the distance from the leading edge of the log (in this case the left side of the image) at the 1/3rd position, 𝑥 is the pith intercept of the knot, and 𝑅 is the radius of the log. Equation 4.18 calculates the pith intercept location from these values.    Figure 4.18 Determining the pith intercept x of a knot from the 1/3rd radius point x’ and β angle.    𝑥 = 𝑥′ −13𝑅 tan(𝛽) 4.18    𝛽 𝑥 𝑥′ 13𝑅 69  4.3.3 Knot Matching  It is desirable to image the log from at least two orientations in the event one orientation minimizes the knot footprint. Moreover, for a knot well imaged in both orientations, it is possible to average the results to reduce errors. To ensure the same knot is not counted twice, and to conduct averaging if appropriate, it is necessary to match corresponding knots between orientations.   When using the single orientation method (Section 3.4.2.2), or knot length method (Section 3.4.2.3), each orientation calculates a knot circumferential angle 𝜙 and pith intercept 𝑥. Utilising these two data points for each knot, it is possible to plot the knot positions on a ‘knot plot’.   Figure 4.19 Sample knot plot for a log with 0 degree and 90 degree orientation results. 70   Figure 4.19 shows a sample knot plot with results from 0-degree and 90-degree orientations. For 6 of the calculated knot positions, there is similarity between the orientations, with one outlier in the 0-degree orientation at approximately 0.2 meter pith position at 50 degrees circumferential angle. For the 6 positions with similar results between the orientations, it is highly likely that these calculated positions correspond to the same knot (and through visual observation of the images, this is confirmed). However, it is necessary for the algorithm to be able to detect these matches automatically to prevent double counting a knot, and to allow the results from each orientation to be averaged if desired.  To accomplish this, a bounding box is drawn around calculated knot positions of one orientation with a manually set tolerances for the pith distance and circumferential angle. Calculated knot positions in the adjacent orientation are then checked to see if they lie within a bounding box. If so, it is considered a match with the knot of the bounding box it lays within. If multiple knots are found within a bounding box, the knot with the smallest difference is taken as the match. The bounding box is also allowed to wrap around the angle bounds of [-180 180] to ensure that calculated knot positions on opposite ends of the angle bounds can be considered a match. This is done because angular positions on the ends of the bounds are physically close to each other.  71   Figure 4.20 Knot map close-up of two detected knots from adjacent orientations. The 90-deg knot is considered a match with the 0-deg as it lays within the bounding box.  Figure 4.20 depicts a close-up of a knot pair from Figure 4.19. The bounding box with pith and circumferential tolerances is drawn in red, centered about the detected 0-degree orientation knot. As the knot detected in the 90-degree orientation lies within this bounding box, it is considered a match, and therefore physically the same knot. From here, a weighted mean of their results is taken, with the confidence score acting as the different weightings.  Circum. Tolerance Pith Tolerance 72  To collect the images required to conduct this analysis, purpose-built hardware was constructed. Due to the size of logs being scanned, the X-ray producing and detecting hardware, and safety considerations, significant development into a system that can reliably and consistently scan logs was conducted. The next chapter discusses the scanning system constructed to accomplish this.   4.4 Measurement Metrics  The development of metrics for the overall performance of the detection and processing algorithm is critical to understanding how changes in parameters or methods affect the end results. Detection and identification of knots can be quantified by the number of true positive, false positive, and false negatives. The overall performance of the analysis process is measured using the three metrics of Precision, Recall, and average circumferential error. Precision is a measure of how many of the detected positions correspond to a real knot, Recall is a measure of how many real knots are detected, and the average circumferential error is the angular error between the calculated knots and actual knots.  4.4.1 Quantifying detection  True Positive (TP) are cases where the algorithm successfully detects the knot position and orientation with reference to a known knot positions as determined through physical measurements. A detection and orientation calculation is deemed successful if it falls within the tolerances in the knot matching method as outlined in Section 4.3.3. However, rather than matching two knots calculated by the algorithm in different orientations, as described in Section 73  4.3.3, a calculated knot position is matched with a physically known knot position. Figure 4.21 depicts this process with a sample log, calculated knot positions using the Single Orientation Method (SOM) combining results across adjacent orientations (Two View), and physical measurements. The red box centered on one of the known knot positions captures all the surrounding calculated positions, thus classifying each of them as a match with that knot.  False Positive (FP) cases are where the algorithm detects a knot and orientation, however there is no match to a known physical knot. False Negative (FN) cases are when the algorithm fails to detect a known knot position. These quantities allow the calculation of the performance metrics.  74   Figure 4.21 Sample log for Two View Single Orientation Method (SOM) results compared to the physical measurements. A red bounding box is centered on one of the known knot locations.  4.4.2 Precision  Precision can be defined as the fraction of True Positive detections from all knot positions detected. In essence, how many detected knot positions are actual knot positions. Equation 4.19 outlines this calculation, where 𝑇𝑃 is the total number of True Positives detections, 𝐹𝑃 is the total number of False Positive detections, and the denominator 𝑇𝑃 + 𝐹𝑃 is the total number of                       i      i i n  m                             i   m e en ia   ng e   eg                                                                                        i a   ea   emen 75  detected positions. A value of 0 indicates that none of the detected positions correspond to an actual knot, while a value of 1 indicates that all detected positions correspond to a physical knot.    𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =𝑇𝑃𝑇𝑃 + 𝐹𝑃 4.19   4.4.3 Recall  The quantity “Recall” considers the total number known knots that are detected and is defined as the number of True Positive detections expressed as a fraction of the total number of known knots in the log. Recall is important because it is calculated with a fixed baseline quantity, which is the total number of known knots.   Equation 4.20 outlines this calculation, where 𝐹𝑁 is the total number of False Negatives, and 𝑇𝑃 + 𝐹𝑁 is the total number of actual knot positions.   𝑅𝑒𝑐𝑎𝑙𝑙 =𝑇𝑃𝑇𝑃 + 𝐹𝑁 4.20  4.4.4 Average Circumferential Error  If a calculated knot position is successfully matched with a known knot position (as described in Section 4.4.1), there will be an associated error between the circumferential angles. The absolute 76  value of this error is taken for each detected position in each image and averaged. Equation 4.21 expresses this value, where 𝜖 is the average circumferential angular error for a log, 𝜙𝑖,𝑐𝑎𝑙𝑐 is the calculated circumferential angle for knot 𝑖, 𝜙𝑖,𝑘𝑛𝑜𝑤𝑛 is the known circumferential angle for the corresponding knot, and 𝑛 is the total number of true positive positions within a log scan.    𝜖 =∑ |𝜙𝑖,𝑐𝑎𝑙𝑐 − 𝜙𝑖,𝑘𝑛𝑜𝑤𝑛|𝑛𝑖=1𝑛 4.21  4.4.5 Precision-Recall Curves  Precision and Recall values are individual numbers used to express the performance of the algorithm for a given confidence threshold. However, changing the confidence threshold changes the performance of the algorithm, and in turn the Precision and Recall values. Therefore, comparing different calculation methods by only looking at the Precision and Recall values at one confidence threshold does not tell a complete picture. Therefore, to compare different methods, it is necessary to examine their response over a wide variety of confidence thresholds. This can be achieved by plotting the Precision and Recall values at multiple confidence thresholds.   Figure 4.22 shows a Precision-Recall curve for a sample log. Each number next to the circular markers represents the confidence score used to calculate the corresponding Precision and Recall values.  77   Figure 4.22 Precision-Recall Curve for a sample log (blue) compared to a perfect detection algorithm (yellow).  Observed is an inverse relationship between Precision and Recall, which is expected based on the discussion in Section 4.3.1.1. A perfect detection algorithm has Precision and Recall values of 1 for any confidence threshold. The better the performance of an algorithm, the more it’s behaviour will tend towards a perfect algorithm, and the more the curve will shift towards the top left-hand corner of the plot. By plotting the Precision-Recall curves of different algorithms, and comparing the shapes of the curves, a judgement can be made if one method outperforms another.                 e a                                 e i i n                                                   n i en e    e      e  e   De e  i n78  To perform the image processing, knot detection, calculation, and analysis of results, it is first necessary to collect X-ray images of the logs. The following section will describe the equipment and methods used to capture detailed and consistent scans of the specimens.  79  Chapter 5: Experimental Setup  To capture images using radiography, specialised hardware is required to both produce and detect X-rays. Moreover, the unique application of scanning logs at an oblique angle, and the added safety requirements required for X-rays established the need for a custom scanning setup. The scanning equipment used was a combination of purchased equipment and custom fabricated parts to develop a prototype for a portable scanning cart.   5.1 X-ray Source  A Teledyne CP160D X-ray tube was used as the source. Figure 5.1 illustrates the X-ray tube. Table 5.1 provides a basic overview of the CP160D. 80   Figure 5.1 Teledyne CP160D portable X-ray tube [30].  Output voltage 10-160kV Tube current and full output 5.6mA Weight 11.9kg Leakage dose at 1m <2mSv/h Full beam angle 60x40 elliptical Attached collimator beam 10cmx48cm diaphragm at 70cm away Dimensions 140mm x 695mm Table 5.1 Teledyne CP160D specifications.  (a) 81  5.2 X-ray Detector  The detector used to capture the images was the X-Scan XI8816 linear detector. The detector is 768mm in length and features a 1.6mm pixel pitch, corresponding to a total of 480 pixels.    Figure 5.2 X-Scan XI8816 linear detector. Power, trigger, and ethernet ports are visible at the bottom.       82  Maximum scan rate 12kHz Voltage range 10kV-160kV Bit depth 16-bit Interface GigE Detector length 768mm Table 5.2 X-Scan XI8816 detector specifications.  5.3 FPInnovations Setup  Before the completion of the custom build scanning hardware, existing facilities were used at FPInnovations to conduct scans. The existing setup consists of a large industrial conveyor with large lead shielding box containing the X-ray tube and detector. Logs are loaded onto the conveyor bed from outside the shielding box onto an adjustable stand. The conveyer bed moves along rails into the shielding box through lead curtains, which reduces the radiation from the X-ray tube in the control room to below allowable limits.  Due to the conveyor size, large diameter logs were capable of being scanned. However, based on the internal arrangement inside the shielding box, space was limited for an oblique scanning geometry. Consequently, only small oblique angles of around 30 degrees were possible with the diameter of log being scanned, when an oblique angle of 45 degrees was desired. Moreover, the mounting to fit the X-ray tube placed it at an orientation that minimised its beam angle, further reducing the effectiveness of the setup. This coupled with the desire to investigate portable scanning systems lead to the development of the portable scanning cart.  83    Figure 5.3 Scanning setup at FPInnovations. A test log is mounted in the support structure on the convey system.  Figure 5.4 is a photograph of the scanning setup at FPInnovations. The log is held in place by a support structure and travels along a conveyor system. To the right of the support structure out of frame is the scanning enclosure which houses the X-ray source and detector.  5.4 Scanning Cart Setup  A scanning cart was designed to conduct oblique log scanning and overcome the limitations of the existing scanning setup at FPInnovations mentioned in Section 5.3. Figure 5.4 depicts a Test Log Conveyor System Log Support Structure 84  rendering of the complete setup required to conduct scanning, including cart, log, log supports, tracks, and stepper motors. Figure 5.5 shows a photo of the constructed scanning card conducting scans on site.   Figure 5.4 Computer rendering of the scanning cart taking an oblique measurement.  85   Figure 5.5 Constructed scanning cart operating on site.  5.4.1 Cart function  The scanning cart is designed to travel along the log, with a source mounted on one side and a detector on the other. Logs are supported by adjustable height stands and secured in place to prevent movement during scanning.  The scanning angle of the cart can be placed at either 0-degrees for an orthogonal scan, or at 45-degrees for an oblique scan. The internal frame of the cart is constructed of 45mm t-slot extruded aluminium Section, with mounting plates for the casters, X-ray tube, and detector waterjet cut from 5mm aluminium plate. Aluminium panels are fixed to the exterior of the cart to mount lead shielding, and to provide rigidity to the structure. Figure 5.6 shows a cross Section of the scanning cart internals showing the physical setup of the X-ray source, beam, and detector. 86  Openings on either side of the cart can accommodate logs up to 13” in diameter. Articulating doors surrounding the opening are used to reduce the opening size when there is no log present to minimise X-ray scattering and leakage.    Figure 5.6 Cross Section of the scanning cart illustrating the arrangement of X-ray source, detector, and beam.     Detector X-ray tube X-ray beam 87  5.4.2 Radiation and Shielding  A critical consideration when dealing with radiography are the harmful effects of ionizing radiation. The two primary ways to reduce the impact of radiation on the users are increasing physical distancing and shielding material.   Lead is a commonly used shielding material due to its good ability to reduce transmitted radiation. The interior of the scanning cart was mostly lined with 0.8mm thick lead, except for the panel directly in line with the beam, which had 2.4mm thick lead.   To minimize possible radiation exposure, the operator remained 18 meters away from the scanning cart location. Furthermore, the operator location was situated behind a large concrete structure to further reduce any received radiation dose. Figure 5.7 provides a plan view of the FPInnovations yard where the scanning cart was used. The red zone represents the location of the scanning cart during testing, the yellow lines indicate the “no-go” area when the X-ray is on, and the green zone represents the operating location. The CT scanner concrete building provides additional shielding.  88    Figure 5.7 Plan view diagram of FPInnovation’s yard. Restricted areas are bounded in yellow, scanning cart location in red, and operating location in green.  5.4.3 Control and Movement  Movement of the cart is controlled through a custom written GUI in MATLAB that communicates with an Arduino Uno through a serial connection. The cart is driven along tracks by a stepper motor and belt drive. The Arduino Uno sends commands to a stepper motor driver that drives the stepper motor. The motion of the cart is programmed to a set “Run” sequence that rapidly moves the cart up to the log face, slowly scans across the log, and then rapidly moves back to the starting position.  Electronic limit switches are used to calibrate the cart position, while additional hardwired limit switches prevent the cart moving beyond the track limits. An ultrasonic sensor mounted inside Concrete CT Scanner Building Scanning Cart Location Operating Location Restricted Boundary Yard Boundary 89  the cart measures the distance from the source to the log face. The X-ray source and detector were controlled independently through the manufacturer’s supplied software and hardware. Figure 5.8 shows a wiring and hardware diagram for all the components required to conduct a scan. Figure 5.9 shows the scanning cart being used on site with X-ray source, log, belt, and stepper motor visible.   Figure 5.8 Wiring diagram outlining all components and wiring arrangements.  90   Figure 5.9 End view of scanning cart with source, log, belt, and stepper motor visisble.  5.5 Test Logs  14 softwood test logs were selected from the FPInnovations yard as specimens for the scanning tests. The green logs were balsam fir, while the all other specimens were various species of fir and pine, including Douglas fir, hemlock pine, and loblolly pine. A combination of log sizes and moisture content were selected. Table 5.3 is a summary of all the logs tested and scanned, with dimensions and moisture condition.  Stepper Motor and Belt Scanning Cart  Log on stands X-ray source 91   Log Identifier Moisture Condition Diameter (cm) Length (cm) A1 Dry 15.9 92 BD Dry 18.4 121 D1 Dry 17.1 109 F33 Dry 16.5 85 F49 Dry 15.9 88 GS Dry 15.8 100 H5 Dry 17.1 109 L039 Dry 13.3 87 S1 Semi-Green 22.9 152 S2 Semi-Green 25.4 152 S3 Semi-Green 22.9 152 6HT Green 17.8 60 4HT Green 13.3 60 4LB Green 15.2 57 Table 5.3 Summary of test logs scanned and properties.  Moisture condition is a qualitative measure of the moisture content of the log ranging from dry, semi-green, to completely green. Dry logs had been stored outside for extended periods, semi-green logs had been stored for a shorter period and subject to a water sprinkler, and green logs were kept frozen in an industrial freezer in a completely green state.   92  With the scanning arrangement completely defined and the log specimens determined, the image processing techniques described, and the calculation methods derived, it is now possible to collect images and interpret the results to measure the effectiveness of the processing and calculation methods. 93  Chapter 6: Experimental Data and Results  6.1 Oblique Scans  Oblique radiographic measurements were conducted using both the FPInnovations setup and custom-built scanning cart. Each specimen was scanned four times, rotating the log 90-degrees between each scan, capturing four independent views of the log. This was to simulate the scanning arrangement of 2 sources and 2 detectors as outlined in Section 3.4.2.4. Figure 6.1 is from a sample log showing each of the four orientations after processing and knot detection. The red lines show the detected log edges, and the green lines show the detected knots.   Figure 6.1 Four scans of a single log, rotating the log 90 degrees between each scan. Red lines are the detected log edges, and green lines detected knots.                                                                           94  Seven of the logs had two sets of images collected, one in which the detector’s maximum brightness and darkness levels were properly calibrated, and one in which the image backgrounds were intentionally saturated by increasing the detector’s integration time. This was to investigate the effect of signal-to-noise ratio on measurements. Figure 6.2 shows two images of the same log showing the two sets of images collected for those seven logs. Figure 6.2(a) is a correctly calibrated detector, in which no parts of the image are saturated, however the contrast in the main region of interest (i.e. the log) is lacking. Figure 6.2(b) is an image in which the background was saturated however the detail and contrast within the log is more favourable.   95   Figure 6.2 Two sets of images collected for a specimen. (a) Correctly calibrated detector with no saturated pixels, (b) detector saturated in the background.  Out of the 14 specimens, a total of 21 sets of scans were collected, with each set containing 4 images, equalling a total of 84 oblique scan images.   (a) (b) 96  6.2 Hand Measurements  To validate radiographic results, reference data were collected. Knot positions were identified and measured by hand using a string and protractor. A screw was used to mark the pith position on the reference face, and knot positions were identified visually on the surface of the log and marked with another screw. A string was pulled taut between the two screws, and the angle measured on the reference face of the log. The distance from the reference face to the knot was measured using a tape measure. Knot diameter on the log surface was also measured using a tape measure. Figure 6.3 are images of this hand measurement process with Figure 6.3(a) showing the knot pith position measurement with a tape measure, and Figure 6.3(b) showing the knot circumferential angle measurement with a protractor.   97   Figure 6.3 Hand measurement process for knots. (a) Measuring knot pith position, (b) measuring knot circumferential angle.  6.3 Result Computation  Knot detection and calculation was conducted using the Single Orientation Method (SOM, Section 3.4.2.2), Knot Length Method (KLM, Section 3.4.2.3), and an averaged combination of both (SOM-KLM). Results were also calculated using only the data from one orientation (One View) and combining two adjacent orientations, weighted according to their confidence values (Two View, Section 4.3.3). Table 6.1 shows the selected tuned parameters.  (a) (b) 98   Tuned Parameter Value Circumferential Angle Tolerance 45 degrees Pith Distance Tolerance 100 mm (50 mm for the green logs due to their short length) Minimum knot diameter 5 mm Averaging window size 300 pixels Table 6.1 Tuned parameter values for scanning.  6.3.1 One View Results  Figure 6.4 shows a plot of the Precision-Recall curve for the Single Orientation Method (SOM), Knot Length Method (KLM) and a combination of both (SOM-KLM), calculating the results from only one orientation. All three methods observe the same trend of a decreasing Precision for increasing Recall, with the exception at low Recall values at approximately 0.1, where the Precision also decreases.   For equivalent Recall values above 0.35, the KLM has the poorest results, with a reduction in Precision of approximately 0.05 and 0.1 compared to the SOM-KLM and SOM results respectively. Within this same range, the SOM-KLM has an approximately 0.05 reduction in Precision compared to the SOM results.  99  Between Recall values of 0.05 and 0.35, the SOM and SOM-KLM performance reverses, with the SOM providing an approximate decrease of Precision of 0.05 over the SOM-KLM results.  Table 6.2 provides the average circumferential error for each method, with the SOM providing the smallest error of the three calculation methods within 16 degrees. The average circumferential error was not observed to alter significantly with changing confidence threshold.   Figure 6.4 Precision Recall Curve for Single Orientation Method (SOM), Knot Length Method (KLM), and a combination of both (SOM-KLM), only utilising one orientation (One View).                               e a                                 e i i n                                                      ne  ie      ne  ie          ne  ie 100  Method Average Circumferential Error Single Orientation Method (SOM) One View 16 degrees Knot Length Method (KLM) One View 18 degrees Combined Method (SOM-KLM) One View 18 degrees Table 6.2 Average circumferential error for the three One View calculation methods.  6.3.2 Two View Results  Figure 6.5 plots the Precision-Recall curves for the SOM, KLM, and combined SOM-KLM calculation methods when the results are averaged across two adjacent orientations.   Across all confidence thresholds, the KLM returned an approximate reduction in Precision of 0.1 for equivalent Recall values as compared to the SOM and SOM-KLM results. The Two View SOM and SOM-KLM results are similar, with the SOM having approximately 0.05 increased Precision values above a Recall of 0.5. Below a Recall of 0.5, the combined SOM-KLM and SOM results converge, with the combined SOM-KLM providing a 0.025 higher Precision value at a Recall of 0.4.  Despite the detection performance of the Two View SOM and SOM-KLM being similar, the Two View SOM results provide the best circumferential angle error of 15 degrees, as see in Table 6.3. This corresponds to a 15% reduction in circumferential angle error as compared to the One View SOM-KLM error. The average circumferential error was not observed to alter significantly with changing confidence threshold. 101    Figure 6.5 Precision-Recall curve for SOM, KLM, SOM-KLM, and averaging results between two adjacent orientations (Two View).  Method Average Circumferential Error Single Orientation Method (SOM) Two View 15 degrees Knot Length Method (KLM) Two View 18 degrees Combined Method (SOM-KLM) Two View 17 degrees Table 6.3 Average circumferential error for the three Two View calculation methods.                                e a                                 e i i n                                                          ie          ie              ie 102  6.3.3 Two View Results vs One View Results  Figure 6.6 compares the Two View and One View SOM results. The Two View SOM extends to higher values of Recall for equivalent Precision values compared to the One View SOM. At approximately a Recall of 0.4 the two methods intersect, and at Recall values of less than 0.4, the One View SOM provides increased Precision values of approximately 0.05.  Further, the circumferential angular error of the Two View SOM result is slightly better than the One View SOM result at 15 degrees and 16 degrees respectively.  103   Figure 6.6 Comparison between One View and Two View SOM results.  6.3.4 Effect of Log Moisture Content and Detector Calibration  Figure 6.7 compares the performance of the Two View SOM algorithm with logs of varying moisture content, and detector calibration. Compared are the logs of different moisture outlined in Table 5.3. Dry logs of either detector calibration provided the highest Precision values for equivalent Recall values compared to semi-green and green logs. Semi-green logs were able to achiever higher Recall values for equivalent Precision values compared to green logs, ranging from a 0.05 to 0.1 increase in Recall.                               e a                                 e i i n                                                    ne  ie          ie 104   Below a Recall value of 0.8, the unsaturated detector provided an increase in Precision values over the saturated detector results, ranging approximately from a 0.05 to 0.12 increase. Above a Recall value of 0.8, these two results converge to provide near similar results.    Figure 6.7 Precision-Recall curve for SOM with logs of different moisture content, and saturated and unsaturated detectors for dry logs.                                e a                                 e i i n                                          D    n a   a e    g D    a   a e    g  emi   een   g   een   g 105  Chapter 7: Discussion  7.1 Result Analysis  Results and processing indicate the oblique scanning method, and knot calculation and matching method were successful in detecting and determining the orientation of knots within the log specimens. Different calculation methods and specimens performed with varying levels of success.  7.1.1 One View Results Curve Behaviour  For the One View results, all calculation methods observed a decrease in Precision for Recall values of 0.25 and less, which is contrary to a more expected monotonically decreasing Precision-Recall curve. One explanation for this is that for very high confidence thresholds, some orientations fail to detect any knots, which produces a Precision value of 0, skewing the average Precision downwards. In Figure 7.1, illustrated in red is the region in which the curve is expected to be in, while the actual direction of the curve is blue. This reasoning also explains why the Two View results do not see this same decrease for the same confidence threshold, because the orientation with a 0 Precision would be combined with the adjacent orientation. To see this decreasing affect, both adjacent orientations would have to detect zero knots, which is highly improbably.   106   Figure 7.1 SOM One View result zoomed in. The expected range of curve direction in red, and the actual direction of the curve in blue.  Using One View results does not leverage the full capability of scanning multiple orientations, and results in fewer knots being detected. As such it is necessary to investigate the benefits of averaging results compared to the One View results.                           e a                                e i i n                                                      ne  ie Expected range of curve direction Actual curve direction 107  7.1.2 Two View and One View Calculation Methods  Comparisons between Two View and One View SOM results were made, as the SOM generally provided the best detection performance and smallest circumferential angular error. As observed in Figure 6.6 Two View results yielded higher Recall values for the same Precision value compared to the One View results.   These results validate the desired outcome of the two-scanner arrangement discussed in Section 3.4.2.4. Knots that are in line with the beam in one orientation may not appear clearly on the image and so cannot be detected, but when taken from an adjacent orientation are easy to detect. Therefore, by averaging across two orientations, compared to just considering one orientation, it is possible to detect more knots, increasing the Recall.  It is observed that for lower Recall values the One View results achieve a higher Precision. This may be caused from the averaging process, where artifacts from both orientations are added to the list of calculated knots, while the number of correctly calculated knots is maintained as they are matched. Thus, the ratio of false positives to true positives increases, reducing Precision.   For example, if each orientation detects 4 True Positives and 1 False Positive, the One View Precision for each orientation would be 0.8. However, when the results are combined, the number of True Positives remains at 4, while both the False Positives are considered. Thus, the number of True Positives remains at 4, and the number of False Positives increases to 2, reducing 108  the Precision to 0.67. Figure 7.2 depicts this scenario averaging between two orientations. The True Positives are represented as green circles, and False Positives as red circles.   Figure 7.2 Reduction in Precision by considering two orientations. The circles are calculated positions, green filled are correctly identified knots, red filled are erroneous detections.  In reality, the region in which the One View results obtain a higher Precision is likely outside the bounds of a useful detection algorithm. A detection algorithm that operates at either extremes of Recall and Precision will either have too many false positives, or only detect a small fraction of knots respectively. As such, confidence thresholds which achieve more of a balance between the two are generally more useful. This region is captured by the red bounding box in Figure 7.3, which corresponds to confidence thresholds from 0.3 to 0.6 for the Two View SOM results. Considering this region, the Two View SOM results provide the best results as compared to any other method with Recall values ranging from 0.6 to 0.8, and Precision values ranging from 0.7 to 0.5 within this same region.  𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =46  𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =45  𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =45  109   Figure 7.3 SOM One View and Two View results. Red bounding box is the more suitable region of operation for the algorithm.   7.1.3 KLM Performance  In both the One View and Two View results, the SOM and SOM-KLM outperformed the KLM as indicated by the larger Precision and Recall values for all confidence thresholds. The KLM is suspected to have performed worse as knot length detection is far less accurate than knot 𝛽 angle detection. As such, incorporating knot length values worsens the overall performance of the calculation method. Figure 7.4 illustrates the knot length calculation inconsistencies. Figure                               e a                                 e i i n                                                    ne  ie          ie 110  7.4(a) showing a case where the knot length was overestimated, and Figure 7.4(b) a case where the knot length was underestimated. Considering the performance of the KLM, and the inherit limitations of the method, it is not recommended as a viable calculation method.    Figure 7.4 Inconsistent knot length calculation, with estimated knot length in green. (a) Longer green line indicating overestimating knot length, (b) Green line indicating underestimating knot length.  7.1.4 Single Orientation Method Sensitivity Analysis  The Single Orientation Method as described in Equation 3.16 requires an assumption for the axial angle 𝜓 of a detected knot. This angle is approximately constant for a given tree species, as (a) (b) 111  described in Section 3.1.2. However, the axial angle does vary somewhat about the reported average values. Thus, the circumferential angles 𝜙 computed on the basis of the assumed axial angles will also vary somewhat. For the Single Orientation Method to be effective, it is important that the sensitivity of the circumferential angle 𝜙 calculation to variation in the actual axial angle 𝜓 should be stable.  Figure 7.5 shows a graph of computed circumferential angles 𝜙 vs. assumed axial angles 𝜓 for various imaged knot angles 𝛽. Across all the sampled 𝛽 angle values, those near 0° have the steepest gradient, indicating the greatest sensitivity to the choice of axial angle 𝜓. The gradient of the line can be thought of as an error multiplier, which multiplies each degree of error in the axial angle 𝜓, to the calculated error in the circumferential angle 𝜙. As such, low error multiplier numbers are desired, preferably not much greater than 1.  For example, for angle 𝛽 = 0°, the slope of the line is approximately 1.25. This indicates that for a 1° error in the axial angle 𝜓 assumption, a 1.25° error is observed in the calculated circumferential angle 𝜙. Since the likely variation in axial angle is ±5°, the resulting error in the circumferential angle 𝜙 is approximately 6°. While knots with 𝛽 angles near 0° have the highest axial angle 𝜓 sensitivity, they also have the highest detection confidence, and as such partially offset this negative effect. Even still, a 1.25 error multiplier is the largest observed across the range of 𝛽 angles. As this value is only slighter larger than 1, the impact of an axial angle 𝜓 error on the final calculation is acceptable and means the Single Orientation Method is a stable calculation method. 112   Figure 7.5 Sensitivity of circumferential angle for assumed axial angles, for given 𝜷 angles.  7.1.5 Effects of Log Moisture  As observed in Figure 6.7, the algorithm’s ability to detect knots in dry logs outperforms that of green and semi-green logs. This behaviour is expected as the increased moisture content of green logs can reduce the contrast in basis weight between the knots and clear wood by around half. This makes the background subtraction method more susceptible to highlighting artifacts, which negatively affects the detection process. Figure 7.6 compares the difference between a green log and dry log. The dry log, Figure 7.6(a), has significantly less artifacts in the clear wood, and more defined knots, compared to the green log in Figure 7.6(b) .                    ia   ng e   eg                       i   m e en ia   ng e   eg                              Deg ee Be a  ng e   Deg ee Be a  ng e   Deg ee Be a  ng e  Deg ee Be a  ng e    Deg ee Be a  ng e    Deg ee Be a  ng e    Deg ee Be a  ng e113   Figure 7.6 Comparison between dry log and green log. (a) Dry log and (b) green log.  7.1.6 Physical Hand Measurements  The reference data used was collected using hand measurements by visually locating knots on the surface of the log. This method is not ideal due to the errors it produces. First, by visually locating the knots it is easy to miss small knots, knots hidden beneath bark, or knots that do not produce noticeable changes to the log surface. Moreover, often it is difficult to distinguish between a knot and general roughness in the bark. It is estimated that 5%-15% of knots are missed within the log using this method. Also, hand measurements typically yield greater errors (a) (b) 114  than measurements made by an automated process such as a CT scanner, with an estimated error of between 2-5 degrees. Finally, axial angles cannot be determined because only the outside surface of the knot is visible. This also affects the pith positions, because it is assumed that the knot’s position on the surface is the same as it’s pith position, however knots with considerable axial angles will have a different pith position to its surface position.  Ideally, CT scanning is used to generate a highly accurate reconstruction of the log’s interior to measure the position and orientation of the knots to use as reference data. However, this was not available during this research.   7.1.7 Log Samples  Algorithm performance comparisons were made between different dry, semi-green, and green logs. However, a more accurate representation of the algorithm’s performance would be to use the same logs scanned across multiple sessions, starting in a green state, and drying out over a period of weeks or months.   Sawmills typically cut green logs, and so optimising the algorithm’s performance for green logs would provide the most applicable results. However, obtaining large quantities of green logs is difficult as maintaining a green state requires a constant source of water, or the logs to be frozen. The three green logs scanned were kept in a green state by freezing them at -20 degrees Celsius, however due to limited freezer space and difficulty obtaining green logs, they were smaller than desired. Larger and longer logs are more desirable as they are more representative of actual 115  sawmill conditions. Larger logs also utilise more pixels on the detector, which increases the detail of the images.   Finally, the green and semi-green logs were comprised of only 3 specimens each, while the dry logs were made up of 7 specimens. Ideally, more green and semi-green logs would be scanned to ensure results are sufficiently averaged to account for particularly easy or difficult to scan logs.  7.1.8 Detector Calibration and Saturation  Comparisons were made between scans where the detector was correctly calibrated at the expense of an underexposed log, and well imaged log internals but with a saturated background. Results from Figure 6.7 indicate that for dry logs, a correctly calibrated detector provides better results than the saturated detector. Despite a poorer signal-to-noise ratio, the unsaturated results may provide better results as no information is lost, as compared to the saturated images. The saturated background prevents accurate calculation of the log’s radius by the method described in Section 4.1.3, which requires known background pixel values. As a result of poor radius detection, the variable moving average window technique cannot be applied correctly which introduces artifacts, and results in inconsistent knot angle calculations which rely on knowing the log radius.    116  7.2 Limitations  While showing promising results, there are limitations to the oblique scanning method, some of which can be improved upon, and other which are fundamental to the scanning arrangement.  7.2.1 Green Logs  Scanning green logs still poses a challenge due to the incredibly low contrast they provide between the clear wood and knots. The current implementation of the contrast enhancement method is unable to reliably increase the contrast in green logs without also highlighting artifacts. Considering sawmills mainly cut green logs, this needs to be further improved.  7.2.2 Sawmill Implementation  The use of X-rays in an industrial setting that is not conventionally setup for radiation can pose a challenge. Additional safety precautions and training for employees working near the X-ray source would be required, as well as shielded enclosures. However, with proper measures in place, the radiation from the X-ray sources can be imperceptible to background radiation, yet it would still take an initial investment beyond the equipment to implement such a system. Also, it is preferable to place the detector and scanner in a location that does not capture the conveyer structure in the images, which would require either modification to the existing conveyor, or place it in a naturally occurring gap. Thus, placement of the setup maybe limited in physically small sawmills. 117   7.2.3 Circumferential Angle Accuracy  This method is also not able to achieve the same circumferential angle accuracy as a CT scanner. An average circumferential error of 15 degrees was achievable with the described method, which is considerably coarser than a CT scanning system. Based on the inference nature of the described method, it is unlikely the circumferential angle error could be reduced to that of a CT scanner. However, the significant reduction in both upfront and operational cost may make this system more attractive, particularly for small to medium sized sawmills. The oblique scanning system should be viewed more of a middle ground or alternative option, rather in direct competition to a CT scanning system, as it presents its own unique advantages and limitations.  Further, the impact of the circumferential angle error increases the further away from the pith the lumber is cut. Therefore, lumber cut close to the surface of a log would see a larger lateral error compared to lumber cut close to the pith. This understanding could be factored into the cutting pattern algorithm, where lumber from close to the pith has a higher degree of certainty in its quality. Figure 7.7 illustrates this scenario with the black line representing the actual knot orientation, and red line representing the calculated knot orientation with a given circumferential angle error 𝜖, and lateral errors of 𝑥1 and 𝑥2. 𝑥1 has a smaller lateral error for the same circumferential angle error as its closer to the pith.  118   Figure 7.7 Effect of circumferential error 𝝐 on lateral error. Lateral error 𝒙𝟏 is less than 𝒙𝟐 for the same circumferential error as its closer to the pith.  7.2.4 Axial Angle Assumption  Based on these calculation methods, an axial angle is assumed rather than calculated. This means the axial position of the knot cannot be accurately determined, however axial placements of knots in cut lumber is less of an issue compared to the lateral placement of knots and their proximity to the lumber edged, as determined from circumferential angle. A poor axial angle assumption however can provide poor circumferential angle calculations, and as such care needs to be taken when making the assumption.    𝜖 𝑥1 𝑥2 119  7.2.5 Scanning Thickness  Finally, scanning logs at an oblique angle increases the effective thickness of the logs by a factor of its angle. A 45-degree scan increases the log thickness by approximately 40%, which may prove challenging for scanning particularly large green logs. Sawmills that scan considerable log diameters would require higher voltage X-ray sources, which in turn would affect the shielding and safety requirements. Consideration into the X-ray source output, detector, and the expected maximum log size must be taken to ensure that interior information can still be adequately captured, while preferably not saturating the detector.   120  Chapter 8: Conclusion  8.1 Conclusion  This research confirms the viability of using oblique X-ray scanning as a method to determine the circumferential angle and pith intercepts of knots within dry, semi-green, and green softwood logs. Analysis of the various calculation methods indicate that the two View Single Orientation Method (SOM) provides the best performance, with an average circumferential angular error of 15 degrees. Operating within ideal confidence thresholds, the SOM can achieve Recall values ranging from 0.6 to 0.8, and equivalent Precision values ranging from 0.75 to 0.5.   The Knot Length Method (KLM) could not provide adequate results and underperformed compared to the SOM in both Two View and One View configurations and is not recommended as a calculation method. Similarly, the combined SOM-KLM results were less favourable than the SOM and is not recommended as a calculation method.  Two View results provided higher recall values as compared to the One View results. This was the expected outcome and confirms the theory that knots that cannot be well imaged in one orientation, can be captured in the other orientation, and so by averaging results across orientations 90 degrees apart on the log, more knots can be detected.  The detection algorithm performs better with images where the detector is not saturated, compared to images where the background was saturated. Unsaturated images likely perform 121  better due to the better radius detection, which in turn allows for correct implementation of the background subtraction method, and knot detection process.   Thus, the final proposed method utilises two sources and line detectors placed 90 degrees apart, at an oblique angle of 45 degrees. The SOM is utilised to calculate knot results for each orientation independently, and then the results are averaged. The detectors are correctly calibrated, and a confidence threshold between 0.3 to 0.6 is utilised based on the individual needs of the sawmill.  This proposed setup makes it ideal for small to medium sized sawmills as the hardware required for such a setup is considerably more affordable compared to a CT scanning setup. A single line detector costs approximately $20,000 to $30,000 CAD, and X-ray source $45,000 to $55,000 CAD in year 2020 [31], totalling in the range of $130,000 to $170,000 CAD for the main hardware components. This contrasts with a CT scanning system which would cost on the order of 5 to 10 times as much for the hardware alone [32]. Additionally, such a system can relatively easily be retrofitted into an existing production line in a sawmill, where logs are commonly transported along conveyors, whereas a CT scanner cannot. While the identification ability and accuracy of the oblique scanner will be less than that of a CT scanner, the substantially lower cost and maintenance makes this system far more viable for smaller sawmills, and so compensate for its lesser performance.   Second, this method only requires the processing of two images to detect knot locations, where as a CT system would require the capture and processing of at many hundreds of images, 122  possibly even thousands. The fewer images that require processing, the less computation time is required, which is critical in a non-stop production environment, where cutting patterns may need to be determined in a matter of seconds.  A proof of concept scanning cart was also constructed to test the feasibility for a mobile log scanning device for field use. This initial design moved along fixed tracks, driven by a belt system. The cart showed enough rigidity to ensure accurate measurements, and the enclosed design significantly reduced radiation, reducing the safety distance required for human operators. Further design iterations of the cart may allow for fully unrestricted motion on rougher terrain.  In conclusion, the proposed oblique scanning method with Two View SOM results offers internal and reliable knot identification at a fraction of the cost and complexity as compared to a CT scanning system, making this a viable solution for small to medium sized sawmills to improve their cutting patterns, and thus the quality of their cut lumber.  8.2 Future Work  Critical to accurate calculation of circumferential angles is well imaged logs and accurate knot detection. The biggest improvement in both circumferential angle error and detection performance will be gained from improving the knot highlighting methods and improving knot detection methods. Current methods are relatively simple and therefore robust, however more complex methods may be considered to better improve this process. The organic nature of logs 123  makes this process challenging and may even be suited for a machine learned object detection algorithm which can account for these variations much better than a hardcoded method can.   One observed feature present in some log scans is a ‘mushrooming’ effect at the end of knots. It is believed this effect occurs due to surface distortions created by the knot. This mushrooming effect negatively impacts the angle detection as is skews the calculated angle to the sides of the knot, as the knot end is removed during the background subtraction method. Not only will this need to be resolved, but it may even be possible to use this effect to extract further information about the location or orientation of knots, based on the impact it has on the surface. Figure 8.1 illustrated this mushrooming effect with a sample knot. Notice how the knot edges bulge out towards the end, and the center of the knot is removed, affecting the angle determination process.   Figure 8.1 Example of 'mushrooming' effect at the end of the knot where it bulges out the side, and the knot center is removed.  ‘mushrooming’ bulge 124  Finally, obtaining green logs and conducting more scans to determine scanning parameters that produce the best results with minimal artifacts would ensure the algorithm is able to perform adequately with logs with of high moisture content. This would also include investigating different X-ray tube settings and filtering, to try and increase the contrast of the knots in green logs directly in the image.  125  Bibliography  [1]  Natural Resources Canada, "Overview of Canada's forest industry," 2 March 2020. [Online]. Available: Canada's forest industry by the numbers. [2]  Natural Resources Canada, "Statistical data," 26 September 2018. [Online]. Available: https://cfs.nrcan.gc.ca/statsprofile/employment/ca. [Accessed 1 April 2020]. [3]  B. Gopalakrishnan, Y. Mardikar, D. Gupta, S. M. Jalali and S. Chaudhari, "Establishing Baseline Electrical Energy Consumption in Wood Processing Sawmills for Lean Energy Initiatives: A Model Based on Energy Analysis and Diagnostics," Energy Engineering, vol. 109, no. 5, pp. 40-80, 2012.  [4]  ISO, "ISO 2300:1973(en) Sawn timber of broadleaved species - Defects - Terms and definitions," International Organization for Standardization, Geneva, Switzerland, 1972. [5]  U.S. Department of Agriculture, Wood Handbook - Wood as an Engineering Material (Centennial Edition), Madison, Wisconsin: U.S. Department of Agriculture, 2010.  [6]  Y. G. T. D. Nusret As, "EFFECT OF KNOTS ON THE PHYSICAL AND MECHANICAL PROPERTIES OF SCOTS PINE," Wood Research, vol. 51, no. 3, pp. 51-58, 2006.  [7]  J. W. Johnson and R. H. Kunesh, "Tensile Strength of Special Douglas-Fir and Hem-Fir 2-Inch Dimension Lumber," Wood and Fiber Science, 1975.  126  [8]  A. Rais, E. Ursella, E. Vicario and F. Giudiceandrea, "The use of the first industrial X-ray CT scanner increases the lumber recovery value: case study on visually strength-graded Douglas-fir timber," Annals of Forest Science, vol. 74, no. 28, pp. 1-9, 2017.  [9]  A. G. Stig Grundberg, "Simulated grading of logs with an x‐ray log scanner‐grading accuracy compared with manual grading," candinavian Journal of Forest Research, pp. 70-76, 1997.  [10]  C. Lundgren, "Predicting Log Type and Knot Size Category Using External Log Shape Data from a 3D Log Scanner," Scandinavian Journal of Forest Research, vol. 15, no. 1, pp. 119-126, 2000.  [11]  Microtec, "Logeye," Microtec, [Online]. Available: https://microtec.eu/en/catalogue/products/logeye/?tag=log. [Accessed 14 April 2020]. [12]  A. Achim, B. Gardiner, J.-M. Leban and R. Daquitaine, "Predicting the Branching Properties Of Sitka Spruce Grown In Great Britain," New Zealand Journal of Forestry Science, pp. 246-264, 2006.  [13]  Microtec, "CT Log," Microtec, [Online]. Available: https://microtec.eu/en/catalogue/products/ctlog/?tag=log. [Accessed 14 April 2020]. [14]  Nordson Matrix, "3D - SART," [Online]. Available: https://www.nordsonmatrix.com/technologies#LineScan. [Accessed 10 April 2020]. [15]  E. J. Angus, "Robust CT Scanning of Logs with Feature-Tailored Voxels," The University of British Columbia, Vancouver, 2013. 127  [16]  C. A. MacDonald, An introduction to X-ray Physics, Optics, and Applications, Princeton, New Jersey: Princeton University Press , 2017.  [17]  D. Tafti and C. V. Maani, Radiation X-ray Production, Florida: StatPearls, 2019.  [18]  J. R. Olson and D. G. Arganbright, "Prediction of Mass Attenuation Coefficients of Wood," Wood Science, vol. 11, no. 2, pp. 86-90, 1981.  [19]  Radiology Key, "Based on X-Rays," 20 December 2015. [Online]. Available: https://radiologykey.com/based-on-x-rays/. [Accessed 14 April 2020]. [20]  C. B. Caceres, L. Uliana and R. E. Hernandez, "Orthogonal Cutting Study of Wood and Knots of White Spruce," Wood and Fiber Science, vol. 50, no. 1, pp. 55-65, 2018.  [21]  R. Shmulsky and P. D. Jones, "Figure 2.15. Branch configuration in main stem," in Forest Products and Wood Science An Introduction, Wiley, 2011, p. 41. [22]  J. Pyorala, X. Liang, M. Vastaranta, N. Saarinen, V. Kankare, Y. Wang, M. Holopainen and J. Hyyppa, "Quantitative Assessment of Scots Pine (Pinus Sylvestris L.) Whorl Structure in a Forest Environment Using Terrestrial Laser Scanning," IEEE JOURNAL OF SELECTED TOPICS IN APPLIED EARTH OBSERVATIONS AND REMOTE SENSING, 2018.  [23]  E. Beaulieua, R. Schneider, F. Berninger, C.-H. Ung and D. E. Swift, "Modeling jack pine branch characteristics in Eastern Canada," Forest Ecology and Management, pp. 1748-1757, 2011.  [24]  R. L. Roeh and D. A. Maguire, "Crown profile models based on branch attributes in coastal Douglas-fir," Forest Ecology and Management, pp. 77-100, 1997.  128  [25]  N. L. Osborne and D. A. Maguire, "Modeling knot geometry from branch angles in Douglas-fir (Pseudotsuga menziesii)," NCR Research Press, pp. 215-224, 2015.  [26]  D. Auty, A. R. Weiskittel, A. Achim, J. R. Moore and B. A. Gardiner, "Influence of early re-spacing on Sitka spruce branch structure," Annals of Forest Science, pp. 93-104, 2012.  [27]  National Grading Rule Committee, "National Grading Rule for Dimension Lumber," 2012. [28]  N. Otsu, "A Threshold Selection Method from Gray-Level Histograms," IEEE transactions on systems, man, and cybernetics, vol. 9, no. 1, pp. 62-66, 1979.  [29]  MathWorks, "https://www.mathworks.com/help/images/ref/graythresh.html" [Online]. Available: https://www.mathworks.com/help/images/ref/graythresh.html. [Accessed 18 9 2020]. [30]  Teledyne, "SITEX CP160D," [Online]. Available: http://www.teledyneicm.com/products/ndt/cp160d/. [Accessed 14 July 2020]. [31]  Z. Pirouz, Interviewee, Personal Communication. [Interview]. 2 10 2020. [32]  G. Szathmary, Interviewee, Personal Communication. [Interview]. 2 10 2020.   

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            data-media="{[{embed.selectedMedia}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.24.1-0394845/manifest

Comment

Related Items