remote sensing

Article Freshwater Fish Habitat Complexity Mapping Using Above and Underwater Structure-From-Motion Photogrammetry

Margaret Kalacska 1,*, Oliver Lucanus 2, Leandro Sousa 2, Thiago Vieira 2 and Juan Pablo Arroyo-Mora 3

1 Department of Geography, Applied Remote Sensing Lab, McGill University, Montreal, QC H3A 0B9, Canada 2 Laboratório de Ictiologia de Altamira, Universidade Federal do Pará, Altamira, PA 68372-040, Brazil; [email protected] (O.L.); [email protected] (L.S.); [email protected] (T.V.) 3 Flight Research Lab, National Research Council Canada, Ottawa, ON K1A 0R6, Canada; [email protected] * Correspondence: [email protected]

 Received: 28 September 2018; Accepted: 28 November 2018; Published: 29 November 2018 

Abstract: Substrate complexity is strongly related to biodiversity in aquatic habitats. We illustrate a novel framework, based on Structure-from-Motion photogrammetry (SfM) and Multi-View Stereo (MVS) photogrammetry, to quantify habitat complexity in freshwater ecosystems from Unmanned Aerial Vehicle (UAV) and underwater photography. We analysed sites in the Xingu river basin, Brazil, to reconstruct the 3D structure of the substrate and identify and map habitat classes important for maintaining fish assemblage biodiversity. From the digital models we calculated habitat complexity metrics including rugosity, slope and 3D fractal dimension. The UAV based SfM-MVS products were generated at a ground sampling distance (GSD) of 1.20–2.38 cm while the underwater photography produced a GSD of 1 mm. Our results show how these products provide spatially explicit complexity metrics, which are more comprehensive than conventional arbitrary cross sections. Shallow neural network classification of SfM-MVS products of substrate exposed in the dry season resulted in high accuracies across classes. UAV and underwater SfM-MVS is robust for quantifying freshwater habitat classes and complexity and should be chosen whenever possible over conventional methods (e.g., chain-and-tape) because of the repeatability, scalability and multi-dimensional nature of the products. The SfM-MVS products can be used to identify high priority freshwater sectors for conservation, occurrences and diversity studies to provide a broader indication for overall fish species diversity and provide repeatability for monitoring change over time.

Keywords: Brazil; fractal dimension; neural network; river; rugosity; UAV; underwater; Xingu river

1. Introduction In community ecology there are several theories to explain the distribution of species across environmental gradients. For instance, niche theory describes an n-dimensional hyper-volume of conditions and resources in which populations have a positive growth rate [1]. To understand species distributions along environmental gradients using niche theory is challenging however, because a niche is partitioned into conditions (e.g., habitat characteristics) and resources (e.g., food availability) and results will vary according to the methods used to quantify the habitat characteristics [2]. Remote sensing provides opportunities to characterize aquatic habitat structures with repeatability and robust quantitative metrics. At large spatial scales, freely available satellite imagery has been used to map river networks at scales from individual rivers or basins to the entire globe [3,4]. However,

Remote Sens. 2018, 10, 1912; doi:10.3390/rs10121912 www.mdpi.com/journal/remotesensing Remote Sens. 2018, 10, 1912 2 of 28 at small scales, satellite imagery with fine spatial resolution (<5 m) is expensive and not always available for specific sites on the optimal date(s) due to cloud cover (especially in the tropics) or satellite revisit times. The recent developments in unmanned aerial vehicle (UAV) platforms for ecological applications [5–7] are revolutionizing the way ecological variables can be mapped at the spatial and temporal scales needed for community ecology and environmental studies. In terrestrial environments, UAV based photography [8–10] and Structure from Motion (SfM) with multi-view stereo (MVS) photogrammetry to produce 3D reconstructions of landscapes is increasingly popular [11,12]. In a strict sense our use of the term SfM refers to an analytical workflow that combines both SfM and MVS photogrammetry often followed by interpolation and in some cases textured mesh generation as described in Reference [13] but use SfM-MVS throughout for brevity. When correctly implemented, UAV SfM-MVS products have high spatial accuracy, even to within the error of differential GPS measurements [13–17]. The landscape reconstructions from SfM-MVS are also much higher spatial resolution (<1–5 cm) than conventional satellite imagery used to assess land cover change. Recently, SfM-MVS from underwater photography and videography has been used to model coral specimens [18], reefs [19–23] and vertical wall marine environments [24] with relatively high accuracies [21]. It has also been shown to be a powerful analytical approach for deep sea applications of terrain and object reconstruction [25]. In freshwater fluvial ecosystems, UAV SfM-MVS has been used to derive submerged digital elevation models and reach-scale morphology [26,27]. However, to the best of our knowledge, SfM-MVS (from UAV or underwater photography) has not yet been explored for freshwater fish habitat complexity characterization. Biodiversity is strongly related to habitat structural complexity in both marine and freshwater environments [28–34]. While several definitions of habitat complexity have been used interchangeably with heterogeneity and diversity [35], in this study, we refer to habitat diversity as the variety of substrate types (e.g., sand, pebbles, boulders, bedrock) and heterogeneity as the magnitude of substrate diversity within a study site such as patches of sand interspersed with rocks versus homogenous sand. We further refer to complexity as the heterogeneity in the arrangement of substrate types within the habitat [36,37]. Metrics for quantifying aquatic habitat complexity and diversity include rugosity [32,38,39], spatial autocorrelation [40], fractal geometry [23,35,41], grain size [34], corrugation [42], current velocity [43], optical intensity [32], slope and aspect [44,45]. In freshwater ecology, most studies use either low-tech methods (e.g., chain-and-tape) or proxies (e.g., abundance of macrophytes, submerged vegetation) to infer habitat complexity [37,46–49]. The simple and subjective sampling methods (e.g., chain-and-tape) are time consuming, labour intensive and importantly, non-spatially extensive [23,50]. With the chain-and-tape method, a rope or chain is draped over the substrate profile and its length is measured and compared to the linear distance measured over the transect to produce a ‘substrate rugosity index’ (SRI) [51]. It is one of the most commonly used methods to quantify aquatic habitat complexity despite its well-known weaknesses [37,51]. For this reason, in marine environments, the SRI has been shown to be less accurate than digital 3D reconstructions of the habitat structures [18,23,50]. In freshwater ecosystems, distinguishing complexity and diversity among substrate profiles (a weakness of the SRI) is of fundamental importance to the aquatic biodiversity that inhabit only certain habitat types (e.g., large boulders vs. sand). In this study, our goals are to illustrate the utility of SfM-MVS from UAV and underwater photography to quantify the habitat complexity in freshwater ecosystems and to map the area of habitat classes important for endemic and/or specialized ichthyofauna. Because SfM-MVS is still in early stages of adoption in the freshwater ecological communities [52], there is a lack of good practice guidelines (e.g., sensor, lens choice, resolution, lighting effects). Our discussion addresses these aspects as means to provide an initial set of recommendations for freshwater habitat SfM-MVS studies. Remote Sens. 2018, 10, 1912 3 of 28

2. Materials and Methods

2.1.Remote Study Sens. Area 2018, 10, x FOR PEER REVIEW 3 of 28 FieldworkFieldwork was was carried carried out out at at five five sites sites in in the the Xingu Xingu river river basin, basin, Brazil. Brazil. The The Xingu Xingu is is one one of of the the primaryprimary tributaries tributaries of of the the Amazon Amazon River, River, contributing contributing 5% 5% of of its its annual annual freshwater freshwater discharge discharge [53 [53]] (Figure(Figure1). 1). The The river river drains drains approximately approximately 500,000 500,000 km km2 of2 of the the Brazilian Brazilian Shield Shield [54 [54].]. It It is is oligotrophic oligotrophic withwith a lowa low conductivity conductivity and and high high transparency transparency [54 [54]] and and is is known known for for exceptionally exceptionally high high fish fish species species richnessrichness and and specialized specialized taxa taxa (450 (450 fish fish species species from from 48 48 families families are are known, known, of of which which 60 60 species species are are endemicendemic and and 35 35 remain remain undescribed) undescribed) [55 [55].].

i

(i)

(ii)

ii

(iii)

iii

iv

iv

(v)

v

Figure 1. Study sites in the Xingu River basin, Brazil. Service layer credits: ESRI, HERE, Garmin, Figure 1. Study sites in the Xingu River basin, Brazil. Service layer credits: ESRI, HERE, Garmin, OpenStreetMap contributors and the GIS community. OpenStreetMap contributors and the GIS community. Our primary study site is located on the Jatobá river, a north flowing tributary of the Xingu (FigureOur1). At primary this location study the site water is located depth rangeson the from Jatobá 15 cmriver, to ~2.5a north m in flowing the dry season.tributary The of substrate the Xingu is(Figure primarily 1). comprised At this location of gravel the assemblages water depth (2.5–15 ranges cm from grain 15 size) cm and to ~2.5 medium m in boulders the dry season. (15–50 cm The substrate is primarily comprised of gravel assemblages (2.5–15 cm grain size) and medium boulders (15–50 cm grain size) (Table 1). At least 17 fish species (14 genera) are known to inhabit this small section of the river (45 m long × 30 m wide) including characins (e.g., Astyanax anterior), cichlids (e.g., Geophagus agyrosticus), anostomids (e.g., Leporellus vittatus) and loricariids (Ancistrus sp.). The habitat

Remote Sens. 2018, 10, 1912 4 of 28 grain size) (Table1). At least 17 fish species (14 genera) are known to inhabit this small section of the river (45 m long × 30 m wide) including characins (e.g., Astyanax anterior), cichlids (e.g., Geophagus agyrosticus), anostomids (e.g., Leporellus vittatus) and loricariids (Ancistrus sp.). The habitat is also representative of the types of substrate structure preferred by larger predatory benthopelagic species such as Hoplias aimara. To evaluate the potential of SfM-MVS over a broader range of habitat diversity than what is present at the Jatobá site, we include four additional sites along the Xingu river and two of its main tributaries, the Iriri and Culuene rivers (Figure1). The receded flood pulse from the wet season allowed for studying habitats at low water levels. During the dry season, large areas of substrate are exposed in areas covered (partially or completely) by fast flowing, deep and more turbid water during the rest of the year. (Figure2).

Table 1. Summary of the nine habitat classes important for Xingu fish diversity.

Class * Grain Size Description and Importance Preferred by species that feed on invertebrates sifted from the sand Sand and pebbles <0.5 cm but relatively few fishes are consistently found in this class. Cobbles 0.5–2.5 cm Several endemics have specialized to feed in this class. Affords protection against predators because caves are too small for Gravel Assemblage 2.5–15 cm larger fishes to enter. Affords cover to many species and forms caves large enough to be Medium boulders 15–50 cm used as breeding sites. In shallow sections of the river this is the most biodiverse class. Many mid-sized fishes prefer shadows created by the large boulders. For the large loricariids, caves must be large enough for adults up to 45 cm TL to protect the nest and brood. Narrow fissures in the large Large boulders 50–300 cm boulders shelter fish assemblages that rarely leave their safety. The compressed body shapes allow species to reside inside the fissures safe from predators (e.g., Ancistrus ranunculus, H. zebra). Solid rock Few fishes are consistently found in this class. The biocover and algae N/A (bedrock) on the surface provides food to specialized species. Remote Sens.Solid 2018, rock 10, x FOR PEER REVIEW The shapes and surfaces characteristic of this substrate are ideal 4 of 28 N/A (textured) hiding places for smaller loricariids. is also representative of the types of substratePhotographs structure (aerial orpreferred underwater) by cannotlarger be predatory used to determine benthopelagic the substrate in areas of very high flow where the white water of the species suchWhite as water Hoplias aimara N/A. rapids obscures the river bottom. Some of the most rheophile fishes To evaluate the potential of SfM-MVSare consistently over a broader found in thisrange class. of habitat diversity than what is present at the Jatobá site, we include fourAdults additional of the largest sites fishes along of the the river Xingu (e.g., Brachyplatystomariver and two tigrinum of its ,main Phractocephalus hemioliopterus) are not commonly seen in water tributaries,Deep turbid the Iriri water and Culuene N/A rivers (Figure 1). The receded flood pulse from the wet season allowed for studying habitats at low watershallower levels. than During 200 cm. the Due dry to the season, turbidity large and/or are depth,as of aerialsubstrate are photographs cannot be used to characterize the substrate in this class. exposed in areas covered (partially or completely) by fast flowing, deep and more turbid water * The grain sizes of the classes have been modified from the Wentworth scale to reflect the relevance of the classes to duringthe the fish rest species. of the year. (Figure 2).

