annual growth user guide

14
annualGrowth v2.0 User’s Guide Thomas S. Denney Jr., Ph.D. Department of Electrical Engineering Auburn University [email protected]

Upload: enrikd13

Post on 05-Dec-2015

218 views

Category:

Documents


1 download

DESCRIPTION

annual growth school user guide

TRANSCRIPT

Page 1: Annual Growth User Guide

annualGrowth v2.0

User’s Guide

Thomas S. Denney Jr., Ph.D.Department of Electrical Engineering

Auburn [email protected]

Page 2: Annual Growth User Guide

General Instructions

1.1. Basic Layout

The user interacts with the annualGrowth program in several ways:1. Pushbuttons --- Only pushbuttons with a bold font are active. Clicking on a pushbutton with

a normal (non-bold) font does nothing. Pushbuttons are automatically bolded and un-bolded to guide the user in processing the image.

2. Parameters --- To change a parameter, left-click on the parameter , then type in new value.3. Image Window --- The user can add/delete/move ring points and add/delete rays by clicking

on the image window. Other features such as the disc center are set by clicking on the image window.

4. Menu Bar --- Only the Defaults menu is used. Ignore the File, Edit, Window, and Help menus. Clicking on Defaults allows the user to change the default parameters for a disc and change the default directories for reading image files and writing data files.

AnnualGrowth v2.0 User’s Guide 2

Page 3: Annual Growth User Guide

1.2. Analysis ProcedureThe basis analysis procedure is as follows (the order of these steps can be changed if the appropriate pushbutton is un-bolded):1. When annualGrowth is first invoked, the image window and parameters are blank.2. Push Load Image to load a disc image. The disc image will be displayed in the image

window and the default parameters will appear.3. Push Set Center, then click on the center of the disc.4. Push Set Radius, then click on a point in the disc roughly 1/3 of the distance between the

center and the edge of the disc. The center and radius can be changed as needed by pushing the appropriate button and clicking on the new location.

5. Push Set Fiducial, then click on a point on the disc with a known azimuth. Enter the azimuth in the Fiducial Angle parameter box.

6. Push Auto Rays to generate a set of analysis rays at equally spaced angles.7. To add an additional ray, push Add Ray and click on the image window to place the new

ray.8. To delete a ray, push Delete Ray and click on the ray to be deleted.9. To zoom in/out in the image window, push Select View. Left-click on a point in the image

window to zoom in centered around the selected point. Right-click zooms out around the selected point.

10. Make any adjustments to the parameters as needed by clicking on the parameter (highlights the parameter in blue) and typing in the new value.

11. Push Find Points to find the ring points. When complete, the ring points are displayed with green crosses.

12. To add a ring point, push Add Points, and click in the image window to add points.13. To delete a point, push Delete Points, and click on the points to be deleted.14. To move a point, push Move Points, then click and drag the point to its new location.15. Select View can be pressed at any time to zoom in/out of the image window.16. Push Set Gold Ray and click on a ray from which the disc’s age will be computed. The

user must ensure that all ring points are correct on this ray by adding/deleting/moving points as necessary. The age of the disc is the number of points on the “gold ray” minus one (to account for the outside edge point).

17. When the six outermost points on each ray have been verified and/or edited, push Compute Age/Growth to compute a cubic spline fit to the last six points on each ray. The age of the disc will be displayed in the message window.

18. Ring points can be edited after the cubic spline fit if needed. Also more rays can be added by pushing Add Ray and clicking on the image. Push Find Points to find the ring points on the added rays (the other rays are left unchanged). Push Compute Age/Growth again to re-compute the cubic spline fit.

19. Push Save Points to save the points, rays, etc to a disk file. This can be done at any time during the analysis. Two files are written: a binary .mat file and an ASCII .dat file, which contains the angle (adjusted for the fiducial point) and radius of all ring points. The .dat file can be imported into Excel.

20. A set of saved points can be loaded by pushing Load Points and selecting the appropriate file. The loaded points can be edited and saved again.

21. Pushing Done exits the program.

AnnualGrowth v2.0 User’s Guide 3

Page 4: Annual Growth User Guide

2. Description of the Ring Point Finding AlgorithmThe point finding algorithm finds ring points on a given analysis ray by searching for dark to light transitions along the ray. Each ray is processed individually. The analysis procedure for a given ray is described below.

