A review of people counting using openCV part 1


object extracting

Why using openCV for people counting?

There are alternatives to count people in a public place, for example using microcontrollers and lasers and arduino to design a cool and accurate system to count people in and out a room. But why does it bother to use webcams and, more importantly what the post focuses on, openCV?

1. it is easy to set-up. NOTHING is easier to mount a camera over the door and connected with power and data cables. Setting up a laser system? Think about the DIY work.

2. a lot of developers and programmers are working on that – making openCV more suitable and efficient to count people. A simple example is the blob extracting app.

The state of art of openCV for people counting

Blob extracting using openCV or flash (as3) have been researched by many developers. The accuracy has reached a high level, but limited to single objects – objects should not be overlapped – if people in the camera could be simply seem as objects.

Codeproject.com shows a new post discussing recognising people even though they are overlapped to some extent, as the picture below shows. The post compares different algorithms from simple threshold to image differences and erosion .

people counting opencv

A pedestrian detector comes with recent versions of openCV (>=2.2), in modules/objdetect/src/hog.cpp, and samples/cpp/peopledetect.cpp. Unfortunately this new example has not be well documented officially.

If the camera for people counting is mounted statically, a substraction method is suggested by evident’s work. A relevant paper is linked http://portal.acm.org/citation.cfm?id=1561072&preflayout=flat.

Face detection for people counting using openCV is also concerned, as an example is described in opencv wiki – face detection using openCV. But the drawbacks are clear – this method needs faces for people counting. In other words, top-view cameras do not fit.

The rest part of review is published in the second part – a review of people counting using openCV part 2.

Author: Andol Li

A HCI researcher, a digital media lecturer, an information product designer, and a python/php/java coder.

9 Comments On “ A review of people counting using openCV part 1”

  1. Nice job,Andol, I read lots of your blogs, what you did is damn cool. I am interested in CV and HCI very much, but not working in this area.
    Good luck to you, on the road to human life future.

    • @Zhijie
      Hi, So ———————————— nice to have your visit to my blog, lighting the whole blog up 🙂
      tons of stuffs to learn from you, still

      • Sometimes I just feel so confused about what I shall do. I’d like to do something creative and useful to people’s daily life using CV knowledge, but it seems not easy technically and it’s difficult to have a real good idea. So I think I have to improve myself to a higher level.However,Don’t you think it’s a waste of time to implement the others’ algorithms one by one?

    • @ 丕子
      Hi 丕子, thanks for your kind reminding, I am actually planning the second part of review, in which some challenges /or issues that current are faced by current people counting using openCV. Also had a look at your blog, nice site, and found a lot useful information there.
      ps: if you dont mind could we have a link exchange.

  2. How possible do you think it is for a complete beginner to count easily detectable objects on a conveyor and count them?
    I have very little programming experience, it’ll most likely end up running on a mini-pc with some kind of linux distro.

    • @wouter
      conveyor? that should be easier to count people in chaotic backgrounds, such like street.
      it would be good of you could post some demo pictures that the detection will be used.

Leave a comment
Due to technical adjustments, the comment function is shortly closed and will be re-openning soon. Thanks.

Copyrights 2006-2018 © All rights reserved
Theme Tree2, re-designed by Andol Li, powered by WordPress and Bootsrap
WWW.ANDOL.ME | 浙ICP备15040508号-1
公安备案图标 浙公网安备33010602004018号
Back to top