(a) (b)

Figure 2. ExampleExample of of the the seasonal seasonal difference difference in exposed substrate between the dry season ( a) and wet season. ( (b)) from from the the Iriri Iriri and and Xingu Rivers’ confluence. confluence.

2.2. Habitat Class Descriptions To examine the utility of the SfM-MVS for quantifying the habitat extent and complexity important to the fish assemblages of the Xingu, we define nine habitat classes considered essential for aquatic diversity based on over 2,000 hrs of personal underwater observation and as described by [56]. The heterogeneity of habitat classes is important because many species are preferentially associated with each (Figures 3 and 4, Table 1). For example, the cichlid Crenicichla dandara prefers shadows of large rocks (medium and large boulder classes) where its dark coloration provides camouflage from its prey [57]. However, other than a few species that have obligate associations to a specific habitat class (e.g., Hypancistrus zebra to the large boulder class), there is overlap between some habitat classes where various species have been observed to occur. The grain size descriptions in Table 1 are based on the Wentworth scale with modifications to the ranges based on relevance to the fish species as observed in the field.

Table 1. Summary of the nine habitat classes important for Xingu fish diversity.

Class * Grain Size Description and Importance Preferred by species that feed on invertebrates sifted from the Sand and <0.5 cm sand but relatively few fishes are consistently found in this pebbles class. Cobbles 0.5–2.5 cm Several endemics have specialized to feed in this class. Gravel Affords protection against predators because caves are too 2.5–15 cm Assemblage small for larger fishes to enter. Affords cover to many species and forms caves large enough Medium 15–50 cm to be used as breeding sites. In shallow sections of the river boulders this is the most biodiverse class. Many mid-sized fishes prefer shadows created by the large boulders. For the large loricariids, caves must be large enough Large boulders 50–300 cm for adults up to 45 cm TL to protect the nest and brood. Narrow fissures in the large boulders shelter fish assemblages that rarely leave their safety. The compressed body shapes

Remote Sens. 2018, 10, x FOR PEER REVIEW 5 of 28

allow species to reside inside the fissures safe from predators (e.g., Ancistrus ranunculus, H. zebra). RemoteSolid Sens. 2018rock, 10 , 1912 Few fishes are consistently found in this class. The biocover5 of 28 N/A (bedrock) and algae on the surface provides food to specialized species. Solid rock The shapes and surfaces characteristic of this substrate are 2.2. Habitat Class DescriptionsN/A (textured) ideal hiding places for smaller loricariids. To examine the utility of the SfM-MVSPhotographs for quantifying (aerial or the underwater) habitat extent cannot and complexity be used to important to the fish assemblages of the Xingu,determine we define the nine substrate habitat classesin areas considered of very high essential flow where for aquatic the White water N/A diversity based on over 2,000 hrs ofwhite personal water underwater of the rapids observation obscures the and river as bottom. described Some by of [56 ]. The heterogeneity of habitat classes isthe important most rheophile because fishes many are species consistently are preferentially found in this associated class. with each (Figures3 and4, Table1). ForAdults example, of the the largest cichlid fishesCrenicichla of the river dandara (e.g., prefersBrachyplatystoma shadows of large rocks (medium and large bouldertigrinum classes), Phractocephalus where its dark colorationhemioliopterus provides) are not camouflage commonly from its Deep turbid prey [57]. However, otherN/A than a fewseen species in water that have shallower obligate than associations 200 cm. Due to ato specific the turbidity habitat class water (e.g., Hypancistrus zebra to the large boulderand/or class), depth, there aerial is overlapphotographs between cannot some be habitat used to classes where various species have been observed tocharacterize occur. The the grain substrate size descriptions in this class. in Table1 are based on the Wentworth* The grain scale sizes with of modifications the classes have to been the rangesmodified based fromon the relevance Wentworth to scale thefish to reflect species the as relevance observed in the field.of the classes to the fish species.

Figure 3. 3. Examples of the habitat classes described in Table1 1..( (a) sand and pebbles with a large large proportionproportion of sand; (b)) sandsand andand pebbles;pebbles; ((cc)) cobbles;cobbles; ((d)) gravelgravel assemblages;assemblages; (e) mediummedium boulders; ((ff)) largelarge boulders;boulders; ((gg)) solidsolid rockrock (bedrock);(bedrock); ((hh)) solidsolid rockrock (textured).(textured).

Remote Sens. 2018, 10, 1912 6 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 6 of 28

Figure 4. Example of morphological diversity commonly associated with the habitat classes in the Xingu River basin. (a) Hemiodus unimaculatus,(b) Pseudoloricaria laeviscula,(c) Potamotrygon Figure 4. Example of morphological diversity commonly associated with the habitat classes in the orbigny,(d) Retroculus xinguensis,(e) Geophagus argyrostictus,(f) Teleocichla monogramma,(g) Peckoltia Xingu River basin. (a) Hemiodus unimaculatus, (b) Pseudoloricaria laeviscula, (c) Potamotrygon orbigny, sabaji,(h) Crenicichla sp. ‘xingu 1’, (i) Potamotrygon leopoldi,(j) Sartor respectus,(k) Teleocichla preta, (d) Retroculus xinguensis, (e) Geophagus argyrostictus, (f) Teleocichla monogramma, (g) Peckoltia sabaji, (h) (l) Ossubtus xinguensis,(m) Hypancistrus zebra,(n) Cichla melaniae,(o) Hoplias aimara,(p) Baryancistrus Crenicichla sp. ‘xingu 1’, (i) Potamotrygon leopoldi, (j) Sartor respectus, (k) Teleocichla preta, (l) Ossubtus xanthellus,(q) Leporinus tigrinus,(r) Hypomasticus julii,(s) Peckoltia vittata,(t) Scobinancistrus aureatus, xinguensis, (m) Hypancistrus zebra, (n) Cichla melaniae, (o) Hoplias aimara, (p) Baryancistrus xanthellus, (u) Spectracanthicus punctatissimus,(v) Tometes kranponhah,(w) tatauaia. Photographs are not (q) Leporinus tigrinus, (r) Hypomasticus julii, (s) Peckoltia vittata, (t) Scobinancistrus aureatus, (u) to scale. Spectracanthicus punctatissimus, (v) Tometes kranponhah, (w) Hydrolycus tatauaia. Photographs are not to scale.

Remote Sens. 2018, 10, 1912 7 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 7 of 28

2.32.3.. Unmanned Aerial Vehicle (UAV) and Underwater Photographs Two models of UAVs were used (Table2 2).). TheThe DJIDJI InspireInspire 11 isis aa 2.92.9 kgkg 4-rotor4-rotor UAV.UAV. ItIt hashas anan X3X3 ± ◦ FC350 12.4 MP camera andand integratedintegrated 3-axis3-axis gimbalgimbal ((±0.03°).0.03 ). The The camera has a 1/2.3”1/2.3″ CMOS CMOS sensor, sensor, ◦ a fixed fixed 20 mm lens with a 94° 94 diagonal field field of view and a linear rolling shutter producing an image × size of 4000 × 30003000 pixels. pixels. The The DJI DJI Inspire Inspire 2 2 is is a a 3.4 3.4 kg kg 4 4-- rotor rotor UAV. UAV. It was used with an X5S camera ± ◦ which has a micro 4/34/3 sensor, sensor, linear r rollingolling shutter, integratedintegrated 3-axis3-axis gimbalgimbal ((±0.01°)0.01 ) and and a a DJI DJI MFT ◦ × 15 mm/1.7 aspherical aspherical lens lens (72° (72 diagonaldiagonal field field of view) producing an image sizesize ofof 52805280 × 39563956 pixels (Figure5 a). 5a). Flights Flights were were conducted conducted as two as orthogonal two orthogonal grids (i.e., grids double (i.e. grid, double pattern). grid All pattern).photographs All photographsincluded the geolocationincluded the of geolocation the centre of of the the frame centre and of thethe altitudeframe and in the the EXIF altitude data. in The the unmodified EXIF data. Thegeolocation unmodified is expected geolocation to have is expected an absolute to have positional an absolute error positional up to 3 m. error Because up to there 3 m. were Because no GNSS there wereactive no control GNSS stations active control within stations 100 km ofwithin the study 100 km sites of andthe study the limited sites and time the available limited attime each available site for atdata each collection, site for data no post collection, processing no post correction processing was correction applied to was the geolocationsapplied to the in geolocations the EXIF data, in northe wereEXIF data, any control nor were points any collectedcontrol points on site. collected The positional on site. The errors positional of non-post errors processed of non-post GPS processed positions wereGPS positions found to be were of the found same to magnitude be of the assame the magnitudegeolocation as from the the geolocation UAVs and from therefore the UAVs would and not thereforeimprove thewould overall not absoluteimprove positionthe overall of theabsolute UAV generatedposition of data. the UAV generated data. Underwater photographs were collected at the Jatobá Jatobá site with a Canon 5D Mark III DSLR with an EF 24–7024–70 mm ff/2.8L II II USM USM lens lens set set to to 24 24 mm mm in in autofocus autofocus mode mode (Figure (Figure 55b).b). ThisThis isis aa full-framefull-frame camera with with a a 36 36 ×× 2424 mm mm CMOS CMOS sensor sensor producing producing 22.3 22.3 MP MP effective effective pixels pixels (5760 (5760 × 3840× 3840 pixels). pixels). The Thephotographs photographs were were collected collected using using a median a median apertu aperturere of f/5.6 of withf /5.6 ISO with 200 ISO and 200 saved and savedin Canon in Canon RAW (.CR2)RAW (.CR2) format. format. The camera The camera was used was with used an with Aquatica an Aquatica Housing Housing and 8” and dome 8” domeport. Photographs port. Photographs were weretaken takenwith the with back the of back the housing of the housing at the surface at the surfaceof the water of the and water the dome and the port dome as nadir port as as possible. nadir as possible.A single g Arid single pattern grid was pattern used wasto acquire used to four acquire rows four of photographs rows of photographs with 71–72 with frames 71–72 per frames row (287 per framesrow (287 total) frames over total) a period over of a period30 min of (one 30 mincamera (one operator camera operatorin snorkel in gear). snorkel Overlap gear). Overlapwas visually was visuallyestimated estimated by the operator. by the operator. The water The depth water in depththe study in the area study was area<1.8 m. was Photographs <1.8 m. Photographs were exported were asexported full resolution as full resolution TIFFs for TIFFsanalysis. for analysis.

(a) (b)

Figure 5. ((a)) Example Example of of a a UAV UAV photograph acquired from 30 m altitude at the Jatobá Jatobá site used in the SfMSfM-MVS-MVS analyses. ( b)) Example of of an underwater photograph collected with with the camera housing at the water surface (Jatob(Jatobá)á) and the lens facing nadir (Scale(Scale not shown).shown).

2.42.4.. Structure from Motion (SfM) (SfM)-Multi-View-Multi-View Stereo (MVS) Photogrammetry Products SfMSfM-MVS-MVS products consisting of an orthomosaic, dense 3D point cloud, triangular mesh and digital surface model (DSM) were generated from from the UAV photographs with Pix4D Mapp Mapperer Pro (Figure 66))[ [13,15,58]13,15,58] with with ground ground sampling sampling distances distances (GSD) (GSD) ranging ranging from from 1.20 1.20–2.38–2.38 cm cm (Table (Table 2).2 A). Arefractive refractive index index submerged submerged DSM DSM correction correction was was applied applied following following [26,59,60] [26,59,60] prior prior to to the the calculation calculation of the habitat complexity metrics (Section 2.5 2.5).). The The SfM SfM-MVS-MVS workflow workflow was was also also used for the underwater photographs to to create the same productsproducts with a GSD GSD of of 1 1 mm. mm. No refractive index correction was applied to the DSM DSM created created from from the the underwater underwater photographs. photographs. Pix4D utilizes a modification of the SIFT algorithm [61] where local gradients rather than sample intensities are used to create descriptors of each key point [62]. Following the generation of the initial 3D point cloud, a