First, for a given analysis ray, a strip of pixels is selected centered about the ray. The width of this strip is determined by the Width of analysis strip parameter.

AnnualGrowth v2.0 User’s Guide 4

Page 5: Annual Growth User Guide

Next, the pixels in the analysis strip are median filtered to obtain a 1-D intensity profile along the ray.

Sometimes because of noise, imaging artifacts, or non-ring features in the image, thin V-shaped valleys and thin peaks can appear in the 1-D intensity profile. The 1-D profile is processed with an algorithm that “fills in” valleys and “cuts off” peaks less than a certain width (Peak rejection and Valley rejection parameters). The result is shown below for a portion of the 1-D profile shown above. The dotted line is the original 1-D profile and the solid line is 1-D profile after the peak/valley rejection algorithm.

AnnualGrowth v2.0 User’s Guide 5

0 50 100 150 200 250 300 350 40060

80

100

120

140

160

180

200

220

240

radius in pixels

inte

nsity

250 260 270 280 290 30060

80

100

120

140

160

180

200

220

240

radius in pixels

inte

nsity

Page 6: Annual Growth User Guide

Next, the point finding algorithm searches the 1-D profile for rising edges. If a run of at least Minimum run length pixels with increasing intensity (going from the disc center to the bark) is found, a ring point is placed near the midpoint of the run. A rising edge that results in a total intensity change of less than Minimum run diff is rejected even if it satisfies the above minimum length requirement. In the figure below, the ring points are plotted with “”’s and the pixels in the 1-D profile are plotted with “”’s.

AnnualGrowth v2.0 User’s Guide 6

250 260 270 280 290 30060

80

100

120

140

160

180

200

220

240

radius in pixels

inte

nsity

Page 7: Annual Growth User Guide

3. Detailed Information

3.1. Pushbuttons

3.1.1. I/O and Operational Pushbuttons

Load Image: Loads a TIFF image file and displays it in the image window. A file selection dialog is displayed for the directory specified in the Default image path. When the user selects an image file, the image is displayed in the image window and the default parameters are loaded. If any rays, points, parameters, etc exist in the workspace, the user is prompted to save the points.

Load Points: Loads a previously saved set of points along with the image, rays, parameters, etc. This operation restores the program to the state it was in before the points were saved. Points can be edited, rays can be added, parameters can be changed, age/growth can be computed, etc. If unsaved points exist when Load Points is pressed, the user is prompted to save the points.

Save Points: Saves the image, points, rays, parameters, etc. to disk. If nothing has changed since the last save, pushing this button does nothing. Two files are written: a binary .mat file and an ASCII .dat file, which contains the angle (adjusted for the fiducial point) and radius of all ring points. The .dat file can be imported into Excel.

Find Points: Finds the dark-to-light transitions between tree rings along each analysis ray. While point finding algorithm is running, the last ray number processed is displayed in the image window. When complete, the ring points are displayed with a green “+”. If Find Points is pressed after rays have been added, only the added rays are processed. If Find Points will result in overwriting existing ring points, the user is prompted to save the points.

Compute Age/Growth: Computes a cubic spline fit to the last six points on each ray. The age of the disc will be displayed in the message window. Points can be edited, rays added, etc. and the age/growth re-computed as needed.

Done: Exits the program and returns to the MATLAB prompt.

3.1.2. Image Feature Pushbuttons

Set Center: Sets the center of the disc. Analysis rays emanate from this point. The disc center can be changed if the pushbutton is bolded. The center circle, rays, fiducial angle, etc. are recomputed if they exist when the center is changed.

Set Radius: The central region of the disc is analyzed with a different algorithm than the rest of the disc. To define the central region, push Set Radius and click on a point in the disc roughly 1/3 of the distance between the center and the edge of the disc. A light blue ring centered about the disc center with the selected radius will appear.

Set Fiducial: If there is a point on the disc image with a known azimuth (called a fiducial point), push Set Fiducial and click on the fiducial point. A magenta line from the disc center to the fiducial point will appear. Enter the known azimuth angle in the Fiducial Angle parameter box. When the ring point positions are written (in ASCII format) to the .dat file, the angles will be adjusted to match the coordinate system specified by the Fiducial Angle parameter and the fiducial point.

AnnualGrowth v2.0 User’s Guide 7

