<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0">
  <front>
    <journal-meta><journal-id journal-id-type="publisher">ESurf</journal-id><journal-title-group>
    <journal-title>Earth Surface Dynamics</journal-title>
    <abbrev-journal-title abbrev-type="publisher">ESurf</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Earth Surf. Dynam.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">2196-632X</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/esurf-7-859-2019</article-id><title-group><article-title>Introducing <italic>PebbleCounts</italic>: a grain-sizing tool for photo surveys of dynamic gravel-bed rivers</article-title><alt-title>PebbleCounts: grain sizing for gravel-bed rivers</alt-title>
      </title-group><?xmltex \runningtitle{PebbleCounts: grain sizing for gravel-bed rivers}?><?xmltex \runningauthor{B. Purinton and B. Bookhagen}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes">
          <name><surname>Purinton</surname><given-names>Benjamin</given-names></name>
          <email>purinton@uni-potsdam.de</email>
        <ext-link>https://orcid.org/0000-0001-8504-8115</ext-link></contrib>
        <contrib contrib-type="author" corresp="no">
          <name><surname>Bookhagen</surname><given-names>Bodo</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-1323-6453</ext-link></contrib>
        <aff id="aff1"><institution>Institute of Geosciences, University of Potsdam, Potsdam, Germany</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Benjamin Purinton (purinton@uni-potsdam.de)</corresp></author-notes><pub-date><day>17</day><month>September</month><year>2019</year></pub-date>
      
      <volume>7</volume>
      <issue>3</issue>
      <fpage>859</fpage><lpage>877</lpage>
      <history>
        <date date-type="received"><day>17</day><month>April</month><year>2019</year></date>
           <date date-type="rev-request"><day>23</day><month>April</month><year>2019</year></date>
           <date date-type="rev-recd"><day>16</day><month>August</month><year>2019</year></date>
           <date date-type="accepted"><day>26</day><month>August</month><year>2019</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2019 Benjamin Purinton</copyright-statement>
        <copyright-year>2019</copyright-year>
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019.html">This article is available from https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019.html</self-uri><self-uri xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019.pdf">The full text article is available as a PDF file from https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019.pdf</self-uri>
      <abstract><title>Abstract</title>
    <p id="d1e89">Grain-size distributions are a key geomorphic metric of gravel-bed rivers. Traditional measurement methods include manual counting or photo sieving, but these are achievable only at the 1–10 m<inline-formula><mml:math id="M1" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> scale. With the advent of drones and increasingly high-resolution cameras, we can now generate orthoimagery over hectares at millimeter to centimeter resolution. These scales, along with the complexity of high-mountain rivers, necessitate different approaches for photo sieving. As opposed to other image segmentation methods that use a watershed approach, our open-source algorithm, <italic>PebbleCounts</italic>, relies on <inline-formula><mml:math id="M2" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means clustering in the spatial and spectral domain and rapid manual selection of well-delineated grains. This improves grain-size estimates for complex riverbed imagery, without post-processing. We also develop a fully automated method, <italic>PebbleCountsAuto</italic>, that relies on edge detection and filtering suspect grains, without the <inline-formula><mml:math id="M3" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means clustering or manual selection steps. The algorithms are tested in controlled indoor conditions on three arrays of pebbles and then applied to 12 <inline-formula><mml:math id="M4" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 1 m<inline-formula><mml:math id="M5" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> orthomosaic clips of high-energy mountain rivers collected with a camera-on-mast setup (akin to a low-flying drone). A 20-pixel <inline-formula><mml:math id="M6" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis length lower truncation is necessary for attaining accurate grain-size distributions. For the <inline-formula><mml:math id="M7" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means <italic>PebbleCounts</italic> approach, average percentile bias and precision are 0.03 and 0.09 <inline-formula><mml:math id="M8" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>, respectively, for <inline-formula><mml:math id="M9" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.16</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M10" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> images, and 0.07 and 0.05 <inline-formula><mml:math id="M11" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for one 0.32 mm pixel<inline-formula><mml:math id="M12" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image. The automatic approach has higher bias and precision of 0.13 and 0.15 <inline-formula><mml:math id="M13" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>, respectively, for <inline-formula><mml:math id="M14" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.16</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M15" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> images, but similar values of <inline-formula><mml:math id="M16" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">0.06</mml:mn></mml:mrow></mml:math></inline-formula> and 0.05 <inline-formula><mml:math id="M17" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for one 0.32 mm pixel<inline-formula><mml:math id="M18" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image. For the automatic approach, only at best 70 % of the grains are correct identifications, and typically around 50 %. <italic>PebbleCounts</italic> operates most effectively at the 1 m<inline-formula><mml:math id="M19" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patch scale, where it can be applied in <inline-formula><mml:math id="M20" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula>–10 min on many patches to acquire accurate grain-size data over 10–100 m<inline-formula><mml:math id="M21" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> areas. These data can be used to validate <italic>PebbleCountsAuto</italic>, which may be applied at the scale of entire survey sites (10<inline-formula><mml:math id="M22" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>–10<inline-formula><mml:math id="M23" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">4</mml:mn></mml:msup></mml:math></inline-formula> m<inline-formula><mml:math id="M24" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>). We synthesize results and recommend best practices for image collection, orthomosaic generation, and grain-size measurement using both algorithms.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d1e334">Gravel-bed rivers transport water, nutrients, and sediment downstream, linking high mountains with populated forelands. The grain-size distributions – and associated percentile diameters, such as the <inline-formula><mml:math id="M25" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">50</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">84</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> – in a river reach are fundamental geomorphic metrics of these systems <xref ref-type="bibr" rid="bib1.bibx56 bib1.bibx46 bib1.bibx21" id="paren.1"><named-content content-type="pre">e.g.,</named-content></xref>. They are used to characterize aquatic habitats <xref ref-type="bibr" rid="bib1.bibx40" id="paren.2"><named-content content-type="pre">e.g.,</named-content></xref>, assess the impacts of human infrastructure like dams <xref ref-type="bibr" rid="bib1.bibx39 bib1.bibx33" id="paren.3"><named-content content-type="pre">e.g.,</named-content></xref>, calibrate theoretical models of river transport and erosion (e.g., <?xmltex \hack{\mbox\bgroup}?><xref ref-type="bibr" rid="bib1.bibx58" id="altparen.4"/><?xmltex \hack{\egroup}?>; <?xmltex \hack{\mbox\bgroup}?><xref ref-type="bibr" rid="bib1.bibx2" id="altparen.5"/><?xmltex \hack{\egroup}?>; <?xmltex \hack{\mbox\bgroup}?><xref ref-type="bibr" rid="bib1.bibx3" id="altparen.6"/><?xmltex \hack{\egroup}?>; <?xmltex \hack{\mbox\bgroup}?><xref ref-type="bibr" rid="bib1.bibx25" id="altparen.7"/><?xmltex \hack{\egroup}?>), and explore natural phenomena such as downstream fining <xref ref-type="bibr" rid="bib1.bibx45 bib1.bibx27 bib1.bibx51 bib1.bibx29 bib1.bibx20 bib1.bibx41" id="paren.8"><named-content content-type="pre">e.g.,</named-content></xref>, which is essential for nutrient transport and ecological diversity.</p>
      <?pagebreak page860?><p id="d1e401">Accurate grain-size measurement is elusive in nature given the heterogeneity of gravel-bed rivers, particularly in steep mountain catchments where the range of grain sizes is large. Traditionally, grain-size distributions have been gathered via physical clast measurement and counting along grids <xref ref-type="bibr" rid="bib1.bibx69" id="paren.9"/>, lines <xref ref-type="bibr" rid="bib1.bibx67" id="paren.10"/>, or in <inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M28" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patches <xref ref-type="bibr" rid="bib1.bibx9" id="paren.11"/>, all truncated at some lower observable limit <xref ref-type="bibr" rid="bib1.bibx51" id="paren.12"><named-content content-type="pre">e.g.,</named-content></xref>. Not only are these techniques time-consuming, prone to operator bias, and disruptive to the environment, but they also require large (hundreds of pebbles) sample sizes to accurately estimate the characteristic nature of the grains in each location <xref ref-type="bibr" rid="bib1.bibx68" id="paren.13"/>.</p>
      <p id="d1e441">In light of this, measurement from photographs is an attractive option for increasing sample size and decreasing fieldwork, while covering larger areas. Increasingly affordable high-resolution – 12- to 24-megapixel – cameras allow the collection of high-quality photo surveys via structure from motion with multi-view stereo (SfM-MVS) <xref ref-type="bibr" rid="bib1.bibx59 bib1.bibx26" id="paren.14"/> at scales of entire river cross sections or reaches with resolutions at, or exceeding, 1 cm pixel<inline-formula><mml:math id="M29" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx70" id="paren.15"><named-content content-type="pre">e.g.,</named-content></xref>. Even higher-resolution (1 mm pixel<inline-formula><mml:math id="M30" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>) river surveys can be accomplished with low-flying unmanned aerial vehicles (UAVs) <xref ref-type="bibr" rid="bib1.bibx17" id="paren.16"><named-content content-type="pre">e.g.,</named-content></xref>, pole-mounted cameras, or using handheld imagery.</p>
      <p id="d1e481">We build on previous work and introduce the addition of color-space clustering techniques to present efficient new semi-automated (<italic>PebbleCounts</italic>) and fully automated (<italic>PebbleCountsAuto</italic>) algorithms for grain sizing from imagery in high-energy mountain rivers. Our algorithms are built on Python with a few popular libraries and are open source. The instructions and code can be accessed at <uri>https://github.com/UP-RS-ESP/PebbleCounts</uri> (last access: 12 September 2019)  <xref ref-type="bibr" rid="bib1.bibx49" id="paren.17"/>. In this study, we present previous work on grain-size measurement from rivers and our motivation for new developments. The processing chains of <italic>PebbleCounts</italic> and <italic>PebbleCountsAuto</italic> are then discussed. We test the algorithms in controlled conditions and then in a more challenging field setting in the northwestern Argentine Andes. The limits and caveats of the method are discussed using imagery of varying resolution, and suggestions for photo collection and processing are provided.</p>