Remote Sens. 2018, 10, 1912 8 of 28 modification of the SIFT algorithm [61] where local gradients rather than sample intensities are used to create descriptors of each key point [62]. Following the generation of the initial 3D point cloud, aRemote multi-view Sens. 2018 stereo, 10, x FOR photogrammetry PEER REVIEW algorithm is implemented to increase the density of the9 point of 28 cloud [63]. The raster DSM is generated through an inverse distance weighting interpolation of the denseshallow 3D neural point cloud. networks The dense were applied3D point at clouds each were site toalso produce converted of to classification a textured mesh of the in Pix4D exposed to facilitatesubstrate. the calculation of the fractal dimension [41].

Figure 6. Flow chart of the analytical steps to generate the products (3D point cloud, textured mesh, DSM and orthomosaic) used as inputs to the calculation of the habitat complexity metrics (slope, rugosity, spatial spatial correlation, correlation, 3D fractal fractal dimension). dimension). For For photographs photographs collected collected from from the the UAV, UAV, the refractive index correction was applied to the DSM prior to the calculation of the habitat complexity metrics. The The sparse sparse and and dense point point clouds clouds from from the the Xadá Xadá study site are shown to the right of the flowchartflowchart along with the position of the photographs used for the analysis. Examples of the DSM and orthomosaic products are shown inin thethe resultsresults section.section.

2.6. SfM-MVS Model Assessment While the accuracy of terrestrial SfM-MVS models has been established using the methods described here (e.g., [13]), a range of accuracies have been reported in the literature for underwater SfM-MVS in marine environments (e.g., [21]) but no quantification of the uncertainties has been published for freshwater ecosystems, which have inherently different structures than coral reefs. Assessment of the submerged DSM from the UAV based SfM-MVS (Inspire 2 UAV and X5S camera— 176 photographs) was carried out in controlled conditions (i.e., outdoor swimming pool with a maximum depth of 220 cm) using nine 30 cm diameter targets placed at various depths ranging from the surface to 220 cm deep. Estimated depth from the surface for each target from the dense point cloud was compared to the actual measured depth to the targets. For the underwater SfM-MVS

Remote Sens. 2018, 10, 1912 9 of 28

Table 2. Summary of UAV photographs collected for the study sites including the ground sampling distance (cm) of the densified 3D point cloud and the number of photographs used for creating the 3D models.

Location River Date UAV Camera Area (ha) GSD (cm) No. Photographs Jatobá Jatobá 2 August 2017 Inspire 2 X5S 2.80 1.20 375 Cachoeira Culuene Culuene 1 August 2017 Inspire 2 X5S 4.54 1.75 283 Retroculus site Xingu 8 August 2016 Inspire 1 X3 0.52 1.43 208 Cachoeira Xada Xingu 11 August 2016 Inspire 1 X3 4.62 2.38 420 Cachoeira Iriri Iriri 6 August 2016 Inspire 1 X3 2.77 1.46 425

2.5. Habitat Complexity Metrics and Classification The complexity metrics used here are indicators of the amount of available habitat and shelter for the benthic organisms and the amount of brood care and foraging area for mobile species. At the Jatobá site, from the submerged DSM, we calculated: (1) slope; (2) the autocorrelation of the surface topographic variation; and (3) the arc-chord ratio, a measure of rugosity expressed as the surface to planar area corrected for slope [45,64]. These metrics were calculated at a GSD of 1.2 cm (Table2). From the underwater SfM-MVS the same metrics were calculated at the original GSD (1 mm) and at two coarser spatial scales (3 and 15 cm) arbitrarily chosen to represent the relevant habitat complexity for two common size classes of fishes found in the river. For comparison, from the underwater SfM-MVS DSM we calculated digital chain-and-tape SRI with a chain link size of 1 cm. At the other four study sites (Table2, Figure1), from the textured mesh, we calculated the Minkowski–Bouligand fractal dimension as a measure of 3D complexity [41] for the habitat classes (Table1, Figure3) that were exposed by the low water level of the dry season. This metric has been used for shape quantification and complexity characterization of irregularly shaped organisms such as corals [41]. The fractal dimension, D, includes information from various spatial scales, where increasing values of D, from 0–3, indicate higher complexity (i.e., increasing roughness of shape) [41,65]. The exposed substrate from the Xada, Iriri, Retroculus and Culuene sites was classified into habitat classes (Table1, Figure3) with a shallow neural network in MATLAB 2018a (Mathworks, Natick MA) at a GSD of 5 cm. In addition to the RGB layers from the orthomosaic, input layers included slope, profile convexity and plan convexity topographic metrics and data range and mean texture occurrence metrics calculated from the DSM in ENVI 5.3 (Harris Geospatial, Boulder CO). Profile convexity is the rate of change of the slope in the z plane while plan convexity is the rate of change in the x-y plane. The data range and mean texture metrics were calculated with a 3 × 3 pixel moving window. The data range represents the difference between the maximum and minimum DSM values within the window. The mean is the average of the DSM values within the window. Regions of interest representing the habitat classes present in subsets of each site were used to train a two-layer feed-forward (sigmoid hidden and softmax output neurons) network (10 hidden neurons) with the scaled conjugate gradient backpropagation algorithm [66]. A separate network was trained for each of the four sites. The pixels from the regions of interest were divided with 70% used for network training, 15% for validation and 15% for testing. The error from the validation data is used to minimize overfitting the network. Through multiple epochs the validation error will decrease. Once overfitting occurs (decreasing the ability of the network to generalize) the validation error increases. Training stops at the epoch with the minimum error in the validation data. The testing data are used as an independent measure of the network performance. The corresponding trained shallow neural networks were applied at each site to produce of classification of the exposed substrate.

2.6. SfM-MVS Model Assessment While the accuracy of terrestrial SfM-MVS models has been established using the methods described here (e.g., [13]), a range of accuracies have been reported in the literature for underwater SfM-MVS in marine environments (e.g., [21]) but no quantification of the uncertainties has been published for freshwater ecosystems, which have inherently different structures than coral reefs. Remote Sens. 2018, 10, 1912 10 of 28

Assessment of the submerged DSM from the UAV based SfM-MVS (Inspire 2 UAV and X5S camera—176 photographs) was carried out in controlled conditions (i.e., outdoor swimming pool with a maximum depth of 220 cm) using nine 30 cm diameter targets placed at various depths ranging from the surface to 220 cm deep. Estimated depth from the surface for each target from the dense point cloud was compared to the actual measured depth to the targets. For the underwater SfM-MVS products, the uncertainty of within model measured distances was determined from an underwater substrate reconstruction with stainless steel hexagonal locknuts used as targets (Figure A1). Four hundred photographs were collected in .CR2 with a Canon 1DX Mark II with a 24 mm EF1.2 lens in autofocus mode set to ISO 3200. Linear distance measurements between the hexagonal locknuts were carried out with two divers in snorkel gear and a standard measuring tape. Dimensions of the locknuts were also measured with a digital calliper.

3. Results We found a strong significant relationship between the UAV based submerged DSM (GSD = 0.65 cm) and the in-situ measurements of the distances between the targets and the surface of the water (R2 = 0.994, Sy.x = 6.205, p < 0.001, F = 1449). While these data were collected under controlled conditions, they represent the range of depths at the Jatobá study site. Table3 illustrates the results of the underwater SfM-MVS measurements of distance between features in the dense 3D point cloud and measurements taken in-situ. The distance between features measured in the point cloud and in-situ with the tape measure underwater range from 1.4 to 2.5 cm (Table3, Figure A1). For the measurements of the dimensions of the lock nuts, the difference between the digital calliper and the dense 3D point cloud range from 0.01–0.04 cm.

Table 3. Comparison between measurements from the underwater SfM-MVS model and tape measure distances and digital calliper measurements of the dimensions of the hexagonal locknut targets. P1–P4 refer to the locations of the locknuts in Figure A1. Measurements are in cm.

Measurement Model In-Situ Absolute Difference Tape Measure P1-P2 68.4 66.5 1.9 P2-P3 42.4 41.0 1.4 P3-P4 76.9 75.5 1.4 P2-P4 59.3 57.0 2.3 P1-P4 85.0 82.5 2.5 Digital Calliper Width 3.61 3.57 0.04 Thickness 0.67 0.68 0.01 Height 3.02 3.01 0.01

From the Jatobá site, Figure7 illustrates the finer spatial resolution obtainable from UAV photography in contrast to best available satellite imagery collected close in time to the UAV data (9 days difference). In the pansharpened GeoEye satellite image (50 cm panchromatic, 2 m multispectral), the location of the largest rapids can be seen but substrate classes cannot be determined (Figure7a). The glare off the surface of the water also prevents determining other information from the subsurface such the presence of aquatic vegetation. From the UAV photograph (Figure7b) locations of shallow and deep water can be inferred as well as the outlines of the largest boulders underwater. The flexibility of the UAV operation allows for multiple view angles to minimize glare and optimize the spatial information in each frame. A single aerial frame (Figure7b) is a flat 2D representation of the surface and lens distortions, variations in depth of field and a lack of coordinates for each pixel of the photograph prevent accurate measurements of area, distance or volume. However, once the full set of photographs for a site is processed through the SfM-MVS workflow (Figure6), measurements of distance and orientation between objects can be made. Furthermore, the 3D point Remote Sens. 2018, 10, 1912 11 of 28 cloud (Figure7c) can be rotated on the screen to view the landscape from various perspectives. The 3D representation of the landscape and subsequent products (e.g., DSM, orthomosaic) (Figure8) are also locatedRemote inSens. real-world 2018, 10, x FOR geographical PEER REVIEW coordinates. 11 of 28

(a) (b)

(c)

FigureFigure 7. 7.(a ()a Pansharpened) Pansharpened GeoEye GeoEye satellitesatellite image (50 (50 cm cm panchromatic, panchromatic, 2 2m m multispectral) multispectral) acquired acquired 1111 August August 2017 2017 of of the the Jatob Jatobáá study study site.site. ((bb)) UAVUAV photograph acquired acquired 2 2August August 2017. 2017. (c) ( cDensified) Densified 3D3D point point cloud cloud (1.2 (1.2 cm cm GSD) GSD) generated generated fromfrom UAV SfM-MVSSfM-MVS analyses analyses using using 375 375 photographs. photographs. The The substratesubstrate (medium (medium and and large large boulder boulder classes) classes) is visibleis visible in thein the shallow shallow clear clear water. water. The The interactive interactive point cloudpoint is cloud available is available at: https://bit.ly/riojatoba at: https://bit.ly/riojatoba. .

