PDA

View Full Version : Announcing Easy Lap Counter


jokeane
2009.11.30, 06:12 PM
Easy Lap Counter is simple way to track your R/C races. It uses a standard external web camera to watch a section of your track for movement. Moving cars are recognized by color, and laps counts and lap times are tracked.

http://sites.google.com/site/easylapcounter/

cosmicsoul
2009.11.30, 07:04 PM
Pretty cool!

I wonder how many different colors it can distinguish at one time. I wonder if you could use Quarter sized colored stickers rather than using the actual color of the car. Could you teach the camera to read these?

Anyway neat concept!!!!

pedrocamp
2009.11.30, 08:58 PM
This is great for a home track. I will have to try it with my dNaNo, hope it is not too small!

hobbycar
2009.11.30, 10:29 PM
Very very interesting.

-hobbycar

color01
2009.11.30, 10:49 PM
Great idea for a home track. If it's not top-secret, could you clarify how the software decides when a car passes the exact "1 lap" mark? Getting the location exact is fairly important to obtaining accurate lap time measurements, and a webcam is not classically the easiest way to pinpoint a moving object's position. :)

jokeane
2009.12.01, 12:43 PM
Pretty cool!

I wonder how many different colors it can distinguish at one time. I wonder if you could use Quarter sized colored stickers rather than using the actual color of the car. Could you teach the camera to read these?

Anyway neat concept!!!!

The 'colored sticker' concept might work, provided the sticker is large enough and the underlying car color is black or dark.

The size of the moving 'blob' in the camera view w/ Mini-Z's and XMods is already quite small, so I've found going with the average overall car color was what worked best for me.

jokeane
2009.12.01, 01:02 PM
Great idea for a home track. If it's not top-secret, could you clarify how the software decides when a car passes the exact "1 lap" mark? Getting the location exact is fairly important to obtaining accurate lap time measurements, and a webcam is not classically the easiest way to pinpoint a moving object's position. :)

The timing accuracy of Easy Lap Counter is relative to the sampling size (area seen by the camera) and how long it takes a car to move through the area. Also a factor is the FPS sampling rate of the camera (speed of camera is based on light levels, CPU processing speed, .etc). I see something on the order of 15 samples per second with my setup (FPS).

So for example if it takes your car 0.2 seconds to pass through the active camera area (about what it is on my track w/ my cars) that is the maximum sampling error for an individual lap time.

ELC has a simple rejection filter based on a minimum allowed lap time (2 seconds). So I count a 'hit' the first time I see a color (provided it isn't too soon after the last 'hit'). Lap times are the time between hits. (Optionally I can take into account the motion direction to avoid counting 'back ups' as laps - see help tips for how to set this.)

Just like any lap counting system, the larger your sampling area (camera view or antenna area) the fewer 'misses' you get. You trade off potentially 'missing' vs. timing accuracy if you reduce the active sample area.

Long story short, if you need super high lap time accuracy, get a very fast camera, bright lights and select only a sub-section of the camera frame as active (see camera menu).

If you just want to have fun, use the entire camera frame as active and look at average lap times rather than individual ones... :)

Draconious
2009.12.01, 02:37 PM
Need to hook that up to that digital camera that does 1000FPS :)
Was a Casio I think...

ianc
2009.12.01, 04:35 PM
I looked at your project page and the setup info was a little thin as of yet. I believe you said to run a race: 'Press the button to start the race and have fun!'

Does this mean the user must stand in front of the computer and click start to start the race, or is there some builtin delay with an audible countdown after the button press? If this isn't a feature currently, it sure would be nice to have...

All in all, an extremely interesting project and very inexpensive to implement. Thanks for the nice work to benefit the entire community!

ianc

jokeane
2009.12.01, 06:43 PM
I looked at your project page and the setup info was a little thin as of yet. I believe you said to run a race: 'Press the button to start the race and have fun!'

Does this mean the user must stand in front of the computer and click start to start the race, or is there some builtin delay with an audible countdown after the button press? If this isn't a feature currently, it sure would be nice to have...

