We are making a project in which we want to count the no. of people entering and leaving a room with one single entrance. We are using IR sensors and detectors for this ,along with an Aurdino. We have a problem in this system, i.e when two or more persons are entering or leaving the room at a time we are getting a wrong count. Thanks in advance for your valuable time and solution.....If there is any other better way,please state that.
You question is a bit vague in sense of how many IR sensors you have, what type of them etc. With that in mind, I will try to answer with the following assumptions:
- You have IR sensors which are laser-ir diode/resistor/transistor pairs (the person walking cuts the laser beam which can be detected on the photosensitive element).
- You have enough of those.
- People will not be trying to fool your system.
You can try to put a bit denser array of these sensors both horizontally and vertically so that you may distinguish two persons walking in at the same time. This will call for some heuristics in the sense of how wide a single person is etc.
A much easier solution (involving a bit more sophisticated IR sensor) is using Microsoft Kinect along with Kinect SDK which has skeleton detection already implemented so you can just read if and how many people are entering and leaving the room.