WhileWhile the the underwater underwater substrate substrate topographytopography is is not not immediat immediatelyely evident evident from from the the full full area area DSM DSM withwith a largea large range range of of elevation elevation values values (~25(~25 m) (Figure 88a),a), when a a subsection subsection of of the the DSM DSM representing representing a 7a× 7 ×7 7 m m area area of of thethe aquaticaquatic substrate is is extracted extracted (Figure (Figure 9),9), it it is is possible possible to to visualize visualize the the topography topography underwater.underwater. The The values values of of the the submergedsubmerged DSM (Figure (Figure 9a),9a), following following the the refractive refractive index index correction, correction, representrepresent the the distance distance from from the the surface surface (1.52–2.39(1.52–2.39 m), with with brighter brighter pixels pixels indicating indicating structures structures closer closer toto the the surface. surface. The The RMS RMS height height (standard(standard deviationdeviation of of the the heig height)ht) was was found found to to be be 0.1. 0.1. Higher Higher values values indicateindicate larger larger variations variations in in height height andand thereforetherefore have been been interpreted interpreted to to mean mean a potentially a potentially rougher rougher substratesubstrate [23 [23].]. Higher Higher values values of slope of slope (Figure (Figure9b) represent 9b) represent the edges the edges of boulders. of boulders. The rugosity The rugosity (surface to(surface planar ratio) to planar (Figure ratio)9c) is(Figure similar, 9c) except is similar, the overall except slope the overall of the slope riverbed of the has riverbed been removed has been and pixelsremoved with and high pixels values with of high rugosity values are of foundrugosity around are found and around between and the between largest the boulders. largest boulders. Due to the Due to the GSD of 1.2 cm, features smaller than that cannot be resolved. The length of the topographic correlation was found to be 54.7 cm (E-W) and 52.3 cm (N-S).

Remote Sens. 2018, 10, 1912 12 of 28

Remote Sens. 2018, 10, x FOR PEER REVIEW 12 of 28 GSDRemote of 1.2 Sens. cm, 2018 features, 10, x FOR smaller PEER REVIEW than that cannot be resolved. The length of the topographic correlation12 of 28 was found to be 54.7 cm (E-W) and 52.3 cm (N-S).

FigureFigureFigure 8.8. DSM8.DSM DSM andand and orthomosaicorthomosaic orthomosaic producedproduced produced from fromfrom the the densifieddensified 3D3D point point cloud cloudcloud (Figure (Figure(Figure 6c).6 c).6c).

(a) (b) (c) (a) (b) (c) Figure 9. From the UAV based SfM-MVS products at the Jatobá site: (a) Submerged DSM with FigureFigurerefractive 9. 9.From From index the the UAVcorrection UAV based based applied, SfM-MVS SfM (b-MVS) productsSlope, products (c) atRugosity the atJatob the expressedá site: Jatobá (a) as Submergedsite: the ( asurface) Submerged DSM to planar with DSM refractiveratio. with indexrefractive correction index applied,correction (b applied,) Slope, ((cb)) Rugosity Slope, (c) expressed Rugosity asexpressed the surface as the to planarsurface ratio. to planar ratio. From the underwater SfM-MVS a higher GSD (1 mm) was achieved allowing for a more precise definitionFromFrom thethe of underwaterunderwater the edges of SfM-MVS SfMthe underwater-MVS aa higherhigher structures GSDGSD (1(1 (e.g. mm)mm), boulders) waswas achievedachieved as well allowingallowing as the location forfor aa moremore of aquatic preciseprecise definitiondefinitionvegetation ofof the theand edgesedges the presence ofof thethe underwater underwaterof green filamentous structuresstructures algae (e.g.,(e.g. (Figure, boulders)boulders) 10a,b). asas From wellwell aerial asas thethe photographs locationlocation ofof aquatic aquaticit can vegetationvegetationbe difficult andand to thethe distinguish presencepresence ofbetweenof greengreen filamentousunderwaterfilamentous vegetation algaealgae (Figure(Figure and 10 10apatchesa,b).,b). FromFrom of filamentous aerialaerial photographsphotographs algae but ititthe cancan two are clearly separable in the underwater orthomosaic (Figure 10a). The map of rugosity (Figure bebe difficultdifficult toto distinguishdistinguish betweenbetween underwaterunderwater vegetationvegetation andand patchespatches ofof filamentousfilamentous algaealgae butbut thethe 10c) illustrates the most complex areas are at the boulder—sand interface. Small holes/depressions in twotwo areare clearly clearly separable separable in in the the underwater underwater orthomosaic orthomosaic (Figure (Figure 10a). 10a). The The map map of rugosity of rugosity (Figure (Figure 10c) the boulders are also distinguishable. The RMS was found to be 0.15. The length of the topographic illustrates10c) illustrates the most the most complex complex areas areas are are at the at the boulder—sand boulder—sand interface. interface. Small Small holes/depressions holes/depressions inin correlation was found to be 27 cm (E-W) and 13.5 cm (N-S). When the DSM and rugosity maps are thethe bouldersboulders areare alsoalso distinguishable.distinguishable. TheThe RMSRMS waswas foundfound toto bebe 0.15.0.15. TheThe lengthlength ofof thethe topographictopographic spatially degraded to 3 and 15 cm GSD, increasingly generalized, larger scale patterns of topography correlation was found to be 27 cm (E-W) and 13.5 cm (N-S). When the DSM and rugosity maps are correlationand overall was complexity found to beare 27 seen. cm The(E-W) range and of 13.5 rugosity cm (N values-S). When also thedecreases DSM andwith rugosity increasing maps GSD are spatially degraded to 3 and 15 cm GSD, increasingly generalized, larger scale patterns of topography spatiallyfrom a degraded maximum to of 3 262 and at 15 1 mmcm GSD, (Figure increasingly 10c) to 1.9 atgeneralized, 15 cm (Figure larger 10g). scale The patternsthree digital of topography transects andand(Figure overalloverall 10h) complexitycomplexity of SRI resulted areare seen.seen. in values TheThe rangerangeof 2.44 ofof (A rugosityrugosity-A’), 2.18 valuesvalues(B—B’) alsoalsoand decreases2.05decreases (C—C’) withwith respectively. increasingincreasing GSDGSD fromfrom aa maximummaximum ofof 262262 atat 11 mmmm (Figure(Figure 1010c)c) toto 1.91.9 atat 1515 cmcm (Figure(Figure 10 10g).g). TheThe threethree digitaldigital transectstransects (Figure(Figure 10 10h)h) ofof SRISRI resultedresulted ininvalues values ofof2.44 2.44(A-A’), (A-A’), 2.18 2.18 (B—B’) (B—B’) and and 2.05 2.05 (C—C’) (C—C’) respectively. respectively.

Remote Sens. 2018, 10, 1912 13 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 13 of 28

0 45 cm

(a) (b) (c)

(d) (e) (f)

0 45 cm

(g) (h)

Figure 10. From the underwater SfM-MVS at the Jatobá site, (a) Orthomosaic at a GSD of 1 mm. (b) Figure 10. From the underwater SfM-MVS at the Jatobá site, (a) Orthomosaic at a GSD of 1 mm. Submerged DSM at a GSD of 1 mm. The lines represent the location of the three transects used to (b) Submerged DSM at a GSD of 1 mm. The lines represent the location of the three transects used to

Remote Sens. 2018, 10, 1912 14 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 14 of 28

calculatecalculate virtual virtual chain-and-tape chain-and-tape SRI SRI and and ( c()c) Rugosity Rugosity expressed expressed as as the the surface surface to to planar planar ratio ratio at at a a GSD GSD ofof 1 1 mm, mm, ( d(d)) Submerged Submerged DSM DSM resampled resampled to to 3 3 cm, cm, ( e(e)) Rugosity Rugosity expressed expressed as as the the surface surface to to planar planar ratio ratio atat 3 3 cm cm resolution, resolution, ( f(f)) Submerged Submerged DSMDSM resampledresampled toto 1515 cm,cm, ( g(g)) Rugosity Rugosity expressed expressed as as the the surface surface to to planarplanar ratio ratio at at 15 15 cm cm resolution, resolution, ( h(h)) Cross Cross sections sections of of the the three three virtual virtual chain-and-tape chain-and-tape transects. transects.

TheThe low low water water of of the the dry dry season season allowed allowed for for the the 3D 3D reconstruction reconstruction of of habitat habitat classes classes in portionsin portions of theof the river river that that are are normally normally submerged submerged in the in the wet wet season season (Figure (Figure 11). 11). The The four four sites sites encompass encompass six six of theof the habitat habitat classes classes from from Table Table1 as 1 wellas well as illustrateas illustrate an an example example of theof the white white water water and and deep/turbid deep/turbid classes.classes. The The Iriri Iriri site site (Figure (Figure 11a) 11a) exhibits exhibits the largest the largest heterogeneity heterogeneity of habitat of habitatclasses including classes including cobbles, solidcobbles, rock, solid medium rock, and medium large and boulders. large boulders. In contrast, In the contrast, Retroculus the Retroculus site (Figure site 11 (Figureb) and Culuene 11b) and (FigureCuluene 11 (Fic) aregure the 11c) most are homogenous the most homogenous in terms of in the terms number of the of number habitat classesof habitat present. classes present.

(a) (b)

(c) (d)

FigureFigure 11. 11.Orthomosaics Orthomosaicsgenerated generated fromfrom thethe UAVUAV photographs photographs of of ( a(a)) Cachoeira Cachoeira Iriri, Iriri, ( b(b)) Retroculus Retroculus site,site, ( c(c)) Cachoeira Cachoeira Culuene Culuene and and ( d(d)) Cachoeira Cachoeira do do Xad Xadá.á. ExamplesExamples ofof thethe habitathabitat classesclasses rangingranging fromfrom sandsand and and pebbles pebbles to to large large boulders boulders exposed exposed in in the the dry dry season. season. Areas Areas of of deep/turbid deep/turbid waterwaterand and white white waterwater can can also also be be seen. seen. The The four four interactive interactive 3D 3D point point clouds clouds are are available available at: at:https://bit.ly/iriri3D https://bit.ly/iriri3D,, https://bit.ly/retroculushttps://bit.ly/retroculus, ,https://bit.ly/culuene https://bit.ly/culuene, https://bit.ly/xadarapids, https://bit.ly/xadarapids. .

Remote Sens. 2018, 10, 1912 15 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 15 of 28

BasedBased on the confusion matrices (Figure A2A2),), the neural networks separated the habitat classes with a high level of accuracy and minimal potential overfitting.overfitting. The overall accuracy for all four sites was over 90%. Individual Individual class class user user and and producer producer accuracie accuraciess were were all all > >90% 90% with with two two exceptions, exceptions, a ashallow shallow water water class class (UA (UA = =83.3%, 83.3%, PA PA = = 85.6%) 85.6%) at at Culuene Culuene and and the the shadow shadow class at Iriri (UA(UA= = 63.2%, 63.2%, PA == 32.2%). The results of the neural network classification classification (Figures 12 and 13)13) reveal that only the bedrock and shallow water classes are consistently found at the four sites. The shallow water class represents waterwater less than 30 cm deep with the sand sand and/or and/or gravel gravel assemblage assemblage classes classes mixed mixed together. together. Classes PodostemaceaePodostemaceae andand Wet Wet Bedrock, Bedrock, while while not not included included in Tablein Table1 are 1 only are foundonly found in certain in certain areas ofareas the of Xingu the Xingu basin basin where where there there are rapids are rapids with with a splash a splash zone zone on the on surrounding the surrounding boulders. boulders. In our In siteour they site arethey found are found at Iriri. at The Iriri. class The tree/shrub class tree/shrub illustrates illustrates areas that areas are not that flooded are not on flooded a permanent on a basis.permanent In the basis. wet seasonIn the wet when season these when areas these are submerged areas are submerged they provide they critical provide habitat critical for habitat a range for of speciesa range (Figureof species4). Also(Figure evident 4). Also from evident the proportions from the proportions (Figure 12) and(Figure spatial 12) distributionand spatial distribution (Figure 13) of(Figure the classes 13) of isthe the classes variability is the betweenvariability locations. between Consistentlocations. Consistent with the overall with the complexity overall complexity of the site (Figureof the site 14), (Figure the substrate 14), the classifications substrate classifications (Figures 11 (Figuresand 12) reveal11 and Iriri 12) hasreveal the Iriri highest has diversitythe highest of habitatdiversity classes of habitat (9 classes) classes and (9 Culueneclasses) theand least Culuene (5 classes). the least The (5 ‘shadow’ classes).class The is ‘shadow’ not included class inis thisnot totalincluded because in this it representstotal because areas it represents with topographic areas with features topographic such as features the spaces such between as the spaces boulders between that areboulders not observable that are not from observable the SfM-MVS from products.the SfM-MVS products.

Figure 12. ProportionProportion of substrate classes at Culuene, Iriri, Retroculus and XadXadáá as determined from the UAVUAV SfM-MVSSfM-MVS products products and and a a neural neural network network classification classification based based on substrateon substrate exposed exposed by theby lowthe waterlow water level level of the of dry the season.dry season.

Remote Sens. 2018, 10, 1912 16 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 16 of 28

FigureFigure 13. MapMap of of substrate substrate classes classes from from the UAV the SfM-MVS UAV SfM products-MVS productsand neural and network neural classification network classificationfor (a) Iriri; ( bfor) Culuene; (a) Iriri; ( (bc)) XadCuluene;á and ( (cd)) Xadá Retroculus. and (d) Retroculus.