All in all, an extremely interesting project and very inexpensive to implement. Thanks for the nice work to benefit the entire community!

ianc

Sorry for the confusion, I'll clarify that statement about starting a race. After you press the start race button, there is a short count down w/ simple Red/Yellow/Green images and sounds (Ready,Set,Go). I'm pretty sure it is on a 1 second interval. If this needs extending (5,4,3,2,1... Go!) let me know.

I look forward to someone actually giving it a trial run... so far it seem like no one has. :)

ianc
2009.12.01, 09:14 PM
After you press the start race button, there is a short count down w/ simple Red/Yellow/Green images and sounds (Ready,Set,Go). I'm pretty sure it is on a 1 second interval. If this needs extending (5,4,3,2,1... Go!) let me know.

From my experience, it would be best if it was configurable. 3 seconds does not really sound like enough time to press the button, cross the room, grab your radio and adjust your grip to be ready to race. If it could start at 10, 20 or even 30 seconds, then just beep on the second, or every five seconds until it reached a countdown of 5 (5,4,3,2,1... Go!), that would be great.

I look forward to someone actually giving it a trial run... so far it seem like no one has

Don't worry, I'm sure someone will, and soon. Just give it a little time. If people can avoid paying hundreds of dollars just by buying a $30 webcam and using your software, soon you'll have more people than you can handle.

Thanks again for such a great project!

ianc

jokeane
2010.02.01, 01:24 PM
I've uploaded a new release of Easy Lap Counter which should improve car detection accuracy and overall performance.

I've also verified that ELC works on Vista 32-bit, provided Vista is fully updated.

And I've added simple contrast and hue saturation boost controls if your camera software does not offer them (PS3 Eye).

http://sites.google.com/site/easylapcounter/

JeremyC
2010.02.01, 06:43 PM
Do you think this could work outside with a Micro-T?

HaCo
2010.02.02, 12:20 PM
Great!

Hint: "Donate" button!

Don't have time to test it right now, but in a few weeks I will certainly do.

jokeane
2010.02.03, 08:04 AM
Do you think this could work outside with a Micro-T?

It is possible if the lighting conditions are correct. Strong sunlight will make for bright highlights and shadows, which make my job harder. If it is possible to use a 'shaded' area for the spot the camera watches, that would help. Also tweaking your camera settings (lowering contrast, boosting saturation a bit) can help.

ELC works best in a situation with a lot of diffuse indirect light. See the demo footage up on the Google Groups page shot from my camera of my setup.

Lorents
2010.02.09, 01:29 AM
Tested your software yesterday on my rcp track and it works great :)

I used the PS3 Eye camera that seems to give about 58 fps. It was really easy and hassle free to set up!

Mini z drivers really love tweaking their cars so it might be cool to add a single driver test/practice mode to compare different setups and driving techniques. Maybe something like this:

- Start by entering a description of your current setup - ie. "Car a with tweak b, motor c and battery d" (just a text field)
- Define how many test laps you want to run - ie 20 laps
- Press start button
- Start driving - instead of a count down it could start the timing when you cross the line for the first time
- For each lap the lap time should be added to a list so that the driver can review it after the test race. Somewhere on the screen it should display no of laps driven, best lap time and average lap time while driving (large bold font)
- Would be cool if it could sound a discrete sound every time the car passes the line and a louder more cheerful sound when you beat the best lap time within the test - would give some feedback to the driver while driving
- When the test race is finished it could list the results for the race in another list (name of setup, no of laps, best lap time, avg lap time) to make it easy comparing different races and setups
- Would be really nice to ba able to save lists as .csv or something like that :)

This would make it THE tool for setting up cars, comparing cars and learning to drive :D

Another thing I thought of. Is it possible to increase the acuracy of lap timing by interpolating the car position on the camera frame before and after crossing the line? Ie if the car is 10 pixels behind the line after crossing and 20 pixels in front of the line on the previous picture and the time between the pictures is 2 ms you could remove 1/3 of 2 ms from the lap time. Not sure if the image is too blurry to get an accurate position though...

