Bus/Coach detection (al same colour)
Paul from United Kingdom  [1 posts]
9 years

Can anyone give me advice the best way to go about counting passing vehicles, specifically, the attached bus in the attached photo?  They are all the same livery.  What I want to do is count the number and time of buses passing the house.  Anyone point me in the right direction if this is possible?


Steven Gentner from United States  [1443 posts] 9 years

Its certainly possible ... couple things to think about:

1. If you can get a polarizing filter some of the sunlight streaks caused by your window will be reduced and provide a clearer image. Ideally removing the window pane would be best but I suspect that rain will then pose an issue.

2. You can detect things based on movement. If you try the movement module, and set the background to the last 100 frames a big bus will create a lot of movement. Checking the variables after this module (MOVEMENT_PERCENT) will can be used in an If_STatement module to count large moving objects. Note this will include trucks, etc.


3. If you want instead to just count that specific bus, you'll need to isolate a particular property that identifies just that bus. You might be able to use a green and yellow extraction (is it yellow? Can't quite tell) to isolate just that particular bus. I.e. run a yellow rgbFilter module before the movement module as it will only allow through yellow colored objects. Note, however, that this will only work in really good lighting and start to error in the evening and morning.

4. Check out the other postings at the bottom of the movement module page. For example


may be of interest too.

5. Its always best to work with video when counting cars/buses. Can you record a sequence that includes one or more of these buses and post it somewhere that we can use to test?

Given that the bus is quite large, there may be other quick tricks like detecting movement only in a particular location that would accurately get these buses. Sometimes having an entire image is too much information where only a part of the image is really needed.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index