TheThe 3D fractal fractal dimension dimension for for the the different different habitat habitat classes, classes, as calculated as calculated from the from substrate the substrate exposed exposedin the dry in seasonthe dry (Figure season 14 (Figure) reveals 14) a naturalreveals variability a natural invariability complexity in complexity not only between not only sites between but also siteswithin but the also same within class the at differentsame class sites. at different For example, sites. theFor solid example, rock classthe solid from rock Culuene class hasfrom a lowCuluene value hasof 1.27,a low whereas value of the 1.27, same whereas class fromthe same Iriri class is more from complex Iriri is more with aco valuemplex of with 1.7 duea value to fissures of 1.7 due in theto fissuresbedrock in that the arebedrock not present that are in not Culuene. present Overall,in Culuene. Iriri Overall, is the site Iriri with is the the site greatest with the habitat greatest complexity habitat complexity(avg = 1.8), (avg whereas = 1.8), Culuene whereas was Culuene found was to be found the least to be complex the least (avg complex = 1.26). (avg = 1.26).

Remote Sens. 2018, 10, 1912 17 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 17 of 28

Figure 14. The Minkowski–Bouligand fractal dimension (D) as a measure of 3D habitat complexity. Figure 14. The Minkowski–Bouligand fractal dimension (D) as a measure of 3D habitat complexity. Each bar represents one of the first five habitat classes from Table1. SP = Sand/pebbles, CO = Cobbles, Each bar represents one of the first five habitat classes from Table 1. SP = Sand/pebbles, CO = Cobbles, TR = Textured rock, MB = Medium boulders, LB = Large boulders, SR = Solid rock. Dotted lines TR = Textured rock, MB = Medium boulders, LB = Large boulders, SR = Solid rock. Dotted lines represent the mean for the site. represent the mean for the site. 4. Discussion 4. Discussion We demonstrated that ultrafine resolution spatially explicit information about habitat complexity can beWe generated demonstrated from that both ultrafine UAV and resolution underwater spatially photographs explicit with information a SfM-MVS about workflow. habitat Thecomplexity complexity can metrics be generated calculated from from both the SfM-MVS UAV and products underwater are critical photographs analytical with tools a for SfM gaining-MVS insightworkflow. into The the c habitatomplexity classes metrics necessary calculated for conservation from the SfM of-MVS the localproducts species. are critical As for coralanalytical reefs tools [67], forfor manygaining freshwater insight into fishes the inhabitat the Xingu classes river necessary basin, fine for resolutionconservation satellite of the imagery local species. (<2 m) As (Figure for coral7a) isreefs spatially [67], for too many coarse freshwater to extract meaningfulfishes in the habitatXingu river complexity basin, information.fine resolution Furthermore, satellite imagery the orbits (<2 m) of most(Figure satellites 7a) is spatially restrict too the coarse revisit to times extract and meaningful the time of habitat day images complexity are collected information. at a given Furthermore, location. Cloudthe orbits cover of most is further satellites a challenge restrict the when revisit relying times onand optical the time satellite of day imageryimages are in collected the humid at tropics.a given Thelocation. low altitudeCloud cover from whichis further UAVs a challenge are operated when not relying only improves on optical the satellite spatial imagery resolution in ofthe the humid data buttropics. also The increases low altitude the range from of conditionswhich UAVs under are whichoperated photographs not only improves can be taken the spatial (e.g., uniform resolution cloud of cover).the data Underwater but also increases SfM-MVS the has range additional of conditions flexibility under because which varying photographs the camera can settings be taken (e.g., (e.g. ISO), oruniform the use cloud of artificial cover). illuminationUnderwater suchSfM-MVS as dive has lights additional can produce flexibility high because quality varying photographs the camera even undersettings less (e.g. than, ISO) ideal or natural the use illumination of artificial conditions illumination [24 ].such In high as dive energy lights or dangerouscan produce aquatic high systemsquality suchphotographs as rivers evenwith strong under current, less than data ideal collection natural can illumination be extremely conditions challenging. [24]. Both In high UAVs energy for areas or withdangerous shallow aquatic water andsystems cameras such operated as rivers from with a strong boat or current, by an experienced data collection diver/snorkeler can be extremely could mitigatechallenging. these Both challenges UAVs [for23 ].areas with shallow water and cameras operated from a boat or by an experiencedBased on diver/snorkeler Table3, the measurements could mitigate of these distance challenges within [23]. the dense 3D point cloud were more similarBased to the on digital Table calliper3, the measurements than to the tape of measure distance because within usethe ofdense the tape3D point measure cloud underwater were more is pronesimilar to to human the digital error. calliper A minimum than to of the two tape snorkelers measure were because required use toof usethe thetape tape measure measure und anderwater record is theprone values. to human The strong error. current A minimum added of to thetwo difficulties snorkelers of were taking required accurate to measurementsuse the tape measure underwater. and recordFrom thethe values. SfM-MVS The strongworkflow, current the spatial added variability to the difficulties in complexity of taking at individual accurate sites measurements is captured dueunderwater. to the 2D and 3D nature of the products (Figures9–11). In comparison, the SRI is less robust and moreFrom subjective. the SfM The-MVS theoretical workflow, SRI the from spatial the DSMvariability ranges in fromcomplexity 2.05 to at 2.44. individual It does sites not captureis captured the differencesdue to the 2D in theand cross-section 3D nature of profiles. the products There (Figures is also a high9–11). degree In comparison, of subjectivity the SRI depending is less robust on where and themore transect subjective. is placed The [theoretical50]. The 2D SRI map from of rugositythe DSM is ranges more robustfrom 2.05 where to 2.44. the entire It does variability not capture can the be summarizeddifferences in by the the cross range-section of values profiles. (1–262). There is also a high degree of subjectivity depending on where the transect is placed [50]. The 2D map of rugosity is more robust where the entire variability can be summarized by the range of values (1–262).

Remote Sens. 2018, 10, 1912 18 of 28

Similar to [50] we found that as the GSD decreases, the values of rugosity increase in the SfM-MVS products, indicating that at finer GSD more of the structural complexity can be actually measured. This scalability is one of the strengths of SfM-MVS; from products generated at a fine GSD, generalizations of the habitats to coarser scales can be readily achieved. Such scaling is not possible from SRI measured in the field because the chain-and-tape method is calculated at a fixed resolution (i.e., chain-link size) [23]. With terrestrial laser scanner reconstructions of terrain, highly accurate classifications have been achieved for geomorphological classes using multi-scale 3D point cloud classification [68]. For classification of the exposed habitats from the SfM-MVS products we found that colour and topographic and texture metrics combined as predictors in the shallow neural network resulted in high accuracy of the classification (Figures 12 and 13, Figure A2). Location and proportion of the habitat classes can provide important information about the ichthyofauna. For example, in-situ observations indicated that at all sites different species preferentially inhabit the different classes. At Iriri for example, the payara () is only found in the main white-water channel. The splash zone on the large boulders next to the main rapids allows for growth of riverweeds (Podostomacae spp.) that adhere to solid surfaces in high flow environments. The endemic parrot pacu (Ossubtus xinguensis) has specialized dentition to feed on them. The wet bedrock and Podostemaceae classes were important to differentiate from the surroundings because not only are the riverweeds a food source for fish but also the wet rocks represent the splash zone from the rapids where Podostemaceae dormant from the previous year may regenerate provided a consistent water source. The trunks and lower branches of the vegetation class may become submerged in the wet season where they provide important habitat for fry and juvenile fishes (e.g., Cichla melaniae) as well as spawning and feeding grounds for species such as Leporinus frederici, Farlowella amazona, Geophagus cf altifrons, Aequidens mikaeli and so forth. The boulder class represents habitat for anostomids (e.g., S. respectus and Synaptolaemus latofasciatus), as well as loricariids (e.g., Pseudacanthicus pirarara) and cichlids (e.g., C. dandara) among others. The gravel assemblage class represents habitat and feeding areas for several species including cichlids (e.g., Crenichla sp. 1, G. argyrostictus, R. xinguensis), anostomids (e.g., Leporinus maculatus) and Serrasalmids (e.g., Myleus setiger). The sand class is further important for stingrays (e.g., P. orbignyi), loricariids (e.g., Limatulichthys spp.) and cichlids (e.g., Teleocichla monogramma) among others. The 3D fractal dimension is a powerful metric, which allows for quantitative comparisons between habitat classes at multiple sites as well as between sites. This metric is scale invariant and relates complexity, spatial patterns and scale [23]. In order for this metric to be calculated, fine spatial resolution, spatially extensive, digital 3D data are required. From an ultrafine resolution (mm pixel size) underwater photography SfM-MVS derived DSM of an inter-tidal reef, Ref. [23] found that fractal dimension better characterized the roughness of the reef than other conventional measures. Our results reinforce this finding (Figure 14). Despite the strengths of the SfM-MVS framework presented here, there remain limitations. Both the UAV and underwater photography were collected with a nadir view of the substrate, therefore elements of the substrate such as the underside of overhangs, caves, crevices, or tunnels inside boulders or other structures underneath or between boulders are only partially represented (Figure A1). These elements, especially caves within the piles of boulders or holes inside rocks are important features of the habitat for certain fishes. For example, small loricariids such as Leporacanthicus heterodon are preferentially found in crevices and caves between boulders to avoid predation. Ref. [19] also point out this limitation for SfM-MVS reconstruction of coral colonies. For the UAV based submerged DSM, more sophisticated corrections such the fluid lensing approach [67] for the individual frames used in the SfM-MVS workflow have the potential to further improve the reconstruction of the submerged topography. Both UAV and underwater photographs can provide a baseline for assessing freshwater habitat complexity. However, it is not an automated process and because of the complex nature of the analysis, a thorough understanding of the camera system is necessary to produce reliable and repeatable digital Remote Sens. 2018, 10, x FOR PEER REVIEW 19 of 28 Remote Sens. 2018, 10, 1912 19 of 28 most important factors are not considered [19]. A number of factors influence the accuracy of the photogrammetric models and subsequent products (DSM, orthomosaic and metrics of complexity). representationsThe various software of the implementations habitats. Errors of can the result SIFT in (or the SIFT SfM-MVS-like) algorithms products rely if the on most distinctive important key factorspoints (i.e. are, notinvariant considered features) [19]. in A the number photographs. of factors Following influence steps the accuracyaimed at ofimproving the photogrammetric the initial set modelsof candidate and subsequent key points productsand filtering (DSM, to orthomosaicreject points and with metrics low contrast of complexity). and a strong The various edge response, software implementationsthe retained key points of the are SIFT robust (or SIFT-like) to varying algorithms illumination rely conditions, on distinctive view key angle, points pixel (i.e., noise invariant and so features)forth [69]. in the photographs. Following steps aimed at improving the initial set of candidate key pointsSimilar and filtering to terrestrial to reject environmen points withts, low best contrast practices and a for strong photographic edge response, data the collection retained key for pointsunderwater are robust SfM- toMVS varying involve illumination a few major conditions, considerations: view angle, GSD, pixel depth noise of field, and so shutter forth [69speed]. and overlap.Similar The to GSD terrestrial (the distance environments, between best two practices consecutive for photographic pixel centres data as measured collection on for the underwater ground) SfM-MVSis a produ involvect of the adistance few major of considerations:the camera to the GSD, ground/substrate depth of field, shutterand the speedfocal length and overlap. of the lens The GSD[12]. (theAt a distancegiven focal between length, two increasing consecutive the distance pixel centres between as measured the camera on and the the ground) substrate is a will product result of in the a distancecoarser GSD of the and camera larger toimaging the ground/substrate area (Figure 15). and Converse the focally, lengthat a given of thedistance lens [ 12between]. At a giventhe camera focal length,and substrate, increasing increasing the distance the focal between length the will camera result and in a the finer substrate GSD because will result each in pixel a coarser will capture GSD and a largersmaller imaging area (will area also (Figure result 15in ).a Conversely,smaller imaging at a givenarea). Overlap distance in between both the the along camera track and (direction substrate, of increasingtravel) and theacross focal track length (neighbouring will result inlines) a finer directions GSD because can be eachoptimized pixel willonce capture the GSD a and smaller imaging area (willarea alsohave result been in determined. a smaller imaging For underwater area). Overlap scenes in a both high the overlap along trackin both (direction directions of travel) (~ 80%) and is acrossrecommended. track (neighbouring lines) directions can be optimized once the GSD and imaging area have been determined. For underwater scenes a high overlap in both directions (~ 80%) is recommended.

