Keywords: Ordinary differential equations; Step size selection; Stability; Efficiency. 1. Introduction ... estimate, especially when the aim is to solve stiff problems.
2.2 ASTM Adjuncts: 2.2.1 For a complete adjunct list, see Appendix X2. 3. Terminology. 3.1 DefinitionsâFor definitions of terms used in these test methods, see Terminology E 7. 3.2 Definitions of Terms Specific to This Standard: 3.2.1 ASTM grain si
scale, grain-to-gas mass ratio ËÏ, strength of turbulence Î±, and detailed disc properties. We test these against ..... turbulence, we expect these to scale as power laws, so define ..... 'Response function' Ï defined in Section 3.2: this is the m
Jun 22, 2008 - der to reveal the grain boundaries it is necessary to etch the metallographic specimen. Etching reagents attack pri- marily the grain boundaries.
May 25, 2016 - to simplify sediment transport calculations (e.g., [13â21]). In fact .... in 11 m water depth during the experiment with the time of the individual coring efforts indicated ... break and swash (Figure 2b), so retaining sediment in co
A considers a MIN with a sorting grain that reduces the probability of network blocking by using a contention- free switch. Subsection 7.B describes the combina-.
to isoamyl alcohol, namely ethyl ether, amyl alcohol, amyl acetate, bromo- benzene, and .... optical density of the copper carbamate extracted from serum is ...
May 22, 2017 - urine in solvents, which are immiscible with water, are a possible alternative. Dukes. (1939) has described a method based on these principles, ...
0166-3542/$ â see front matter Published by Elsevier B.V. ... Form Approved ... (FDA). However, ribavirin has been shown to inhibit in vitro viral replication in ...
the soft X-ray microscope at beamline 5.3.2 of the Advanced Light Source in Berkeley, CA, ..... of the ALS beamline 5.3.2 makes significant circular polariza-.
Jan 5, 2018 - An improved knowledge of the temporal evolution of grain size at large spatial .... An example of MAIAC cloud mask for Thule located on the ...
(56/77) required a single contact and 14.3% (11/77) required an intervention that required more intensive contact ... The clinic nurses gave out the questionnaires (see .... CoA: coarctation of aorta; TOF: tetralogy of fallot; AVR: aortic valve ...
Petrophysical Advisor. Geoff Page ... NMR Relaxation - T2 Decay Effects ... Yes, in case of the simplest model of perfectly sorted and .... Case Study: Application to Well Completion ... â¢MSRM is a new log integration method addressing.
(2) the cooling rate difference between laboratory experiments and in situ cooling. INDEX ...... corresponding to very high Mr/Ms and low Hcr/Hr despite a.
Aug 11, 1989 - reagent mix. The ascorbic acid was dissolved in 0.5 mol/L. NaCl, and the pH of the solution was adjusted to 7.0. A standard curve was prepared ...
extension found the following relationship between the 2D coordinates (x,y) of a point in a plane and its perspective projection (x',y') in another (image) plane ...
Radiographic image measured by a digital camera. Region of interest automatic selection of welding zone. Rejection of the background elimination of the non- ...
Jun 23, 2016 - depth and seed volume for AEH. Two-way ANOVA determined that dry grain mass increased with increasing barrier depth (Fig. 5c).
Cud chewing per lb of DM (Georgia). â¢ 19 to 21% forage NDF ... (Wisconsin). â¢ Calculate the amount of effective NDF (IL) ... Float off the plant parts. â¢ Evaluate the ...
... core FOR13P4: stereo plot of the main axes direction. Notice that the K3 is well grouped and close to the vertical except some points associated with MMITs.
function being analyzed, poor selection of the search parameters can lead to a ...... B. E. Stuckman and E. E. Easom, A comparison of Bayesian/sampling global ...
Keywords: Constitutive equations; Creep damage; Evolutionary algorithms; Global ... equations where stress can be explicitly expressed as a function of strain. .... The objective function is normally defined, for example , by the sum of the ...
classifies the cut pairs into two types: Type-1 which is a pair of a tree edge and a non-tree edge; and ... components are computed by adding some new edges to the input graph. ..... the removal of x and y from G. We can classify all possible connect
First, in keepin the nature of most piano music, our algorithm h ... each time point where a note begins or ends each layer a set of ... The numbers correspond to fingers, where the thumb .... Keyboard Fingering for Melodic Fragmentsâ. Music.
A SIMPLE AUTOCORRELATION ALGORITHM FOR DETERMINING GRAIN SIZE FROM DIGITAL IMAGES OF SEDIMENT DAVID M. RUBIN U.S. Geological Survey, Santa Cruz, California 95060, U.S.A. e-mail: [email protected] ABSTRACT: Autocorrelation between pixels in digital images of sediment can be used to measure average grain size of sediment on the bed, grain-size distribution of bed sediment, and vertical profiles in grain size in a cross-sectional image through a bed. The technique is less sensitive than traditional laboratory analyses to tails of a grain-size distribution, but it offers substantial other advantages: it is 100 times as fast; it is ideal for sampling surficial sediment (the part that interacts with a flow); it can determine vertical profiles in grain size on a scale finer than can be sampled physically; and it can be used in the field to provide almost real-time grain-size analysis. The technique can be applied to digital images obtained using any source with sufficient resolution, including digital cameras, digital video, or underwater digital microscopes (for real-time grain-size mapping of the bed).
Grain-size analysis is fundamental to sedimentology, but despite technological advances in lab instruments, grain-size analysis is still slow. To process a sample of sand requires roughly an hour. The purpose of this note is to present a new approach that performs grain-size analysis 100 times as fast. The new technique has three other advantages. First, it can be used to measure grain size on the bed surface, thus replacing the greased-plate technique for sampling surficial sediment (the part that interacts directly with a flow). This capability is particularly useful for tracking changes in bed-sediment grain size, which in some settings is more important than flow changes in regulating sediment transport (Rubin and Topping 2001). Second, it can be used to measure vertical profiles in grain size at a sub-millimeter resolution. Finally, the technique can be utilized in the field, providing almost real-time grainsize analysis. Where calibration data are available, the real-time analyses are quantitative; where such data have not yet been obtained, the real-time measures are relative (coarsening and fining trends can be determined, but actual grain sizes cannot). PREVIOUS TECHNIQUES FOR GRAIN-SIZE ANALYSIS
Lab Techniques for Analysis of Bed Sediment Most approaches to grain-size analysis of sand-size bed sediment have utilized mechanical sieving (Krumbein and Pettijohn 1938), settling through a column of water (Gibbs 1972; Syvitski et al. 1991) or laser diffraction (Agrawal et al. 1991). Many of these techniques have been summarized by McCave and Syvitski (1991), and discussed by others in a volume edited by Syvtiski (1991). Although laser diffraction and settling can be applied in situ to suspended sediment, they cannot be applied to bed sediment. Except for digital image analysis (discussed in the next section), all existing approaches require that bed sediment be sampled and transported to a lab to perform the grain-size analysis. Sampling of surficial sediment (the part interacting with the flow) is particularly difficult and typically involves sampling of sediment by adhesion to a greased plate and then using solvent to remove the grease prior to size analysis. In-Situ Techniques for Analysis of Bed Sediment Using digital images of the bed for grain-size analysis of surfical sediment offers two substantial advantages. First, this approach samples only the surficial layer of sediment (the layer of grains that interacts with the flow and in which small changes in sediment texture are proportionately greatest). Second, this approach eliminates the need to collect samples and transport them to the lab for analysis. At least one previous technique has been devised for in-situ analysis of surficial bed-sediment grain size. It utilizes digital grain-size analysis and an algorithm that recognizes and measures individual grains (Butler et al. 2001). This approach is subject to inaccuracies caused by overlapping of grains (which can cause partially JOURNAL OF SEDIMENTARY RESEARCH, VOL. 74, NO. 1, JANUARY, 2004, P. 160–165 Copyright q 2004, SEPM (Society for Sedimentary Geology) 1527-1404/04/074-160/$03.00
covered grains to appear smaller than they are) or touching of grains of the same color or brightness (which can cause them to appear larger). The approach presented here addresses these problems by considering the statistical properties of entire images. Similar approaches that are worth investigating are 2-D FFT, wavelets, and using look-up catalogs of calibrated grain sizes, similar to some nonlinear prediction schemes (Rubin 1992). AUTOCORRELATION ALGORITHM
Conceptual Approach The grain-size algorithm presented here is based on the idea that the spatial autocorrelation in an image varies with grain size. Spatial autocorrelation can be defined as the correlation between two rectangular regions (called plaquettes) in an image, measured by calculating the correlation between intensity of each pixel in one plaquette with the pixel in the corresponding location in the second plaquette. (To describe this operation in terms that are perhaps more familiar, the pixels in one plaquette might be considered ‘‘observed’’ values, and the pixels in the second plaquette considered ‘‘predicted’’ values; the spatial autocorrelation is the correlation between these two sets of values.) The value of the spatial correlation approaches 1.0 where the offset between the plaquettes is small relative to grain size (or other structures in the image) and approaches zero where the offset approaches the size of the largest grains. Calculating the spatial correlation at a variety of offsets— distances between the two plaquettes—produces a curve that describes the correlation as a function of distance (Moran 1948). An on-line search for this autocorrelation curve (known as a correlogram) illustrates that this statistical approach has been used to characterize and model data from studies in acoustics, ecology, epidemiology, genetics, meteorology, oceanography, brain physiology, financial and real-estate markets, and quality control for manufacturing wool yarn. It is likely that this approach also has been used to measure the size of objects in images, but the author was unable to find specific references to such usage. For a uniform-size sample (a sample in which all grains have the same size), grain diameter can be determined by matching the autocorrelation curve of the sample against autocorrelation curves of calibrated samples. For samples containing multiple grain sizes, the grain-size distribution can easily be determined by solving for the proportions of individual grain-size fractions that collectively yield the best fit to the observed autocorrelation curve. Autocorrelation of Uniform Simulated Grains The spatial autocorrelation r between two plaquettes in an image is
O (x 2 x¯)(y 2 y¯) !O (x 2 x¯) !O (y 2 y¯) i
where x i and y i are the intensities of corresponding pixels in the two plaquettes, and x¯ and y¯ are the mean intensities of pixels in the two plaquettes. If the two plaquettes are both representative of the sediment, x¯ 5 y¯, and the two terms in the denominator (related to the standard deviation) are equal. An autocorrelation curve is determined by calculating r as a function of distance between the two plaquettes. As the distance of offset k between the two plaquettes increases, x i becomes increasingly unrelated to yi, the two terms in the numerator become less likely to have the same sign, and the sum of their products decreases (eventually to zero). Autocorrelation curves can be calculated analytically for some simple idealized situations. For example, consider a checkerboard-like image representing a population of non-overlapping, square grains of size D (measured in pixels), with all pixels representing any grain having equal intensity, and each grain having a random in-
GRAIN-SIZE ANALYSIS FROM DIGITAL IMAGES
FIG. 1.—Digital images of natural grains obtained by placing sieved sand on a scanner and scanning at a resolution of 236 pixels per centimeter. Images in top row are enlarged to display 1 cm square; images in bottom row show 1 mm square. Three grain sizes are illustrated: A) 0.500–0.600 mm, B) 0.250–0.300 mm, and C) 0.150– 0.180 mm.
In this oversimplified conceptual model, grain size D is also equal to the distance of offset k at which the correlation r decreases to zero.
a grain). These natural variations cause real autocorrelation curves (Fig. 2) to fall off more steeply at short offsets and more gradually at long offsets (relative to the linear autocorrelation curves for uniform hypothetical ‘‘grains’’ considered above). The curves shown in Figure 2 were computed from images taken using a digital camera with automatic focus and flash. Each image sampled a 6 cm by 4 cm area of sand at approximately 500 pixels per cm (3072 by 2048 pixels). Sand samples were pressed flat using a glass plate, which was removed before the photographs were taken to avoid reflections of the flash. Each curve in Figure 2 represents the mean curve of four images of each size fraction, although differences between images were very small compared to differences between different grain sizes. One approach to digital-image grain-size analysis for uniform-size (or well sorted) natural grains is to determine calibration curves for each grain-size fraction of the sediment in a geographic area. The grain size in individual samples can then be determined by comparison with the calibrated curves. Experiments with natural sediment (discussed below) suggest that this approach works relatively well for natural populations of grains in beach and dune sands.
Measurement of Uniform-Size Natural Grains
Measurement of Mixed-Size Natural Grains
An image of natural sediment is substantially different from the simulated example above, even for uniform-size grains (sieved to a narrow size interval). Real grains (Fig. 1) are irregular in shape rather than square; they differ in size in an image (because both long cylinders and squat disks can be retained between the same pair of sieves); they overlap; and they have non-uniform pixel intensities within each grain (due to both external illumination and intrinsic color variations within
The approach to determining a complete grain-size distribution from an autocorrelation curve requires three steps: (1) determining autocorrelation curves for each grain-size fraction in a sediment population (performed once for all samples in a geographic region), (2) determining the autocorrelation curve for a specific sample of sediment from that region, and then (3) solving for the proportions of calibrated sizes that collectively give the best fit to the sample’s autocorrelation curve.
tensity (uncorrelated to other grains). In such a grossly oversimplified representation, the correlation between pixels in the two plaquettes can be calculated for any offset (measured in a direction parallel to the pixel grid). Correlation is 1.0 where the offset is zero (because the two samples are identical) and zero where the offset is equal to or greater than the grain size (because the intensities of corresponding pixels in the two plaquettes are random and unrelated). At intermediate offsets, the correlation depends on the fraction of offset pixels that end up in the same ‘‘grain’’ as they started. The correlation of that population is 1.0; the correlation of the population of pixels that end up in a new grain is zero. For offsets k that are less than or equal to the grain size, the correlation r is proportional to grain size rk 5
D2k . D
FIG. 2.—Autocorrelation curves of six sieved grain-size fractions. The curves quantify what is visible to the eye in the images in Figure 1: pixels in larger grains are more similar—for a longer distance—than pixels in small grains.
FIG. 3.—Comparison of grain size determined by sieving and by spatial autocorrelation for seven beach and dune sands. Grain sizes determined by the two techniques are highly correlated (r 2 5 0.966).
The linear equations describing this problem are a (1,1) x1 1 a (1,2) x2 1 · · · a (1,m) x m 5 b1
row noise can be reduced by smoothing or averaging successive rows, as illustrated below.
a (2,1) x1 1 a (2,2) x2 1 · · · a (2,m) x m 5 b2 _ a (n,1) x1 1 a (n,2) x2 1 · · · a (n,m) x m 5 b n
where x 1 . . . xm is the solution (the proportion of each of m grain-size fractions in the mixture), coefficients a are the autocorrelation values observed for the calibration sands (m calibration sands measured at offsets of 1 . . . n pixels), and b1 . . . bn are the observed autocorrelation values for the sample being analyzed. Each row in Equation 3 thus relates the autocorrelation b of the sample at a given pixel offset to the proportions of the individual grain-size fractions (x1 . . . xm) and the calibration coefficients a for each grain size at the specified pixel offset. The maximum number of size classes that can be evaluated (the number of ‘‘unknowns’’ that can be determined) is limited by both m (the number of calibration sands) and n (the number of information-providing observations in the autocorrelation curve of the sample, i.e., the number of offsets at which 0 , r , 1 for at least one grain-size fraction). This latter value is limited by the size of the largest grains (expressed in pixels); at greater offsets, no additional information is obtained because r approaches 0 for all grain sizes. The minimum information required to solve Equation 3 is the spatial autocorrelation measured at m pixel offsets, in which case, Equation 3 can be solved by matrix algebra. When applied to real images, however, additional information is generally available because the number of useful pixel offsets is likely to exceed the number of calibration samples (n . m). In this case, more accurate grain-size distributions can be calculated using a least-squares fit to the data. The best—most accurate as well as most meaningful—results are obtained using a non-negative least-squares fit (Lawson and Hanson 1974), because a negative proportion of any grain-size fraction is physically impossible. This approach was used in the examples discussed below. Measurement of Vertical Grain-Size Profiles Autocorrelation is a convenient approach for field measurement of vertical grainsize profiles through sedimentary deposits. Images obtained by digital camera or video can be used for nearly real-time grain-size analysis on a scale finer than can be sampled physically. In its simplest implementation, the autocorrelation curve is computed for each row of pixels in the image, and grain size is related to the mean autocorrelation for a range of pixel offsets. Because the statistics of each row are calculated for small samples, the resulting values can be rather noisy. Such row-to-
Examples Grain Size of Natural Beach and Dune Sands.—Seven samples of beach and dune sand were collected along the California coast near Santa Cruz. Grain size of each sample was measured by sieving and by the autocorrelation technique presented above. Calibration data were obtained from a single large sample from one location. The sample sands were photographed using the same camera setup as the calibration curves. Grain sizes determined by the two techniques are well correlated (r 2 5 0.966), although some values determined using the two techniques were observed to differ by more than 0.1 mm (Fig. 3). Grain-Size Distribution of Synthetic Mixtures.—The grain-size-distribution algorithm was tested using three synthetic mixtures of sand. One mixture had a narrow unimodal distribution, one had a broad distribution, and one had a bimodal distribution. Samples were photographed using the same camera setup and procedure as the calibration curves. In all three cases, the grain-size distributions calculated from the images mimic the real distributions (Fig. 4), although differences in the details of the curves are apparent. The distributions in Figure 4 were calculated using data from all pixel offsets up to the distance where the correlation approached zero (the precise value used was 0.08). Including data from greater offset distances with poorer correlations degraded the predictions, probably because the predictions were based on data that included a greater proportion of ‘‘noise’’ such as nonuniform illumination from the camera’s flash. In all cases the number of offsets substantially exceeded the number of grainsize classes, which allowed a non-negative least-squares fit to be used to solve for the size distribution. Vertical Profile of Grain Size.—Autocorrelation is a useful approach for field measurement of vertical grain-size profiles through sediment deposits. Figure 5 shows such a profile through four beds photographed with a 3-megapixel digital camera. Although vertical grain-size variations in the image are visible to the eye, the autocorrelation statistics are more precise in documenting details of the bedding. Each of the four beds is inversely graded (gradually coarsening upward to the top contact and then abruptly fining at the base of the overlying bed). The overall sequence also coarsens upward. Calculations for this vertical grain-size profile (autocorrelation curves for 1440 rows of pixels, smoothed at two scales) took 7 seconds on an 867 MHz computer.
GRAIN-SIZE ANALYSIS FROM DIGITAL IMAGES
FIG. 4.—Comparison of actual and computed grain-size distributions for three sand mixtures. Known distributions were created by mixing sieved sand fractions by volume. Sands were photographed with a digital camera, and grain-size distributions were computed from spatial autocorrelations using non-negative leastsquares fits. A) Unimodal mixture. B) Mixture with equal amounts of five 1/2-phi size fractions. C) Bimodal mixture.
Image Resolution and Sampling Considerations The following guidelines may be helpful in devising imaging strategies: (1) Images of samples must have sufficient resolution that the smallest grains of interest are represented by more than one pixel, because grains smaller than one pixel will have autocorrelation curves that are related to patches of grains rather than individual grains. (2) Calibration and sample images must contain enough grains to be representative of the sediment being analyzed (representative of shape, color, mineralogy, internal crystals, and packing). More than one image may be required per sediment
sample, particularly for images of mixed grain sizes, where grains may be segregated by size on different spatial scales. (3) In order for images to contain many sediment grains and have many pixels per grain, images must have many pixels; alternatively, multiple images can be used for each sample. (4) The results are not sensitive to image brightness (mean pixel intensity) or contrast (standard deviation of pixel intensity), because Equation 1 is normalized relative to these statistical measures. Problems may result, however, if images are so underexposed or overexposed that individual grains merge together as solid areas of black or white. In this case, the overexposed or underexposed regions of the image appear statistically to be large individual grains. (Even this degree of overexposure or underexposure may not be a problem if it is uniform from image to image.) (5) Illumination should be at a constant angle (such as a flash mounted on the camera). Illumination from different angles can cause changes in shadows behind grains, which influences the autocorrelation results. (6) Grain size calculated for an image can be subject to error if the bed is photographed from a different distance or at a different angle from the calibration images. To avoid both problems, the camera should always be aimed perpendicular to the surface being photographed, and kept at a constant distance from the surface. One convenient way to ensure both alignments in the field is to mount the camera facing downward within a housing, oriented to photograph the bed through a window on the bottom of the housing. Pushing the housing and window against the bed ensures that the distance is constant and also enables photography even in turbid water, because the optical path is through air within the housing rather than through the water. The U.S.G.S. underwater microscope (U.S. Geological Survey 2001) employs this design for data collection in the turbid water of the Colorado River. (7) In theory, grain-size profiles calculated across individual images also might be subject to errors if the camera is not oriented perpendicular to the surface or if the image is distorted due to optical properties of a lens. For example, an obliquity in view angle might cause grains on one edge of an image to appear larger than on the opposite edge because of differing distances to the two sides or because of differing focus. Similarly, spherical defects in optics might cause differences between the center and edge of an image. Tests using sieved sands were unable to detect any such systematic differences in calculated grain size across images. (Systematic differences of just a few percent could have been detected.) This test can be easily performed with other cameras, lenses, or housings by looking for systematic differences in autocorrelation across images of sieved sand. (8) It is conceivable that the grain size calculated from an image’s autocorrelation might vary if grains on the bed are segregated by size into patches, and if the large grains in these patches have brightness or darkness different from small grains; this combination of properties was not investigated. (9) Because of the three-dimensional fabric of a deposit and three-dimensional grain-shape properties, it might give improved accuracy to convert the spatial results obtained from a two-dimensional image to three-dimensional volume. For example, where all grains have the same shape, then large grains viewed in a two-dimensional image are thicker in the non-observed dimension and therefore represent a greater volume than the same surface area covered by small grains. In this case, the surfacearea measurements underrepresent the proportion of larger grains in a mixture (the underrepresentation is proportional to D). Despite this theoretical underrepresentation of coarser grains, the grain-size distributions calculated for the three mixtures examined in this study tend to overrepresent coarser grains. Additional work is needed to determine whether this is a consistent tendency and what the cause might be. Summary of Steps to Calculate Grain Size of Natural Sediment (1) (2) (3) (4)
Collect representative physical samples of the sediment under investigation. Sieve the sediment to obtain individual grain-size fractions. Take high-resolution images of each individual size fraction. Calculate autocorrelation curves for each size fraction. A sufficient number of grains of each size must be included in the images for the autocorrelation statistics to be representative of the sediment. (5) Take high-resolution images of samples to be analyzed; these images also must include enough grains to be representative of the sediment. (6) Calculate autocorrelation curve of sample image. (7) For a measure of size, the autocorrelation curve of the sample can be compared directly to curves of calibration samples. To determine the grain-size distribution, use a non-negative least-squares fit to solve for the proportions of each grain-size fraction that collectively give the best fit to the autocorrelation curve of the sample.
FIG. 5.—Vertical grain-size profile measured in a digital photograph. A) Digital image of four beds; total thickness is 6 cm (240 pixels per cm). B) Relative grain size was determined from spatial autocorrelation and then smoothed using two windows: 25 pixels (; 1 mm) and 70 pixels (; 3 mm). The four beds are inversely graded, as is the overall sequence. C) Gradual upward coarsening and abrupt fining are visible in the enlarged image.
COMPUTER CODE EXAMPLES
Three example MATLABt scripts are presented below. (The use of MATLABt trade name is for descriptive purposes and does not constitute endorsement by the U.S.G.S.) The scripts illustrate how to read images, convert images to data, calculate spatial autocorrelations, convert autocorrelations to grain sizes and grain-size distributions, and plot autocorrelation profiles. Calculate Autocorrelation The following example opens an image (line 1), displays the image (line 2), converts the image to grayscale data (line 3), and calculates the autocorrelation curve for offset distances of one pixel to 99 pixels (lines 7–10). This code can be used to perform steps (4) and (6) listed above in the Summary of Steps to Calculate Grain Size of Natural Sediment. ColorData 5 imread(‘ImageName.jpg’);
imshow(ColorData) data 5 double(rgb2gray(ColorData)); ImageWidth 5 size(data,2); MaxOffset 5 99; ImageWidthToProcess 5 ImageWidth-MaxOffset; for Offset 5 1:MaxOffset OffsetPlaquette 5 data(:,11Offset:ImageWidthToProcess1Offset); AutoCData(Offset) 5 corr2(data(:,1:ImageWidthToProcess), OffsetPlaquette) end Calculate Grain Size and Grain-Size Distribution from Autocorrelation The next example reads a file containing calibration data (line 1), reads a file containing autocorrelation data for a sample (line 3), calculates which part of the autocorrelation curve to use for grain-size calculations (line 4), interpolates and averages the observed autocorrelations relative to the calibration data (lines 5–8),
GRAIN-SIZE ANALYSIS FROM DIGITAL IMAGES
and determines the grain-size distribution (line 10). The calibration file that is read in line 1 must specify autocorrelation values in a matrix, with one column for each calibrated grain size and one row for each offset distance; each column can be calculated using the autocorrelation algorithm presented above. The autocorrelation data of the sample must consist of a single column giving autocorrelation of the sample image as a function of offset distance; it also can be calculated using the autocorrelation algorithm above. The result of the grain-size-distribution calculation is a list of the proportions of each grain-size fraction in the sample; sizes are listed in the same order as the columns in the calibration data file. This example performs step (7) listed above in the Summary of Steps to Calculate Grain Size of Natural Sediment. load CalibrationData; CalibrationSizes 5 [0.30 0.43 0.61 0.86 1.21 1.71]; load ObsAutocorrelation; MaxOffset 5 sum(gt(ObsAutocorrelation,0.3)); for Offset 5 1:MaxOffset GrainSize(Offset) 5 interp1(CalibrationData(Offset,:), . . . CalibrationSizes,ObsAutocorrelation(Offset), ‘linear’, ‘extrap’); end MeanSize 5 mean(GrainSize) MaxOffset 5 sum(gt(ObsAutocorrelation,0.08)); SizeDist 5 lsqnonneg(CalibrationData(1:MaxOffset, 1:6), . . . ObsAutocorrelation (1:MaxOffset))
for i 5 windowsize: ImageHeight11-windowsize smoothed1(i) 5 sum((AutocProfileData(i11-windowsize:i1windowsize-. . . 1)).*triangf); end smoothed 5 smoothed*scale; plot(smoothed(windowsize:ImageHeight-windowsize). . . (ImageHeight-windowsize:-1:windowsize),‘c’) ylabel(‘Height in Image (pixels)’) xlabel(‘Grain Size (Spatial Autocorrelation)’) text(0,ImageHeight130,‘Fine’) text(min(ImageWidthToProcess,20471LeftSide)-120,ImageHeight130,‘Coarse’) hold off
Plot Autocorrelation Profiles
AGRAWAL, Y.C., MCCave, I.N., and Riley, J.B., 1991, Laser diffraction size analysis, in Syvitski, J.M.P., ed., Principles, Methods and Application of Particle Size Analysis: Cambridge, UK, Cambridge University Press, p. 119–128. BUTLER, J.B., LANE, S.N. AND CHANDLER, J.H., 2001, Automated extraction of grain-size data from gravel surfaces using digital image processing for hydraulic research: Journal of Hydraulic Research, v. 39, p. 1–11. GIBBS, R.J., 1972, The accuracy of particle-size analyses utilizing settling tubes: Journal of Sedimentary Petrology, v. 42, p. 141–145. KRUMBEIN, W.C. AND PETTIJOHN, F.J., 1938, Manual of Sediment Petrography: New York, Appleton-Century Crofts, Inc., 549 p. LAWSON, C.L. AND HANSON, B.J., 1974, Solving Least Squares Problems: Englewood Cliffs, New Jersey, Prentice-Hall, 340 p. MCCAVE, I.N., AND SYVITSKI, J.M.P., 1991, Principles and Methods of Geological Particle Size Analysis, in Syvitski, J.M.P., ed., Principles, Methods and Application of Particle Size Analysis: Cambridge, U.K., Cambridge University Press, p. 3–21. MORAN, P.A.P., 1948, The interpretation of statistical maps: Royal Statistical Society, Journal, Series B (Methodological), v. 10, p. 243–251. RUBIN, D.M., 1992, Use of forecasting signatures to help distinguish periodicity, randomness, and chaos in ripples and other spatial patterns: CHAOS, v. 2, p. 525–535. RUBIN, D.M., AND TOPPING, D.J., 2001, Quantifying the relative importance of flow regulation and grain-size regulation of suspended-sediment transport (a) and tracking changes in grain size on the bed (b): Water Resources Research, v. 37, p, 133–146. SYVITSKI, J.M.P., ED., 1991, Principles, Methods and Application of Particle Size Analysis: Cambridge, UK, Cambridge University Press, 368 p. SYVITSKI, J.P.M., ASPREY, K.W., AND CLATTENBURG, D.A., 1991, Principles, design and calibration of settling tubes, in Syvitski, J.M.P., ed., Principles, Methods and Application of Particle Size Analysis: Cambridge, UK, Cambridge University Press, p. 45–63. U.S. GEOLOGIC SURVEY, 2001, Underwater microscope system: USGS Fact Sheet 135-01, Washington, D.C., U.S. Government Printing Office, 2 p.
The example shown below reads a color image (line 1), specifies which part of the image to use in the autocorrelation profile (lines 4–9), displays the selected part of the original image (line 10), calculates the autocorrelation profile (lines 11–14), plots the autocorrelation profile on the image (lines 15–17), calculates and plots a smoothed autocorrelation profile (lines 18–24), and labels the plot (lines 25–29). ColorData 5 imread(‘ImageName.jpg’,’jpg’); Data 5 double(rgb2gray(ColorData)); PixelOffset 5 4; LeftSide 5 1; RightSide 5 1000; DataToUse 5 data (1:size(data,1),LeftSide:RightSide); ImageHeight 5 size(DataToUse,1); ImageWidth 5 size(DataToUse,2); ImageWidthToProcess 5 ImageWidth-PixelOffset-1; imshow(ColorData(1:ImageHeight,LeftSide:min(RightSide,20471LeftSide),:)) pause(0.1) for i 5 1:ImageHeight correl 5 corrcoef(DataToUse(i,1:ImageWidthToProcess11),DataToUse . . . (i,11PixelOffset:ImageWidthToProcess1PixelOffset11)); AutocProfileData(ImageHeight11-i) 5 correl(1,2); end scale 5 min(ImageWidthToProcess,20471LeftSide)/max(AutocProfileData); hold on plot(scale*AutocProfileData(1:ImageHeight),(ImageHeight:-1:1), ‘m’) windowsize 5 20; triangf 5 (triang(2*windowsize-1)’)/sum(triang(2*windowsize-1)’);
Jodi Harney and James Allen (U.S.G.S.) provided some of the sieved samples used in this study. Jodi Harney and Pat Chavez (U.S.G.S.) reviewed this manuscript. Noah Snyder offered useful advice. Hank Chezar (U.S.G.S.) assembled the underwater digital microscope that is now in use to collect in-situ images of bed sediment in Grand Canyon. REFERENCES