2004 © Ouais
Version 0.11 beta
Here are tips to improve detection efficiency.
Version 0.1 beta
LapCounter Features, User guide & How it works.
The user guide is simple but it helps you in using the software.
It is divided in 4 parts:
How it works. Explanations can be found at the bottom.
Numbers of cars to race.
Numbers of laps in the race.
Cars position to start the race.
The cars will be positioned in the same order their infos are input into the software.
The cars will be positioned in the a random order.
A qualification run will be done before the race. The cars will be positioned according to the qualification results.
This feature enables you to simulate fuel consumption.
Cars will consume some amount of fuel during the race and must stop at pits to refill.
Fuel consumption settings.
Specify the way the fuel consumption will be calculated.
Lap - Fixed
All the cars will consume the same amount of fuel during a lap.
Lap - Random
The amount of fuel consumed by the car will be calculated randomly at every lap, for each car.
Time - Fixed - not available for now
All the cars will consume the same amount of fuel during a time period.
Time - Random - not available for now
The amount of fuel consumed by the car will be calculated randomly at every time period, for each car.
Numbers of laps done with a full tank. - when Lap - fixed is selected.
This is a fixed value. It is used for each car. When Lap - random is selected, 2 values must be set:
The number of laps that can be done with a full tank,
The maximum variation in percent.
The random amount of fuel consumed will be calculated from these values.
Fuel filling settings.
Specify the way the tank fill up delay will be calculated.
The delay is fixed, and will be the same for each car.
It depends on the fuel quantity left in the car tank.
The delay will vary between a minimum and a maximum thresholds.
It will be randomly calculated at every car fill up.
Number of seconds to fill the tank. - when Fixed is selected.
This is a fixed value. It represents the number of seconds needed to fill completely the cars tank if it was empty.
When Random is selected, 2 values must be set:
Minimum & maximum delays (in seconds) to fill an empty tank.
It will be randomly calculated at every car fill up.
Place the camera and set the focus.
Press Ok when ready.
Confirm if it's ok.
Click Setup cars to set up the cars infos.
Car name. Brand, model, whatever you want.
Video Setup. Place the car inside the field of the webcam and press ok.
Idem with the second car.
As an example, this is its picture.
You must select a color to represent each car.
The color must be unique and not appear on other cars.
Color selection on our examples. I used plain colored stickers to identify cars color.
Check if the color selected is ok for you.
The software will analyze pictures to check if colors are unique and don't appear on other cars pictures or in the background startlane picture.
In this example, red was chosen for the second car (Suzuki Jimmy) and appears on the first car (Skyline). The software has detected a conflict.
The user must choose other colors, for example, yellow for the second car.
In this section, we'll see how to set up and run qualifs.
Number of qualification laps.
Call of the next car.
Time starts when clicking on ok.
Car #1 in qualification phase.
Qualification phase for Car #1 is finnished.
Qualification phase is finnished for all cars. Results are displayed.
Used to prepare drivers for the start.
During the race.
Infos are displayed for each car.
Cars list is ordered according to their race position calculated at the checkpoint.
So every time a car passes by in the camera field, its laps number is incremented.
If playing with fuel consumption, the amount of fuel in the car tank is decremented.
At pit stops.
When stopping for a certain time (set in the progs setup) in the camera field, the car is considered at the pits.
A pop-up window appears to show the time left to fill the tank, along with some infos concerning the car. The car stops filling up its tank either when it leaves the pits, or when the tank is full, when the time is equal to 0.
The car #1 has finished and won the race.
Other cars still race until they reach the number of laps for the race.
How it works
The best camera position is when pointing to the startlane from above.
For 2 reasons:
1) No background interfering.
2) If 2 or more cars pass by at the same time, they can't hide each other if point from above.
A picture of each car much be taken.
So that a color can be associated with each of them.
The color is used to identify the car. So it must be unique.
During the race, the software will analyze each picture taken by the camera in order to detect selected colors.
If a color identifying a given car is detected in the picture, the software considers that the car is passing through the checkpoint.
When analyzing pictures, the software tries to detect each color.
In that 2 or more cars can pass through the checkpoint at the same time.
As the software analyzes severals frames per second, it must take care not to consider that a car passes through the checkpoint every time it detects its associated color.
Before starting the race, the software processes a color verification to check if a selected color appears on other cars pictures.
Without this verification, a car containing another car associated color would enable a checkpoint for the later.
Tips to improve detection
Cameras auto-balancing change colors. Detection is affected.
Noise on frames also affects detection.
Cars are colorful, it's quite hard to find enough different colors to identify cars.
The solution for now is to optimize the current use of the prog, without reprogramming it totally: We'll hide cars with plain (white for example) masks and identify them with a colored flag, fixed to the antenna.
Images should now contain only:
You can specify a higher tolerance value as a few colors will appear on the frames, in order to improve detection. Because of auto-balancing on cameras, color detection is harder. With a higher tolerance, it should be ok.
At the beginning, I avoided this solution, in that I didn't want that cars' flags may hide behind some others, when passing by at the same time (probability very low indeed). To solve this, a solution consists in placing flags at a different height on the antenna.
Java and win32 versions don't give the same performances, so detection may be affected. Since version 0.11 beta, you may specify different processing speed values for detection.