Figure 15. Diagram illustrating the effect on GSD of varying either the focal length or the distance between the camera and the substrate. Figure 15. Diagram illustrating the effect on GSD of varying either the focal length or the distance between the camera and the substrate. Depth of field (DoF), the zone within which the photograph is in focus, depends on the aperture used (e.g., f /8), the distance to the substrate and the focal length of the lens. Narrower apertures result Depth of field (DoF), the zone within which the photograph is in focus, depends on the aperture in greater DoF (Figure 16). used (e.g., f/8), the distance to the substrate and the focal length of the lens. Narrower apertures result in greater DoF (Figure 16).

Remote Sens. 2018, 10, x FOR PEER REVIEW 20 of 28

Remote Sens. 2018, 10, 1912 20 of 28

Figure 16. Given the same distance from the substrate, same focal point and focal length, increasing

the aperture (smaller f-number) reduces the DoF. The section of the substrate that falls within the grey boxFigure would 16. Given be in focus. the same In this distance illustration, from the an substrate, aperture of samef /5.6 focal results point in theand entire focal length, area of interestincreasing of thethe substrateaperture (smaller being in f focus,-number) while reduces with f the/2.8 DoF. the topThe andsection base of of the the substrate boulders that would falls be within out of the focus. grey box would be in focus. In this illustration, an aperture of f/5.6 results in the entire area of interest of Inthe addition substrate to being overlap, in focus, the DoFwhile is with a critical f/2.8 the element top and to maximizebase of the photographboulders would quality be out for of underwater focus. SfM-MVS because when as much of the subject (i.e., substrate) in the frames is in focus (i.e., maximizing DoF)In it allows addition for to a greater overlap, number the DoF of keypoints is a critical to be element generated to maximize and retained. photograph A wider quality angle lens for andunderwater small aperture SfM-MVS will because increase when DoF. as An much increase of the in subject the ISO (i.e. (i.e.,, substrate) sensitivity in tothe light) frames will is resultin focus in an(i.e. increase, maximizing in the DoF) shutter it allows speed for and a aperture,greater number if the apertureof keypoints cannot to be be generated set manually and (Figureretained. 17 A). Underwider angle the consistent lens and small illumination aperture conditions will increase (clear DoF. sky An with increase direct in the solar ISO illumination—not (i.e., sensitivity to under light) overhangingwill result in vegetation)an increase in the the photographs shutter speed from and the aperture stream survey, if the aperture (Figure 10 cannot) were be collected set manually with a(Figure narrow 17). range Under of the f-number consistent (µ =illumination 5.7 ± 0.4, rangeconditions 5.0–7.1) (clear and sky shutter with direct speed solar (µ = illumination 138.3 ± 22.1,— rangenot under 100–200). overhanging For the underwater vegetation) themodel photographs of the rock from with the the stream hexagonal survey locknuts (Figure (Figure 10) wereA1), overhangingcollected with vegetation a narrow range with patchesof f-number of clear (µ = views5.7 ± 0.4, to range the sky 5.0 resulted–7.1) and in shutter a greater speed range (µ = of 138.3 both ± f-number22.1, range ( µ100= 5.6–200).± 1.7, For rangethe underwater 3.5–10.0) and model shutter of the speed rock with (µ = the 143.8 hexagonal± 90.1, locknuts range 50–400) (Figure used. A1), Foroverhanging the UAV vegetation photographs with (Figure patches 17 b)of theclear X3 views camera to the consistently sky resulted used in aa fixedgreater aperture range of of bothf /2.8. f- Annumber increase (µ = in 5.6 shutter ± 1.7, range speed 3.5 due–10.0) to the and glare shutter off the speed surface (µ = of 143.8 the water± 90.1, at range the Retroculus 50–400) used. site For can the be seenUAV with photographs the widest (Figure range of17b) shutter the X3 speeds. camera For consistently the X5S camera used thea fixed aperture aperture varied of f from/2.8. Anf /4.0– increasef /6.3 atin Culueneshutter speed and f /4.0–due tof /5.6 the atglare Jatob offá. the surface of the water at the Retroculus site can be seen with the widest range of shutter speeds. For the X5S camera the aperture varied from f/4.0–f/6.3 at Culuene and f/4.0–f/5.6 at Jatobá.

Remote Sens. 2018, 10, 1912 21 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 21 of 28

(a) (b)

FigureFigure 17. 17.( (aa)) ViolinViolin plots plots of of thethe shuttershutter speedspeed (blue)(blue) andand apertureaperture (grey) (grey) used used to to take take the the photographsphotographs forfor calculatingcalculating thethe withinwithin modelmodel uncertaintyuncertainty (Canon(Canon 1DX1DX MarkMark II)II) (Figure(Figure A1A1)) andand forfor thethe streamstream surveysurvey (Canon (Canon 5D 5D Mark Mark III) III) (Figure (Figure 10 10).). Focal Focal length length for for both both cameras cameras was was 24 24 mm. mm. ((bb)) Violin Violin plots plots of of thethe shutter shutter speed speed from from the the UAV UAV photographs photographs from from the the five five study study sites sites (Figure (Figure1). 1).

GivenGiven thethe sensorsensor sizesize ofof the the camera camera (e.g., (e.g., full full frame frame vs. vs. micro micro 4/3), 4/3), thethe focalfocal lengthlength ofof thethe lenslens andand thethe apertureaperture chosen,chosen, thethe hyperfocal hyperfocal distancedistance cancan bebe calculated. calculated. ThisThis valuevalue isis thethe closestclosest distancedistance toto thethe lenslens whichwhich isis in in focus focus while while maintaining maintaining thethe furthestfurthest distancedistance inin thethe photographphotograph acceptablyacceptably sharp.sharp. For For example, example, on on a afull full frame frame sensor sensor with with f/5.6f /5.6and a and 24 mm a 24 focal mm length, focal length,the hyperfocal the hyperfocal distance distanceis 3.4 m. isFocusing 3.4 m. Focusing at the hyperfocal at the hyperfocal distance will distance result will in the result foreground in the foreground (anything (anything closer) being closer) out beingof focus. out With of focus. UAV With based UAV photographs, based photographs, generally generallygiven altitudes given of altitudes tens of ofmeters tens ofabove meters the abovetallest thefeatures tallest in features the landscape in the landscape(e.g., trees), (e.g., the trees),entire thephotograph entire photograph will be collected will be within collected the withinhyperfocal the hyperfocaldistance. For distance. example, For with example, a micro with 4/3 asensor micro (such 4/3 sensoras the X5S), (such f as/5.6 the and X5S), a 24f mm/5.6 lens, and the a 24 h mmyperfocal lens, thedistance hyperfocal is 6.9 distancem. With the is 6.9 15 m.mm With lens the used 15 at mm Jatob lensá, usedthe hyperfocal at Jatobá, thedistance hyperfocal ranged distance from 2.7 ranged–3.7 m. fromAt a flight 2.7–3.7 altitude m. At of a flight30 m AGL altitude (Figure of 30 5a), m the AGL entire (Figure landscape5a), the was entire within landscape the hyperfocal was within distance. the hyperfocalUnderwater, distance. however, Underwater, if the water however, is shallow if the and/or water the is operator shallow and/oris close theto the operator substrate, is close care to must the substrate,be taken careretain must an acceptable be taken retain focus an for acceptable as much focus of each for frame as much as ofpossible. each frame This as can possible. be achieved This can by becalculating achieved the by calculatingDoF given a the particular DoF given focal a particular length and focal aperture length (Figure and aperture 16). The (Figure lens can 16 ).be The focused lens canon a be section focused of onthe a substrate section of that the would substrate centre that and would maximize centre andthe DoF maximize over the the range DoF overof topography. the range of topography.The shutter speed should be fast enough to freeze motion; this is fundamentally important to ensureThe the shutter frames speed are in should focus. At be least fast enough1/125 sec to or freeze faster motion;should be this used is fundamentallyfor underwater importantphotography to ensurewhenever the frames possible. are in Photographs focus. At least should 1/125 be sec taken or faster under should the be br usedightest for underwater illumination photography conditions wheneveravailable possible.taking into Photographs consideration should water be depth taken and under clarity. the brightest And, if possible, illumination flash conditions should be available avoided takingbecause into shadows consideration from the water objects depth or structures and clarity. created And, by if possible,the flash will flash change should with be avoided each perspective because shadowsfrom which from the the fram objectses are or taken structures and reduce created the by likelihood the flash of will matching change keypoints. with each Diffusing perspective the from flash whichfrom the the strobes frames arecan takenhelp to and mitigate reduce the harsh likelihood shadows of matching if they must keypoints. be used. Diffusing Lastly, the variable flash fromfocal thelength strobes lenses can could help to result mitigate in deterioration the harsh shadows of the if SfM they-MVS must model be used. over Lastly, a fixed variable focal focal length length lens. lensesHowever, could with result the in use deterioration of a lens with of the high SfM-MVS quality modeloptics, overhigh asharpness, fixed focal low length distortion lens. However, and low withchromatic the use aberration of a lens the with difference high quality should optics, be minimal. high sharpness, low distortion and low chromatic aberration the difference should be minimal. 5. Conclusions 5. Conclusions In conclusion, we have shown the SfM-MVS framework from both UAV and underwater photographyIn conclusion, can be we used have to showneffectively the assess SfM-MVS freshwater framework habitat from complexity both UAV in a and robust underwater way. We photographycalculated habitat can becomplexity used to metrics effectively including assess rugosity, freshwater slope habitat and 3D complexity fractal dimension in a robust from way. the WeSfM calculated-MVS products. habitat Our complexity results metrics show how including these products rugosity, slope provide and spatially 3D fractal explicit dimension complexity from themetrics, SfM-MVS which products. are more Ourcomprehensive results show than how conventional these products arbitrary provide cross spatially sections explicit which complexity may not be metrics,representative which areof the more habitat. comprehensive The shallow than neural conventional network arbitraryclassifications cross of sections SfM-MVS which products may not of besubstrate representative exposed of in the the habitat. dry season The resulted shallow neuralin high networkaccuracies classifications across classes of allowing SfM-MVS us products to quantify of substratethe proportion exposed of the in the classes dry seasonavailable resulted to the infishes high in accuracies the wet season. across UAV classes and allowing underwater us to SfM quantify-MVS is robust for quantifying freshwater habitat classes and complexity and should be chosen whenever possible over conventional methods (e.g., chain-and-tape) because of the repeatability, scalability and