Page 8: Annual Growth User Guide

Set Gold Ray: Push Set Gold Ray and click on a ray to designate that ray as the “gold ray.” The selected ray will turn a gold color. The age of the disc is the number of points on the “gold ray” minus one (to account for the outside edge point). The user must ensure that all ring points are correct on this ray by adding/deleting/moving points as necessary.

3.1.3. Ray Editing Pushbuttons

Auto Rays: Pressing this button generates a number of equally spaced analysis rays emanating from the disc center. The Number of auto rays parameter determines the number of rays. The disc center must be specified before Auto Rays button can be used.

Add Ray: After this button is pressed, subsequent clicks on the image add analysis rays from the disc center through the clicked point to the edge of the image. If rays are added after ring points have been found, pushing Find Points again only finds points on the new rays.

Delete Ray: To delete an analysis ray, push this button and click on the ray(s) to be deleted.

3.1.4. Point Editing Pushbuttons

Select View: Pressing this button allows the user to zoom in or zoom out of the disc image. Left-click zooms in about the clicked point, right click zooms out. To resume adding/deleting/moving points or rays, the appropriate edit button must be pressed again.

Add Points: After this button is pressed, subsequent clicks add a ring point at the selected position. Added points are colored red until points are saved or Find Points is pressed. Added points are assigned to the nearest analysis ray, but a point can be added anywhere on the image.

Delelete Points: After this button is pressed, clicking on a ring point deletes the point.Move Points: After this button is pressed, a ring point can be moved by clicking and dragging

the point. The point will change from a “+” to a “” while it is being moved. A moved point will turn red until points are saved or Find Points is pressed.

3.2. ParametersNumber of auto rays: Specifies the number of analysis rays automatically generated by the

Auto Rays pushbutton. (Valid range: >1, Default 32)Width of analysis strip: For a particular analysis ray, the point finding algorithm finds rings

points by analyzing a 1-D intensity profile obtained from a strip of pixels centered around the ray. The Width of analysis strip parameter sets the width of the strip. Selecting a wider strip will increase the algorithm’s immunity to noise or non-ring structures in the image, but if the rings curve too much within the strip, the accuracy of the point finding algorithm will degrade. (Valid range: >1, Default 10)

Background threshold: The intensity threshold used to segment the disc from the black background. (Valid range: >0, Default 10)

Valley rejection: Sometimes because of noise, imaging artifacts, or non-ring features in the image, a thin V-shaped valley can appear in the 1-D intensity profile. Roughly speaking, setting the Valley rejection parameter to n will “fill in” any valleys that are n pixels or less in width. Increasing the Valley rejection parameter makes the point finding algorithm less likely to find a point in a thin ring. (Valid range: 0, Default 1)

Peak rejection: Same as the valley rejection except that it “cuts off” peaks in the 1-D intensity profile that are n pixels or less in width. (Valid range: 0, Default 1)

AnnualGrowth v2.0 User’s Guide 8

Page 9: Annual Growth User Guide

Minimum run length: The point finding algorithm looks for rising edges in the 1-D intensity profile. If a run of at least Minimum run length pixels with increasing intensity (going from the disc center to the bark) is found, a ring point is placed near the midpoint of the run. (Valid range: 1, Default 2)

Minimum run diff: A rising edge that results in a total intensity change of less than Minimum run diff is rejected even if it satisfies the above minimum length requirement. (Valid range: 0, Default 10)

Fiducial angle: The azimuth angle in degrees of a point on the disc (called a fiducial point). The fiducial point is selected with the Set Fiducial pushbutton. When the ring point positions are written (in ASCII format) to the .dat file, the angles will be adjusted to match the coordinate system specified by the Fiducial Angle parameter and the fiducial point. (Valid range: any real number, Default 0.0)

3.2.1. Changing Default Parameter Settings

The default values for the above parameters can be changed by clicking on the Defaults menu in the Menu bar. The default parameters are the ones that are loaded in the parameter boxes when a new image is loaded. The following two additional defaults can be changed in the Defaults menu:Default image path: The full path name for TIFF image files. The directory can be changed by

the user during the file selection process at any time. Setting the default image path is useful when processing several images from the same directory.

Default results path: The full path name for writing the ASCII .dat files and the binary .mat files.

AnnualGrowth v2.0 User’s Guide 9