under water fish counter

Hey all. I am wanting to build an under water fish counter that counts fish that pass from infront of a sensor at a small creek mouth. I would like to build a mini model by testing it in my aquarium first. I have experience with servos a bit and a little bit with range sensors and POTs. I am not too certain what to start looking for to achieve this but my guess is that I by patterns, a fish's mouth is small compared to its body so thats how I could differentiate between a stick and a fish. That comes later first is to make a little project that counts objects that passes from infront of it under water. The water proofing and all is easy but I need help with the electrical components and help on how I should get started with this. I have a duino and servos. What kind of sensors will I need? does anyone know if an ultrasonic sensor works under water?

Sound carries very well underwater, look at SONAR in submarines - send out a Ping, look for the echo. Always seems to be in the audible range. Ultrasonic, am guessing not as well.

There was a Nova series where they routed salmon thru a channel and captured their silhoutte to determine if they had farmed salmon or regular ocean salmon passing thru. Maybe you could do something similar - use a series of LEDs and photocells, arranged at a 45 degree angle, to determine if something fish shaped was crossing across the array, vs a stick crossing just 1 or 2.

My gut reaction is a camera, using image processing. There would be little disturbance in the creek. And super portable, like for ice fishing!

You could record it all with a GoPro or what have you, then process that back at home. Or process it all live, having an LCD displaying the number, with some external buttons to reset the count.

As with most projects, there are a couple ways to achieve what you are looking for. CrossRoads has mentioned a very hardware-centric design. Myself, being a software engineer lean towards software. Whatever your strong suit is will be where you lean.

MonkeyKnight: My gut reaction is a camera, using image processing. There would be little disturbance in the creek. And super portable, like for ice fishing!

You could record it all with a GoPro or what have you, then process that back at home. Or process it all live, having an LCD displaying the number, with some external buttons to reset the count.

As with most projects, there are a couple ways to achieve what you are looking for. CrossRoads has mentioned a very hardware-centric design. Myself, being a software engineer lean towards software. Whatever your strong suit is will be where you lean.

I am a little weak on the hardware side as I am mostly loving computer and software so I would like to look into your software solution. I would really like to keep the budget under 120$...How do I go about image processing with GoPro. I can go over the budget but no more than 200$ probably. How could I process it at home?

Fish counters are often used where fish ladders bypass dams. The fish are channeled past the counter and sometimes there are observation windows so you can see the fish go by.

The methods used for these are described here; http://en.wikipedia.org/wiki/Fish_counter

A couple of things strike me about this; They are counting fairly large fish e.g. salmon. The fish are being made to swim past the counter.

Counting smaller fish without constricting their movement might be quite a trick proposition. The tiddlers might swim past just out of range or one show off might keep swimming back and forth in front of the counter. Optical solutions might be affected by water clarity particularly after heavy rain.

I could imagine fish might be sensitive to sonar or electric fields so maybe different species would react differently to different counting technologies.

Let me start off by mentioning, this is by no means a trivial task. On any facet. This dosen't even look like an Arduino task, unless you are going to pan and tilt the camera, or display something on an LCD.

You have already identified that the waterproofing will be the simplest task.

OpenCV http://opencv.willowgarage.com/wiki/FullOpenCVWiki lends itself nicely to identifying just about anything. A colleague of mine once used it to identify and count blood cells. A technique that is commonly used in tracking/counting of objects is the mean-shift algorithm. http://en.wikipedia.org/wiki/Mean-shift Here is a random 'Tuber of it in action - http://www.youtube.com/watch?v=pWs8t16g0VQ

Some googlin' around will render copious amounts of resources; - http://www.inf.ed.ac.uk/publications/online/1272.pdf - http://www.youtube.com/watch?v=dRKFBUgToO8[\url]

Unless you are doing something extremely out of the ordinary, or constrained by something exotic. I can bet that this has been done before. Which means: Finding the people that have experience in this exact endeavor will prove invaluable. Hit up the OpenCV mailing list.

I think that I would start off with either: A cheap webcam (or IPCam) feeding live footage. Or: A recording of some fish swimming by a camera. That way you can keep your expenses to a minimum. During initial development. Or practice counting and tracking other objects, like crowds of people, ants, hoards of other insects. Footage should be available on the web somewhere.

Have fun learning, and post your progress/results!

Let me start off by mentioning, this is by no means a trivial task. On any facet. This dosen't even look like an Arduino task, unless you are going to pan and tilt the camera, or display something on an LCD.

Twirap is trying to count fish passing in front of a sensor at a small creek mouth, not track them or identify them. Since fish counters exist it is possible (with about 97% accuracy), and sounds like an arduino could do it. However a lot depends on the precise scope and aim of the project which are not fully defined. If we knew why he wants to count them, how wide the mouth is and whether or not the fish can be directed past the sensor that would all help pin down solutions and whether or not the project is practical.

I apologize. I didn’t realize that he already had a sensor built. I thought he was looking at building one.

twirap:
I have a duino and servos. What kind of sensors will I need? does anyone know if an ultrasonic sensor works under water?

My best solution for a home brew solution (aka, not involving building a fish laddar, or diverting a stream to flow in front of an observation window) was to use a camera as the sensor. Assuming the camera and software is going to count them, a level of tracking and identifying would have to be in place.

No matter how you intend to count them, I am about 100% sure you will first have to identify it as a fish.

radman:
However a lot depends on the precise scope and aim of the project which are not fully defined. If we knew why he wants to count them, how wide the mouth is and whether or not the fish can be directed past the sensor that would all help pin down solutions and whether or not the project is practical.

You are absolutely correct. Until all the details are filled in, we are left to our own devices to fill in the blanks.

radman:
Since fish counters exist it is possible (with about 97% accuracy), and sounds like an arduino could do it.

I suppose, the next logical step would be to go pick up a ‘fish counter’.

I'm not clear from the question whether you're trying to develop a fish counting sensor, or something to interface to the sensor to store the results.

Making something to detect small fish in moving water sounds very difficult to me. I'd be astonished if it was feasible to produce a home-made solution based on image recognition within a video stream, but then I'm astonished on a daily basis. Maybe this problem has already been solved for you, but if not then I'd regard that as a potential show stopper.

Once you have developed/bought the sensor, the nature of the interface provided by the sensor will determine what is involved in counting the fishes it has sensed; maybe that will be something that an Arduino can do, but you'll never know for sure until you've got the sensor sorted out.