Remote Sens. 2018, 10, 1912 22 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 22 of 28 themulti proportion-dimensional of the nature classes of available the products. to the fishes The SfM in the-MVS wet season.products UAV can and be underwaterused to identify SfM-MVS high ispriority robust freshwater for quantifying sectors freshwater for conservation, habitat classes species and occurrences complexity and and diversity should bestudies chosen to wheneverprovide a possiblebroader overindication conventional for overall methods fish species (e.g., chain-and-tape) diversity and provide because repeatability of the repeatability, for monitoring scalability change and multi-dimensionalover time. We have nature further of the products. discussed The best SfM-MVS practices products for underwater can be used SfMto identify-MVS high highli priorityghting freshwaterdifferences sectorsbetween for underwater conservation, and speciesUAV based occurrences photography. and diversity Despite studiesthe Xingu’s to provide unique adiversity, broader indicationthe recent implementation for overall fish speciesof the Belo diversity Monte and hydroelectric provide repeatability dam in 2015, for will monitoring negatively changeimpact some over time.of the Wevery have specific further habitats discussed [55,70 best–72] as practices already for observed underwater by the SfM-MVS authors of highlighting this study. As differences such, our betweenstudy serves underwater as an example and UAV of baseda simple photography. to implement, Despite yet much the Xingu’s needed unique framework diversity, for repeatable the recent implementationand consistent in of-situ the monitoring Belo Monte of hydroelectric freshwater aquatic dam in 2015,habitats. will negatively impact some of the very specific habitats [55,70–72] as already observed by the authors of this study. As such, our study serves as an example of a simple to implement, yet much needed framework for repeatable and consistent Author Contributions: Conceptualization, M.K., O.L. and L.S.; methodology, M.K., O.L. and L.S.; formal in-situ monitoring of freshwater aquatic habitats. analysis, M.K.; investigation, M.K., O.L., L.S., T.V., J.P.A.-M; resources, M.K., O.L., L.S. and T.V.; writing— Authororiginal Contributions: draft preparation,Conceptualization, M.K., O.L., J.P.A. M.K.,-M., O.L. L.S.and and L.S.; T.V; methodology, writing—review M.K., and O.L. editing, and L.S.; M.K., formal O.L., analysis, J.P.A.- M.K.;M., L.S. investigation, and T.V. M.K., O.L., L.S., T.V., J.P.A.-M; resources, M.K., O.L., L.S. and T.V.; writing—original draft preparation, M.K., O.L., J.P.A.-M., L.S. and T.V; writing—review and editing, M.K., O.L., J.P.A.-M., L.S. and T.V. Funding: Natural Sciences and Engineering Research Council of Canada, Discovery Grant Program to Kalacska Funding:and CNPqNatural Universal Sciences Project and #486376/2013 Engineering-3 Researchto Sousa. Council of Canada, Discovery Grant Program to Kalacska and CNPq Universal Project #486376/2013-3 to Sousa. Acknowledgments: We would like to thank Damilton Rodrigues da Costa (Dani) for fieldwork assistance and Acknowledgments: We would like to thank Damilton Rodrigues da Costa (Dani) for fieldwork assistance and NormaNorma SalcedoSalcedo andand BlakeBlake StoughtonStoughton fromfrom AquaticaAquatica forfor cameracamera housinghousing support.support. ConflictsConflicts ofof Interest:Interest:The The authorsauthors declaredeclare nono conflictconflict ofof interest.interest. TheThe fundersfunders hadhad nono rolerole inin thethe designdesign ofof thethe study;study; inin thethe collection,collection, analyses,analyses, oror interpretationinterpretation ofof data;data; inin thethe writingwriting ofof thethe manuscript,manuscript, oror inin thethe decisiondecision toto publishpublish thethe results.results.

AppendixAppendix AA

Figure A1. Cont.

Remote Sens. 2018, 10, 1912 23 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 23 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 23 of 28

FigureFigure A1.A1. ((A)) PhotographPhotograph ofof underwaterunderwater rockrock structurestructure usedused toto determinedetermine thethe uncertaintyuncertainty inin thethe Figuredensedense A1.3D point point(A) Photograph cloud. cloud. P1 P1–P4–P4 of representunderwater represent the therock locknuts locknuts structure used used usedas targets. as to targets. determine (B) Dense (B) the Dense 3D uncertainty point 3D pointcloud in cloudof the the denseofrock the 3D structure rock point structure cloud. in ‘a P1.’ in –ScaleP4 ‘a.’ represent Scale bar baris the in is locknuts inmeters. meters. used The The as interactive targets. interactive (B ) point Dense point cloud 3D cloud point is is cloud available available of the at: rockhttps://bit.ly/calib_rockhttps://bit.ly/calib_rock structure in ‘a.’ .Scale . bar is in meters. The interactive point cloud is available at: https://bit.ly/calib_rock.

(a) (a)

Figure A2. Cont.

Remote Sens. 2018, 10, 1912 24 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 24 of 28

(b)

(c)

Figure A2. Cont.

Remote Sens. 2018, 10, 1912 25 of 28 Remote Sens. 2018, 10, x FOR PEER REVIEW 25 of 28

(d)

FigureFigure A2. A2. OverallOverall confusion confusion matrix matrix from the from neural the network neural classification network classification for (a) Iriri; ( forb) Culuene; (a) Iriri; ((cb) )Xadá; Culuene; (d) Retroculus. (c) Xadá;( POd )= Retroculus.Podostemaceae, PO CO = = Podostemaceae, Cobbles, BR = Bedrock, CO = Cobbles, SH = Shallow BR =water, Bedrock, SD =SH Shadow, = Shallow VG water = Vegetation,, SD = Shadow, TW = Turbid VG = Vegetation, water, WW TW = White = Turbid water, water, SA = WW Sand, = RA White = Gravel water, Assemblage.SA = Sand, RAY axis = Gravel represents Assemblage the target. class, Y axis X axis represents represents the the target output class, class. X axis represents the output class. References References 1. Hutchinson, G.E. Population studies— ecology and demography—Concluding remarks. Cold 1. SpringHutchinson, Harb. Symp G.E.. Population Quant. Boil studies—Animal. 1957, 22, 415–427 ecology. and demography—Concluding remarks. Cold Spring 2. Vandermeer,Harb. Symp.Quant. J.H. Niche Boil. Theory1957, 22. Annu, 415–427.. Rev. [ EcolCrossRef. Syst]. 1972, 3, 107–132. 3.2. Yamazaki,Vandermeer, D.; J.H. Trigg, Niche M.A Theory..; Ikeshima,Annu. D Rev.. Development Ecol. Syst. 1972 of a, global3, 107–132. similar [CrossRef to 90 m] water body map using 3. multiYamazaki,-temporal D.; Trigg,Landsat M.A.; images Ikeshima,. Remote D. Sens Development. Environ. 2015 of, a 171 global, 337 similar–351. to 90 m water body map using 4. Gleason,multi-temporal C.J.; Smith, Landsat L.C. images. TowardRemote global Sens. mapping Environ. of river2015 ,discharge171, 337–351. using [CrossRef satellite ]images and at-many- 4. stationsGleason, hydraulic C.J.; Smith, geometry L.C.. Proc Toward. Natl.global Acad. Sci mapping. USA 2014 of, 111 river, 4788 discharge–4791. using satellite images and 5. Pajares,at-many-stations G. Overview hydraulic and current geometry. StatusProc. of remote Natl. Acad. sensing Sci. a USApplications2014, 111 based, 4788–4791. on unmanned [CrossRef aerial][PubMed vehicles] 5. (UAVs)Pajares,. G.Photogramm Overview. Eng and. currentRemote Sens Status. 2015 of remote, 81, 281 sensing–329. applications based on unmanned aerial vehicles 6. Pimm,(UAVs). S.LPhotogramm..; Alibhai, S. Eng.; Bergl, Remote R.; Dehgan, Sens. 2015 A,.;81 Giri,, 281–329. C.; Jewell, [CrossRef Z.; Joppa,] L.; Kays, R.; Loarie, S. Emerging 6. TechnologiesPimm, S.L.; Alibhai, to Conserve S.; Bergl, Biodiversity R.; Dehgan,. Trends A.; Ecol Giri,. Evol C.; Jewell,. 2015, 30 Z.;, 685 Joppa,–696 L.;. Kays, R.; Loarie, S. Emerging 7. SanchezTechnologies-Azofeifa, to Conserve A.; Guzman, Biodiversity. J.A.; Campos,Trends Ecol.C.A.; Evol.Castro,2015 S.,; 30Garcia, 685–696.-Millan, [CrossRef V.; Nightingale,][PubMed J.]; Rankine, 7. CSanchez-Azofeifa,. Twenty-first century A.; Guzman, remote J.A.; sensing Campos, technologies C.A.; Castro, are S.;revolutionizing Garcia-Millan, the V.; Nightingale,study of tropical J.; Rankine, forests C.. BiotropicaTwenty-first 2017 century, 49, 604 remote–619. sensing technologies are revolutionizing the study of tropical forests. Biotropica 8. Anderson,2017, 49, 604–619. K.; Gaston, [CrossRef K.J. Lightweight] unmanned aerial vehicles will revolutionize spatial ecology. Front. 8. EcolAnderson,. Environ K.;. 2013 Gaston,, 11, 138 K.J.–146 Lightweight. unmanned aerial vehicles will revolutionize spatial ecology. 9. Baxter,Front.Ecol. P.W Environ..J.; Hamilton,2013, 11G., 138–146.Learning [CrossRefto fly: Integrating] spatial ecology with unmanned aerial vehicle 9. surveysBaxter, P.W.J.;. Ecosphere Hamilton, 2018, 9 G., doi:10.1002/ecs2.2194. Learning to fly: Integrating spatial ecology with unmanned aerial vehicle surveys. 10. Linchant,Ecosphere 2018J.; Lisein,, 9.[CrossRef J.; Semeki,] J.; Lejeune, P.; Vermeulen, C. Are unmanned aircraft systems (UASs) the future of wildlife monitoring? A review of accomplishments and challenges. Mamm. Rev. 2015, 45, 239–252.

Remote Sens. 2018, 10, 1912 26 of 28

10. Linchant, J.; Lisein, J.; Semeki, J.; Lejeune, P.; Vermeulen, C. Are unmanned aircraft systems (UASs) the future of wildlife monitoring? A review of accomplishments and challenges. Mamm. Rev. 2015, 45, 239–252. [CrossRef] 11. Fonstad, M.A.; Dietrich, J.T.; Courville, B.C.; Jensen, J.L.; Carbonneau, P.E. Topographic structure from motion: A new development in photogrammetric measurement. Earth Surf. Process. Landf. 2013, 38, 421–430. [CrossRef] 12. Micheletti, N.; Chandler, J.H.; Lane, S.N. Structure from Motion (SfM) Photogrammetry. In Geomorphological Techniques; British Society for Geomorphology: London, UK, 2015; pp. 2–12. 13. Kalacska, M.; Chmura, G.L.; Lucanus, O.; Bérubé, D.; Arroyo-Mora, J.P. Structure from motion will revolutionize analyses of tidal wetland landscapes. Remote Sens. Environ. 2017, 199, 14–24. [CrossRef] 14. Aguera-Vega, F.; Carvajal-Ramirez, F.; Martinez-Carricondo, P.; Lopez, J.S.H.; Mesas-Carrascosa, F.J.; Garcia-Ferrer, A.; Perez-Porras, F.J. Reconstruction of extreme topography from UAV structure from motion photogrammetry. Measurement 2018, 121, 127–138. [CrossRef] 15. Cunliffe, A.M.; Brazier, R.E.; Anderson, K. Ultra-fine grain landscape-scale quantification of dryland vegetation structure with drone-acquired structure-from-motion photogrammetry. Remote Sens. Environ. 2016, 183, 129–143. [CrossRef] 16. Harwin, S.; Lucieer, A. Assessing the accuracy of georeferenced point clouds produced via multi-view stereopsis from unmanned aerial vehicle (UAV) imagery. Remote Sens. 2012, 4, 1573–1599. [CrossRef] 17. James, M.R.; Robson, S. Straightforward reconstruction of 3D surfaces and topography with a camera: Accuracy and geoscience application. J. Geophys. Res. Earth Surf. 2012, 117.[CrossRef] 18. House, J.E.; Brambilla, V.; Bidaut, L.M.; Christie, A.P.; Pizarro, O.; Madin, J.S.; Dornelas, M. Moving to 3D: Relationships between coral planar area, surface area and volume. PeerJ 2018, 6, e4280. [CrossRef][PubMed] 19. Bryson, M.; Ferrari, R.; Figueira, W.; Pizarro, O.; Madin, J.; Williams, S.; Byrne, M. Characterization of measurement errors using structure-from-motion and photogrammetry to measure marine habitat structural complexity. Ecol. Evol. 2017, 7, 5669–5681. [CrossRef][PubMed] 20. Palma, M.; Casado, M.R.; Pantaleo, U.; Cerrano, C. High resolution orthomosaics of African coral reefs: A tool for wide-scale benthic monitoring. Remote Sens. 2017, 9, 705. [CrossRef] 21. Raoult, V.; Reid-Anderson, S.; Ferri, A.; Williamson, J.E. How reliable is structure from motion (SfM) over time and between observers? A case study using coral reef bommies. Remote Sens. 2017, 9, 740. [CrossRef] 22. Young, G.C.; Dey, S.; Rogers, A.D.; Exton, D. Cost and time-effective method for multiscale measures of rugosity, fractal dimension, and vector dispersion from coral reef 3D models. PLoS ONE 2017, 12, e0175341. [CrossRef][PubMed] 23. Leon, J.X.; Roelfsema, C.M.; Saunders, M.I.; Phinn, S.R. Measuring coral reef terrain roughness using ‘Structure-from-Motion’ close-range photogrammetry. Geomorphology 2015, 242, 21–28. [CrossRef] 24. Robert, K.; Huvenne, V.A.I.; Georgiopoulou, A.; Jones, D.O.B.; Marsh, L.; Carter, G.D.O.; Chaumillon, L. New approaches to high-resolution mapping of marine vertical structures. Sci. Rep. 2017, 7, 9005. [CrossRef] [PubMed] 25. Singh, H.; Roman, C.; Pizarro, O.; Eustice, R.; Can, A. Towards high-resolution imaging from underwater vehicles. Int. J. Robot. Res. 2007, 26, 55–74. [CrossRef] 26. Tamminga, A.; Hugenholtz, C.; Eaton, B.; Lapointe, M. Hyperspatial remote sensing of channel reach morphology and hydraulic fish habitat using an unmanned aerial vehicle (UAV): A first assessment in the context of river research and management. River Res. Appl. 2015, 31, 379–391. [CrossRef] 27. Tamminga, A.D.; Eaton, B.C.; Hugenholtz, C.H. UAS-based remote sensing of fluvial change following an extreme flood event. Earth Surf. Process. Landf. 2015, 40, 1464–1476. [CrossRef] 28. Ferrari, R.; Bryson, M.; Bridge, T.; Hustache, J.; Williams, S.B.; Byrne, M.; Figueira, W. Quantifying the response of structural complexity and community composition to environmental change in marine communities. Glob. Chang. Boil. 2016, 22, 1965–1975. [CrossRef][PubMed] 29. Fonseca, V.P.; Pennino, M.G.; de Nobrega, M.F.; Oliveira, J.E.L.; Mendes, L.D. Identifying fish diversity hot-spots in data-poor situations. Mar. Environ. Res. 2017, 129, 365–373. [CrossRef][PubMed] 30. Gonzalez-Rivero, M.; Harborne, A.R.; Herrera-Reveles, A.; Bozec, Y.M.; Rogers, A.; Friedman, A.; Ganase, A.; Hoegh-Guldberg, O. Linking fishes to multiple metrics of coral reef structural complexity using three-dimensional technology. Sci. Rep. 2017, 7, 13965. [CrossRef][PubMed] Remote Sens. 2018, 10, 1912 27 of 28

