C++ School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C++ Expert!

Join 300,511 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,916 people online right now. Registration is fast and FREE... Join Now!




possible for counting?

 

possible for counting?

alexax

1 Jul, 2009 - 01:19 AM
Post #1

New D.I.C Head
*

Joined: 28 Jun, 2009
Posts: 12

Is it possible to count number of very small fishes? Let's say one second can count 500 fishes. How should i do using c++ with OpenCV?

User is offlineProfile CardPM
+Quote Post


e_barroga

RE: Possible For Counting?

1 Jul, 2009 - 02:12 AM
Post #2

D.I.C Regular
Group Icon

Joined: 16 Feb, 2009
Posts: 435



Thanked: 23 times
Dream Kudos: 825
My Contributions
What do you mean by count?

I'm sure it is possible without a library such as OpenCV (whatever that is).
User is offlineProfile CardPM
+Quote Post

computerfox

RE: Possible For Counting?

1 Jul, 2009 - 05:43 AM
Post #3

straight vegetarian kid
*****

Joined: 29 Jan, 2009
Posts: 3,772



Thanked: 48 times
Dream Kudos: 1700
My Contributions
first off, what is fish? i assume it's a class that you created. then in that case, yes you care able to count with a loop and a variable, usually called count. hope that helps smile.gif
User is offlineProfile CardPM
+Quote Post

NickDMax

RE: Possible For Counting?

1 Jul, 2009 - 06:40 AM
Post #4

Can grep dead trees!
Group Icon

Joined: 18 Feb, 2007
Posts: 5,216



Thanked: 285 times
Dream Kudos: 1175
Expert In: Java/C++

My Contributions
It should be possible, especially if you can control the environment that the fish are in.

Basically the process is to take a picture of the aquarium (or whatever environment you have) without the fish. Then take pictures with the fish in the tank then compare the changes. libraries like OpenCV offer features to assist in edge detection which can possibly help. But depending upon how the fish are colored in contrast to the background this may not be necessary.

Just as with your eye the higher the density of fish the harder it will be to count them. If they group together you will probably need object recognition (edge detection), on the other hand if they are spread out then you probably only need simple comparison of images.
User is offlineProfile CardPM
+Quote Post

alexax

RE: Possible For Counting?

2 Jul, 2009 - 07:31 PM
Post #5

New D.I.C Head
*

Joined: 28 Jun, 2009
Posts: 12

Hi NickDMax,

you get what i wanted! Ok now i have a edge detection program working using openCV and win32..

You mentioned above that "taking pictures with the fish in the tank then compare the changes".. What you mean by that? How aam i suppose to compare the changes? By coding?
User is offlineProfile CardPM
+Quote Post

e_barroga

RE: Possible For Counting?

2 Jul, 2009 - 09:35 PM
Post #6

D.I.C Regular
Group Icon

Joined: 16 Feb, 2009
Posts: 435



Thanked: 23 times
Dream Kudos: 825
My Contributions
If we can use programming to create games like Halo or Unreal or other games, I am sure it is possible to count small amount of fish.
User is offlineProfile CardPM
+Quote Post

alexax

RE: Possible For Counting?

2 Jul, 2009 - 09:47 PM
Post #7

New D.I.C Head
*

Joined: 28 Jun, 2009
Posts: 12

So do you know how to program it?
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic

Time is now: 11/8/09 05:13AM

Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month