<sec id="Ch1.S1.SS1">
  <label>1.1</label><title>Prior studies</title>
      <p id="d1e511">Modern digital grain sizing is divided into texture- and segmentation-based image-processing methods, as opposed to previous manual digitization <xref ref-type="bibr" rid="bib1.bibx38 bib1.bibx36" id="paren.18"><named-content content-type="pre">e.g.,</named-content></xref>. Many texture methods rely on the relationship between grains and their shadowed interstices to derive size estimates over image windows. Examples include semivariance <xref ref-type="bibr" rid="bib1.bibx62 bib1.bibx15 bib1.bibx16 bib1.bibx13" id="paren.19"/>, entropy or inertia calculated from gray-level co-occurrence matrices <xref ref-type="bibr" rid="bib1.bibx34 bib1.bibx16 bib1.bibx13 bib1.bibx24 bib1.bibx22 bib1.bibx70 bib1.bibx71" id="paren.20"/>, and autocorrelation <xref ref-type="bibr" rid="bib1.bibx52 bib1.bibx65 bib1.bibx11" id="paren.21"/>. These methods only provide one estimate of grain size (e.g., <inline-formula><mml:math id="M31" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">50</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>), which often requires site-specific calibration.</p>
      <p id="d1e539"><xref ref-type="bibr" rid="bib1.bibx10" id="text.22"/> achieved full grain-size distribution measurements using wavelet decomposition and published an open-source Python tool, <italic>pyDGS</italic>. This is a texture method that has been designed for the analysis of thin sections or beach sands and requires each grain to be fully resolvable and the distributions to be fairly homogeneous in size and shape. Additional texture methods rely on the 3-D texture (or roughness) of point clouds to relate the variance of bed-scale topography to average grain size <xref ref-type="bibr" rid="bib1.bibx7 bib1.bibx54 bib1.bibx66 bib1.bibx70 bib1.bibx4" id="paren.23"/>; however, these techniques also require site calibration, and the relationships have been found to vary widely <xref ref-type="bibr" rid="bib1.bibx47" id="paren.24"/>.</p>
      <p id="d1e553">In contrast to texture methods, the focus of segmentation is the full delineation and measurement of every visible grain. Segmentation is error prone in images that contain overlapping grains, a large range of grain sizes including sand patches, changes in land cover (e.g., vegetation), pebbles that are highly irregular in shape (non-ellipsoid), pebbles with intragranular color variations or texture such as veins or fractures, and in which shadowing is irregular. Herein, we refer to these factors collectively as image complexity. Furthermore, segmentation-based methods also require high-spatial-resolution point clouds or images that resolve the specific grain geometries. The benefits are that segmentation does not require any site calibration besides knowledge of the image scale and it provides a full grain-size distribution and all the commonly used percentiles (<inline-formula><mml:math id="M32" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mn mathvariant="normal">5</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">16</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">25</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">50</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">75</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">84</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">95</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>). Published methods by <xref ref-type="bibr" rid="bib1.bibx12" id="text.25"/>, <xref ref-type="bibr" rid="bib1.bibx57" id="text.26"/>, and <xref ref-type="bibr" rid="bib1.bibx30 bib1.bibx31" id="text.27"/> all rely on edge detection followed by watershed segmentation and ellipse fitting to each separate grain to get the long (a) and intermediate (b) axes. <xref ref-type="bibr" rid="bib1.bibx23" id="text.28"/> added some sophistication to the algorithm of <xref ref-type="bibr" rid="bib1.bibx30 bib1.bibx31" id="text.29"/> and provide a free – though closed-source – application called <italic>Basegrain</italic> for Matlab<sup>™</sup>, which has become a standard tool <xref ref-type="bibr" rid="bib1.bibx4 bib1.bibx5 bib1.bibx42 bib1.bibx17" id="paren.30"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
</sec>
<sec id="Ch1.S1.SS2">
  <label>1.2</label><title>Motivation</title>
      <p id="d1e628">Watershed segmentation is effective for interlocking, uniformly colored, oblate grains; however, energetic gravel-bed rivers in mountains often have more complex grain compositions with intragranular variation, irregular shadowing, and a large range of sizes. The automated watershed methods proposed suffer from oversegmentation, grain misidentification, and the need for significant, time-consuming post-processing (e.g., in <italic>Basegrain</italic> with the split, merge, and delete tools) when applied to complex images. These issues limit their application to areas <inline-formula><mml:math id="M33" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M34" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1" specific-use="star"><?xmltex \currentcnt{1}?><label>Figure 1</label><caption><p id="d1e655">Difference between our <inline-formula><mml:math id="M35" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> means with manual selection (KMS) and automatic with image filtering (AIF) approaches versus a fully automated watershed segmentation approach on a gravel image from a high-mountain river. The <inline-formula><mml:math id="M36" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M37" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> axes of each grain mask are found via an ellipse fit to the same area. Fewer grains are found in the KMS and AIF results, and there is still some misidentification in the case of AIF but less than in the watershed result.</p></caption>
          <?xmltex \igopts{width=384.112205pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f01.jpg"/>

        </fig>

      <p id="d1e685">Thus, we are motivated to develop a new semi-automated technique that uses <inline-formula><mml:math id="M38" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means clustering of pixels and rapid<?pagebreak page861?> manual selection of well-defined grains, herein referred to as the <inline-formula><mml:math id="M39" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> means with manual selection (KMS) or <italic>PebbleCounts</italic> approach, and a fully automated version that uses filtering of suspect grains, herein referred to as the automatic with image filtering (AIF) or the <italic>PebbleCountsAuto</italic> approach (Fig. <xref ref-type="fig" rid="Ch1.F1"/>). By avoiding oversegmentation and misidentification, we are able to select fewer grains per image but be sure that those selected are correctly delineated, thus improving the resulting distribution (Fig. <xref ref-type="fig" rid="Ch1.F2"/>), with the intention of upscaling to include many thousands of grain measurements over large areas. Despite the selection of fewer grains, Fig. <xref ref-type="fig" rid="Ch1.F2"/> demonstrates that these represent the true grain size through the close match in distribution with hand-clicked results.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2"><?xmltex \currentcnt{2}?><label>Figure 2</label><caption><p id="d1e718">Watershed segmentation (blue, dashed and dotted line) versus KMS (gray, dashed line) and AIF (red, dotted line) approaches compared with a hand-clicked <inline-formula><mml:math id="M40" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis grain-size distribution (black line) for a <inline-formula><mml:math id="M41" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M42" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> river patch (S09 in Fig. <xref ref-type="fig" rid="Ch1.F6"/>b). Watershed approach leads to oversegmentation of grains, giving an unreasonable number of clasts (276 versus 106 in the control) and an overly fine grain-size distribution.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f02.png"/>

        </fig>

      <p id="d1e755">Furthermore, faced with diverse camera models and the rise of SfM-MVS for the generation of georeferenced orthophotos, we wish to explore reasonable and appropriate combinations for covering acre-to-hectare areas while maintaining accurate grain-size measurement. Fundamentally, our aim for the KMS approach is not in the delineation of a single high-resolution image from a <inline-formula><mml:math id="M43" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M44" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patch as in previous segmentation work but rather a method that can cover areas of 10–100 m<inline-formula><mml:math id="M45" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> containing complex grain arrangements, despite missing many grains at the patch scale. These semi-automated photo-sieving results can then be used to validate the AIF method at much greater spatial scales (10<inline-formula><mml:math id="M46" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>–10<inline-formula><mml:math id="M47" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">4</mml:mn></mml:msup></mml:math></inline-formula> m<inline-formula><mml:math id="M48" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>), where physical counting is infeasible and previous methods are unreliable or time-consuming.</p>
</sec>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Algorithm description</title>
      <p id="d1e823">Our methods are similar to previous work by <xref ref-type="bibr" rid="bib1.bibx30" id="text.31"/> and <xref ref-type="bibr" rid="bib1.bibx23" id="text.32"/>, with some key differences. A flow chart of both methods is shown in Fig. <xref ref-type="fig" rid="Ch1.F3"/> and the processing is presented briefly. We direct the interested user to the manual (<uri>https://github.com/UP-RS-ESP/PebbleCounts</uri>) for a full description of the steps. Our<?pagebreak page862?> algorithms use 2-D image processing in the spatial and spectral domains, which ignores the potential to exploit third height dimensions from irregularly spaced point clouds generated via lidar or SfM-MVS. The reader is directed to Sect. S1 in the Supplement for our efforts in this regard.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3" specific-use="star"><?xmltex \currentcnt{3}?><label>Figure 3</label><caption><p id="d1e839">Flowchart of <italic>PebbleCounts</italic> <bold>(a)</bold> and <italic>PebbleCountsAuto</italic> <bold>(b)</bold>. The boxes are user-supplied input or output from the algorithm. Dashed lines indicate a user input step during processing, either entering and checking values or clicking.</p></caption>
        <?xmltex \igopts{width=469.470472pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f03.png"/>

      </fig>

<sec id="Ch1.S2.SS1">
  <label>2.1</label><?xmltex \opttitle{\textit{PebbleCounts}: KMS}?><title><italic>PebbleCounts</italic>: KMS</title>
      <p id="d1e870">We employ the additional color spaces HSV (hue, saturation, value) and CIELab <xref ref-type="bibr" rid="bib1.bibx53" id="paren.33"/>, aside from traditional RGB (red, green, blue) and gray scale, to enhance differences in the spectral domain separate from lighting. First, the RGB image undergoes strong non-local means de-noising <xref ref-type="bibr" rid="bib1.bibx8" id="paren.34"/> to smooth intragranular color difference, interactive gray-scale shadow masking <xref ref-type="bibr" rid="bib1.bibx44" id="paren.35"/> to separate obvious interstices, and HSV color selection for sand-patch masking (whereby sand is filtered by a narrow, user-selected color mask). The image and shadow/sand edge mask are then windowed for further processing.</p>
      <p id="d1e882">At each window, the RGB image undergoes another weaker non-local means de-noising, is then converted to CIELab, and the chromaticity bands from this color space undergo bilateral filtering <xref ref-type="bibr" rid="bib1.bibx61" id="paren.36"/> to preserve intergranular edges while further smoothing color. Following this, edge detection on the smoothed, gray-scaled image occurs via a combination of top-hat, Sobel, and Canny methods with feature-AND selections <xref ref-type="bibr" rid="bib1.bibx53" id="paren.37"/>, in which an edge is added to the full mask only if it overlaps with a found edge in the previous edge mask, thus piecewise building an edge map while avoiding lone (i.e., intragranular) edges <xref ref-type="bibr" rid="bib1.bibx23" id="paren.38"/>.</p>
      <p id="d1e894">After edge detection, our algorithm uses <inline-formula><mml:math id="M49" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means clustering <xref ref-type="bibr" rid="bib1.bibx43 bib1.bibx55" id="paren.39"/> to further segment the pebbles. First, the matrix of non-masked pixels is converted into a vector that includes the spectral information at each location. This <inline-formula><mml:math id="M50" display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>×</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula>-dimensional vector (<inline-formula><mml:math id="M51" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> being the number of non-masked pixels) includes two spectral observables: the green–red and blue–yellow smoothed chromaticity bands from CIELab; and the two spatial observables: the <inline-formula><mml:math id="M52" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M53" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> coordinates of the pixel in image space. To avoid oversegmentation by anisotropic or image-spanning grains, the <inline-formula><mml:math id="M54" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:math></inline-formula> coordinates are rescaled to 50 % of the color, which is also rescaled from 0 to 1.</p>
      <p id="d1e954">We attempted using agglomerative Ward hierarchical clustering <xref ref-type="bibr" rid="bib1.bibx64" id="paren.40"/> to further improve results on anisotropic and/or large grains; however, this approach is prohibitively slow on large images, and test results did not show significant improvement. The <inline-formula><mml:math id="M55" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means clustering requires a user-supplied number of clusters. Here, we add clusters beginning at 1 and recalculate up to an inertia improvement threshold of 1 %–10 % (user supplied). Resulting labeled masks are cleaned via binary operations and the user is prompted to select the labeled regions that contain full, single grains within a simple pop-up window (Fig. S3).</p>
      <p id="d1e967">After selection, the orientation and <inline-formula><mml:math id="M56" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M57" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> axes of an ellipse fit to the labeled region, shown to accurately approximate grain size <xref ref-type="bibr" rid="bib1.bibx30" id="paren.41"/>, are recorded and the grain is added to the final list and the masked region. This processing takes place over three separate scales representing a “burrowing” of the algorithm through the image (from largest to smallest window/grain size). Scales are set by the user-supplied longest expected <inline-formula><mml:math id="M58" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> axis and image resolution. In contrast to the 46 variables employed by <italic>Basegrain</italic>, <italic>PebbleCounts</italic> has 20 command-line variable flags – of which 15 exert influence on the results – with most requiring little to no modification (Table S1). Examples of the command-line interface and clicking steps are in the manual and Sect. S2.</p>
</sec>
<sec id="Ch1.S2.SS2">
  <label>2.2</label><?xmltex \opttitle{\textit{PebbleCountsAuto}: AIF}?><title><italic>PebbleCountsAuto</italic>: AIF</title>
      <p id="d1e1013">This method applies the same initial non-local means de-noising and interactive shadow/sand masking, with the option to input user-supplied values for full automation. From here, we diverge from the windowing and <inline-formula><mml:math id="M59" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means approach and move directly to edge detection on the entire image using the same top-hat, Canny, and Sobel combination with feature-AND selections.</p>
      <p id="d1e1023">The resulting mask is then cleaned via binary morphological operations and each label is measured via ellipse fitting. To reduce the misidentified grains, the ellipses are filtered in a three-step chain. (A) Does the centroid fall within another ellipse? (B) Does the ellipse overlap with any neighboring<?pagebreak page863?> ellipses above some threshold? (C) Is the percent misfit (ellipse area versus grain-mask area) above some threshold? At each step, an answer of “yes” leads to the elimination of the grain. The (A) and (B) steps filter grains that have high overlap or are oversegmented, whereas (C) helps filter areas where multiple grains were combined in one mask or a non-grain was identified (e.g., remaining sand patch). Grains passing the test are taken as the final results, with the assumption that misidentified grains are minimal, particularly when upscaling to large areas and tens of thousands of pebbles on high-quality (low-blur) images. The command-line variables for this method are shown in Table S2, and command-line examples can be found in the manual.</p>
      <p id="d1e1026">We experimented with resampling (over- and undersampling) the image prior to grain detection to increase smoothing and to improve the detection of larger grains at the cost of measuring fewer smaller grains. The majority of images achieved the best results using the original resolution, though we did find a slight improvement in results using undersampling on some unsharp images (see Sect. S3). The selection of other parameters like the maximum percent misfit is also covered in Sect. S3.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Calibration and validation I: controlled experiment</title>
<sec id="Ch1.S3.SS1">
  <label>3.1</label><title>Experimental setup</title>
      <p id="d1e1045">To test the KMS and AIF approaches on a simple control, we arranged three distributions of well-rounded, river pebbles with <inline-formula><mml:math id="M60" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula>-axis sizes from 3 to 130 mm in semi-overlapping patterns in a 0.5 <inline-formula><mml:math id="M61" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 0.5 m area (Fig. <xref ref-type="fig" rid="Ch1.F4"/>). As opposed to most studies that use <inline-formula><mml:math id="M62" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis lengths to measure the grain-size distribution <xref ref-type="bibr" rid="bib1.bibx9" id="paren.42"/>, in the experimental setup, we use <inline-formula><mml:math id="M63" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> axes since it was easier to hand-measure the longest axis of the <inline-formula><mml:math id="M64" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">200</mml:mn></mml:mrow></mml:math></inline-formula> grains used. Six size-class bins (3–5, 10–20, 25–35, 40–50, 60–70, and 80–130 mm; all <inline-formula><mml:math id="M65" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> axes) were sampled to approximate two log-normal and one bimodal grain-size distribution. The river pebbles used had uniform intragranular color with minimal striations (i.e., veins), low angularity, and a diverse array of intergranular colors. Lighting was<?pagebreak page864?> controlled by overhead fluorescent bulbs and the photos were taken without flash to limit cast shadows.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><?xmltex \currentcnt{4}?><label>Figure 4</label><caption><p id="d1e1101">Result of KMS (gray, dashed lines) and AIF (red, dotted lines) on the three experimental lab setups <bold>(a–c)</bold> with known grain inputs in six size classes (black line), measured as the grain <inline-formula><mml:math id="M66" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> axis: <bold>(a)</bold> log normal, <bold>(b)</bold> log normal with increased number of all classes, including fines, and <bold>(c)</bold> skewed bimodal with increased number of coarser grains. Bottom row shows the counts per bin and the top row shows the resulting grain-size distribution. The images are 0.26 mm pixel<inline-formula><mml:math id="M67" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> (24 megapixels).</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f04.png"/>

        </fig>

</sec>
<sec id="Ch1.S3.SS2">
  <label>3.2</label><title>Orthomosaic generation</title>
      <p id="d1e1150">We tested a Fujifilm X100F model camera with a fixed 23 mm focal length lens and a Sony <inline-formula><mml:math id="M68" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula>6000 model with a removable 35 mm fixed length lens. Both had the same advanced photo system type-C (APS-C) sensors (23.6 mm <inline-formula><mml:math id="M69" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 15.6 mm) and both output photos at 24 megapixels in a 4000 <inline-formula><mml:math id="M70" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 6000-pixel format. Following initial tests, it became clear that the image quality and grain-size results were practically identical for these two cameras, so the results presented are only those for the Fujifilm, as the photo quality was slightly sharper throughout and less distorted at the image corners. To simulate reduced quality, the 24-megapixel Fujifilm picture dimensions were reduced to 75 %, 50 %, and 25 %, resulting in 13.5-, 6-, and 1.5-megapixel images at pixel dimensions of 3000 <inline-formula><mml:math id="M71" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 4500, 2000 <inline-formula><mml:math id="M72" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 3000, and 1000 <inline-formula><mml:math id="M73" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 1500, respectively.</p>
      <p id="d1e1196">For each test setup, we collected <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> images from <inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula><inline-formula><mml:math id="M76" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> off nadir (oblique) and at least four overhead near-nadir (tilts <inline-formula><mml:math id="M77" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula><inline-formula><mml:math id="M78" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>) pictures, for 12–16 photos in total. The collection of oblique images aided in removing doming effects from the resulting point clouds <xref ref-type="bibr" rid="bib1.bibx37" id="paren.43"><named-content content-type="pre">e.g.,</named-content></xref> and for capturing the pebble edges and sides (Fig. S1). As consumer-grade cameras have square pixels with negligible difference in horizontal and vertical resolution, the image scale can be calculated directly from the camera parameters and camera height with the resolution (<inline-formula><mml:math id="M79" display="inline"><mml:mi>R</mml:mi></mml:math></inline-formula>) in mm pixel<inline-formula><mml:math id="M80" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> given by
            <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M81" display="block"><mml:mrow><mml:mi>R</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:mi>S</mml:mi><mml:mo>⋅</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:mi>f</mml:mi><mml:mo>⋅</mml:mo><mml:mi>I</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M82" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula> is the sensor height or width in millimeters, <inline-formula><mml:math id="M83" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> is the lens focal length in millimeters, <inline-formula><mml:math id="M84" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula> is the camera height in millimeters, and <inline-formula><mml:math id="M85" display="inline"><mml:mi>I</mml:mi></mml:math></inline-formula> is the image height or width in pixels. <inline-formula><mml:math id="M86" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M87" display="inline"><mml:mi>I</mml:mi></mml:math></inline-formula> should either both be the width or both be the height of the sensor and image, respectively. This assumes no major distortions within the field of view, which is not valid for oblique imagery but is negligible for near-nadir photography at close range using non-fisheye lenses. With <inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.55</mml:mn></mml:mrow></mml:math></inline-formula> m, the resulting image resolutions tested from the Fujifilm were 0.26, 0.35, 0.53, and 1.05 mm pixel<inline-formula><mml:math id="M89" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> by Eq. (1).</p>
      <p id="d1e1369">We used the 12–16 photos to generate SfM-MVS orthoimages in Agisoft Photoscan v.1.4.2 <xref ref-type="bibr" rid="bib1.bibx1" id="paren.44"/> – renamed Agisoft Metashape in recent versions. This allows rapid output of additional information including point clouds, digital elevation models (DEMs), and the undistorted orthomosaics, with resolution recorded in the image metadata for direct input into <italic>PebbleCounts</italic> and <italic>PebbleCountsAuto</italic>. Detailed Agisoft processing steps are provided in Sect. S4.</p><?xmltex \hack{\newpage}?>
</sec>
<sec id="Ch1.S3.SS3">
  <label>3.3</label><title>Comparison metrics</title>
      <p id="d1e1390">For the simple controlled experiment, with relatively coarse grain-size bins, it is not appropriate to compare percentiles (e.g., <inline-formula><mml:math id="M90" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">50</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>) or to run Kolmogorov–Smirnov (KS) tests and measure the difference in distributions between the AIF or KMS and control grain-size distributions. Instead, we compared the counts in each bin between the control and algorithm and visually assessed the matching of the grain-size distributions. This provides a reasonable baseline for checking the performance of the algorithm in a highly controlled setting.</p>
</sec>
<sec id="Ch1.S3.SS4">
  <label>3.4</label><title>Results I: controlled experiment</title>
      <p id="d1e1412">For each of the three 150–200 clast arrangements, the KMS <italic>PebbleCounts</italic> runtime was <inline-formula><mml:math id="M91" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">7</mml:mn></mml:mrow></mml:math></inline-formula> min on a laptop with 16 GB RAM and 2 cores (Intel i7-6650U 2.20 GHz) and no GPU, whereas the AIF <italic>PebbleCountsAuto</italic> runtime was <inline-formula><mml:math id="M92" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> min. Both a single near-nadir image and the combined orthomosaic were used, but the results were entirely consistent aside from some inter-run variability in the KMS approach caused by the non-unique solution of <inline-formula><mml:math id="M93" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means clustering. Given this consistency, we only present the results from the single near-nadir images. Furthermore, the use of only four overlapping near-nadir photos also generated the same results, albeit in about one-sixth the Agisoft orthomosaic processing time of using all 12–16 photos (<inline-formula><mml:math id="M94" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> min versus <inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> h on the same laptop).</p>
      <p id="d1e1469">Across all three distributions, the KMS approach consistently undercounts the number of clasts in each <inline-formula><mml:math id="M96" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula>-axis bin (Fig. <xref ref-type="fig" rid="Ch1.F4"/>). However, and in agreement with previous research <xref ref-type="bibr" rid="bib1.bibx32" id="paren.45"/>, this undercounting is uniformly distributed, and thus the grain-size distributions do not show notable differences between the algorithm and control. For the two arrangements with increased fine (3–5 mm) and coarse (60–130 mm) pebbles (Fig. <xref ref-type="fig" rid="Ch1.F4"/>b, c), the undercounting is stronger at the finer end of the distribution, leading to a slight underestimation of the grain-size distribution by the KMS approach in this region. This is caused partially by the user missing more of the smaller grains (of which there are exponentially more), some smaller grains being partially hidden by the larger, and also by the smallest grains being only a few pixels in area and thus eliminated during mask-cleaning steps or not captured at all. On the other hand, the AIF approach tends to overcount the fine pebbles, leading to overestimation of the grain-size distribution, because many small non-grain areas remaining in the masked image are automatically selected in the final result, rather than ignored as in the KMS approach.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5" specific-use="star"><?xmltex \currentcnt{5}?><label>Figure 5</label><caption><p id="d1e1488">Results of reducing the image dimensions to <bold>(a)</bold> 75 % (13.5 megapixels), <bold>(b)</bold> 50 % (6 megapixels), and <bold>(c)</bold> 25 % (1.5 megapixels) and rerunning the KMS approach on the distribution in Fig. <xref ref-type="fig" rid="Ch1.F4"/>a. The control is shown as solid black (left <inline-formula><mml:math id="M97" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) and gray (right <inline-formula><mml:math id="M98" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis)  lines and KMS as the dashed lines.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f05.png"/>

        </fig>

      <p id="d1e1524">As we reduced the resolution from 0.26 to 1.05 mm pixel<inline-formula><mml:math id="M99" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, the reduction in the finest size class increased dramatically for the KMS approach (Fig. <xref ref-type="fig" rid="Ch1.F5"/>). At the lowest resolution tested (1.5 megapixels), this undercounting leads to severe discrepancies in the grain-size<?pagebreak page865?> distribution curve. As the resolution degrades, it becomes more difficult to discern rocks in the smallest size class (3–5 mm), which correspond to <inline-formula><mml:math id="M100" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula>-axis grain sizes of 12–19, 9–14, 6–9, and 3–5 pixels for the 24-, 13.5-, 6-, and 1.5-megapixel resolutions, respectively, indicating the necessity of a limiting lower measurement factor <xref ref-type="bibr" rid="bib1.bibx30" id="paren.46"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Calibration and validation II: field surveys</title>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Field setting</title>
      <?pagebreak page866?><p id="d1e1569">Having established the algorithms on control data, we sought to evaluate the performance on complex, natural photos. Field data provide the real-world application and detailed uncertainty analysis most useful for researchers seeking to apply the methods to their own sites. For this, we turned to photo surveys carried out on gravel-bed river cross sections of the foreland and topographic transition zone of the northwestern Argentine Andes (Fig. <xref ref-type="fig" rid="Ch1.F6"/>). This is an area of strong precipitation, topographic, and environmental gradients, and the dynamic rivers surveyed are capable of transporting enormous quantities of sand, gravel, and boulders of various lithologies <xref ref-type="bibr" rid="bib1.bibx6 bib1.bibx48" id="paren.47"/>. Catchment-average erosion rates from the area, based on cosmogenic nuclide inventories, suggest rates on the order of 0.6–1 mm year<inline-formula><mml:math id="M101" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx6" id="paren.48"/>, with large variability during the Pleistocene and Holocene <xref ref-type="bibr" rid="bib1.bibx60" id="paren.49"/>. The region is frequently affected by extreme hydrometeorological events that lead to flooding and drainage-pattern rearrangement <xref ref-type="bibr" rid="bib1.bibx18 bib1.bibx19" id="paren.50"/>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6" specific-use="star"><?xmltex \currentcnt{6}?><label>Figure 6</label><caption><p id="d1e1601"><bold>(a)</bold> Field cross-section survey sites (black triangles) in NW Argentina from three gravel-bed rivers (Toro, Vaqueros, and Grande) and their tributaries, draining from the sparsely vegetated mountains in the west towards the verdant foreland and city centers of Salta and Jujuy in the east. The Landsat 8 RGB composite satellite image (using bands 2, 3, and 4) from 12 June 2017 shows the climatic transition from wet foreland to dry mountains, demarcated by the green–brown transition zone, running approximately north–south, corresponding to vegetation changes. <bold>(b)</bold> Detailed view of the <inline-formula><mml:math id="M102" display="inline"><mml:mrow><mml:mn mathvariant="normal">12</mml:mn><mml:mo>×</mml:mo><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M103" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> orthomosaic clips from each of the field sites with average resolution of 1.16 mm pixel<inline-formula><mml:math id="M104" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. </p></caption>
          <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f06.png"/>

        </fig>

</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Orthomosaic generation</title>
      <p id="d1e1658">All cross-section surveys were collected using the Sony <inline-formula><mml:math id="M105" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula>6000 camera model at 24-megapixel resolution, and survey sizes ranged from <inline-formula><mml:math id="M106" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1000</mml:mn></mml:mrow></mml:math></inline-formula> to 5000 m<inline-formula><mml:math id="M107" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>. In this case, the standard zoom lens delivered with the camera was used at the shortest focal length of 16 mm to maximize the field of view. Also, to help cover the large survey sites, the camera was affixed to the end of a pole with a remote control trigger, allowing overhead shots to be collected from a height of 4.5–5 m (Fig. <xref ref-type="fig" rid="Ch1.F7"/>), giving a ground resolution of approximately 1.1–1.2 mm pixel<inline-formula><mml:math id="M108" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> by Eq. (1). UAV flights have proven difficult in the windy conditions experienced in these valleys, but flights at 20–30 m heights with the 12-megapixel camera provided on the DJI Mavic and Phantom models (focal lengths of 3.6–4.3 mm, sensor dimensions of 6.17 <inline-formula><mml:math id="M109" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 4.55 mm, and image dimensions of 4000 <inline-formula><mml:math id="M110" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 3000 pixels) would result in image resolutions of <inline-formula><mml:math id="M111" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">7</mml:mn></mml:mrow></mml:math></inline-formula>–13 mm pixel<inline-formula><mml:math id="M112" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and are thus inadequate for delineating centimeter-scale pebbles.</p>

      <?xmltex \floatpos{p}?><fig id="Ch1.F7"><?xmltex \currentcnt{7}?><label>Figure 7</label><caption><p id="d1e1740">Sony <inline-formula><mml:math id="M113" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula>6000 24-megapixel camera affixed to mast for photo collection at a height of 4.5–5 m <bold>(a)</bold> and differential GPS measurement of coded targets <bold>(b)</bold>.</p></caption>
          <?xmltex \igopts{width=230.467323pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f07.jpg"/>

        </fig>

      <p id="d1e1762">To generate georeferenced orthomosaics that could be tiled and passed directly to <italic>PebbleCounts</italic> and <italic>PebbleCountsAuto</italic>, survey sites on the dry riverbed were laid out with on average 18 coded targets (with a range of 10–24) and the position of each was measured with a differential GPS (Fig. <xref ref-type="fig" rid="Ch1.F7"/>). Kinematic post-processing with a permanent base station <inline-formula><mml:math id="M114" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">100</mml:mn></mml:mrow></mml:math></inline-formula> km away at the Universidad Nacional de Salta (UNSA) in Salta, Argentina, led to centimeter accuracy of XYZ target locations. The site was traversed in a cross-hatched pattern with a photo captured every two to three paces, so that each location appeared in <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">9</mml:mn></mml:mrow></mml:math></inline-formula> near-nadir pictures from slightly different angles. We refer to the images as near nadir, rather than nadir, due to the fact that during mast photo collection some unintentional tilting of the camera (<inline-formula><mml:math id="M116" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula><inline-formula><mml:math id="M117" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>) occurred. These near-nadir photos aided in removing doming effects but did not allow us to capture the sides of pebbles as in the oblique images taken in the experimental setup (Fig. S1). Capturing oblique images of every patch in the field sites would require infeasible amounts of time and processing power.</p>
      <p id="d1e1813">Agisoft processing was similar to that described for the experiment, with some key differences (see Sect. S4). Given the volume of photos (600–1300 per site), the sites were processed automatically using the Python API for Agisoft, with processing times consistently over 10 h on an 80-core, 500 GB RAM server making use of 1 GPU NVIDIA Tesla K80 unit for some of the steps (e.g., dense matching).</p>
      <p id="d1e1816">From 10 of our full survey sites over three different river systems, we selected <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:mn mathvariant="normal">12</mml:mn><mml:mo>×</mml:mo><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M119" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patches to clip out of the full orthomosaics and evaluate using the KMS and AIF approaches. The final resolution of these 12 GeoTiff orthoimages matched the theoretical value from Eq. (1), with an average of 1.16 mm pixel<inline-formula><mml:math id="M120" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and range of 1.08–1.24 mm pixel<inline-formula><mml:math id="M121" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> (standard deviation of 0.05 mm pixel<inline-formula><mml:math id="M122" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>). The patches (Fig. <xref ref-type="fig" rid="Ch1.F6"/>b) include variable amounts of sand and a large range of grain sizes, packing arrangements, and shadowing. From one site (S14A), there were handheld images available for the same selected patch from the same Sony <inline-formula><mml:math id="M123" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula>6000 camera zoomed to 20 mm focal length and taken from a height of <inline-formula><mml:math id="M124" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.5</mml:mn></mml:mrow></mml:math></inline-formula> m, allowing for the generation of a complementary orthomosaic at 0.32 mm pixel<inline-formula><mml:math id="M125" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> resolution.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <label>4.3</label><title>Comparison metrics</title>
      <p id="d1e1918">For control data from the field, we return to <inline-formula><mml:math id="M126" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis measurements (rather than <inline-formula><mml:math id="M127" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> axes as in the lab). In each patch, the <inline-formula><mml:math id="M128" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> axes of all grains visible to the naked eye were manually digitized. This generated a 5490 pebble control dataset across all 12 mast-surveyed sites. For the lone handheld patch at 0.32 mm pixel<inline-formula><mml:math id="M129" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, the control data were 1726 pebbles versus 621 from the same patch at the 1.12 mm pixel<inline-formula><mml:math id="M130" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> mast resolution, as smaller grains could be manually measured on the image at a resolution that was 4 times greater.</p>
      <p id="d1e1966">The use of continuous control data, as opposed to discrete bins in the lab experiment, allows a more detailed investigation of the performance of both approaches, including biases and their correction. The <inline-formula><mml:math id="M131" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis measurements of overlapping control and KMS grains were compared to look for sizing bias. This was followed by a search for the lower truncation limit (the lower cutoff in <inline-formula><mml:math id="M132" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis length in pixels that grains are reliably measured at) of the algorithm, also using the KMS results. For parts of the analysis, the size data were converted to the typical <inline-formula><mml:math id="M133" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> scale (<inline-formula><mml:math id="M134" display="inline"><mml:mrow><mml:mi mathvariant="italic">ψ</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mo>=</mml:mo><mml:mi>log⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mo>(</mml:mo><mml:mi mathvariant="normal">mm</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>) of grain-size measurement of coarse river sediments. This allows direct comparison of statistical results with other studies <xref ref-type="bibr" rid="bib1.bibx31" id="paren.51"><named-content content-type="pre">e.g.,</named-content></xref></p>
      <p id="d1e2020">We compared the grain-size distributions from the KMS and AIF approaches with the control using a two-sample KS test to check the null hypothesis that the two samples are drawn from the same distribution. Because sample sizes were at times small, leading to erroneous KS-test results, we also devised a second metric of grain-size distribution comparison. Similar to the KS test, which uses the maximum distance between the cumulative distribution functions (grain-size distributions), our metric interpolates both distributions to the same lengths in 0.1 <inline-formula><mml:math id="M135" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> steps and then sums the difference between the re-interpolated curve to give an<?pagebreak page867?> approximate integral of the difference between the two grain-size distributions (AIF or KMS minus the control), which we term <inline-formula><mml:math id="M136" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Here, an <inline-formula><mml:math id="M137" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> value close to 0 indicates good matching, and positive or negative values indicate underestimation or overestimation, respectively.</p>
      <p id="d1e2052">We also examined the performance of some key percentiles (<inline-formula><mml:math id="M138" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mn mathvariant="normal">5</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">16</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">25</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">50</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">75</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">84</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">95</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>). The metrics for comparison of control (<inline-formula><mml:math id="M139" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">C</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and KMS or AIF (<inline-formula><mml:math id="M140" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) percentiles are consistent with other studies <xref ref-type="bibr" rid="bib1.bibx57 bib1.bibx31 bib1.bibx32" id="paren.52"/>. These are the mean (<inline-formula><mml:math id="M141" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>n</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="normal">Σ</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">C</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>), the mean squared (<inline-formula><mml:math id="M142" display="inline"><mml:mrow><mml:mi mathvariant="normal">ms</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>n</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="normal">Σ</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">C</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>), and the irreducible random error (<inline-formula><mml:math id="M143" display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:msqrt><mml:mrow><mml:mi mathvariant="normal">ms</mml:mi><mml:mo>-</mml:mo><mml:msup><mml:mi>m</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msqrt></mml:mrow></mml:math></inline-formula>). The bias of <italic>PebbleCounts</italic> is quantified by <inline-formula><mml:math id="M144" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M145" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> measures the scatter or precision after bias correction <xref ref-type="bibr" rid="bib1.bibx57" id="paren.53"/>.</p>
</sec>
<sec id="Ch1.S4.SS4">
  <label>4.4</label><title>Results II: field surveys</title>
      <p id="d1e2244">The KMS <italic>PebbleCounts</italic> approach took <inline-formula><mml:math id="M146" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> min per 1 m<inline-formula><mml:math id="M147" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> orthomosaic clip at 1.16 mm pixel<inline-formula><mml:math id="M148" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> resolution, depending on the number of grains, and particularly the number of finer grains, present. Runtime for the AIF <italic>PebbleCountsAuto</italic> approach was typically <inline-formula><mml:math id="M149" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> min per site. All runtimes refer to the same laptop with 16 GB RAM and 2 cores (Intel i7-6650U 2.20 GHz) and no GPU. For the 0.32 mm pixel<inline-formula><mml:math id="M150" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image, the processing for KMS took <inline-formula><mml:math id="M151" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">45</mml:mn></mml:mrow></mml:math></inline-formula> min, as there were more fine grains to be identified (given the log-normal distribution) and so the clicking took exponentially longer, and the AIF took <inline-formula><mml:math id="M152" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> min given the longer time spent filtering the large number of grains. We note that the use of a GPU for the filtering steps will significantly improve processing time. Importantly, these runtimes refer to the use of no lower truncation value, which leads to much longer processing time.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8" specific-use="star"><?xmltex \currentcnt{8}?><label>Figure 8</label><caption><p id="d1e2329">Comparison of <bold>(a)</bold> KMS and <bold>(b)</bold> AIF at the 12 field sites all aggregated and coarsely binned. Control is shown as solid  black (left <inline-formula><mml:math id="M153" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) and gray (right <inline-formula><mml:math id="M154" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis) lines and KMS and AIF as the dashed lines.</p></caption>
          <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f08.png"/>

        </fig>

      <p id="d1e2358">An aggregation and coarse binning of all <inline-formula><mml:math id="M155" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> axes in the control versus KMS and AIF data for the coarser imagery are presented in Fig. <xref ref-type="fig" rid="Ch1.F8"/>. There is obvious undercounting in these data from the KMS results, similar to the experimental setup, and here it causes a significant discrepancy in the grain-size distribution curves. Whereas the manual clicking found over 1000 grains in the smallest classes (1–2 and 2–3 <inline-formula><mml:math id="M156" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>), the KMS approach found none in the smallest and only <inline-formula><mml:math id="M157" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">100</mml:mn></mml:mrow></mml:math></inline-formula> in the second smallest. This skews the percentiles to the higher grain sizes and thus overestimates them significantly. In opposition to this, but again in agreement with the experimental setup, the AIF results display significant overcounting at the finer sizes as many non-grains are identified,<?pagebreak page868?> particularly when the algorithm is run with no lower truncation.</p>
      <p id="d1e2388">The skewed results from both the KMS and AIF approaches warrant detailed analysis of the algorithms’ deficiencies and grain-size distribution corrections. To begin, we examined the performance of <italic>PebbleCounts</italic> on grains manually digitized and the same grains selected during clicking in the KMS approach on the coarser imagery (Fig. <xref ref-type="fig" rid="Ch1.F9"/>). There is only a slight negative bias across all grain sizes, indicating underestimation of individual grains by <italic>PebbleCounts</italic>; however, this median shift varies with no apparent pattern and is likely caused by uncertainties in the manual <inline-formula><mml:math id="M158" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis digitization of thousands of grains. For instance, digitization with <inline-formula><mml:math id="M159" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis vector lines can achieve subpixel accuracy compared to the raster processing of <italic>PebbleCounts</italic>. The AIF approach measures grains identically to the KMS method and thus has the same misfit errors on correctly identified grains. From this, we conclude that the algorithm is effective on a grain-by-grain basis and the skewing of the grain-size distributions is instead caused by sampling errors related to the image resolution and ability to find small grains (see Fig. <xref ref-type="fig" rid="Ch1.F5"/>).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9"><?xmltex \currentcnt{9}?><label>Figure 9</label><caption><p id="d1e2421">Measurement error of <italic>PebbleCounts</italic> (here the KMS results) versus control on a grain-by-grain basis for overlapping grains in the coarser (1.16 mm pixel<inline-formula><mml:math id="M160" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>) imagery. There is an overall median shift, but the binned medians do not display a consistent pattern.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f09.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10" specific-use="star"><?xmltex \currentcnt{10}?><label>Figure 10</label><caption><p id="d1e2447"><bold>(a)</bold> Error in each percentile (5th–95th) as lower truncation value is increased in 1 mm steps for the 1.16 mm pixel<inline-formula><mml:math id="M161" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery. Only a few steps are plotted for clarity. <bold>(b)</bold> The median difference in percentiles compared with the control versus the lower truncation value, with the normalized median absolute difference (NMAD) shown as the error envelope <xref ref-type="bibr" rid="bib1.bibx35" id="paren.54"/>. From this analysis, we select a lower truncation of 20 pixels. The analysis in panel <bold>(a)</bold> was repeated for the finer image (with 0.5 mm truncation steps) to get the gray squares line in panel <bold>(b)</bold> and is not shown here.</p></caption>
          <?xmltex \igopts{width=469.470472pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f10.png"/>

        </fig>

      <p id="d1e2482">The undercounting error can be explored on the full distribution of pebbles by gradually increasing the lower truncation value and assessing the error in percentiles versus the control data at each step (Fig. <xref ref-type="fig" rid="Ch1.F10"/>). As truncation is increased, the median percentile error decreases rapidly up to an inflecting value – manually chosen from the graph as a significant local minimum where the median difference is near 0 mm. Truncating the KMS distributions at a minimum <inline-formula><mml:math id="M162" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis length of 23 mm (rounded to 20 pixels) improves the results significantly for the 1.16 mm pixel<inline-formula><mml:math id="M163" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery taken from the mast. Beyond this truncation, there is limited improvement. Regarding the 0.32 mm pixel<inline-formula><mml:math id="M164" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image, the 20-pixel (6.5 mm) truncation also results in a median difference near 0 mm, with subsequent truncation values leading to only <inline-formula><mml:math id="M165" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">0.5</mml:mn></mml:mrow></mml:math></inline-formula> mm improvements. Supplying these truncation values directly to the KMS <italic>PebbleCounts</italic> tool results in reduced processing time to <inline-formula><mml:math id="M166" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula> min for the coarser imagery and <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">15</mml:mn></mml:mrow></mml:math></inline-formula> min for the finer, as many small grains were then ignored and left out of the clicking mask.</p>
      <p id="d1e2552">The same analysis for the AIF approach is complicated by the large number of false grains found and the extreme overcounting of fine grains. Given this, we instead make the assumption that the similarity of the two methods, particularly in the edge detection and ellipse fitting steps, leads to similar errors in both. Therefore, we assume the same 20-pixel truncation. For the AIF <italic>PebbleCountsAuto</italic> tool, processing times with the 20-pixel truncation reduced to <inline-formula><mml:math id="M168" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> min and <inline-formula><mml:math id="M169" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> min for the coarse and fine images, respectively.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11" specific-use="star"><?xmltex \currentcnt{11}?><label>Figure 11</label><caption><p id="d1e2581">Results from hand-clicked control (black line), KMS <italic>PebbleCounts</italic> (gray, dashed line), and AIF <italic>PebbleCountsAuto</italic> (red, dotted line) with the initial non-truncated run <bold>(a)</bold> and the 20-pixel truncated run <bold>(b)</bold>. In corresponding colors are the <inline-formula><mml:math id="M170" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> value results of a KS test and the <inline-formula><mml:math id="M171" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> approximate integral between the curves for each approach versus the control data. The legend indicates the number of grains (<inline-formula><mml:math id="M172" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula>) making up each curve. Note the reduction in <inline-formula><mml:math id="M173" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula>-axis scale between the columns, where the right truncated distributions are plotted on a narrower range to emphasize the remaining discrepancies. The curves separated by site (Fig. <xref ref-type="fig" rid="Ch1.F6"/>b) are shown in Sect. S5 and Fig. S7.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f11.png"/>

        </fig>

      <p id="d1e2637">The combined results before and after lower truncation for the coarser (<inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.16</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M175" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>) imagery taken from the mast surveys are shown in Fig. <xref ref-type="fig" rid="Ch1.F11"/>. Without any lower truncation, the AIF tool results in significant overcounting and grain-size distribution underestimation with a high <inline-formula><mml:math id="M176" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">8</mml:mn></mml:mrow></mml:math></inline-formula>. The KMS tool instead shows undercounting and grain-size distribution overestimation with a low <inline-formula><mml:math id="M177" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub><mml:mo>&lt;</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula>. Both have KS-test <inline-formula><mml:math id="M178" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> values <inline-formula><mml:math id="M179" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">0.0001</mml:mn></mml:mrow></mml:math></inline-formula>. When we apply a 20-pixel truncation, both the AIF and KMS approaches achieve <inline-formula><mml:math id="M180" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> values near or below <inline-formula><mml:math id="M181" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, with the manual KMS approach performing best and achieving a high KS-test <inline-formula><mml:math id="M182" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> value of 0.2398. The AIF approach retains a low <inline-formula><mml:math id="M183" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> of 0.0008 with a <inline-formula><mml:math id="M184" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">0.1</mml:mn></mml:mrow></mml:math></inline-formula>–0.2 <inline-formula><mml:math id="M185" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> bias towards coarser values in the upper portion of the grain-size distribution (<inline-formula><mml:math id="M186" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">50</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>).</p>
      <p id="d1e2780">In  Sect. S5 (Fig. S7), we show the 20-pixel truncated KMS and AIF results on a site-by-site basis. For the KMS approach, following truncation, 11 sites have <inline-formula><mml:math id="M187" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> values <inline-formula><mml:math id="M188" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0.1</mml:mn></mml:mrow></mml:math></inline-formula> and one site (S16) has <inline-formula><mml:math id="M189" display="inline"><mml:mrow><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.0971</mml:mn></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M190" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> values are also near 0, indicating close matching of the grain-size distributions, aside from S24 and S34, which both show large discrepancies. The AIF results in Fig. S7 follow a similar trend to the KMS results, but there is a bias towards coarser values, with many <inline-formula><mml:math id="M191" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> values <inline-formula><mml:math id="M192" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, and generally poorer results compared with the KMS approach, with grain-size distributions being overestimated by <inline-formula><mml:math id="M193" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">0.1</mml:mn></mml:mrow></mml:math></inline-formula>–0.2 <inline-formula><mml:math id="M194" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>. In the KMS results, despite a high <inline-formula><mml:math id="M195" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> value, S24 demonstrates a stronger bias in the grain-size distribution towards coarser grains (up to 0.5 <inline-formula><mml:math id="M196" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> discrepancy), as indicated by the high <inline-formula><mml:math id="M197" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> value of <inline-formula><mml:math id="M198" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1.36</mml:mn></mml:mrow></mml:math></inline-formula>. Here, the KS-test pass is likely caused by the small sample size remaining after truncation (<inline-formula><mml:math id="M199" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">24</mml:mn></mml:mrow></mml:math></inline-formula>), the least of any site. The poor performance of S24 was expected given the large size range with many sub-centimeter pebbles and a few large boulders, strong cast shadows from the large grains, and intragranular edges on angular boulders with quartz veins (see Fig. <xref ref-type="fig" rid="Ch1.F6"/>b). Importantly, S24 is the only site not from a major river stem but rather from a debris-flow fan draining a small tributary catchment in the Quebrada del Toro. S34 also had a high <inline-formula><mml:math id="M200" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2.11</mml:mn></mml:mrow></mml:math></inline-formula>. In this case, poor performance is due to significant blurriness of this image and again a small sample size (<inline-formula><mml:math id="M201" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">47</mml:mn></mml:mrow></mml:math></inline-formula>).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F12" specific-use="star"><?xmltex \currentcnt{12}?><label>Figure 12</label><caption><p id="d1e2945">Comparing the key <inline-formula><mml:math id="M202" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis percentiles across all 12 field sites and between the KMS and AIF approaches with the 20-pixel truncation applied. <bold>(a)</bold> All 12 sites from KMS, <bold>(b)</bold> KMS improvement when excluding S24 and S34, <bold>(c)</bold> all 12 sites from AIF, and <bold>(d)</bold> AIF improvement when excluding S10, S24, and S34. For the main plot, each data point is a percentile value from a single site and the 1 : 1 relationship is the gray diagonal. The mean (<inline-formula><mml:math id="M203" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>), mean squared (ms), and irreducible (<inline-formula><mml:math id="M204" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>) errors are shown for each plot, taken as the average of all seven percentile errors across the 9–12 sites plotted. The <inline-formula><mml:math id="M205" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M206" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> are separately plotted for each percentile in the inset plot. The number of grains in the control (“control grains”) and KMS or AIF results (“grains found”) is also indicated. The individual site curves where these data points originate are shown in  Sect. S5 and Fig. S7.</p></caption>
          <?xmltex \igopts{width=412.564961pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f12.png"/>

        </fig>

      <p id="d1e3002">We also compared the individual percentiles of interest to assess the bias and accuracy of truncated results (Fig. <xref ref-type="fig" rid="Ch1.F12"/>). For the KMS approach, the bias (<inline-formula><mml:math id="M207" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>) is 0.06 <inline-formula><mml:math id="M208" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> with a precision (<inline-formula><mml:math id="M209" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>) of 0.13 <inline-formula><mml:math id="M210" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>. Excluding S24 and S34, <inline-formula><mml:math id="M211" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M212" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> drop to 0.03 and 0.09 <inline-formula><mml:math id="M213" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>, respectively. The AIF results have higher <inline-formula><mml:math id="M214" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M215" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> values of 0.15 and 0.17 <inline-formula><mml:math id="M216" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>, respectively, which are reduced to 0.13 and 0.15 <inline-formula><mml:math id="M217" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> following exclusion of the same S24 and S34 sites, in addition to the S10 site, which was also somewhat blurry and with relatively few grains. For the AIF percentiles, we chose to include S16 despite a large overestimation at higher percentiles (Fig. S7), as this was a sharp image with a relatively large sample size. The high uncertainties from this scene likely require some adjustment of the edge-detection variables (see Sect. S3) for improved segmentation, but the results presented are realistic for fast processing using the AIF method, with the caveat of higher expected uncertainties.</p>
      <?pagebreak page869?><p id="d1e3087">The uncertainties in Fig. <xref ref-type="fig" rid="Ch1.F12"/> are average values, and the inset plots also demonstrate the increasing uncertainty of larger percentiles. The maximum uncertainty for both at <inline-formula><mml:math id="M218" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">95</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> is <inline-formula><mml:math id="M219" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.08</mml:mn><mml:mi mathvariant="italic">ψ</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M220" display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.07</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M221" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for the KMS result and <inline-formula><mml:math id="M222" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.35</mml:mn><mml:mi mathvariant="italic">ψ</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M223" display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn><mml:mi mathvariant="italic">ψ</mml:mi></mml:mrow></mml:math></inline-formula> for the AIF result. Importantly, since the <inline-formula><mml:math id="M224" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> scale is logarithmic, the larger errors at higher percentiles correspond to similar percentage misfits as lower errors at smaller percentiles (e.g., 0.2 <inline-formula><mml:math id="M225" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> precision at a grain size of 6.5 <inline-formula><mml:math id="M226" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> (91 mm) is a 13 %–15 % misfit, whereas a 0.01 <inline-formula><mml:math id="M227" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> precision at 4.5 <inline-formula><mml:math id="M228" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> (23 mm) is a 4 %–10 % misfit).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F13" specific-use="star"><?xmltex \currentcnt{13}?><label>Figure 13</label><caption><p id="d1e3203"><bold>(a)</bold> Results from hand-clicked control (black line), KMS <italic>PebbleCounts</italic> (gray, dashed line), and AIF <italic>PebbleCountsAuto</italic> (red, dotted line) from the 20-pixel truncated run on the 0.32 mm pixel<inline-formula><mml:math id="M229" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> handheld imagery. In corresponding colors are the <inline-formula><mml:math id="M230" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula>-value results of a KS test and the <inline-formula><mml:math id="M231" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> approximate integral between the curves for each approach versus the control data. <bold>(b)</bold> Percentile comparison for both methods with KMS in gray and AIF in red, with inset box showing the uncertainties for each in the corresponding color.</p></caption>
          <?xmltex \igopts{width=384.112205pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f13.png"/>

        </fig>

      <p id="d1e3254">As a final test for the KMS and AIF approaches, we turn towards our handheld imagery taken from S14A with a 4 times greater resolution of 0.32 mm pixel<inline-formula><mml:math id="M232" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> (Fig. <xref ref-type="fig" rid="Ch1.F13"/>). We only show the 20-pixel truncated results, which displayed high KS-test <inline-formula><mml:math id="M233" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> values <inline-formula><mml:math id="M234" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M235" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> close to 0 in both cases, with the AIF approach slightly underestimating (<inline-formula><mml:math id="M236" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.6</mml:mn></mml:mrow></mml:math></inline-formula>) and KMS slightly overestimating (<inline-formula><mml:math id="M237" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">diff</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">0.77</mml:mn></mml:mrow></mml:math></inline-formula>). For the KMS approach, <inline-formula><mml:math id="M238" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M239" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> are 0.07 and 0.05 <inline-formula><mml:math id="M240" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>, respectively, and <inline-formula><mml:math id="M241" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>0.06 and 0.05 <inline-formula><mml:math id="M242" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for AIF.</p>
</sec>
<sec id="Ch1.S4.SS5">
  <label>4.5</label><?xmltex \opttitle{Caveat of \textit{PebbleCountsAuto} AIF}?><title>Caveat of <italic>PebbleCountsAuto</italic> AIF</title>
      <p id="d1e3381">The promising results of the AIF approach shown in Figs. <xref ref-type="fig" rid="Ch1.F11"/>–<xref ref-type="fig" rid="Ch1.F13"/> come with some consideration of the grain-by-grain accuracy. In Fig. <xref ref-type="fig" rid="Ch1.F14"/>, we analyze the percentage of grains found in the AIF approach that have a corresponding grain in either the hand-clicked control (based on a 6 mm buffer of the <inline-formula><mml:math id="M243" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis line) or the KMS results (based on a 6 mm centroid buffer). From this subset of grains, we consider the AIF grain to be a matching (or correct) result if the <inline-formula><mml:math id="M244" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis difference between it and the nearby “good” grain (from the control or KMS) is <inline-formula><mml:math id="M245" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> cm. From this, we see that in the best-case scenario the percentage of correct grains identified by the AIF approach is only 70 %, from the handheld 0.32 mm pixel<inline-formula><mml:math id="M246" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image. A number of sites (S10, S16, S20B, S24, S34, and S35) have <inline-formula><mml:math id="M247" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">50</mml:mn></mml:mrow></mml:math></inline-formula> % matched grains. The two poorly performing sites (S24 with grain complexity and S34 with image blur) both demonstrate the lowest accuracy with <inline-formula><mml:math id="M248" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">40</mml:mn></mml:mrow></mml:math></inline-formula> % matches. Notably, despite a significant number of false positives in the results, when comparing the overall grain-size distributions (Fig. <xref ref-type="fig" rid="Ch1.F11"/>), and on a site-by-site basis (Fig. S7), the distribution of the AIF results matches the hand-clicked control well. The errors associated with the AIF method are demonstrated in  Sect. S6.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F14"><?xmltex \currentcnt{14}?><label>Figure 14</label><caption><p id="d1e3451">Percentage of grains from AIF results with a matching grain in either the hand-clicked control or in the KMS result. A match is defined as a grain within 5 pixels of the hand-clicked line or the KMS grain centroid for the 1.16 mm pixel<inline-formula><mml:math id="M249" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery or within 20 pixels for the 0.32 mm pixel<inline-formula><mml:math id="M250" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image (corresponding in both cases to a distance of <inline-formula><mml:math id="M251" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">6</mml:mn></mml:mrow></mml:math></inline-formula> mm), and with a 1 cm maximum <inline-formula><mml:math id="M252" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis difference between the AIF grain and the match. The total percent correct, taken across all black triangles, is 51 %.</p></caption>
          <?xmltex \igopts{width=199.169291pt}?><graphic xlink:href="https://esurf.copernicus.org/articles/7/859/2019/esurf-7-859-2019-f14.png"/>

        </fig>

</sec>
</sec>
<sec id="Ch1.S5">
  <label>5</label><title>Discussion</title>
      <p id="d1e3511">In this study, we developed two new methods for grain-size measurement with low uncertainties and the potential to deliver full grain-size distributions from complex images of high-energy mountain rivers. Our open-source Python-based algorithms perform equally well to other image segmentation tools but can be applied more quickly over larger areas surveyed by the SfM-MVS workflow we present. Critical to success is the application of a strict lower cutoff, which limits the minimum measurable <inline-formula><mml:math id="M253" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis grain size to 20 times the pixel resolution. The automated version of the algorithm delivers less accurate measurements, but these can be limited by using low-blur, higher-resolution imagery. We focus our discussion on the comparison of our approach with similar work, the effect of the lower truncation on grain-size distribution estimates, and practical guidelines for acquiring imagery and applying <italic>PebbleCounts</italic>, including the application of UAV surveys.</p>
<sec id="Ch1.S5.SS1">
  <label>5.1</label><title>Performance</title>
      <p id="d1e3531">For comparison of our algorithms to previous work, we do not consider errors reported in studies using texture-based measurements <xref ref-type="bibr" rid="bib1.bibx71" id="paren.55"><named-content content-type="pre">e.g.,</named-content></xref>, since these are based on correlative relationships rather than physical measurement of each grain. Texture methods work well for homogeneous pebble arrangements in lower-energy settings, but high-energy mountain rivers with heterogeneous pebble arrangements and large ranges in sizes require segmentation approaches. Similar to other image segmentation methods, the KMS <italic>PebbleCounts</italic> approach undercounts grain sizes in each respective size class <xref ref-type="bibr" rid="bib1.bibx32" id="paren.56"/>. This undercounting does not undermine the resulting grain-size distributions and associated percentile estimates, so long as an appropriate lower truncation is defined. This cutoff was found to be 20 pixels (compare to 23 pixels found by <xref ref-type="bibr" rid="bib1.bibx30" id="text.57"/>) in <inline-formula><mml:math id="M254" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis length (Fig. <xref ref-type="fig" rid="Ch1.F10"/>), which explains the degradation in 3–5 mm counting in the reduced-resolution lab images (Fig. <xref ref-type="fig" rid="Ch1.F5"/>), where the smallest pebbles were only a few pixels in size as resolution was decreased.</p>
      <p id="d1e3560">As shown in Fig. <xref ref-type="fig" rid="Ch1.F12"/>, when we apply this cutoff and exclude poorly performing images, we find an average <inline-formula><mml:math id="M255" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> (bias) and <inline-formula><mml:math id="M256" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> (precision) of 0.03 and 0.09 <inline-formula><mml:math id="M257" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>, respectively, for the <inline-formula><mml:math id="M258" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.16</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M259" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery and 0.07 and 0.05 <inline-formula><mml:math id="M260" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for the 0.32 mm pixel<inline-formula><mml:math id="M261" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image. For the AIF approach, these values are 0.13 and 0.15 <inline-formula><mml:math id="M262" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for the <inline-formula><mml:math id="M263" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.16</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M264" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery and <inline-formula><mml:math id="M265" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">0.06</mml:mn></mml:mrow></mml:math></inline-formula> and 0.05 <inline-formula><mml:math id="M266" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for the 0.32 mm pixel<inline-formula><mml:math id="M267" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> image. These are averages, which actually increase at higher percentiles in agreement with other image segmentation methods (e.g., Sime and Ferguson, 2003). We thus suggest higher error budgets at higher percentiles.</p>
      <p id="d1e3687">As demonstrated in Figs. <xref ref-type="fig" rid="Ch1.F14"/> and S8, there are significant inaccuracies associated with the AIF approach. The errors associated with the AIF approach can be limited when applied to high-quality (low-blur) <inline-formula><mml:math id="M268" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M269" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> resolution imagery, with better results possible on <inline-formula><mml:math id="M270" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">0.5</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M271" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery. Ultimately, the uncertainties are highly dependent on the input image quality and complexity (range in grain size, angularity, intragranular variability) and providing blanket estimates is less useful than end users applying the KMS tool to a subset of images to validate the results of the AIF approach.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1" specific-use="star"><?xmltex \currentcnt{1}?><label>Table 1</label><caption><p id="d1e3740">Comparison of <italic>PebbleCounts</italic> and <italic>PebbleCountsAuto</italic> results with other segmentation-based pebble counting studies.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="3">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="right"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Study/technique</oasis:entry>
         <oasis:entry colname="col2">Bias (<inline-formula><mml:math id="M278" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>)</oasis:entry>
         <oasis:entry colname="col3">Precision (<inline-formula><mml:math id="M279" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula>)</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">This study/KMS</oasis:entry>
         <oasis:entry colname="col2">0.03–0.07</oasis:entry>
         <oasis:entry colname="col3">0.05–0.09</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">This study/AIF</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M280" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">0.06</mml:mn></mml:mrow></mml:math></inline-formula>–0.13</oasis:entry>
         <oasis:entry colname="col3">0.05–0.15</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><xref ref-type="bibr" rid="bib1.bibx12" id="text.59"/>/custom watershed segmentation</oasis:entry>
         <oasis:entry colname="col2">0.13–0.33<inline-formula><mml:math id="M281" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">a</mml:mi></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">–</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><xref ref-type="bibr" rid="bib1.bibx57" id="text.60"/> /custom watershed segmentation</oasis:entry>
         <oasis:entry colname="col2">0.14<inline-formula><mml:math id="M282" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">b</mml:mi></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">0.22<inline-formula><mml:math id="M283" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">b</mml:mi></mml:msup></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><xref ref-type="bibr" rid="bib1.bibx31" id="text.61"/>/custom watershed segmentation</oasis:entry>
         <oasis:entry colname="col2">0.007–0.03</oasis:entry>
         <oasis:entry colname="col3">0.07–0.09</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><xref ref-type="bibr" rid="bib1.bibx66" id="text.62"/><inline-formula><mml:math id="M284" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">c</mml:mi></mml:msup></mml:math></inline-formula>/<italic>Basegrain</italic><xref ref-type="bibr" rid="bib1.bibx23" id="paren.63"/></oasis:entry>
         <oasis:entry colname="col2">0.16–0.82<inline-formula><mml:math id="M285" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">d</mml:mi></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">0.33–1.99<inline-formula><mml:math id="M286" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">d</mml:mi></mml:msup></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><table-wrap-foot><p id="d1e3749"><inline-formula><mml:math id="M272" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">a</mml:mi></mml:msup></mml:math></inline-formula> Taken from only three percentiles (<inline-formula><mml:math id="M273" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mn mathvariant="normal">50</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">84</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">95</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>). <inline-formula><mml:math id="M274" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">b</mml:mi></mml:msup></mml:math></inline-formula> Corrected value presented by <xref ref-type="bibr" rid="bib1.bibx31" id="text.58"/>. <inline-formula><mml:math id="M275" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">c</mml:mi></mml:msup></mml:math></inline-formula> Comparison made in millimeters, converted to <inline-formula><mml:math id="M276" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> units here. <inline-formula><mml:math id="M277" display="inline"><mml:msup><mml:mi/><mml:mi mathvariant="normal">d</mml:mi></mml:msup></mml:math></inline-formula> Large spread caused by significant disagreement at higher percentiles.</p></table-wrap-foot></table-wrap>

      <?pagebreak page870?><p id="d1e4003">In spite of this caveat, our bias and precision values of <inline-formula><mml:math id="M287" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">0.06</mml:mn></mml:mrow></mml:math></inline-formula>–0.15 <inline-formula><mml:math id="M288" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> are on the low end of previously published errors from similar techniques (Table <xref ref-type="table" rid="Ch1.T1"/>). To our knowledge, the only study to compare <italic>Basegrain</italic> results to control data by <xref ref-type="bibr" rid="bib1.bibx66" id="text.64"/>, makes comparisons in millimeters rather than <inline-formula><mml:math id="M289" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> units. Since the <inline-formula><mml:math id="M290" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> scale is logarithmic, in our study, the error in millimeter increases with <inline-formula><mml:math id="M291" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> from <inline-formula><mml:math id="M292" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">0.8</mml:mn></mml:mrow></mml:math></inline-formula> mm uncertainty at 4.5 <inline-formula><mml:math id="M293" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> (23 mm) to <inline-formula><mml:math id="M294" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">7</mml:mn></mml:mrow></mml:math></inline-formula> mm uncertainty at 6.5 <inline-formula><mml:math id="M295" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> (91 mm) for the <inline-formula><mml:math id="M296" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.16</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M297" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery in the KMS case. <xref ref-type="bibr" rid="bib1.bibx66" id="text.65"/> report even greater bias and lower precision from <italic>Basegrain</italic>, with errors also increasing in magnitude at higher percentiles. We emphasize that the previous image segmentation techniques discussed all rely on watershed segmentation, whereas neither of our algorithms use this step for the reasons demonstrated in Figs. <xref ref-type="fig" rid="Ch1.F1"/> and <xref ref-type="fig" rid="Ch1.F2"/>.</p>
</sec>
<sec id="Ch1.S5.SS2">
  <label>5.2</label><title>Lower truncation</title>
      <p id="d1e4129">The issue of lower truncation on grain-size distributions and percentile estimates has received much attention in the literature <xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx50 bib1.bibx9 bib1.bibx32" id="paren.66"><named-content content-type="pre">e.g.,</named-content></xref>. Previously, field geomorphologists were interested in all grains above 8–16 mm, simply because smaller grains were difficult to manually identify and thus underrepresented in the results <xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx51" id="paren.67"><named-content content-type="pre">e.g.,</named-content></xref>. Previous work suggests that truncation at the finer end of the distribution primarily increases the lower percentiles, while having less effect on the large (<inline-formula><mml:math id="M298" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mn mathvariant="normal">50</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>) percentiles <xref ref-type="bibr" rid="bib1.bibx9" id="paren.68"/>. We find significant shifts in all percentiles of <inline-formula><mml:math id="M299" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0.5</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M300" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> when applying a 20-pixel truncation. <xref ref-type="bibr" rid="bib1.bibx32" id="text.69"/> report truncation errors of <inline-formula><mml:math id="M301" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">0.3</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M302" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> for all percentiles in 1, 3, and 5 <inline-formula><mml:math id="M303" display="inline"><mml:mi mathvariant="italic">ψ</mml:mi></mml:math></inline-formula> truncated distributions. Their better results at lower percentiles are likely because the data were collected manually grid-by-number style in the field with the ability to include smaller grain sizes. The measurement resolution presents the ultimate control on how accurately grain-size percentiles can be measured. The purpose of the KMS and AIF approaches introduced here is in acquiring grain-size distributions from a subset of the full grain-size range present in the river, namely the subset with <inline-formula><mml:math id="M304" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula>-pixel <inline-formula><mml:math id="M305" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis length in image resolution.</p><?xmltex \hack{\newpage}?>
</sec>
<sec id="Ch1.S5.SS3">
  <label>5.3</label><title>Image acquisition</title>
      <p id="d1e4230">Ideally, collecting more than nine near-nadir images m<inline-formula><mml:math id="M306" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> (as in our field surveys) or collecting an approximately 1 : 2 (or greater) ratio of near-nadir to oblique imagery (as in our experiments with point-cloud data dimensions; see  Sect. S1), leads to the highest quality point-cloud results in Agisoft. Higher-quality point clouds, in turn, lead to less distortion errors during orthorectification and higher-quality orthomosaics. Due to the textured nature of gravel images, we attained comparable results in reduced time using only four overlapping near-nadir images m<inline-formula><mml:math id="M307" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> in the lab setting. In any case, high overlap of <inline-formula><mml:math id="M308" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">80</mml:mn></mml:mrow></mml:math></inline-formula> % between images is recommended to ensure the best results. Where a user desires accurate and dense point-cloud data in addition to the 2-D orthomosaics, it is recommended that (many) more images closer to the surface be collected <xref ref-type="bibr" rid="bib1.bibx63" id="paren.70"><named-content content-type="pre">e.g.,</named-content></xref> and from oblique viewing angles <xref ref-type="bibr" rid="bib1.bibx37" id="paren.71"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
      <p id="d1e4277">As we find the difference in calculated resolution and subsequent grain-size measurement to be negligible between orthorectified and raw near-nadir imagery at these scales, the use of orthoimagery is not strictly necessary when using image-segmentation software like <italic>PebbleCounts</italic> <xref ref-type="bibr" rid="bib1.bibx17" id="paren.72"><named-content content-type="pre">e.g.,</named-content></xref>. However, on very rough surfaces with cast shadows from large grains, generating orthoimagery will overcome distortions present in the raw photos. Furthermore, georeferenced orthomosaics may be preferable for capturing large sites at a constant resolution that can be fed into the algorithm.</p>
      <p id="d1e4288">In terms of camera and photographic height (and thus resolution) considerations, one first needs to assess the minimum grain size that is desired. Following this, the resolution of the image can be determined using Eq. (1) with some knowledge of the camera parameters (focal length, camera height, sensor size, and image size). The smallest grain <inline-formula><mml:math id="M309" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> axis needed should be 20 times this resolution. For instance, using a similar camera to the Sony <inline-formula><mml:math id="M310" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula>6000 (24-megapixel, 15.6 <inline-formula><mml:math id="M311" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 23.5 mm sensor, 16 mm focal length), to measure all grains down to 1 cm one needs a resolution of 0.5 mm pixel<inline-formula><mml:math id="M312" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and thus a maximum camera height of <inline-formula><mml:math id="M313" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> m. If finer grain<?pagebreak page871?> sizes are desired, the user can use higher-resolution imagery but must be aware of the longer time needed for processing.</p>
</sec>
<sec id="Ch1.S5.SS4">
  <label>5.4</label><title>UAV surveying</title>
      <p id="d1e4343">The <inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> m flight heights typical of UAV surveys lead to centimeter-scale imagery with currently available 12- to 24-megapixel cameras, which is less appropriate for <italic>PebbleCounts</italic> processing, unless large (<inline-formula><mml:math id="M315" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn></mml:mrow></mml:math></inline-formula> m) cobbles and boulders dominate the river site. Acquiring 0.5 mm pixel<inline-formula><mml:math id="M316" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery from a DJI Mavic drone with a 12-megapixel camera requires a very low flight height of <inline-formula><mml:math id="M317" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.4</mml:mn></mml:mrow></mml:math></inline-formula> m, giving a field of view of only <inline-formula><mml:math id="M318" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> <inline-formula><mml:math id="M319" display="inline"><mml:mrow><mml:mn mathvariant="normal">1.5</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> m. This may be improved using better cameras like on the Mavic 2 Pro (20-megapixel camera), but gathering such imagery with the high overlap (<inline-formula><mml:math id="M320" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">80</mml:mn></mml:mrow></mml:math></inline-formula> %) required for SfM-MVS processing is still difficult, particularly given current <inline-formula><mml:math id="M321" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> min flight length limitations from available batteries. Given continual technology improvements (e.g., greater battery life, more accurate geotags from onboard dGPS, higher megapixel cameras, and reduced motion blur), it is within reason to expect hectare to multi-hectare SfM-MVS UAV surveys at mm resolution in seamless orthomosaics along entire river reaches in the near future. But, for the time being, a single, non-overlapping orthoimage workflow proposed by <xref ref-type="bibr" rid="bib1.bibx17" id="text.73"/> has high potential to achieve large-areal results. Their workflow, building on <xref ref-type="bibr" rid="bib1.bibx14" id="text.74"/>, uses a number of high and oblique overlapping flights to orthorectify a lower non-overlapping flight with millimeter-scale acquisition, with resulting single, scaled images passed to <italic>Basegrain</italic>, or, alternatively, to <italic>PebbleCounts</italic>.</p>
</sec>
<sec id="Ch1.S5.SS5">
  <label>5.5</label><title>Coverage and processing limits</title>
      <p id="d1e4452">Using handheld imagery, a survey site of 1000–5000 m<inline-formula><mml:math id="M322" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> with <inline-formula><mml:math id="M323" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> ground control points (GCPs) measured via dGPS can be covered in 2–6 h by one person  (including GCP collection). Using a camera-on-mast setup, this time can be reduced by half, with even greater speed possible using more people and cameras (of the same sensor dimensions, focal length, and height). The potential to cover even larger sites up to or exceeding 100 <inline-formula><mml:math id="M324" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 100 m (1 ha) is feasible in a day of work by two people (with one measuring the targets and both sharing the photo-taking) using the proposed method with a 16–20 mm focal length lens and a 3–5 m mast.</p>
      <p id="d1e4481">One limit of the scalability of the <italic>PebbleCounts</italic> method is processing time. The KMS <italic>PebbleCounts</italic> tool is recommended to be applied to maximum 1–2 m<inline-formula><mml:math id="M325" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patches, depending on the image resolution, as the manual clicking of good grains is time-consuming, requiring 5–20 min per patch depending on patch size, image resolution, and abundance of finer grains. On the other hand, the AIF <italic>PebbleCountsAuto</italic> tool can theoretically be applied at larger scales. However, it is also advisable to tile data and feed them to the algorithm in maximum 1–2 m<inline-formula><mml:math id="M326" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patches for <inline-formula><mml:math id="M327" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M328" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imagery, since the non-local means de-noising can take minutes on very large images (<inline-formula><mml:math id="M329" display="inline"><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">2000</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">2000</mml:mn></mml:mrow></mml:math></inline-formula> pixels). Again, the use of systems with GPUs or large memory will shorten processing times and allow for larger images to be run.</p>
      <p id="d1e4548">In practical terms, a workflow to cover a <inline-formula><mml:math id="M330" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">2500</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M331" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> survey site captured at 1 mm pixel<inline-formula><mml:math id="M332" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> resolution and processed into a georeferenced orthomosaic would be (1) tiling into 2 m<inline-formula><mml:math id="M333" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> patches, (2) passing each patch to the AIF <italic>PebbleCountsAuto</italic> tool with quick manual steps of shadow-masking and sand-clicking (if sand is present), where each tile takes 1–2 min, (3) selecting a random subset of <inline-formula><mml:math id="M334" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> tiles to pass to the KMS <italic>PebbleCounts</italic> tool as validation and uncertainty estimation for the AIF approach. Such a workflow could be accomplished in 1–2 d of work by an experienced user, providing tens to hundreds of thousands of measured grains from the survey site and a robust measurement of the full grain-size distribution. To increase processing speed, a gridded subset of tiles could also be extracted from the full survey site, with a 3–5 m step size between patches, to provide complete coverage across heterogeneous gravel-bar features, while avoiding unnecessary oversampling and processing of every patch in the survey site.</p>
</sec>
</sec>
<sec id="Ch1.S6" sec-type="conclusions">
  <label>6</label><title>Conclusions</title>
      <p id="d1e4617">Using a <inline-formula><mml:math id="M335" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>-means approach for pebble segmentation in the spectral and spatial domain combined with fast manual selection of good results, we developed a new semi-automated algorithm for grain sizing optimized for images taken over gravel-bed rivers (<italic>PebbleCounts</italic>). We also developed an automated algorithm that uses suspect grain filtering (<italic>PebbleCountsAuto</italic>), albeit with larger uncertainties in the results. The lower truncation of the methods (minimum <inline-formula><mml:math id="M336" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>-axis length measurable) is limited to 20 pixels and above. These new methods were necessary to acquire grain-size distributions from dynamic high-mountain rivers with complexity from sources such as large ranges in grain size, intragranular heterogeneity, grain overlap, irregular shadowing, and sand patches. Similar to previous methods, <italic>PebbleCounts</italic> is best applied at the patch scale (<inline-formula><mml:math id="M337" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M338" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>); however, <italic>PebbleCounts</italic> provides more realistic results in complex images without any post-processing steps in <inline-formula><mml:math id="M339" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula>–10 min per patch, assuming <inline-formula><mml:math id="M340" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> mm pixel<inline-formula><mml:math id="M341" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> resolution imagery. <italic>PebbleCountsAuto</italic> performs very well on high-quality (low-blur) imagery, though with remaining misidentification that must be approached with caution. Grain-sizing results can be upscaled to areas on the order of 10<inline-formula><mml:math id="M342" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula>–10<inline-formula><mml:math id="M343" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">4</mml:mn></mml:msup></mml:math></inline-formula> m<inline-formula><mml:math id="M344" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> when <italic>PebbleCounts</italic> results are used as validation for the automated <italic>PebbleCountsAuto</italic> function.</p>
</sec>

      
      </body>
    <back><notes notes-type="codeavailability"><title>Code availability</title>

      <p id="d1e4739"><italic>PebbleCounts</italic> is a Python-based program with the code and documentation available on GitHub at <uri>https://github.com/UP-RS-ESP/PebbleCounts</uri>  (last access: 12 September 2019)  <xref ref-type="bibr" rid="bib1.bibx49" id="paren.75"/>.</p>
  </notes><app-group>
        <supplementary-material position="anchor"><p id="d1e4750">The supplement related to this article is available online at: <inline-supplementary-material xlink:href="https://doi.org/10.5194/esurf-7-859-2019-supplement" xlink:title="pdf">https://doi.org/10.5194/esurf-7-859-2019-supplement</inline-supplementary-material>.</p></supplementary-material>
        </app-group><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e4759">BB and BP defined the project. BP developed the algorithms with support from BB. BP carried out the analysis, produced the figures, and wrote the manuscript. BB provided funding, guidance in data analysis, and manuscript edits.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e4765">The authors declare that they have no conflict of interest.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e4771">Anna Rosner is thanked for assistance with fieldwork for mast surveys, and Steffen Wellegehausen is thanked for aiding in the lab experiment setup. Constructive reviews from Patrice Carbonneau, Pascal Allemand, and Eric Lajeunesse improved the structure of the manuscript.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e4776">This research has been supported by the DFG (IRTG-StRATEGy (grant no. IGK2018)) and the MWFK Brandenburg (NEXUS). We acknowledge the support of the open-access publishing fund of the University of Potsdam.</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d1e4782">This paper was edited by Eric Lajeunesse and reviewed by Patrice Carbonneau and Pascal Allemand.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Agisoft(2018)</label><?label agisoft?><mixed-citation>Agisoft: AgiSoft PhotoScan Professional, available at: <uri>http://www.agisoft.com/downloads/installer/</uri> (last access: 12 September 2019), 2018.</mixed-citation></ref>
      <ref id="bib1.bibx2"><?xmltex \def\ref@label{{Attal and Lav{\'{e}}(2006)}}?><label>Attal and Lavé(2006)</label><?label attal2006?><mixed-citation>Attal, M. and Lavé, J.: Changes of bedload characteristics along the
Marsyandi River (central Nepal): Implications for understanding hillslope
sediment supply, sediment load evolution along fluvial networks, and
denudation in active orogenic belts, Geol. S. Am. S., 398, 143–171, <ext-link xlink:href="https://doi.org/10.1130/2006.2398(09)" ext-link-type="DOI">10.1130/2006.2398(09)</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Attal et al.(2015)</label><?label attal2015?><mixed-citation>Attal, M., Mudd, S. M., Hurst, M. D., Weinman, B., Yoo, K., and Naylor, M.: Impact of change in erosion rate and landscape steepness on hillslope and fluvial sediments grain size in the Feather River basin (Sierra Nevada, California), Earth Surf. Dynam., 3, 201–222, <ext-link xlink:href="https://doi.org/10.5194/esurf-3-201-2015" ext-link-type="DOI">10.5194/esurf-3-201-2015</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>Bertin and Friedrich(2016)</label><?label bertin2016?><mixed-citation>Bertin, S. and Friedrich, H.: Field application of close-range digital
photogrammetry (CRDP) for grain-scale fluvial morphology studies, Earth
Surf. Proc. Land., 41, 1358–1369, <ext-link xlink:href="https://doi.org/10.1002/esp.3906" ext-link-type="DOI">10.1002/esp.3906</ext-link>,
2016.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>Bertin et al.(2017)</label><?label bertin2017?><mixed-citation>Bertin, S., Groom, J., and Friedrich, H.: Isolating roughness scales of
gravel-bed patches, Water Resour. Res., 53, 6841–6856,
<ext-link xlink:href="https://doi.org/10.1002/2016WR020205" ext-link-type="DOI">10.1002/2016WR020205</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Bookhagen and Strecker(2012)</label><?label bookhagen2012?><mixed-citation>Bookhagen, B. and Strecker, M. R.: Spatiotemporal trends in erosion rates
across a pronounced rainfall gradient: Examples from the southern Central
Andes, Earth Planet. Sc. Lett., 327–328, 97–110,
<ext-link xlink:href="https://doi.org/10.1016/j.epsl.2012.02.005" ext-link-type="DOI">10.1016/j.epsl.2012.02.005</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Brasington et al.(2012)</label><?label brasington2012?><mixed-citation>Brasington, J., Vericat, D., and Rychkov, I.: Modeling river bed morphology,
roughness, and surface sedimentology using high resolution terrestrial laser
scanning, Water Resour. Res., 48, W11519, <ext-link xlink:href="https://doi.org/10.1029/2012WR012223" ext-link-type="DOI">10.1029/2012WR012223</ext-link>,
2012.</mixed-citation></ref>
      <ref id="bib1.bibx8"><label>Buades et al.(2011)</label><?label buades2011?><mixed-citation>Buades, A., Coll, B., and Morel, J.-M.: Non-Local Means Denoising, Image
Processing On Line, 1, 208–212, <ext-link xlink:href="https://doi.org/10.5201/ipol.2011.bcm_nlm" ext-link-type="DOI">10.5201/ipol.2011.bcm_nlm</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Bunte and Abt(2001)</label><?label bunte2001?><mixed-citation>Bunte, K. and Abt, S. T.: Sampling surface and subsurface particle-size
distributions in wadable gravel- and cobble-bed streams for analyses in
sediment transport, hydraulics and streambed monitoring, Tech. rep., US
Forest Service, Rocky Mountain Research Station, Fort Collins, CO,
<ext-link xlink:href="https://doi.org/10.2737/RMRS-GTR-74" ext-link-type="DOI">10.2737/RMRS-GTR-74</ext-link>, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx10"><label>Buscombe(2013)</label><?label buscombe2013?><mixed-citation>Buscombe, D.: Transferable wavelet method for grain-size distribution from
images of sediment surfaces and thin sections, and other natural granular
patterns, Sedimentology, 60, 1709–1732, <ext-link xlink:href="https://doi.org/10.1111/sed.12049" ext-link-type="DOI">10.1111/sed.12049</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Buscombe et al.(2010)</label><?label buscombe2010?><mixed-citation>Buscombe, D., Rubin, D. M., and Warrick, J. A.: A universal approximation of
grain size from images of noncohesive sediment, J. Geophys.
Res.-Earth, 115, F02015, <ext-link xlink:href="https://doi.org/10.1029/2009JF001477" ext-link-type="DOI">10.1029/2009JF001477</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>Butler et al.(2001)</label><?label butler2001?><mixed-citation>Butler, J. B., Lane, S. N., and Chandler, J. H.: Automated extraction of
grain-size data from gravel surfaces using digital image processing, J. Hydraul. Res., 39, 519–529, <ext-link xlink:href="https://doi.org/10.1080/00221686.2001.9628276" ext-link-type="DOI">10.1080/00221686.2001.9628276</ext-link>,
2001.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Carbonneau(2005)</label><?label carbonneau2005?><mixed-citation>Carbonneau, P. E.: The threshold effect of image resolution on image-based
automated grain size mapping in fluvial environments, Earth Surf. Proc. Land., 30, 1687–1693, <ext-link xlink:href="https://doi.org/10.1002/esp.1288" ext-link-type="DOI">10.1002/esp.1288</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx14"><label>Carbonneau and Dietrich(2017)</label><?label carbonneau2017?><mixed-citation>Carbonneau, P. E. and Dietrich, J. T.: Cost-effective non-metric photogrammetry from consumer-grade sUAS: implications for direct georeferencing of structure from motion photogrammetry, Earth Surf. Proc. Land., 42, 473–486, <ext-link xlink:href="https://doi.org/10.1002/esp.4012" ext-link-type="DOI">10.1002/esp.4012</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx15"><label>Carbonneau et al.(2003)</label><?label carbonneau2003?><mixed-citation>Carbonneau, P. E., Lane, S. N., and Bergeron, N. E.: Cost-effective non-metric
close-range digital photogrammetry and its application to a study of coarse
gravel river beds, Int. J. Remote Sens., 24, 2837–2854,
<ext-link xlink:href="https://doi.org/10.1080/01431160110108364" ext-link-type="DOI">10.1080/01431160110108364</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Carbonneau et al.(2004)</label><?label carbonneau2004?><mixed-citation>Carbonneau, P. E., Lane, S. N., and Bergeron, N. E.: Catchment-scale mapping of surface grain size in gravel bed rivers using airborne digital imagery, Water Resour. Res., 40, W07202, <ext-link xlink:href="https://doi.org/10.1029/2003WR002759" ext-link-type="DOI">10.1029/2003WR002759</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx17"><label>Carbonneau et al.(2018)</label><?label carbonneau2018?><mixed-citation>Carbonneau, P. E., Bizzi, S., and Marchetti, G.: Robotic photosieving from
low-cost multirotor sUAS: a proof-of-concept, Earth Surf. Proc.
Land., 43, 1160–1166, <ext-link xlink:href="https://doi.org/10.1002/esp.4298" ext-link-type="DOI">10.1002/esp.4298</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Castino et al.(2016)</label><?label castino2016?><mixed-citation>Castino, F., Bookhagen, B., and Strecker, M.: River-discharge dynamics in the
Southern Central Andes and the 1976–77 global climate shift, Geophys.
Res. Lett., 43, 11679–11687, <ext-link xlink:href="https://doi.org/10.1002/2016GL070868" ext-link-type="DOI">10.1002/2016GL070868</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx19"><label>Castino et al.(2017)</label><?label castino2017?><mixed-citation>Castino, F., Bookhagen, B., and Strecker, M. R.: Oscillations and trends of
river discharge in the southern Central Andes and linkages with climate
variability, J. Hydrol., 555, 108–124,
<ext-link xlink:href="https://doi.org/10.1016/j.jhydrol.2017.10.001" ext-link-type="DOI">10.1016/j.jhydrol.2017.10.001</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx20"><label>Chatanantavet et al.(2010)</label><?label chatanantavet2010?><mixed-citation>Chatanantavet, P., Lajeunesse, E., Parker, G., Malverti, L., and Meunier, P.:
Physically based model of downstream fining in bedrock streams with lateral
input, Water Resour. Res., 46, W02518, <ext-link xlink:href="https://doi.org/10.1029/2008WR007208" ext-link-type="DOI">10.1029/2008WR007208</ext-link>,
2010.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>Church et al.(1998)</label><?label church1998?><mixed-citation>Church, M., Hassan, M. A., and Wolcott, J. F.: Stabilizing self-organized
structures in gravel-bed stream channels:<?pagebreak page873?> Field and experimental
observations, Water Resour. Res., 34, 3169–3179,
<ext-link xlink:href="https://doi.org/10.1029/98WR00484" ext-link-type="DOI">10.1029/98WR00484</ext-link>, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>de Haas et al.(2014)</label><?label dehaas2014?><mixed-citation>de Haas, T., Ventra, D., Carbonneau, P. E., and Kleinhans, M. G.: Debris-flow
dominance of alluvial fans masked by runoff reworking and weathering,
Geomorphology, 217, 165–181, <ext-link xlink:href="https://doi.org/10.1016/j.geomorph.2014.04.028" ext-link-type="DOI">10.1016/j.geomorph.2014.04.028</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Detert and Weitbrecht(2012)</label><?label detert2012?><mixed-citation>
Detert, M. and Weitbrecht, V.: Automatic object detection to analyze the
geometry of gravel grains – a free stand-alone tool, in: River flow 2012:
Proceedings of the international conference on fluvial hydraulics, San José,
Costa Rica, 5–7 September 2012,  595–600, Taylor &amp; Francis Group,
London, UK, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Dugdale et al.(2010)</label><?label dugdale2010?><mixed-citation>Dugdale, S. J., Carbonneau, P. E., and Campbell, D.: Aerial photosieving of
exposed gravel bars for the rapid calibration of airborne grain size maps,
Earth Surf. Proc. Land., 35, 627–639, <ext-link xlink:href="https://doi.org/10.1002/esp.1936" ext-link-type="DOI">10.1002/esp.1936</ext-link>,
2010.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>Dunne and Jerolmack(2018)</label><?label dunne2018?><mixed-citation>Dunne, K. B. J. and Jerolmack, D. J.: Evidence of, and a proposed explanation for, bimodal transport states in alluvial rivers, Earth Surf. Dynam., 6, 583–594, <ext-link xlink:href="https://doi.org/10.5194/esurf-6-583-2018" ext-link-type="DOI">10.5194/esurf-6-583-2018</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Eltner et al.(2016)</label><?label eltner2016?><mixed-citation>Eltner, A., Kaiser, A., Castillo, C., Rock, G., Neugirg, F., and Abellán, A.: Image-based surface reconstruction in geomorphometry – merits, limits and developments, Earth Surf. Dynam., 4, 359–389, <ext-link xlink:href="https://doi.org/10.5194/esurf-4-359-2016" ext-link-type="DOI">10.5194/esurf-4-359-2016</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Ferguson et al.(1996)</label><?label ferguson1996?><mixed-citation>Ferguson, R., Hoey, T., Wathen, S., and Werritty, A.: Field evidence for rapid downstream fining of river gravels through selective transport, Geology, 24, 179–182, <ext-link xlink:href="https://doi.org/10.1130/0091-7613(1996)024&lt;0179:FEFRDF&gt;2.3.CO;2" ext-link-type="DOI">10.1130/0091-7613(1996)024&lt;0179:FEFRDF&gt;2.3.CO;2</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Fripp and Diplas(1993)</label><?label fripp1993?><mixed-citation>Fripp, J. B. and Diplas, P.: Surface Sampling in Gravel Streams, J.
Hydraul. Eng., 119, 473–490,
<ext-link xlink:href="https://doi.org/10.1061/(ASCE)0733-9429(1993)119:4(473)" ext-link-type="DOI">10.1061/(ASCE)0733-9429(1993)119:4(473)</ext-link>, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Gomez et al.(2001)</label><?label gomez2001?><mixed-citation>Gomez, B., Rosser, B. J., Peacock, D. H., Hicks, D. M., and Palmer, J. A.:
Downstream fining in a rapidly aggrading gravel bed river, Water Resour.
Res., 37, 1813–1823, <ext-link xlink:href="https://doi.org/10.1029/2001WR900007" ext-link-type="DOI">10.1029/2001WR900007</ext-link>, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Graham et al.(2005a)</label><?label graham2005a?><mixed-citation>Graham, D. J., Reid, I., and Rice, S. P.: Automated Sizing of Coarse-Grained
Sediments: Image-Processing Procedures, Math. Geol., 37, 1–28,
<ext-link xlink:href="https://doi.org/10.1007/s11004-005-8745-x" ext-link-type="DOI">10.1007/s11004-005-8745-x</ext-link>, 2005a.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Graham et al.(2005b)</label><?label graham2005b?><mixed-citation>Graham, D. J., Rice, S. P., and Reid, I.: A transferable method for the
automated grain sizing of river gravels, Water Resour. Res., 41,
W07020, <ext-link xlink:href="https://doi.org/10.1029/2004WR003868" ext-link-type="DOI">10.1029/2004WR003868</ext-link>, 2005b.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Graham et al.(2010)</label><?label graham2010?><mixed-citation>Graham, D. J., Rollet, A.-J., Piégay, H., and Rice, S. P.: Maximizing the
accuracy of image-based surface sediment sampling techniques, Water Resour.
Res., 46, W02508, <ext-link xlink:href="https://doi.org/10.1029/2008WR006940" ext-link-type="DOI">10.1029/2008WR006940</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>Grant(2012)</label><?label grant2012?><mixed-citation>Grant, G. E.: The Geomorphic Response of Gravel-Bed Rivers to Dams:
Perspectives and Prospects, chap. 15, 165–181, Wiley-Blackwell,
<ext-link xlink:href="https://doi.org/10.1002/9781119952497.ch15" ext-link-type="DOI">10.1002/9781119952497.ch15</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx34"><label>Haralick et al.(1973)</label><?label haralick1973?><mixed-citation>Haralick, R. M., Shanmugam, K., and Dinstein, I.: Textural Features for Image
Classification, IEEE T. Syst. Man Cyb., SMC-3,
610–621, <ext-link xlink:href="https://doi.org/10.1109/TSMC.1973.4309314" ext-link-type="DOI">10.1109/TSMC.1973.4309314</ext-link>, 1973.</mixed-citation></ref>
      <ref id="bib1.bibx35"><?xmltex \def\ref@label{{H\"{o}hle and H\"{o}hle(2009)}}?><label>Höhle and Höhle(2009)</label><?label hohle2009?><mixed-citation>Höhle, J. and Höhle, M.: Accuracy assessment of digital elevation
models by means of robust statistical methods, ISPRS J.
Photogramm., 64, 398–406,
<ext-link xlink:href="https://doi.org/10.1016/j.isprsjprs.2009.02.003" ext-link-type="DOI">10.1016/j.isprsjprs.2009.02.003</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx36"><label>Ibbeken and Schleyer(1986)</label><?label ibbeken1986?><mixed-citation>Ibbeken, H. and Schleyer, R.: Photo-sieving: A method for grain-size analysis
of coarse-grained, unconsolidated bedding surfaces, Earth Surf. Proc.
Land., 11, 59–77, <ext-link xlink:href="https://doi.org/10.1002/esp.3290110108" ext-link-type="DOI">10.1002/esp.3290110108</ext-link>, 1986.</mixed-citation></ref>
      <ref id="bib1.bibx37"><label>James and Robson(2014)</label><?label james2014?><mixed-citation>James, M. R. and Robson, S.: Mitigating systematic error in topographic models derived from UAV and ground-based image networks, Earth Surf. Proc. Land., 39, 1413–1420, <ext-link xlink:href="https://doi.org/10.1002/esp.3609" ext-link-type="DOI">10.1002/esp.3609</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>Kellerhals and Bray(1971)</label><?label kellerhals1971?><mixed-citation>
Kellerhals, R. and Bray, D. I.: Sampling procedures for coarse fluvial
sediments, J. Hydr. Eng. Div.-ASCE, 97, 1165–1180, 1971.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Kondolf(1997)</label><?label kondolf1997?><mixed-citation>Kondolf, G. M.: PROFILE: hungry water: effects of dams and gravel mining on
river channels, Environ. Manage., 21, 533–551,
<ext-link xlink:href="https://doi.org/10.1007/s002679900048" ext-link-type="DOI">10.1007/s002679900048</ext-link>, 1997.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Kondolf and Wolman(1993)</label><?label kondolf1993?><mixed-citation>Kondolf, G. M. and Wolman, M. G.: The sizes of salmonid spawning gravels, Water Resour. Res., 29, 2275–2285, <ext-link xlink:href="https://doi.org/10.1029/93WR00402" ext-link-type="DOI">10.1029/93WR00402</ext-link>, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx41"><label>Lamb and Venditti(2016)</label><?label lamb2016?><mixed-citation>Lamb, M. P. and Venditti, J. G.: The grain size gap and abrupt gravel-sand
transitions in rivers due to suspension fallout, Geophys. Res.
Lett., 43, 3777–3785, <ext-link xlink:href="https://doi.org/10.1002/2016GL068713" ext-link-type="DOI">10.1002/2016GL068713</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Langhammer et al.(2017)</label><?label langhammer2017?><mixed-citation>Langhammer, J., Lendzioch, T., Miřijovský, J., and Hartvich, F.: UAV-Based
Optical Granulometry as Tool for Detecting Changes in Structure of Flood
Depositions, Remote Sensing, 9, 240, <ext-link xlink:href="https://doi.org/10.3390/rs9030240" ext-link-type="DOI">10.3390/rs9030240</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Lloyd(1982)</label><?label lloyd1982?><mixed-citation>Lloyd, S.: Least squares quantization in PCM, IEEE T. Inform. Theory, 28, 129–137, <ext-link xlink:href="https://doi.org/10.1109/TIT.1982.1056489" ext-link-type="DOI">10.1109/TIT.1982.1056489</ext-link>, 1982.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Otsu(1979)</label><?label otsu1979?><mixed-citation>Otsu, N.: A Threshold Selection Method from Gray-Level Histograms, IEEE
T. Syst. Man Cyb., 9, 62–66,
<ext-link xlink:href="https://doi.org/10.1109/TSMC.1979.4310076" ext-link-type="DOI">10.1109/TSMC.1979.4310076</ext-link>, 1979.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Paola et al.(1992)</label><?label paola1992?><mixed-citation>Paola, C., Parker, G., Seal, R., Sinha, S. K., Southard, J. B., and Wilcock,
P. R.: Downstream Fining by Selective Deposition in a Laboratory Flume,
Science, 258, 1757–1760, <ext-link xlink:href="https://doi.org/10.1126/science.258.5089.1757" ext-link-type="DOI">10.1126/science.258.5089.1757</ext-link>, 1992.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Parker et al.(1982)</label><?label parker1982?><mixed-citation>
Parker, G., Klingeman, P. C., and McLean, D. G.: Bedload and size distribution
in paved gravel-bed streams, J. Hydr. Eng. Div.-ASCE, 108,
544–571, 1982.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Pearson et al.(2017)</label><?label pearson2017?><mixed-citation>Pearson, E., Smith, M., Klaar, M., and Brown, L.: Can high resolution 3D
topographic surveys provide reliable grain size estimates in gravel bed
rivers?, Geomorphology, 293, 143–155, <ext-link xlink:href="https://doi.org/10.1016/j.geomorph.2017.05.015" ext-link-type="DOI">10.1016/j.geomorph.2017.05.015</ext-link>,
2017.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Purinton and Bookhagen(2018)</label><?label purinton2018?><mixed-citation>Purinton, B. and Bookhagen, B.: Measuring decadal vertical land-level changes from SRTM-C (2000) and TanDEM-X (<inline-formula><mml:math id="M345" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mi mathvariant="normal"> </mml:mi><mml:mn mathvariant="normal">2015</mml:mn></mml:mrow></mml:math></inline-formula>) in the south-central Andes, Earth Surf. Dynam., 6, 971–987, <ext-link xlink:href="https://doi.org/10.5194/esurf-6-971-2018" ext-link-type="DOI">10.5194/esurf-6-971-2018</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx49"><label>Purinton and Bookhagen(2019)</label><?label pebblecounts?><mixed-citation>Purinton, B. and Bookhagen, B.: PebbleCounts: a Python grain-sizing algorithm
for gravel-bed river imagery, <ext-link xlink:href="https://doi.org/10.5880/fidgeo.2019.007" ext-link-type="DOI">10.5880/fidgeo.2019.007</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx50"><label>Rice and Church(1996)</label><?label rice1996?><mixed-citation>Rice, S. and Church, M.: Sampling surficial fluvial gravels; the precision of
size distribution percentile sediments, J. Sediment. Res., 66,
654, <ext-link xlink:href="https://doi.org/10.2110/jsr.66.654" ext-link-type="DOI">10.2110/jsr.66.654</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx51"><label>Rice and Church(1998)</label><?label rice1998?><mixed-citation>Rice, S. and Church, M.: Grain size along two gravel-bed rivers: statistical
variation, spatial pattern and sedimentary links, Earth Surf. Proc.
Land., 23, 345–363,
<ext-link xlink:href="https://doi.org/10.1002/(SICI)1096-9837(199804)23:4&lt;345::AID-ESP850&gt;3.0.CO;2-B" ext-link-type="DOI">10.1002/(SICI)1096-9837(199804)23:4&lt;345::AID-ESP850&gt;3.0.CO;2-B</ext-link>, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx52"><label>Rubin(2004)</label><?label rubin2004?><mixed-citation>Rubin, D. M.: A Simple Autocorrelation Algorithm for Determining Grain Size
from Digital Images of Sediment, J. Sediment. Res., 74, 160,
<ext-link xlink:href="https://doi.org/10.1306/052203740160" ext-link-type="DOI">10.1306/052203740160</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx53"><label>Russ(2002)</label><?label russ2002?><mixed-citation>
Russ, J. C.: The image processing handbook, fourth edition, CRC press, Boca Raton, Florida, USA, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx54"><label>Rychkov et al.(2012)</label><?label rychkov2012?><mixed-citation>Rychkov, I., Brasington, J., and Vericat, D.: Computational and methodological aspects of terrestr<?pagebreak page874?>ial surface analysis based on point clouds, Comput. Geosci., 42, 64–70, <ext-link xlink:href="https://doi.org/10.1016/j.cageo.2012.02.011" ext-link-type="DOI">10.1016/j.cageo.2012.02.011</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx55"><label>Sculley(2010)</label><?label sculley2010?><mixed-citation>Sculley, D.: Web-scale <inline-formula><mml:math id="M346" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula>-means Clustering, in: Proceedings of the 19th
International Conference on World Wide Web, 1177–1178, ACM, New York,
NY, USA, <ext-link xlink:href="https://doi.org/10.1145/1772690.1772862" ext-link-type="DOI">10.1145/1772690.1772862</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx56"><label>Shields(1936)</label><?label shields1936?><mixed-citation>
Shields, A.: Anwendung der Aehnlichkeitsmechanik und der Turbulenzforschung auf
die Geschiebebewegung, PhD thesis, Technical University Berlin,  Berlin, Germany, 1936.</mixed-citation></ref>
      <ref id="bib1.bibx57"><label>Sime and Ferguson(2003)</label><?label sime2003?><mixed-citation>Sime, L. and Ferguson, R.: Information on Grain Sizes in Gravel-Bed Rivers by
Automated Image Analysis, J. Sediment. Res., 73, 630,
<ext-link xlink:href="https://doi.org/10.1306/112102730630" ext-link-type="DOI">10.1306/112102730630</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx58"><label>Sklar et al.(2006)</label><?label sklar2006?><mixed-citation>Sklar, L. S., Dietrich, W. E., Foufoula-Georgiou, E., Lashermes, B., and
Bellugi, D.: Do gravel bed river size distributions record channel network
structure?, Water Resour. Res., 42, W06D18, <ext-link xlink:href="https://doi.org/10.1029/2006WR005035" ext-link-type="DOI">10.1029/2006WR005035</ext-link>,
2006.</mixed-citation></ref>
      <ref id="bib1.bibx59"><label>Smith et al.(2015)</label><?label smith2015?><mixed-citation>Smith, M., Carrivick, J., and Quincey, D.: Structure from motion photogrammetry in physical geography, Prog. Phys. Geog., 40, 247–275, <ext-link xlink:href="https://doi.org/10.1177/0309133315615805" ext-link-type="DOI">10.1177/0309133315615805</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx60"><label>Tofelde et al.(2017)</label><?label tofelde2017?><mixed-citation>Tofelde, S., Schildgen, T. F., Savi, S., Pingel, H., Wickert, A. D., Bookhagen,
B., Wittmann, H., Alonso, R. N., Cottle, J., and Strecker, M. R.: 100 kyr
fluvial cut-and-fill terrace cycles since the Middle Pleistocene in the
southern Central Andes, NW Argentina, Earth Planet. Sc. Lett.,
473, 141–153, <ext-link xlink:href="https://doi.org/10.1016/j.epsl.2017.06.001" ext-link-type="DOI">10.1016/j.epsl.2017.06.001</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx61"><label>Tomasi and Manduchi(1998)</label><?label tomasi1998?><mixed-citation>Tomasi, C. and Manduchi, R.: Bilateral filtering for gray and color images, in: Sixth International Conference on Computer Vision (IEEE Cat. No.98CH36271), 839–846, <ext-link xlink:href="https://doi.org/10.1109/ICCV.1998.710815" ext-link-type="DOI">10.1109/ICCV.1998.710815</ext-link>, Bombay, India, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx62"><label>Verdú et al.(2005)</label><?label verdu2005?><mixed-citation>Verdú, J. M., Batalla, R. J., and Martínez-Casasnovas, J. A.: High-resolution
grain-size characterisation of gravel bars using imagery analysis and
geo-statistics, Geomorphology, 72, 73–93,
<ext-link xlink:href="https://doi.org/10.1016/j.geomorph.2005.04.015" ext-link-type="DOI">10.1016/j.geomorph.2005.04.015</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx63"><label>Verma and Bourke(2019)</label><?label verma2019?><mixed-citation>Verma, A. K. and Bourke, M. C.: A method based on structure-from-motion photogrammetry to generate sub-millimetre-resolution digital elevation models for investigating rock breakdown features, Earth Surf. Dynam., 7, 45–66, <ext-link xlink:href="https://doi.org/10.5194/esurf-7-45-2019" ext-link-type="DOI">10.5194/esurf-7-45-2019</ext-link>, 2019.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx64"><label>Ward(1963)</label><?label ward1963?><mixed-citation>Ward, J. H.: Hierarchical Grouping to Optimize an Objective Function, J. Am. Stat. Assoc., 58, 236–244,
<ext-link xlink:href="https://doi.org/10.1080/01621459.1963.10500845" ext-link-type="DOI">10.1080/01621459.1963.10500845</ext-link>, 1963.</mixed-citation></ref>
      <ref id="bib1.bibx65"><label>Warrick et al.(2009)</label><?label warrick2009?><mixed-citation>Warrick, J. A., Rubin, D. M., Ruggiero, P., Harney, J. N., Draut, A. E., and
Buscombe, D.: Cobble cam: grain-size measurements of sand to boulder from
digital photographs and autocorrelation analyses, Earth Surf. Proc.
Land., 34, 1811–1821, <ext-link xlink:href="https://doi.org/10.1002/esp.1877" ext-link-type="DOI">10.1002/esp.1877</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx66"><label>Westoby et al.(2015)</label><?label westoby2015?><mixed-citation>Westoby, M. J., Dunning, S. A., Woodward, J., Hein, A. S., Marrero, S. M.,
Winter, K., and Sugden, D. E.: Sedimentological characterization of Antarctic
moraines using UAVs and Structure-from-Motion photogrammetry, J.
Glaciol., 61, 1088–1102, <ext-link xlink:href="https://doi.org/10.3189/2015JoG15J086" ext-link-type="DOI">10.3189/2015JoG15J086</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx67"><label>Wohl et al.(1996)</label><?label wohl1996?><mixed-citation>Wohl, E. E., Anthony, D. J., Madsen, S. W., and Thompson, D. M.: A comparison
of surface sampling methods for coarse fluvial sediments, Water Resour.
Res., 32, 3219–3226, <ext-link xlink:href="https://doi.org/10.1029/96WR01527" ext-link-type="DOI">10.1029/96WR01527</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx68"><label>Wolcott and Church(1991)</label><?label wolcott1991?><mixed-citation>Wolcott, J. and Church, M.: Strategies for sampling spatially heterogeneous
phenomena; the example of river gravels, J. Sediment. Res., 61,
534–543, <ext-link xlink:href="https://doi.org/10.1306/D4267753-2B26-11D7-8648000102C1865D" ext-link-type="DOI">10.1306/D4267753-2B26-11D7-8648000102C1865D</ext-link>, 1991.</mixed-citation></ref>
      <ref id="bib1.bibx69"><label>Wolman(1954)</label><?label wolman1954?><mixed-citation>Wolman, M. G.: A method of sampling coarse river-bed material, Eos,
Transactions American Geophysical Union, 35, 951–956,
<ext-link xlink:href="https://doi.org/10.1029/TR035i006p00951" ext-link-type="DOI">10.1029/TR035i006p00951</ext-link>, 1954.</mixed-citation></ref>
      <ref id="bib1.bibx70"><label>Woodget and Austrums(2017)</label><?label woodget2017?><mixed-citation>Woodget, A. S. and Austrums, R.: Subaerial gravel size measurement using
topographic data derived from a UAV-SfM approach, Earth Surf. Proc.
Land., 42, 1434–1443, <ext-link xlink:href="https://doi.org/10.1002/esp.4139" ext-link-type="DOI">10.1002/esp.4139</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx71"><label>Woodget et al.(2018)</label><?label woodget2018?><mixed-citation>Woodget, A. S., Fyffe, C., and Carbonneau, P. E.: From manned to unmanned
aircraft: Adapting airborne particle size mapping methodologies to the
characteristics of sUAS and SfM, Earth Surf. Proc. Land., 43,
857–870, <ext-link xlink:href="https://doi.org/10.1002/esp.4285" ext-link-type="DOI">10.1002/esp.4285</ext-link>, 2018.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>Introducing <i>PebbleCounts</i>: a grain-sizing tool for photo surveys of dynamic gravel-bed rivers</article-title-html>
<abstract-html><p>Grain-size distributions are a key geomorphic metric of gravel-bed rivers. Traditional measurement methods include manual counting or photo sieving, but these are achievable only at the 1–10&thinsp;m<sup>2</sup> scale. With the advent of drones and increasingly high-resolution cameras, we can now generate orthoimagery over hectares at millimeter to centimeter resolution. These scales, along with the complexity of high-mountain rivers, necessitate different approaches for photo sieving. As opposed to other image segmentation methods that use a watershed approach, our open-source algorithm, <i>PebbleCounts</i>, relies on <i>k</i>-means clustering in the spatial and spectral domain and rapid manual selection of well-delineated grains. This improves grain-size estimates for complex riverbed imagery, without post-processing. We also develop a fully automated method, <i>PebbleCountsAuto</i>, that relies on edge detection and filtering suspect grains, without the <i>k</i>-means clustering or manual selection steps. The algorithms are tested in controlled indoor conditions on three arrays of pebbles and then applied to 12&thinsp; × &thinsp;1&thinsp;m<sup>2</sup> orthomosaic clips of high-energy mountain rivers collected with a camera-on-mast setup (akin to a low-flying drone). A 20-pixel <i>b</i>-axis length lower truncation is necessary for attaining accurate grain-size distributions. For the <i>k</i>-means <i>PebbleCounts</i> approach, average percentile bias and precision are 0.03 and 0.09 <i>ψ</i>, respectively, for  ∼ 1.16&thinsp;mm&thinsp;pixel<sup>−1</sup> images, and 0.07 and 0.05 <i>ψ</i> for one 0.32&thinsp;mm&thinsp;pixel<sup>−1</sup> image. The automatic approach has higher bias and precision of 0.13 and 0.15 <i>ψ</i>, respectively, for  ∼ 1.16&thinsp;mm&thinsp;pixel<sup>−1</sup> images, but similar values of −0.06 and 0.05 <i>ψ</i> for one 0.32&thinsp;mm&thinsp;pixel<sup>−1</sup> image. For the automatic approach, only at best 70&thinsp;% of the grains are correct identifications, and typically around 50&thinsp;%. <i>PebbleCounts</i> operates most effectively at the 1&thinsp;m<sup>2</sup> patch scale, where it can be applied in  ∼ 5–10&thinsp;min on many patches to acquire accurate grain-size data over 10–100&thinsp;m<sup>2</sup> areas. These data can be used to validate <i>PebbleCountsAuto</i>, which may be applied at the scale of entire survey sites (10<sup>2</sup>–10<sup>4</sup>&thinsp;m<sup>2</sup>). We synthesize results and recommend best practices for image collection, orthomosaic generation, and grain-size measurement using both algorithms.</p></abstract-html>
<ref-html id="bib1.bib1"><label>Agisoft(2018)</label><mixed-citation>
Agisoft: AgiSoft PhotoScan Professional, available at: <a href="http://www.agisoft.com/downloads/installer/" target="_blank">http://www.agisoft.com/downloads/installer/</a> (last access: 12 September 2019), 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Attal and Lavé(2006)</label><mixed-citation>
Attal, M. and Lavé, J.: Changes of bedload characteristics along the
Marsyandi River (central Nepal): Implications for understanding hillslope
sediment supply, sediment load evolution along fluvial networks, and
denudation in active orogenic belts, Geol. S. Am. S., 398, 143–171, <a href="https://doi.org/10.1130/2006.2398(09)" target="_blank">https://doi.org/10.1130/2006.2398(09)</a>, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Attal et al.(2015)</label><mixed-citation>
Attal, M., Mudd, S. M., Hurst, M. D., Weinman, B., Yoo, K., and Naylor, M.: Impact of change in erosion rate and landscape steepness on hillslope and fluvial sediments grain size in the Feather River basin (Sierra Nevada, California), Earth Surf. Dynam., 3, 201–222, <a href="https://doi.org/10.5194/esurf-3-201-2015" target="_blank">https://doi.org/10.5194/esurf-3-201-2015</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Bertin and Friedrich(2016)</label><mixed-citation>
Bertin, S. and Friedrich, H.: Field application of close-range digital
photogrammetry (CRDP) for grain-scale fluvial morphology studies, Earth
Surf. Proc. Land., 41, 1358–1369, <a href="https://doi.org/10.1002/esp.3906" target="_blank">https://doi.org/10.1002/esp.3906</a>,
2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Bertin et al.(2017)</label><mixed-citation>
Bertin, S., Groom, J., and Friedrich, H.: Isolating roughness scales of
gravel-bed patches, Water Resour. Res., 53, 6841–6856,
<a href="https://doi.org/10.1002/2016WR020205" target="_blank">https://doi.org/10.1002/2016WR020205</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Bookhagen and Strecker(2012)</label><mixed-citation>
Bookhagen, B. and Strecker, M. R.: Spatiotemporal trends in erosion rates
across a pronounced rainfall gradient: Examples from the southern Central
Andes, Earth Planet. Sc. Lett., 327–328, 97–110,
<a href="https://doi.org/10.1016/j.epsl.2012.02.005" target="_blank">https://doi.org/10.1016/j.epsl.2012.02.005</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Brasington et al.(2012)</label><mixed-citation>
Brasington, J., Vericat, D., and Rychkov, I.: Modeling river bed morphology,
roughness, and surface sedimentology using high resolution terrestrial laser
scanning, Water Resour. Res., 48, W11519, <a href="https://doi.org/10.1029/2012WR012223" target="_blank">https://doi.org/10.1029/2012WR012223</a>,
2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Buades et al.(2011)</label><mixed-citation>
Buades, A., Coll, B., and Morel, J.-M.: Non-Local Means Denoising, Image
Processing On Line, 1, 208–212, <a href="https://doi.org/10.5201/ipol.2011.bcm_nlm" target="_blank">https://doi.org/10.5201/ipol.2011.bcm_nlm</a>, 2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Bunte and Abt(2001)</label><mixed-citation>
Bunte, K. and Abt, S. T.: Sampling surface and subsurface particle-size
distributions in wadable gravel- and cobble-bed streams for analyses in
sediment transport, hydraulics and streambed monitoring, Tech. rep., US
Forest Service, Rocky Mountain Research Station, Fort Collins, CO,
<a href="https://doi.org/10.2737/RMRS-GTR-74" target="_blank">https://doi.org/10.2737/RMRS-GTR-74</a>, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Buscombe(2013)</label><mixed-citation>
Buscombe, D.: Transferable wavelet method for grain-size distribution from
images of sediment surfaces and thin sections, and other natural granular
patterns, Sedimentology, 60, 1709–1732, <a href="https://doi.org/10.1111/sed.12049" target="_blank">https://doi.org/10.1111/sed.12049</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Buscombe et al.(2010)</label><mixed-citation>
Buscombe, D., Rubin, D. M., and Warrick, J. A.: A universal approximation of
grain size from images of noncohesive sediment, J. Geophys.
Res.-Earth, 115, F02015, <a href="https://doi.org/10.1029/2009JF001477" target="_blank">https://doi.org/10.1029/2009JF001477</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Butler et al.(2001)</label><mixed-citation>
Butler, J. B., Lane, S. N., and Chandler, J. H.: Automated extraction of
grain-size data from gravel surfaces using digital image processing, J. Hydraul. Res., 39, 519–529, <a href="https://doi.org/10.1080/00221686.2001.9628276" target="_blank">https://doi.org/10.1080/00221686.2001.9628276</a>,
2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Carbonneau(2005)</label><mixed-citation>
Carbonneau, P. E.: The threshold effect of image resolution on image-based
automated grain size mapping in fluvial environments, Earth Surf. Proc. Land., 30, 1687–1693, <a href="https://doi.org/10.1002/esp.1288" target="_blank">https://doi.org/10.1002/esp.1288</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Carbonneau and Dietrich(2017)</label><mixed-citation>
Carbonneau, P. E. and Dietrich, J. T.: Cost-effective non-metric photogrammetry from consumer-grade sUAS: implications for direct georeferencing of structure from motion photogrammetry, Earth Surf. Proc. Land., 42, 473–486, <a href="https://doi.org/10.1002/esp.4012" target="_blank">https://doi.org/10.1002/esp.4012</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Carbonneau et al.(2003)</label><mixed-citation>
Carbonneau, P. E., Lane, S. N., and Bergeron, N. E.: Cost-effective non-metric
close-range digital photogrammetry and its application to a study of coarse
gravel river beds, Int. J. Remote Sens., 24, 2837–2854,
<a href="https://doi.org/10.1080/01431160110108364" target="_blank">https://doi.org/10.1080/01431160110108364</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Carbonneau et al.(2004)</label><mixed-citation>
Carbonneau, P. E., Lane, S. N., and Bergeron, N. E.: Catchment-scale mapping of surface grain size in gravel bed rivers using airborne digital imagery, Water Resour. Res., 40, W07202, <a href="https://doi.org/10.1029/2003WR002759" target="_blank">https://doi.org/10.1029/2003WR002759</a>, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Carbonneau et al.(2018)</label><mixed-citation>
Carbonneau, P. E., Bizzi, S., and Marchetti, G.: Robotic photosieving from
low-cost multirotor sUAS: a proof-of-concept, Earth Surf. Proc.
Land., 43, 1160–1166, <a href="https://doi.org/10.1002/esp.4298" target="_blank">https://doi.org/10.1002/esp.4298</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Castino et al.(2016)</label><mixed-citation>
Castino, F., Bookhagen, B., and Strecker, M.: River-discharge dynamics in the
Southern Central Andes and the 1976–77 global climate shift, Geophys.
Res. Lett., 43, 11679–11687, <a href="https://doi.org/10.1002/2016GL070868" target="_blank">https://doi.org/10.1002/2016GL070868</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Castino et al.(2017)</label><mixed-citation>
Castino, F., Bookhagen, B., and Strecker, M. R.: Oscillations and trends of
river discharge in the southern Central Andes and linkages with climate
variability, J. Hydrol., 555, 108–124,
<a href="https://doi.org/10.1016/j.jhydrol.2017.10.001" target="_blank">https://doi.org/10.1016/j.jhydrol.2017.10.001</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Chatanantavet et al.(2010)</label><mixed-citation>
Chatanantavet, P., Lajeunesse, E., Parker, G., Malverti, L., and Meunier, P.:
Physically based model of downstream fining in bedrock streams with lateral
input, Water Resour. Res., 46, W02518, <a href="https://doi.org/10.1029/2008WR007208" target="_blank">https://doi.org/10.1029/2008WR007208</a>,
2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Church et al.(1998)</label><mixed-citation>
Church, M., Hassan, M. A., and Wolcott, J. F.: Stabilizing self-organized
structures in gravel-bed stream channels: Field and experimental
observations, Water Resour. Res., 34, 3169–3179,
<a href="https://doi.org/10.1029/98WR00484" target="_blank">https://doi.org/10.1029/98WR00484</a>, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>de Haas et al.(2014)</label><mixed-citation>
de Haas, T., Ventra, D., Carbonneau, P. E., and Kleinhans, M. G.: Debris-flow
dominance of alluvial fans masked by runoff reworking and weathering,
Geomorphology, 217, 165–181, <a href="https://doi.org/10.1016/j.geomorph.2014.04.028" target="_blank">https://doi.org/10.1016/j.geomorph.2014.04.028</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Detert and Weitbrecht(2012)</label><mixed-citation>
Detert, M. and Weitbrecht, V.: Automatic object detection to analyze the
geometry of gravel grains – a free stand-alone tool, in: River flow 2012:
Proceedings of the international conference on fluvial hydraulics, San José,
Costa Rica, 5–7 September 2012,  595–600, Taylor &amp; Francis Group,
London, UK, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Dugdale et al.(2010)</label><mixed-citation>
Dugdale, S. J., Carbonneau, P. E., and Campbell, D.: Aerial photosieving of
exposed gravel bars for the rapid calibration of airborne grain size maps,
Earth Surf. Proc. Land., 35, 627–639, <a href="https://doi.org/10.1002/esp.1936" target="_blank">https://doi.org/10.1002/esp.1936</a>,
2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Dunne and Jerolmack(2018)</label><mixed-citation>
Dunne, K. B. J. and Jerolmack, D. J.: Evidence of, and a proposed explanation for, bimodal transport states in alluvial rivers, Earth Surf. Dynam., 6, 583–594, <a href="https://doi.org/10.5194/esurf-6-583-2018" target="_blank">https://doi.org/10.5194/esurf-6-583-2018</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Eltner et al.(2016)</label><mixed-citation>
Eltner, A., Kaiser, A., Castillo, C., Rock, G., Neugirg, F., and Abellán, A.: Image-based surface reconstruction in geomorphometry – merits, limits and developments, Earth Surf. Dynam., 4, 359–389, <a href="https://doi.org/10.5194/esurf-4-359-2016" target="_blank">https://doi.org/10.5194/esurf-4-359-2016</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Ferguson et al.(1996)</label><mixed-citation>
Ferguson, R., Hoey, T., Wathen, S., and Werritty, A.: Field evidence for rapid downstream fining of river gravels through selective transport, Geology, 24, 179–182, <a href="https://doi.org/10.1130/0091-7613(1996)024&lt;0179:FEFRDF&gt;2.3.CO;2" target="_blank">https://doi.org/10.1130/0091-7613(1996)024&lt;0179:FEFRDF&gt;2.3.CO;2</a>, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Fripp and Diplas(1993)</label><mixed-citation>
Fripp, J. B. and Diplas, P.: Surface Sampling in Gravel Streams, J.
Hydraul. Eng., 119, 473–490,
<a href="https://doi.org/10.1061/(ASCE)0733-9429(1993)119:4(473)" target="_blank">https://doi.org/10.1061/(ASCE)0733-9429(1993)119:4(473)</a>, 1993.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Gomez et al.(2001)</label><mixed-citation>
Gomez, B., Rosser, B. J., Peacock, D. H., Hicks, D. M., and Palmer, J. A.:
Downstream fining in a rapidly aggrading gravel bed river, Water Resour.
Res., 37, 1813–1823, <a href="https://doi.org/10.1029/2001WR900007" target="_blank">https://doi.org/10.1029/2001WR900007</a>, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Graham et al.(2005a)</label><mixed-citation>
Graham, D. J., Reid, I., and Rice, S. P.: Automated Sizing of Coarse-Grained
Sediments: Image-Processing Procedures, Math. Geol., 37, 1–28,
<a href="https://doi.org/10.1007/s11004-005-8745-x" target="_blank">https://doi.org/10.1007/s11004-005-8745-x</a>, 2005a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Graham et al.(2005b)</label><mixed-citation>
Graham, D. J., Rice, S. P., and Reid, I.: A transferable method for the
automated grain sizing of river gravels, Water Resour. Res., 41,
W07020, <a href="https://doi.org/10.1029/2004WR003868" target="_blank">https://doi.org/10.1029/2004WR003868</a>, 2005b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Graham et al.(2010)</label><mixed-citation>
Graham, D. J., Rollet, A.-J., Piégay, H., and Rice, S. P.: Maximizing the
accuracy of image-based surface sediment sampling techniques, Water Resour.
Res., 46, W02508, <a href="https://doi.org/10.1029/2008WR006940" target="_blank">https://doi.org/10.1029/2008WR006940</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Grant(2012)</label><mixed-citation>
Grant, G. E.: The Geomorphic Response of Gravel-Bed Rivers to Dams:
Perspectives and Prospects, chap. 15, 165–181, Wiley-Blackwell,
<a href="https://doi.org/10.1002/9781119952497.ch15" target="_blank">https://doi.org/10.1002/9781119952497.ch15</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Haralick et al.(1973)</label><mixed-citation>
Haralick, R. M., Shanmugam, K., and Dinstein, I.: Textural Features for Image
Classification, IEEE T. Syst. Man Cyb., SMC-3,
610–621, <a href="https://doi.org/10.1109/TSMC.1973.4309314" target="_blank">https://doi.org/10.1109/TSMC.1973.4309314</a>, 1973.
</mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Höhle and Höhle(2009)</label><mixed-citation>
Höhle, J. and Höhle, M.: Accuracy assessment of digital elevation
models by means of robust statistical methods, ISPRS J.
Photogramm., 64, 398–406,
<a href="https://doi.org/10.1016/j.isprsjprs.2009.02.003" target="_blank">https://doi.org/10.1016/j.isprsjprs.2009.02.003</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Ibbeken and Schleyer(1986)</label><mixed-citation>
Ibbeken, H. and Schleyer, R.: Photo-sieving: A method for grain-size analysis
of coarse-grained, unconsolidated bedding surfaces, Earth Surf. Proc.
Land., 11, 59–77, <a href="https://doi.org/10.1002/esp.3290110108" target="_blank">https://doi.org/10.1002/esp.3290110108</a>, 1986.
</mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>James and Robson(2014)</label><mixed-citation>
James, M. R. and Robson, S.: Mitigating systematic error in topographic models derived from UAV and ground-based image networks, Earth Surf. Proc. Land., 39, 1413–1420, <a href="https://doi.org/10.1002/esp.3609" target="_blank">https://doi.org/10.1002/esp.3609</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Kellerhals and Bray(1971)</label><mixed-citation>
Kellerhals, R. and Bray, D. I.: Sampling procedures for coarse fluvial
sediments, J. Hydr. Eng. Div.-ASCE, 97, 1165–1180, 1971.
</mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Kondolf(1997)</label><mixed-citation>
Kondolf, G. M.: PROFILE: hungry water: effects of dams and gravel mining on
river channels, Environ. Manage., 21, 533–551,
<a href="https://doi.org/10.1007/s002679900048" target="_blank">https://doi.org/10.1007/s002679900048</a>, 1997.
</mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Kondolf and Wolman(1993)</label><mixed-citation>
Kondolf, G. M. and Wolman, M. G.: The sizes of salmonid spawning gravels, Water Resour. Res., 29, 2275–2285, <a href="https://doi.org/10.1029/93WR00402" target="_blank">https://doi.org/10.1029/93WR00402</a>, 1993.
</mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Lamb and Venditti(2016)</label><mixed-citation>
Lamb, M. P. and Venditti, J. G.: The grain size gap and abrupt gravel-sand
transitions in rivers due to suspension fallout, Geophys. Res.
Lett., 43, 3777–3785, <a href="https://doi.org/10.1002/2016GL068713" target="_blank">https://doi.org/10.1002/2016GL068713</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Langhammer et al.(2017)</label><mixed-citation>
Langhammer, J., Lendzioch, T., Miřijovský, J., and Hartvich, F.: UAV-Based
Optical Granulometry as Tool for Detecting Changes in Structure of Flood
Depositions, Remote Sensing, 9, 240, <a href="https://doi.org/10.3390/rs9030240" target="_blank">https://doi.org/10.3390/rs9030240</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Lloyd(1982)</label><mixed-citation>
Lloyd, S.: Least squares quantization in PCM, IEEE T. Inform. Theory, 28, 129–137, <a href="https://doi.org/10.1109/TIT.1982.1056489" target="_blank">https://doi.org/10.1109/TIT.1982.1056489</a>, 1982.
</mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Otsu(1979)</label><mixed-citation>
Otsu, N.: A Threshold Selection Method from Gray-Level Histograms, IEEE
T. Syst. Man Cyb., 9, 62–66,
<a href="https://doi.org/10.1109/TSMC.1979.4310076" target="_blank">https://doi.org/10.1109/TSMC.1979.4310076</a>, 1979.
</mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Paola et al.(1992)</label><mixed-citation>
Paola, C., Parker, G., Seal, R., Sinha, S. K., Southard, J. B., and Wilcock,
P. R.: Downstream Fining by Selective Deposition in a Laboratory Flume,
Science, 258, 1757–1760, <a href="https://doi.org/10.1126/science.258.5089.1757" target="_blank">https://doi.org/10.1126/science.258.5089.1757</a>, 1992.
</mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Parker et al.(1982)</label><mixed-citation>
Parker, G., Klingeman, P. C., and McLean, D. G.: Bedload and size distribution
in paved gravel-bed streams, J. Hydr. Eng. Div.-ASCE, 108,
544–571, 1982.
</mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Pearson et al.(2017)</label><mixed-citation>
Pearson, E., Smith, M., Klaar, M., and Brown, L.: Can high resolution 3D
topographic surveys provide reliable grain size estimates in gravel bed
rivers?, Geomorphology, 293, 143–155, <a href="https://doi.org/10.1016/j.geomorph.2017.05.015" target="_blank">https://doi.org/10.1016/j.geomorph.2017.05.015</a>,
2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Purinton and Bookhagen(2018)</label><mixed-citation>
Purinton, B. and Bookhagen, B.: Measuring decadal vertical land-level changes from SRTM-C (2000) and TanDEM-X ( ∼  2015) in the south-central Andes, Earth Surf. Dynam., 6, 971–987, <a href="https://doi.org/10.5194/esurf-6-971-2018" target="_blank">https://doi.org/10.5194/esurf-6-971-2018</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Purinton and Bookhagen(2019)</label><mixed-citation>
Purinton, B. and Bookhagen, B.: PebbleCounts: a Python grain-sizing algorithm
for gravel-bed river imagery, <a href="https://doi.org/10.5880/fidgeo.2019.007" target="_blank">https://doi.org/10.5880/fidgeo.2019.007</a>, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Rice and Church(1996)</label><mixed-citation>
Rice, S. and Church, M.: Sampling surficial fluvial gravels; the precision of
size distribution percentile sediments, J. Sediment. Res., 66,
654, <a href="https://doi.org/10.2110/jsr.66.654" target="_blank">https://doi.org/10.2110/jsr.66.654</a>, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Rice and Church(1998)</label><mixed-citation>
Rice, S. and Church, M.: Grain size along two gravel-bed rivers: statistical
variation, spatial pattern and sedimentary links, Earth Surf. Proc.
Land., 23, 345–363,
<a href="https://doi.org/10.1002/(SICI)1096-9837(199804)23:4&lt;345::AID-ESP850&gt;3.0.CO;2-B" target="_blank">https://doi.org/10.1002/(SICI)1096-9837(199804)23:4&lt;345::AID-ESP850&gt;3.0.CO;2-B</a>, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Rubin(2004)</label><mixed-citation>
Rubin, D. M.: A Simple Autocorrelation Algorithm for Determining Grain Size
from Digital Images of Sediment, J. Sediment. Res., 74, 160,
<a href="https://doi.org/10.1306/052203740160" target="_blank">https://doi.org/10.1306/052203740160</a>, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Russ(2002)</label><mixed-citation>
Russ, J. C.: The image processing handbook, fourth edition, CRC press, Boca Raton, Florida, USA, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Rychkov et al.(2012)</label><mixed-citation>
Rychkov, I., Brasington, J., and Vericat, D.: Computational and methodological aspects of terrestrial surface analysis based on point clouds, Comput. Geosci., 42, 64–70, <a href="https://doi.org/10.1016/j.cageo.2012.02.011" target="_blank">https://doi.org/10.1016/j.cageo.2012.02.011</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Sculley(2010)</label><mixed-citation>
Sculley, D.: Web-scale <i>K</i>-means Clustering, in: Proceedings of the 19th
International Conference on World Wide Web, 1177–1178, ACM, New York,
NY, USA, <a href="https://doi.org/10.1145/1772690.1772862" target="_blank">https://doi.org/10.1145/1772690.1772862</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib56"><label>Shields(1936)</label><mixed-citation>
Shields, A.: Anwendung der Aehnlichkeitsmechanik und der Turbulenzforschung auf
die Geschiebebewegung, PhD thesis, Technical University Berlin,  Berlin, Germany, 1936.
</mixed-citation></ref-html>
<ref-html id="bib1.bib57"><label>Sime and Ferguson(2003)</label><mixed-citation>
Sime, L. and Ferguson, R.: Information on Grain Sizes in Gravel-Bed Rivers by
Automated Image Analysis, J. Sediment. Res., 73, 630,
<a href="https://doi.org/10.1306/112102730630" target="_blank">https://doi.org/10.1306/112102730630</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib58"><label>Sklar et al.(2006)</label><mixed-citation>
Sklar, L. S., Dietrich, W. E., Foufoula-Georgiou, E., Lashermes, B., and
Bellugi, D.: Do gravel bed river size distributions record channel network
structure?, Water Resour. Res., 42, W06D18, <a href="https://doi.org/10.1029/2006WR005035" target="_blank">https://doi.org/10.1029/2006WR005035</a>,
2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib59"><label>Smith et al.(2015)</label><mixed-citation>
Smith, M., Carrivick, J., and Quincey, D.: Structure from motion photogrammetry in physical geography, Prog. Phys. Geog., 40, 247–275, <a href="https://doi.org/10.1177/0309133315615805" target="_blank">https://doi.org/10.1177/0309133315615805</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib60"><label>Tofelde et al.(2017)</label><mixed-citation>
Tofelde, S., Schildgen, T. F., Savi, S., Pingel, H., Wickert, A. D., Bookhagen,
B., Wittmann, H., Alonso, R. N., Cottle, J., and Strecker, M. R.: 100&thinsp;kyr
fluvial cut-and-fill terrace cycles since the Middle Pleistocene in the
southern Central Andes, NW Argentina, Earth Planet. Sc. Lett.,
473, 141–153, <a href="https://doi.org/10.1016/j.epsl.2017.06.001" target="_blank">https://doi.org/10.1016/j.epsl.2017.06.001</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib61"><label>Tomasi and Manduchi(1998)</label><mixed-citation>
Tomasi, C. and Manduchi, R.: Bilateral filtering for gray and color images, in: Sixth International Conference on Computer Vision (IEEE Cat. No.98CH36271), 839–846, <a href="https://doi.org/10.1109/ICCV.1998.710815" target="_blank">https://doi.org/10.1109/ICCV.1998.710815</a>, Bombay, India, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib62"><label>Verdú et al.(2005)</label><mixed-citation>
Verdú, J. M., Batalla, R. J., and Martínez-Casasnovas, J. A.: High-resolution
grain-size characterisation of gravel bars using imagery analysis and
geo-statistics, Geomorphology, 72, 73–93,
<a href="https://doi.org/10.1016/j.geomorph.2005.04.015" target="_blank">https://doi.org/10.1016/j.geomorph.2005.04.015</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib63"><label>Verma and Bourke(2019)</label><mixed-citation>
Verma, A. K. and Bourke, M. C.: A method based on structure-from-motion photogrammetry to generate sub-millimetre-resolution digital elevation models for investigating rock breakdown features, Earth Surf. Dynam., 7, 45–66, <a href="https://doi.org/10.5194/esurf-7-45-2019" target="_blank">https://doi.org/10.5194/esurf-7-45-2019</a>, 2019.

</mixed-citation></ref-html>
<ref-html id="bib1.bib64"><label>Ward(1963)</label><mixed-citation>
Ward, J. H.: Hierarchical Grouping to Optimize an Objective Function, J. Am. Stat. Assoc., 58, 236–244,
<a href="https://doi.org/10.1080/01621459.1963.10500845" target="_blank">https://doi.org/10.1080/01621459.1963.10500845</a>, 1963.
</mixed-citation></ref-html>
<ref-html id="bib1.bib65"><label>Warrick et al.(2009)</label><mixed-citation>
Warrick, J. A., Rubin, D. M., Ruggiero, P., Harney, J. N., Draut, A. E., and
Buscombe, D.: Cobble cam: grain-size measurements of sand to boulder from
digital photographs and autocorrelation analyses, Earth Surf. Proc.
Land., 34, 1811–1821, <a href="https://doi.org/10.1002/esp.1877" target="_blank">https://doi.org/10.1002/esp.1877</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib66"><label>Westoby et al.(2015)</label><mixed-citation>
Westoby, M. J., Dunning, S. A., Woodward, J., Hein, A. S., Marrero, S. M.,
Winter, K., and Sugden, D. E.: Sedimentological characterization of Antarctic
moraines using UAVs and Structure-from-Motion photogrammetry, J.
Glaciol., 61, 1088–1102, <a href="https://doi.org/10.3189/2015JoG15J086" target="_blank">https://doi.org/10.3189/2015JoG15J086</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib67"><label>Wohl et al.(1996)</label><mixed-citation>
Wohl, E. E., Anthony, D. J., Madsen, S. W., and Thompson, D. M.: A comparison
of surface sampling methods for coarse fluvial sediments, Water Resour.
Res., 32, 3219–3226, <a href="https://doi.org/10.1029/96WR01527" target="_blank">https://doi.org/10.1029/96WR01527</a>, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib68"><label>Wolcott and Church(1991)</label><mixed-citation>
Wolcott, J. and Church, M.: Strategies for sampling spatially heterogeneous
phenomena; the example of river gravels, J. Sediment. Res., 61,
534–543, <a href="https://doi.org/10.1306/D4267753-2B26-11D7-8648000102C1865D" target="_blank">https://doi.org/10.1306/D4267753-2B26-11D7-8648000102C1865D</a>, 1991.
</mixed-citation></ref-html>
<ref-html id="bib1.bib69"><label>Wolman(1954)</label><mixed-citation>
Wolman, M. G.: A method of sampling coarse river-bed material, Eos,
Transactions American Geophysical Union, 35, 951–956,
<a href="https://doi.org/10.1029/TR035i006p00951" target="_blank">https://doi.org/10.1029/TR035i006p00951</a>, 1954.
</mixed-citation></ref-html>
<ref-html id="bib1.bib70"><label>Woodget and Austrums(2017)</label><mixed-citation>
Woodget, A. S. and Austrums, R.: Subaerial gravel size measurement using
topographic data derived from a UAV-SfM approach, Earth Surf. Proc.
Land., 42, 1434–1443, <a href="https://doi.org/10.1002/esp.4139" target="_blank">https://doi.org/10.1002/esp.4139</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib71"><label>Woodget et al.(2018)</label><mixed-citation>
Woodget, A. S., Fyffe, C., and Carbonneau, P. E.: From manned to unmanned
aircraft: Adapting airborne particle size mapping methodologies to the
characteristics of sUAS and SfM, Earth Surf. Proc. Land., 43,
857–870, <a href="https://doi.org/10.1002/esp.4285" target="_blank">https://doi.org/10.1002/esp.4285</a>, 2018.
</mixed-citation></ref-html>--></article>