31. Nolan, E.T.; Barnes, D.K.A.; Brown, J.; Downes, K.; Enderlein, P.; Gowland, E.; Hogg, O.T.; Laptikhovsky, V.; Morley, S.A.; Mrowicki, R.J.; et al. Biological and physical characterization of the seabed surrounding Ascension Island from 100–1000 m. J. Mar. Boil. Assoc. UK 2017, 97, 647–659. [CrossRef] 32. Shumway, C.A.; Hofmann, H.A.; Dobberfuhl, A.P. Quantifying habitat complexity in aquatic ecosystems. Freshw. Biol. 2007, 52, 1065–1076. [CrossRef] 33. St Pierre, J.I.; Kovalenko, K.E. Effect of habitat complexity attributes on species richness. Ecosphere 2014, 5, 1–10. [CrossRef] 34. Taniguchi, H.; Tokeshi, M. Effects of habitat complexity on benthic assemblages in a variable environment. Freshw. Biol. 2004, 49, 1164–1178. [CrossRef] 35. Tokeshi, M.; Arakaki, S. Habitat complexity in aquatic systems: Fractals and beyond. Hydrobiologia 2012, 685, 27–47. [CrossRef] 36. Lassau, S.A.; Hochuli, D.F. Effects of habitat complexity on ant assemblages. Ecography 2004, 27, 157–164. [CrossRef] 37. McCormick, M.I. Comparison of field methods for measuring surface-topography and their associations with a tropical reef fish assemblage. Mar. Ecol. Prog. Ser. 1994, 112, 87–96. [CrossRef] 38. Dustan, P.; Doherty, O.; Pardede, S. Digital reef rugosity estimates coral reef habitat complexity. PLoS ONE 2013, 8, e57386. [CrossRef][PubMed] 39. Gleason, A.C.R. Recovery of coral reef rugosity from stereo image pairs. In Proceedings of the Oceans 2003 Mts/IEEE: Celebrating the Past...Teaming toward the Future, San Diego, CA, USA, 22–26 September 2003; p. 451. 40. Shurin, J.B.; Cottenie, K.; Hillebrand, H. Spatial autocorrelation and dispersal limitation in freshwater organisms. Oecologia 2009, 159, 151–159. [CrossRef][PubMed] 41. Reichert, J.; Backes, A.R.; Schubert, P.; Wilke, T. The power of 3D fractal dimensions for comparative shape and structural complexity analyses of irregularly shaped organisms. Methods Ecol. Evol. 2017, 8, 1650–1658. [CrossRef] 42. Willis, S.C.; Winemiller, K.O.; Lopez-Fernandez, H. Habitat structural complexity and morphological diversity of fish assemblages in a Neotropical floodplain river. Oecologia 2005, 142, 284–295. [CrossRef] [PubMed] 43. Gorman, O.T.; Karr, J.R. Habitat structure and stream fish communities. Ecology 1978, 59, 507–515. [CrossRef] 44. Buhl-Mortensen, L.; Buhl-Mortensen, P.; Dolan, M.F.J.; Dannheim, J.; Bellec, V.; Holte, B. Habitat complexity and bottom fauna composition at different scales on the continental shelf and slope of northern Norway. Hydrobiologia 2012, 685, 191–219. [CrossRef] 45. Du Preez, C. A new arc-chord ratio (ACR) rugosity index for quantifying three-dimensional landscape structural complexity. Landsc. Ecol. 2015, 30, 181–192. [CrossRef] 46. Ahrenstorff, T.D.; Sass, G.G.; Helmus, M.R. The influence of littoral zone coarse woody habitat on home range size, spatial distribution, and feeding ecology of largemouth bass (Micropterus salmoides). Hydrobiologia 2009, 623, 223–233. [CrossRef] 47. Dias, R.M.; da Silva, J.C.B.; Gomes, L.C.; Agostinho, A.A. Effects of macrophyte complexity and hydrometric level on fish assemblages in a Neotropical floodplain. Environ. Biol. Fish. 2017, 100, 703–716. [CrossRef] 48. Dionne, M.; Folt, C.L. An experimental-analysis of macrophyte growth forms as fish foraging habitat. Can. J. Fish. Aquat. Sci. 1991, 48, 123–131. [CrossRef] 49. Gois, K.S.; Antonio, R.R.; Gomes, L.C.; Pelicice, F.M.; Agostinho, A.A. The role of submerged trees in structuring fish assemblages in reservoirs: Two case studies in South America. Hydrobiologia 2012, 685, 109–119. [CrossRef] 50. Storlazzi, C.D.; Dartnell, P.; Hatcher, G.A.; Gibbs, A.E. End of the chain? Rugosity and fine-scale bathymetry from existing underwater digital imagery using structure-from-motion (SfM) technology. Coral Reefs 2016, 35, 889–894. [CrossRef] 51. Pais, M.P.; Henriques, S.; Costa, M.J.; Cabral, H.N. Improving the “chain and tape” method: A combined topography index for marine fish ecology studies. Ecol. Indic. 2013, 25, 250–255. [CrossRef] 52. Getzin, S.; Wiegand, K.; Schoning, I. Assessing biodiversity in forests using very high-resolution images and unmanned aerial vehicles. Methods Ecol. Evol. 2012, 3, 397–404. [CrossRef] 53. Goulding, M.; Barthem, R.; Ferreira, E.J.G. The Smithsonian Atlas of the Amazon; Smithsonian Books: Washington, DC, USA, 2003; p. 253. Remote Sens. 2018, 10, 1912 28 of 28

54. Zuluaga-Gomez, M.A.; Fitzgerald, D.B.; Giarrizzo, T.; Winemiller, K.O. Morphologic and trophic diversity of fish assemblages in rapids of the Xingu River, a major Amazon tributary and region of endemism. Environ. Biol. Fish. 2016, 99, 647–658. [CrossRef] 55. Fitzgerald, D.B.; Winemiller, K.O.; Perez, M.H.S.; Sousa, L.M. Using trophic structure to reveal patterns of trait-based community assembly across niche dimensions. Funct. Ecol. 2017, 31, 1135–1144. [CrossRef] 56. Sabaj Perez, M. Where the Xingu bends and will soon break. Am. Sci. 2015, 103, 395–403. [CrossRef] 57. Varella, H.R.; Ito, P.M.M. Crenicichla dandara, new species: The black jacundá from the Rio Xingu (Teleostei: Cichlidae). Proc. Acad. Nat. Sci. Phila. 2018, 166, 1–12. [CrossRef] 58. Dandois, J.P.; Olano, M.; Ellis, E.C. Optimal altitude, overlap, and weather conditions for computer vision UAV estimates of forest structure. Remote Sens. 2015, 7, 13895–13920. [CrossRef] 59. Westaway, R.M.; Lane, S.N.; Hicks, D.M. The development of an automated correction procedure for digital photogrammetry for the study of wide, shallow, gravel-bed rivers. Earth Surf. Process. Landf. 2000, 25, 209–226. [CrossRef] 60. Woodget, A.S.; Carbonneau, P.E.; Visser, F.; Maddock, I.P. Quantifying submerged fluvial topography using hyperspatial resolution UAS imagery and structure from motion photogrammetry. Earth Surf. Process. Landf. 2015, 40, 47–64. [CrossRef] 61. Lowe, D.G. Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vis. 2004, 60, 91–110. [CrossRef] 62. Strecha, C.; von Hansen, W.; Van Gool, L.; Fua, P.; Thoennessen, U. On Benchmarking camera calibration and multi-view stereo for high resolution imagery. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Anchorage, AK, USA, 23–28 June 2008. 63. Strecha, C.; Bronstein, A.M.; Bronstein, M.M.; Fua, P. LDAHash: Improved matching with smaller descriptors. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 66–78. [CrossRef][PubMed] 64. Walbridge, S.; Slocum, N.; Pobuda, M.; Wright, D.J. Unified geomorphological analysis workflows with benthic terrain modeler. Geosciences 2018, 8, 94. [CrossRef] 65. Zawada, D.G.; Piniak, G.A.; Hearn, C.J. Topographic complexity and roughness of a tropical benthic seascape. Geophys. Res. Lett. 2010, 37.[CrossRef] 66. Moller, M.F. A scaled conjugate-gradient algorithm for fast supervised learning. Neural Netw. 1993, 6, 525–533. [CrossRef] 67. Chirayath, V.; Earle, S.A. Drones that see through waves—Preliminary results from airborne fluid lensing for centimetre-scale aquatic conservation. Aquat. Conserv. Mar. Freshw. Ecosyst. 2016, 26, 237–250. [CrossRef] 68. Brodu, N.; Lague, D. 3D terrestrial lidar data classification of complex natural scenes using a multi-scale dimensionality criterion: Applications in geomorphology. ISPRS J. Photogramm. Remote Sens. 2012, 68, 121–134. [CrossRef] 69. Smith, M.W.; Carrivick, J.L.; Quincey, D.J. Structure from motion photogrammetry in physical geography. Prog. Phys. Geogr. 2016, 40, 247–275. [CrossRef] 70. Fitzgerald, D.B.; Winemiller, K.O.; Perez, M.H.S.; Sousa, L.M. Seasonal changes in the assembly mechanisms structuring tropical fish communities. Ecology 2017, 98, 21–31. [CrossRef][PubMed] 71. Winemiller, K.O.; McIntyre, P.B.; Castello, L.; Fluet-Chouinard, E.; Giarrizzo, T.; Nam, S.; Baird, I.G.; Darwall, W.; Lujan, N.K.; Harrison, I.; et al. Balancing hydropower and biodiversity in the Amazon, Congo, and Mekong. Science 2016, 351, 128–129. [CrossRef][PubMed] 72. Andrade, M.C.; Winemiller, K.O.; Barbosa, P.S.; Fortunati, A.; Chelazzi, D.; Cincinelli, A.; Giarrizzo, T. First account of plastic pollution impacting freshwater fishes in the Amazon: Ingestion of plastic debris by piranhas and other serrasalmids with diverse feeding habits. Environ. Pollut. 2019, 244, 766–773. [CrossRef] [PubMed]

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).