Oh, and it would be nice if you could show on the web-cam image where the timing line is to make it easier aligning it to a marker on the track or something like that.

Sorry, got a bit carried away here :o Great job on the software, I'll be using it a lot!

jokeane
2010.02.09, 07:39 PM
Wow. Thanks for the valuable feed back!

I'll add these ideas to the feature request list for version 2.0.

58 FPS is pretty good...

Tested your software yesterday on my rcp track and it works great :)

I used the PS3 Eye camera that seems to give about 58 fps. It was really easy and hassle free to set up!

Mini z drivers really love tweaking their cars so it might be cool to add a single driver test/practice mode to compare different setups and driving techniques. Maybe something like this:

- Start by entering a description of your current setup - ie. "Car a with tweak b, motor c and battery d" (just a text field)
- Define how many test laps you want to run - ie 20 laps
- Press start button
- Start driving - instead of a count down it could start the timing when you cross the line for the first time
- For each lap the lap time should be added to a list so that the driver can review it after the test race. Somewhere on the screen it should display no of laps driven, best lap time and average lap time while driving (large bold font)
- Would be cool if it could sound a discrete sound every time the car passes the line and a louder more cheerful sound when you beat the best lap time within the test - would give some feedback to the driver while driving
- When the test race is finished it could list the results for the race in another list (name of setup, no of laps, best lap time, avg lap time) to make it easy comparing different races and setups
- Would be really nice to ba able to save lists as .csv or something like that :)

This would make it THE tool for setting up cars, comparing cars and learning to drive :D

Another thing I thought of. Is it possible to increase the acuracy of lap timing by interpolating the car position on the camera frame before and after crossing the line? Ie if the car is 10 pixels behind the line after crossing and 20 pixels in front of the line on the previous picture and the time between the pictures is 2 ms you could remove 1/3 of 2 ms from the lap time. Not sure if the image is too blurry to get an accurate position though...

Oh, and it would be nice if you could show on the web-cam image where the timing line is to make it easier aligning it to a marker on the track or something like that.

Sorry, got a bit carried away here :o Great job on the software, I'll be using it a lot!

johnnc
2010.05.07, 12:02 AM
Hey Jim,

Just wanted to let you know I downloaded and installed your software on my Acer 10" netbook with built-in web camera. tonight I ran 10 3 minute races with my dNaNo on my homebuilt track. You have a great product here. I haven't played with the settings yet but it works great right out of the gate. My average times is blank on the first series of 10 races. Not sure why that happened as it did show the avg time on each individual race.

Anyway, I know you were interested in knowing if anyone was using your software.

I am going to buy a USB camera tomorrow and set it up on my tripod so I don't have to move my netbook after every race.

keep up the good work....

John

BovineD
2012.12.03, 10:49 PM
Jim just wanted to say thanks for an awesome piece of code! I have been looking to buy a complete i-lap lap timing system for my small group of racers but I wanted to try out your system first to see if it would fit my needs and indeed it works beautifully.

I used my ps3 eye camera with your software and everything just worked and was easy to setup but most importantly it was accurate. My first test run was with two cars one running a completely red enzo and another running the calsonic blue 350z body which is primarily blue but has lots of black and white decals on it and it had no problems reading them. I was most surprised when one of our races came down to the last lap in a photo finish where both cars crossed at the end but it identified the correct winner with both time and of course the final freezeframe snapshot at the end!

I will probably only have a max of 4 to 5 racers at a time and will run through a test with the max drivers next time to see how accurate it is but you have saved me a ton of money so far and I am grateful for that...watch for a donation coming your way.

Just a couple quick questions/requests:

Is there a way to view a list of the lap times in a race? I saw there was a way to save race and print race but was not able to print so didnt know if that was what the output was.

Can you swap out the sounds for each racer or add your own custom sounds?

Would it be possible to have the system call out the lap time in mins and secs in an audible voice?

Thanks alot again!

Draconious
2012.12.03, 11:45 PM
Could this be setup to detect LEDs, or even IR LEDs? instead of paint colors? Maybe LEDs blinking at different patterns?

This needs to be ported to Android :)