bandann
Posts: 24
Joined: Thu May 08, 2014 10:42 am

Opencv people counter

Sun Mar 01, 2015 12:23 pm

Hello.


I have to count the incoming people for a shop, i need to know how many people go through the entrance.
I'm trying to do that with opencv and python, but i can't find any good tutorial for that.


Any help would be highly appreciated

bandann
Posts: 24
Joined: Thu May 08, 2014 10:42 am

Re: Opencv people counter

Wed Mar 04, 2015 7:19 am

Any idea?

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Opencv people counter

Wed Mar 04, 2015 8:40 am

I think this might be very complicated ... is using two light barriers not an option ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

bandann
Posts: 24
Joined: Thu May 08, 2014 10:42 am

Re: Opencv people counter

Fri Mar 06, 2015 11:31 am

Thank you for your answer.

I wish to use a more accurate solution and even a small camera on the ceiling is a nicer solution too.

User avatar
paddyg
Posts: 2541
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Opencv people counter

Fri Mar 06, 2015 12:58 pm

You could do something like:
- take pictures every few seconds.
- reduce number of pixels
- convert to greyscale with standardised mean and variance
- get difference of consecutive pictures
- feed into numpy array
meanwhile record (from the pictures probably) the number of people coming into and out of the shop.
Then simply feed your data through a version of google's AI system http://www.nature.com/nature/journal/v5 ... 14236.html or try just using some simpler correlation function. Probably not terribly accurate but might be fun.

Alternatively you could try running a face recognition algorithm on each picture and use that data instead https://realpython.com/blog/python/face ... th-python/
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

Return to “Python”