Ask Slashdot: Image Recognition For Race Timing?
First time accepted submitter int2str writes "Autocross is a form of motorsports practiced in the U.S. and around the world where car enthusiasts explore the capabilities of their car in an open parking lot or similar suited area. It's point-to-point racing (not closed circuit). Most of these events are organized by car clubs and volunteers. Timing is usually done with a form of detection beam at start and finish that gets interrupted by the car crossing the beam. Many commercial systems are available. All of these system require the operator to enter the car's number or ID and requires the cars finishing in the order they started. So if one car is not able to finish, the operator has to intervene, or timing is broken. For closed circuit racing, transponder systems are available to address this problem. But such systems require sensor loops in the track or overhead (bridge setup) and the transponders are expensive. Do you think it would be possible to design a timing system using off-the-shelf parts and open source solutions to uniquely distinguish about 100 participating vehicles and time them from a start to a finish point, independently of their finishing order?"
Read below for some more details:
int2str continues: "My initial idea would be:
- Use (web-?)cameras at each end that feed into a Linux based notebook (USB/Ethernet).
- Start recoding still images as fast as possible when motion is detected
- Identify unique shape, numbers, barcode, qr code or similar in the images, that have been attached using a magnet to the vehicle's door.
Difficulties to overcome:
- Camera with high enough shutter speed to get recognizable image of vehicle traveling 30-60mph
- Quickly and accurately identify a unique symbol or shape
So far I've started looking into OpenCV as a possible tool for image recognition, but have not been able to find a capture solution. Does anybody have experience with something like this? The solution would be open source and well documented as to benefit the many car clubs around the country and the world."
What exactly is the problem here?
Someone flopped a steamer in the gene pool.
I worked in Face Recognition as a research assistant for my MS. I was part of a group designing a robust end-to-end system for the purposes of identifying people in a wide variety of conditions. This problem seems easier because you can assume that the cars will be in one location within one time frame, the camera is fixed and everything in your data set will cross this line unless they break down, they will have almost identical 3D structure (unlike the face), and you can expect some identifying marks on the front end that crosses the finish line. As long as you have some sort of identifying marks, you can use standard face/object recognition techniques to identify the vehicle. There are some pretty advanced algorithms out there. The best out there when I was actively working in face recognition was STASM and Pittpatt. Better yet, if you had some unique identifier expected at some part of the vehicle, you can easily make the problem much easier. For example, have each one use an infrared identification tag located in precisely the same spot relative to the build of the vehicle.
That brings me to an interesting point, / . is just "the ramblings of socially-inept, technology-literate news-mongers".
Put giant QR code stickers on the hood/doors. Done.
How about sticking a big barcode to the competition number panel and use a simple barcode scanner to ID the vehicle as the beam breaker is triggered?
I autocross and I've been thinking about the same problem. I even thought about writing my own free software and building plans for off-the-shelf/cheap-to-make transponders ($1200 for a wireless transmitter unit? jesus).
The problem is that if a car doesn't finish and misses the timing mark--the software shoudl just let you to fix it up. You should be able to say "this car didn't finish" (has a missing tick) or "ignore this tick" (some corner worker tripped the lights accidentally). Then it shoudl be able to just recalculate the times affected. It seems so simple to me, I am baffled that it hasn't been implemented.
All the cars starts in the same order, all the numbers are known at hte start time and cars never pass each other. So you have always same-sequence travel of cars. All you need to do is fix occassional lacks of ticks or extra ticks. No need to re-run the cars.
What happens if two dudes show up in a blue Miata?
No sig for you. YOU GET NO SIG!
They're similar to QR codes but optimized for the needs of robotics (similar to your needs).
In robotics, the main need is for robust recognition, and accuracy.
QR codes are much more complicated because they need a lot more "payload" bytes (millions of unique codes), whereas you only need to distinguish between a couple hundred codes
there is even source code available:
http://april.eecs.umich.edu/wiki/index.php/April_Tags
As a race organizer, timing chips are a PIA, it would be awesome if facial recognition could track everyone at the start and finish. We're talking up to 10,000 people though, and you'd have to have a photo on file to identify each person. The finish would be easy, everyone is spread out, but at the start you have a lot of faces crossing the starting line simultaneously. Aside from being kind of creepy, is it workable?
Never let a lack of data get in the way of a good rant.
There are several practical issues with optical systems for automated vehicle recognition- number and class markings are already tough to get consistent without requiring an additional barcode or QR large enough (some competitors would gripe about a huge barcode) to be useful at the 30'+ distance finish line sensors are set back to minimize getting hit by spinning cars. Add in the fact that existing markings some times fall off on course, or competitors in dual driver cars forget to change numbers between runs, and it's tough to be certain you'd have something consistent to try to recognize.
The national T&S system uses a wireless barcode reader operated by a worker in the starting queue to read stickers placed on competitors helmets to register cars in the T&S software. Locally, we position the T&S trailer to allow the operators to manually enter vehicles as they enter the start queue. Human eyes really are the most flexible here "shouldn't 80ES be 180ES?".
I like one of the comments above about a webcam triggered by the finish light taking a picture with a clock display in it. Unless there was OCR to immediately post the result to the software, the results feedback would be too slow for our region- we have real time announcement of finish stats, and the software can post results to a web server real time for smartphone access in paddock. The T&S software uploads a small file to the web server in the 20ish second gap between finishing cars.
Apologies for not offering solutions, but hopefully the extra info about some of the issues can help shape a solution.
This is pretty much a tracking problem, I would use the open source Predator Tracking algorithm to track each of the car simultaneously. The problem I see is if it is going to be fast enough for 100 cars, but it is worth to investigate it. http://info.ee.surrey.ac.uk/Personal/Z.Kalal/ Alternatively, thinking about using open source-hardware as a solution, use the open source Arduino Micro-controller Piece the sensor you need, and you will have your system at a much lower price ! http://www.arduino.cc/
This won't work. Almost all forms of autocross guarantee a driver 3 runs (each driver does one run, then each driver does a second set, etc.). Knowing what time you have to beat after each run is a huge part of autocross. The data has to be input in real time, or at least close so that results can be viewed after each run. This problem gets worse with ProSolo, where there are two courses and challenges require results for a class to figure "handicap times". Additionally, multiple cars are on course at one time (generally like 3), so it's very difficult for one person to do.
In my region, we have some open source custom software that a local member wrote that works pretty good and automatically inputs the times as they come in. I've modified the software to make entering our timing cards faster, but we're a bluetooth bar code reader and some business cars away from having a very streamlined process.
The other thing the author of the original question is missing out is how penalties for hitting cones or missing gates is entered. There has to be some human interaction there. If my region didn't have timing cards, we trusted the computer and the operator completely, we could have 1 person running timing, instead of 2 (I'm not counting the announcer or course control). National level SCCA autocross handles this problem by having someone with a bar code scanner standing near the start line that scans a bar code on your helmet as you drive up.
Why not put an RFID tracker on each car? They're relatively cheap and you can store some encrypted identifier in it. Pillar or mat sensors would pick up when the car crosses the line, though it might be a challenge finding sensors that'd pick up a car at 60mph...
Special paint that reflects/absorbs only at certain frequencies. You have a 'stickers' that go on all four corners of the vehicle. The finish line has a spread-spectrum laser array blasting across it. When a car crosses the line, each car is tagged with unique tape. The laser light reflected will be unique to the vehicle. You triangulate the reflected lights timings and use that in conjunction with the wavelength reflected back and you've got a car and you've got a time.
Unique tape on each car. Cheap, replaceable. Not a perfect solution, but some variant of this involving selected emission/absorption is a winning ticket. I made this up in 1 minute and have no idea if there are any preexisting solutions that do this. For the pedants; yes tape could peel off and yes people could cheat some how I'm sure, blah blah blah, and I'm sure there is a more optimal solution blah blah blah, and I'm sure you'll have issues in X Y Z situation with A B C conditions blah blah blah. Go make something better and sell it.
'We are trying to prove ourselves wrong as quickly as possible, because only in that way can we find progress.' RPF
Accuracy hard to achieve. You'd have to carefully track the latency between the webcams image and the software timestamping the video data. Not an easy coding excercise, and would require calibration with accurate timing equipment. This latency also better be stable. I don't know too much about using linux for realtime work but I have heard it has some latency issues at the kernel level that causes trouble for audio pro's.
If you want to do this with a web cam and a bit of code on a linux machine, well 30fps video gets you a lower bound of 33ms time resolution. That's before the camera feeds to the USB data channel, then any gamer will tell you USB has some latency, and then software has to process the image data. High powered laptop and a good camera might be able to do all this as low as 100ms before it can timestamp the data. Image processing for identifying the vehicle can then happen at any time. This would need to be carefully accounted for in deciding who wins a race.
Proper race timing needs to be 3 decimal places, at 200kph (124mph) a 1/1000th of a second ammounts to 6cm of difference. Races are really won and lost on as little as this and often the timing is done even finer.
After logging in slashdot still does not take you back to the page you were on. It's been that way for 20 years.
I have been working on a racing timing system for RC; https://picasaweb.google.com/104667803940601062545/Spiked3#5624165831383052962 is an older screenshot, but you get the idea. In my research I came across this; https://sites.google.com/site/easylapcounter/home which does recognize based on imagery. Your idea certainly seems feasible. for RC, we just byte the bullet and use the expensive MyLaps (AMB) transponder system ($3000 base + $125 per transponder). I assume they have some huge patent on it because it seems like it would easy and cheap to copy, yet no one has done it. Good luck.
slashdot troll = you make a compelling argument I do not like the implications of.