Using video images for fisheries monitoring A manual for using underwater cameras, lighting and image analysis Science report SC050022/SR2 Science Manual – Using Video Images for Fisheries Monitoring i SCHO0408BNYB-E-P
The Environment Agency is the leading public body protecting and improving the environment in England and Wales. It’s our job to make sure that air, land and water are looked after by everyone in today’s society, so that tomorrow’s generations inherit a cleaner, healthier world. Our work includes tackling flooding and pollution incidents, reducing industry’s impacts on the environment, cleaning up rivers, coastal waters and contaminated land, and improving wildlife habitats.
Science at the Environment Agency Science underpins the work of the Environment Agency. It provides an up-to-date understanding of the world about us and helps us to develop monitoring tools and techniques to manage our environment as efficiently and effectively as possible. The work of the Environment Agency’s Science Department is a key ingredient in the partnership between research, policy and operations that enables the Environment Agency to protect and restore our environment.
Acknowledgements The Project owes a big “thank you” to Jim Gregory, Emma Washburn and Peter Clabburn of Environment Agency Wales (EAW). The latter pair spent a year each on assignment, devising ingenious ways to combine lighting and camera arrays, deploying equipment and talking already overworked colleagues into helping out and analysing results.
Contents Science at the Environment Agency iii Acknowledgements iv 1 Introduction 1 1.1 Where and When to use Video Images 1 1.2 Range of Applications 2 2 Criteria for Site Appraisal 2 2.1 Monitoring 2 2.1.1 Species ID 2 2.1.2 Sizing 3 2.1.3 Fish behaviour: 3 2.2 Logistics 3 2.2.1 Mains power 3 2.2.2 Equipment maintenance 3 2.2.3 Access to equipment 3 2.2.4 Equipment Housing 4 2.3 River characteristics 4 2.4 Cost 4 2.
3.5 Recording Hardware 17 3.5.1 Mains Powered Recording Hardware 17 3.5.2 12-volt recording options 18 3.6 Data storage 20 3.7 Introduction to Image Processing Software 20 3.7.1 Motion detection vs Image Analysis 20 3.7.2 Fishtick, The Motion Detection Software System 21 3.7.3 Digital Video Motion Detector (DVMD1-X), the Image Analysis System 23 3.7.4 Which software platform to apply? 24 4 Contacts 28 5 Case studies 29 6 References 37 List of tables and figures Table 2.
Figure 16: Example image collected at Manley Hall using the camera and lighting gantry 34 Figure 17: Larinier fish pass at Hampton Court on the River Lugg Figure 18: Infrared light was reflected off a white polypropylene sheet positioned above the fish pass exit 35 34 35 35 Appendices Appendix 1. Provision for Video Monitoring of Fish Passes: outline specification for head of passes 38 Appendix 2. Model for calculating uncertainty 50 Appendix 3. Fuel cell details 53 Appendix 4.
1 Introduction This manual details the equipment and methods required to record underwater video images and to use them to monitor and count fish. It outlines the combination and arrangement of camera, lighting, image recording equipment, motion detection and image analysis software for a variety of applications related to monitoring fish. The technique can be used to validate existing fish counters (resistivity, infrared, acoustic) or as a stand-alone counting system.
monitoring techniques, including image analysis and motion detection, can be used for these comparisons. Any natural or manmade channel, fish pass, bypass, or water intake that is a maximum of two metres wide and two metres deep can use video counting. Sections of weir face may also be suitable. 2 Criteria for site appraisal This section of the manual guides you through the process of choosing equipment and deciding how to deploy and orientate it on a specific site.
2.1.2 Sizing A simple method of sizing by reference point has been integrated into both the image processing techniques outlined in this report (Fishtick and DVMD). The user clicks on two points within the view a known distance apart (at approximately the same distance from the camera as the fish) in order to calibrate, before measuring the fish. A simple calculation then determines fish length from the calibration.
2.2.4 Equipment housing At some sites, you may be lucky enough to have a gauging station hut or similar in which to store recording hardware. On other sites there may be no sheltered storage and you will have to install your own cabinet or hut (for supplier information, see Section 3.1). Bear in mind the location of the site and the likelihood of vandalism, as this will affect the material you choose and where you decide to locate the housing. 2.
2.5.2 Retrofitting In many cases, it will be possible to retrofit video counting to an existing fish pass. For advice, please see the Contacts Section. 2.6 Validating an existing counter Absolute validation, that is, an accurate record of how many fish actually passed the counter and when, is very difficult to achieve.
Example use of selection matrix in Table 2.1 Scenario: • • • • You have a 900 mm wide Larinier fish pass which you want to monitor. There is mains power at the site. You want to know whether fish use the pass and what species use it. You have a budget of £4,000. Selection matrix: 6 • In the first selection criteria box, read along the row for a Larinier pass of up to 900 mm. There are three suitable systems, Systems 1, 3 and 5, but the rest of your requirements might narrow the options down.
Table 2.
Table 2.
System System 6 • • • • Comments Two underwater sideways cameras opposite each other White board on bed of pass Overhead lamp (infrared or white light) Desktop PC with DVR card (mains version) • • • OR • Mini-ITX PC with DVR card (12v version) • Recommended software: Fishtick System 7 • • • Up to four cameras: underwater upwardlooking cameras and/or a sideways camera next to notch Overhead, angled lamp(s) either infrared or white light Desktop PC with DVR card (mains version) • • For very wide pass
3 Equipment A video fish counting system has six major components: • • • • • • 3.1 HOUSING POWER SUPPLY LIGHTING CAMERAS RECORDING HARDWARE IMAGE PROCESSING SOFTWARE Housing A dry and secure housing within close proximity of the site (cable runs greater than 250 metres should be avoided if possible) will be required for the recording equipment.
3.2 • • 3.2.1 Power supply MAINS POWER SUPPLY BATTERY BANKS Stand alone Solar panels Fuel cells Micro-hydropower turbines Mains power If mains power can be installed at the site, this is the best option. If the site is at risk of flooding, the voltage will need to be dropped to 24 or 48 volts AC. This can be done at the power take-off point (above the flood prone area) and a cable run down to the site and terminated with an IP68 rated connector. 3.2.
need more amps than your power source can supply over an acceptable period, forget it! A summary of equipment power requirements is provided in Table 3.5. Figure 3.2: Bank of leisure batteries powering video fish counting system 3.3 Lighting Four suggested lighting options are: • • • • LIGHT PANELS (LED or fluorescent tube panels) LED ILLUMINATORS AND LAMPS FLOODLIGHTS FLUORESCENT TUBE LIGHTING The better the image, the more questions the data can answer (fish size, species identification).
Fish sensitivity to light: References Atema J et al. 1988. Sensory biology of aquatic animals. Springer Ltd, London. Douglas R and Djamgoz M. 1990. The visual system of fish. Chapman & Hill, London. Herring PJ. 1978. Bioluminescence in action. Academic Press, Oxford. Herring PJ et al. 1990. Light and life in the sea. Cambridge University, Cambridge. Munz FW and Beatty DD. 1965. A critical analysis of the visual pigments of salmon and trout. Vision Research, 5(1), 1-17. Nicol JAC. 1989. The eyes of fishes.
Deep red fluorescent tube light panels were used on Cardiff Bay fish pass. These large light panels require a mains power supply and would not be suitable for a 12volt system. They are also expensive and require a lot of maintenance. Each tube is powered separately, entailing a large number of underwater connections, and problems were encountered with ensuring no water ingress at these connection points. The fish sizing method incorporated into the image processing systems (Section 3.
For smaller sites, a less powerful LED lamp (Table 3.1) supplied by RF Concepts (Table 3.4) would provide sufficient light to enable fish counting. This lamp is waterproof but cannot be immersed. When positioning lighting, remember that a lot of light will be absorbed at the water surface and that infrared light is rapidly attenuated in water. 3.3.3 Floodlights Security floodlights can be deployed in air to illuminate the area. Red filters can be attached to reduce any potential impact on fish movements.
Table 3.1: Summary specification of the lighting equipment Voltage Power requirement Wavelength (nm) Size (mm) Cost (£) 3.3.5 LED strip (449 mm) 12 260 mA per strip 625 449 mm long 7 Infrared illuminator 24 2 amps 850 125 x 175 x 100 600 Infrared LED lamp 12 490 mA 850 70 (D) x 90 (L) 90 Suspended sediment Suspended sediment attenuates light and reduces the visual range in a body of water.
Figure 3.6: A low-budget underwater bullet camera with 30 m of cable 3.5 • • Recording hardware MAINS-POWERED RECORDING HARDWARE (PC + DVR card) 12-VOLT RECORDING HARDWARE Low-power digital video recorders Low-power computers 3.5.1 Mains-powered recording hardware The best option for recording data is a computer-based recording system consisting of a digital video recorder (DVR) card installed in a PC.
A system such as this can be Standardised format: Is it used to record video files which compatible? can then be bought back to the Digital recorders are reasonably cheap and some office and either watched may be attractive low-power options. But beware of (applicable for video validation compatibility problems.
At the other end of the scale are the ‘MicroDVR’ class of recorders. As the name suggests, these are small and very portable 12-volt recording options. They are also cheap, with prices starting at around £130 (Table 3.4). These units can often be powered by AA batteries or connected to a mains power supply. Data are recorded in MPEG4 format onto removable media such as ‘Secure Digital’ (SD) cards; these can be removed and files copied to a computer using an SD card reader.
3.6 Data storage EXTERNAL USB HARD DRIVES Mains-powered Low-power drives External USB hard drives are a flexible and simple way to collect, transport and, if necessary, store data. A range of drives are available with up to two terabytes capacity. Some makes were tested for the purposes of the project but it was not possible to try everything, especially considering how quickly this area is expanding. A good place to find information is on www.dabs.
configured. In reality, an image analysis system requires at least a portion of the detected events to be verified visually by an operator. 3.7.2 Fishtick, the motion detection software system Fishtick is an image processing software package developed by the Oregon-based company Salmonsoft. It consists of a capture programme, FishCap, and a review programme, FishRev. There are a number of different versions suitable for different purposes.
relatively uniform. function better. In less optimal conditions, the motion detection algorithm will The captured images are stitched together and recorded to a new video file. FishRev allows the user to play this file back and add fish to an Excel spreadsheet using the fish up and down arrow keys at the bottom of the screen (Figure 3.8). The species and direction of movement are added at this stage and the user may also add size information if required (Figure 3.9).
Figure 3.9: FishRev screen showing sizing of the fish from the previous figure. Size information is displayed below the bottom right of the video screen. 3.7.3 Digital video motion detector (DVMD1-X), the image analysis system The DVMD is an image-tracking device produced and developed by Radiant, a company based in Colorado, USA. The DVMD1-X is a stand-alone product with its own built in digital signal processor.
The display contains an editable data table (in .csv file format) and a display window in which a video clip can be viewed (Figure 3.10). The table is a summary of all of the ‘tracked events’, providing a record of data for each of the events tracked by the DVMD. The user can scroll down through list and, as each event is selected, the video clip from the event is displayed in the window (Figure 3.10).
Table 3.
Table 3.4: Equipment prices and supplier information Equipment Housing GRP equipment housing (Roadside Range) Steel cabinet and boxes Cost From £235 Metal security boxes Power Leisure batteries Methanol fuel cell stack (SFC A50) Micro-hydro turbine Cameras Lighting Underwater cameras Light panel (600 x 300 mm) Infrared 24-volt LED illuminator Infrared 12-volt LED lamps (IR-70) Red LED strips Red LEDs on a roll, very flexible with a selfadhesive backing.
Swann DVR card X200 DVR MicroDVR £129 Mini-ITX PC £550 CCTV test monitor £249 12-volt VGA PC monitors Processing £99 £2,400 From £126 Fishtick $6,995* DVMD $875* www.dabs.com Timespace Technology Ltd, Blackstone Road, Huntingdon, PE29 6TT. Tel: 01480 414147. Website: www.tspace.co.uk System Q Ltd, Turnoaks Business Park, Hasland, Chesterfield, S40 2WB. Tel: 01246 000000. Website: www.systemq.
4 Contacts There is a wealth of knowledge and experience within the Environment Agency relating to fish counting and video monitoring. For information, advice or “pointing in the right direction”, contact Jim Gregory or Emma Washburn in the first instance. National Lead: Fish counting and using video images for fishery monitoring Jim Gregory E-mail: Jim.Gregory@Environment-Agency.gov.
5 Case studies 5.1 Haverfordwest Town Weir, River Cleddau Type of fish pass: Larinier 1,500 mm wide (Figure 115.1) Power supply: Mains power available System deployment: Trial deployment which, if successful, to become long term Information required: Evidence of fish using the pass Identification: Species level Sizing: Not during trial, but possible Cost of system hardware (not including image processing): below £3,000 System components System 1 (Table 2) was used for the trial deployment (Figure 12).
Figure 11: Installing equipment on Haverfordwest Town Weir fish pass (1,500 mm wide Larinier fish pass) Light panel Camera mounted here 1500mm Figure 12: Fish pass exit showing light panel and scaffold poles, to which a camera was attached 30 Science Manual – Using Video Images for Fisheries Monitoring
Results The data were recorded as MPEG4 video files (Figure 13) and played back through Fishtick and the DVMD. The parameters used are detailed in Table 5.1 and 5.2. The performance exhibited by Fishtick was good for this application, with 94 per cent of targets detected. DVMD assessment was disappointing in terms of efficiency (49 per cent) and was particularly poor in detecting fish in shoals.
5.2 Warkworth, River Coquet Type of fish pass: Pool and traverse and Denil (Figure 14) Power supply: Mains power available System deployment: Trial deployment Information required: Evidence of fish using the pass Identification: Species level Sizing: Not during trial Cost of system hardware (not including image processing): below £1,000 System components System 1 (Table 2) was used for the trial deployment.
Results Approximately 60 fish were used as a subsample with which to assess the software. Fishtick detected 75 per cent of targets and the DVMD detected 73 per cent of targets. 5.
Figure 16: Example image collected at Manley Hall using the camera and lighting gantry 5.4 Hampton Court, River Lugg Type of fish pass: Larinier (Figure 17) Power supply: Battery bank System deployment: Validation of Vaki counter and trial deployment Information required: Evidence of fish for comparison with Vaki data Identification: Species level Sizing: Not possible during this deployment System components System 7 (Table 2) was used for this deployment.
Figure 17: Larinier fish pass at Hampton Court on the River Lugg Figure 18: Infrared light was reflected off a white polypropylene sheet positioned above the fish pass exit Science Manual – Using Video Images for Fisheries Monitoring 35
Table 5.1: Fishtick parameter settings used for data collected from the case studies Parameters Detection Detection filters Motion threshold Auto masking Auto mask threshold Auto mask frequency Pixel threshold Smallest object LoRes detection Frames recorded before Frames recorded after Haverfordwest Town Weir Region 1 Region 2 18 30 OFF OFF 2 2 75 75 12 80 8 120 OFF OFF 3 3 3 3 Warkworth Manley Hall Hampton Court 18 OFF 2 75 8 8 OFF 3 3 3 OFF 4 99 25 4 OFF 3 3 18 ON 2 75 8 8 OFF 3 3 Table 5.
6 References Washburn, E. 2007. Haverfordwest Town Weir Fish Pass: Development of a fish counting system to assess pass effectiveness. Environment Agency Internal Report.
Appendix 1: Provision for video monitoring of fish passes: outline specification for head of passes Simple modifications to the design of the head of a fish pass will permit monitoring of fish passage by video. This can be achieved by illuminating the counting area, increasing the distance of cameras from the fish and allowing for isolation of the area in order for adjustments to the system to be carried out.
• • Channel to extend to the top of the fish pass wall. Removable flanges (100 mm long and 20 mm wide) to be bolted to either side of camera channel at the bottom, to fix light panel or polypropylene board in position (Figure A1.19A1.2). Perspex sheet design to fix the light panel Light panels to be fixed down by attaching counter-sunk (at bottom edge) flanges to the Perspex sheets. Using coach bolts with the head on the river side will mean that no turbulence will ensue from the bolts.
620mm 35 – 40mm 30mm Figure A1.
100mmm 50mm 10mm channel to accommodate 8mm perspex sheet with optical refractive index = 1.5 300mm 300mm 260mm Removable flange bolted to base of camera channel at correct height to sit on top of light panel or board and hold in position 20mm Figure A1.
Type 70 fitting to attach pole to wall of camera channel Scaffold pole Camera mounted within a scaffold clamp (detail below) Scaffold pole fits over spike or peg on base of camera channel to hold it in place Camera channel Figure 20.
69 mm Scaffold pole (Allows rotation of the camera in the horizontal plane) Camera (Allows rotation of the camera in the vertical plane) Kee Systems Clamp Type 114 (Swivel Tee) Size 6 Kee Systems clamp Type 10 (Single Socket Tee) Size 6 Figure 21: Front view and details of the camera mount arrangement Science Manual – Using Video Images for Fisheries Monitoring 43
150mm to centre of lens. Camera must be central within camera channel 150mm maximum to camera lens Position of camera Spike/peg 80mm to wall of camera chamber Plate on wall of camera channel to bolt Kee Systems Type 70 rail support clamp to (clamp must be easy to remove and attach).
A1.2 Larinier pass A) If the pass is equal to or less than 900 mm wide, one camera chamber is required (Figure 23). The light panel can be mounted in either a bed or side recess and a polypropylene board mounted in the other recess: Recess for lighting/polypropylene boards Downslope in this area (optional, but preferable) Baffle section Flow 620mm Camera channel Stop log grooves Figure 23: Plan view of counting arrangement on Larinier pass up to 900 mm Side recess See general specification (Figure ).
Water velocity Maintain water velocity of 0.5 ms-1 (coarse fish) to 1.0 ms-1 (salmonids) to deter fish holding in the upstream exit channel. B) If the pass is greater than 900 mm wide, it is necessary to have a camera channel on each side of the fish pass exit. The light panel can be mounted in a bed recess.
A1.3 Denil pass Where exit channel is present, use specification for a Larinier pass less than or equal to 900 mm wide (Figure 23). A1.4 Vertical slot A camera chamber to contain up to four sideways cameras opposite a light panel or panels mounted in a side recess.
• • • The runner to have an inside depth of 35 to 40 mm, width of 620 mm and to extend to the top of the fish pass wall so that the board/panel can be slotted in and lowered into position. The two front retaining flanges to be 30 mm long. If a light panel is required, this should be 30 mm x 600 mm x height equivalent to Q10. Bed recess Not required. Camera channel See general specification. Camera mount • It is recommended that the camera mount is constructed from Kee Systems (www.keesystems.
Appendix 2: Model for calculating uncertainty Estimation of numbers of fish from a resistivity counter, image counting system (IC) and ground-truthing (GT) Counts from the Manley Hall counter (Dee) over four days are as follows: Counter Yes Yes Yes No No IC No No Yes No Yes GT No Yes Yes Yes Yes Day 1 4 3 11 0 1 Day 2 6 7 10 0 0 Day 3 1 2 12 0 1 Day 4 1 1 5 0 1 Total 12 13 38 0 3 It was assumed that the GT was 100 per cent efficient, that the counter and IC operated with a constant underlying effici
The addition of the IC improves the accuracy and precision of the estimates, but the degree to which this happens will depend on the relative magnitudes of the three parameters estimated. This model could be greatly improved by calibrating on a longer time period, and including river flow as an explanatory variable for counter and IC efficiency. Robin Wyatt, 26 Mar 2007 The key part of the model in WinBUGS language is: model{ fp.rate~dgamma(0.001,0.001) counter.eff~dbeta(1,1) vid.eff~dbeta(1,1) #c.fp.
count.fish=c(14,17,14,6), false.positive=c(4,6,1,1), vid=c(12,10,13,6), #vid2=c(12,10,13,6), #counter=c(18,23,15,7) ) #Initial values to get model going list(fp.rate=3, #sd.p = 1, p.
Appendix 3: Fuel cell details Science Manual – Using Video Images for Fisheries Monitoring 53
54 Science Manual – Using Video Images for Fisheries Monitoring
Appendix 4: Quote for ITX system Science Manual – Using Video Images for Fisheries Monitoring 55
Appendix 5: Fishtick price list 56 Science Manual – Using Video Images for Fisheries Monitoring
Appendix 6: Guide to the DVMD interface Installation • • • It is recommended that the DVMD and DVMD interface are installed on a PC deployed on site and the data files are bought back to the office for review. It is therefore necessary to install the interface on an additional PC so that the user is able to review the collected files. A framegrabber card is not required to review the files. To install the interface with a Falcon framegrabber card, install the card before installing the DVMD interface.
Figure 26: Settings menu in DVMD interface • • 58 The Track tab (under File or shortcut button on toolbar) allows the user to appoint an upstream direction for the fish and enter a site identification number (Figure ). There is then an option of using the PC clock or entering an avi start time to determine the fish time. The PC clock would be used if the PC and DVMD were deployed on site and collecting in ‘real time’, which would be the usual way of using the DVMD.
Figure A6.2: Track menu in DVMD interface To review files collected by the DVMD: • • • • • • • • • Open the relevant .csv file. Ensure everything is set up as required in the Settings tab. Scroll down through the list in the table using the arrow keys. Use the buttons in the video display box below the video screen to play the clip (Figure 27). When a fish is seen, the species information can be selected from the drop down menu in the video display box (species can be added in the Settings tab).
Figure 27: DVMD interface video display 60 Science Manual – Using Video Images for Fisheries Monitoring
Appendix 7: Fishtick user manual Science Manual – Using Video Images for Fisheries Monitoring 61
Appendix 8: DVMD user manual 62 Science Manual – Using Video Images for Fisheries Monitoring
Appendix 9: How to make your own underwater light panel By: Mike Haley, MEICA Team, Crosshands, Wales. Components (supplier) Perspex case (Westward Plastics) PX449 12-volt red LED strips (Plus Opto) Potting compound such as Ambersil Q-SIL 215 (Farnell, RS) Stainless steel screws Silicone sealant – marine grade Waterproof glands Rubber matting The light panel illustrated here has the following dimensions: Outside = 661 x 1501 x 30 mm Inside = 640 x 1484 x 20 mm This gives an internal volume of 0.
1. Connect LED strips together in required configuration. Space the strips about 35 mm apart and ensure as large a free gap as possible between LEDs and lid of box. Glue plastic strips to the LED strips to form a semi-rigid frame which will aid in placing the LEDs into the base compound. 2. Clean and degrease base and lid. 3. Mix six litres of compound steadily for 3-5 minutes, in a clean suitable container. 4. Pour mixed compound into light box base; this amount will give an approximate 5 mm covering.
5. Curing time is 20 hours at 25°C and one hour at 100°C. Thus, the compound curing time is heat-accelerated. A heat gun was used set at 500°C to achieve an approximate surface temper of 80-100°C. Using the heat gun also had the effect of dispersing the trapped air bubbles. This was done for approximately one hour, holding the heat gun six to eight inches above the compound. 6. Offer the LED strips onto the semi-cured compound. 7. Mix a further 11 litres of compound and pour into the box.
8. Fit light box lid using stainless steel screws. Transport light box to site. Before installing into position, fit 6-8 mm rubber matting to underside of light box to take up any unevenness that may penetrate the light box case.
We are The Environment Agency. It's our job to look after your environment and make it a better place – for you, and for future generations. Your environment is the air you breathe, the water you drink and the ground you walk on. Working with business, Government and society as a whole, we are making your environment cleaner and healthier. The Environment Agency. Out there, making your environment a better place.