Ask Slashdot: Image Recognition For Race Timing? 170
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."
Seems simple (Score:3)
What exactly is the problem here?
Re: (Score:3)
What exactly is the problem here?
The problem is that your solution requires us to trust the client.
Not only should you never trust the client, you should assume the client is hostile and act accordingly.
Re: (Score:2)
So put timer inside a box with serially numbered seals. Timers are issued at start of event and must be returned at end. If seal has been tampered, vehicle it was tracking is disqualified.
If necessary, issue them on start line and collect them at finish line. Have simple loops at start and finish line to automatically start and stop timer.
Re: (Score:2)
Seals seemed to work well enough when I was hanging around gliders. I distinctly remember someone going for a height achievement, and the barograph (old-school, pen on paper drum) being started and wrapped in tape, which was then signed across the joins by several witnesses. The barograph was completely inaccessible in flight anyway, but the simple ideas are often the best.
I don't recall any such precautions for the (film) cameras they used to photograph waypoints on distance attempts, but I suppose it woul
Re: (Score:2)
Re: (Score:2)
Agreed, but it works in bicycle racing, and people race in bunches and teams there. Never heard of anybody tampering with the transponders. Your cars should arrive alone and if the transponder doesn't match the car you disqualify it.
It doesn't work all that well in bicycle racing-- if you're using chips, you still need a good camera at the finish, and if you have a good camera at the finish you don't need chips. Chips are a convenience for picking order in the middle/back of the pack, but aren't good for picking close finishes. I've never seen any published data on the spatial resolution of the chip systems (and asked the sales people directly because they were trying to sell it to me). The demos I've seen for track racing (I did a
Re: (Score:2)
Detecting the finish line is one problem.
Detecting multiple cars crossing the finish line within a few ms is another problem.
Trusting the client is another issue.
Price is another..
Re: (Score:3)
Detecting multiple cars crossing the finish line within a few ms is another problem.
Autocross usually doesn't have multiple cars that close to each other. They are staged and sent on the track at intervals. Sometimes as the poster pointed out, they will pass each other and finish "out-of-order" which confuses a timing system that assumes FIFO/LILO.
Re: (Score:2)
Autocross generally charges $20ish as an entry fee... the timer onboard vehicle would raise the barrier to entry higher than most clubs would want (due to cost / complexity for newcomers.)
Reread the summary (Score:2)
What exactly is the problem here?
Was already mentioned in the summary question. Transponder location is the problem. You fall down on the detection of where the finish line is.
Re: (Score:2)
Re: (Score:2)
It makes for one authority on time, where multiple racers would have times relative to each other regardless of the accuracy of actual time at the device... which is set using buttons on the d
Re: (Score:2)
Over 90% of the participants are using the car in their driveway. There will be no "buried loop (antenna)" because you don't modify a parking lot you borrowed for a day. People are not going to use a $200 HotLap timer when they are just there to drive fast.
Auto-X is a very, very entry level motor sport. Most people don't even have their own helmet so they borrow a loaner that most clubs have available. The system HAS to be external to the car. There isn't any question about th
Re: (Score:2)
Your typical rfid system just isn't going to work. Barcode is problematic at best. You're almost better off with soap on a window.
Re: (Score:2)
The way the big kids' loops work is taking a whole bunch of readings at the loop, not just one. Then the decoder averages all the readings per transmitter at the loop from first hit to last, generates a median crossing time, time stamps it against the received ID and stores it.
Re: (Score:2)
RFID, maybe with a camera as backup, seems like the way to go.
It certainly works for bike and running races. Last few races I attended had antenna beside the course and not a timing mat. Perhaps combining the RFID for the ID and a photosensor for more accurate timing.
Or for more low tech, a person at the start and finish keying in the numbers. Plenty of running races have hand held timers that the official just clicks the button (maybe trigger with photosensor instead) and keys the race tag number.
simplify (Score:2)
Some large numbers on the sides or hood of the car would make image recognition, if not trivial, at least relatively simple.
Re: (Score:2)
Numbers on the cars are more or less standard, but are usually a mixture of different types, including shoe polish on the windows - OCR would be... challenging.
Re: (Score:2)
Well then, just offload the problem into The Cloud!
Done!
Most definitely (Score:3)
Re: (Score:2)
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.
The cars in autocross are as (and usually more) varied as what you see on the street. In a field of 100 competitors, you might expect to see 5 or 6 participants with a particular make/model, for the most popular (e.g. 6 Miatas, 5 Neons, 4 Corvettes, 4 Mustangs, and a hodge podge of all kinds of cars from the last 40 years.)
Re: (Score:2)
Re: (Score:2)
There is a practical issue with photographing the front (hard to protect the camera) - most timing equipment is located 30' to the side of the finish line (you can get closer at the start.)
Re: (Score:2)
Re: (Score:2)
I must remember that insult - it's quite good :)
Re: (Score:2)
I must remember that insult - it's quite good :)
Too bad you can't credit it properly since whomever it was is a wuss and posted anonymously.
QR Codes (Score:2)
Put giant QR code stickers on the hood/doors. Done.
Barcodes (Score:3)
Re: (Score:2)
This is the cheapest / most versatile option, but you would use QR codes [wikipedia.org] or other 2D codes designed specifically for this kind of image scanning and not traditional 1D "barcodes". Issues to consider would be lighting, the camera's ability to capture clear images at whatever speed the vehicle is moving at, etc.
Re: (Score:2)
RFID (Score:1)
There is already an outfit doing motorcycle road racing using RFID. it would work in this instance as well.
Re: (Score:2)
I was going to suggest this. The stage rallies around here use optically triggered timing plus RFID for identification.
The autocross group is on an even smaller budget so we use a guy with a stopwatch and a clipboard. It's good enough.
You're overcomplicating it (Score:4, Informative)
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.
Re: (Score:2)
I also autocross, and I think a practical solution would be to add a network camera to each electric eye installation, connect them wired or wireless to a notebook, and simply snap photos as the beam is broken. Keep timestamp records for each beam break event, assume everything is running normally, but also do a fairly simple color check on the car to verify that the assumed finish time event matches the start event. Display a series of thumbnails on the screen for each automatically determined start/fini
Divide and conquer (Score:2)
You're on the right track here, but let's divide the task into subtasks.
We don't need to produce a fully automated solution at the first iteration, so we set up the webcams and the beam-gates with synchronised clocks. Post-race, the software is used by the marshalls to verify timing thus: it lines up a table of screen grabs, each row representing what it thinks is one car, the marshall clicks "OK" if they all match, or either clicks a button to identify a "drop out" (at which point the following photos ar
Re: (Score:2)
shutter speed doesn't have to match frame rate for video cameras-- Many MiniDV cameras are capable of 1/2000 s shutter speeds, even when they're only shooting 30 fps. So you can get a quite clear picture of someone moving pretty fast-- we use 1/1000 for bike races where the finishes are ~60-70 kph and can quite easily read 12 cm high numbers off riders who are 7 m from the camera, and that's with an SD camera and 4:3 format. For road races I know people who use an HD camera with widescreen format to cover
Re: (Score:2)
Except for reruns, double driver cars, novices (or experts) who are late / get into the wrong grid slot. You can't assume the order is always the same.
Re: (Score:2)
The starter always confirms the starting car's number at the starting line. So if someone gets into the wrong grid spot, it doesn't matter because their car number would be still correct at the starting line. If someone is driving someone else's car and doesn't inform timing appropriateyl, then you would have that problem anyway.
Reruns are not an issue because they are just like regular runs, except done again for a special reason. Cars still line up at the starting line in a certain order to run a re-run.
D
Re: (Score:2)
ahh I see what you are saying. "All the cars starts in the same order" was not clear and made it sound like you meant for the entire heat they are always in the same order. Perhaps, "all the cars cross the finish line in the same order they started" would have been easier for me to understand.
Re: (Score:2)
A thousand times this.
Your problem doesn't need complicated (and expensive) things like transponders, infrared identifiers or image recognition cameras. You're dealing with edge cases that a human can deal with in a few seconds if they have the right interface for it.
Give them the right interface for it.
Re: (Score:2)
It doesn't, because at that point, the car that spun is considered a "DNF." The car that spun can be instructed to not to trip the timing lights and if they do, it can be fixed.
In autocross, cars are not allowed to pas each other. If someone spins and the car behind gets too close (within 10 seconds), it gets red-flagged and gets a re-run.
Use the best software (Score:2)
I'd suggest using the best software available: the human brain.
Version 1
Aim a camera at the finish line. Aimed to capture the racer's number and any other identifying information. Set the camera to be triggered by the interruption of an IR beam. Place a clock in the picture field.
During / after the race, find each racer's picture and record the time.
Version 2
Aim a video camera at the finish line.
Use a laser pointer as a finish line. Aim it at something white and make sure it is visible as a racer crosses
Re: (Score:2)
Re: (Score:3, Informative)
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 t
Re: (Score:2)
Racers want to know their time when they cross the line or very soon after, not after their heat / event. The system needs to be reasonably realtime.
Similar cars (Score:3)
What happens if two dudes show up in a blue Miata?
Re:Similar cars (Score:4, Funny)
Even worse, what happens when two dudes show up in a Delorean and finish the race before they even start?
Re: (Score:1)
Why would they start the race if they've already finished it?
Re: (Score:2)
Re: (Score:2)
Yes we can -- they're Brown neutrinos
Re: (Score:1)
Then they are probably a nice couple
Re: (Score:3)
Heard in the Paddock [traqmate.com] Why are you Spec Miata drivers so aggressive? "We are compensating for our ChickCars."
Use AprilTags to identify vehicles (Score:3, Informative)
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
Not quite that easy... (Score:1)
I have run timing & scoring for track events (I don't AutoX), but you are under-estimating the problem. Time tolerances for a winning finish can be as close as .0001 seconds. Any variation in the delay for a camera or the time needed to process the image could be a serious problem. Another problem would be car placement, cars will not always cross the line in a nice, neat manner.
Those problems can have real monetary consequences when you factor in the product contingencies (free race tires and other
Re: (Score:2)
Timing tolerances of +/- 100 microseconds?
At 100 miles/hr (160 km/hr) that would be a distance of 0.176 inches (4.44mm).
I think you meant "milliseconds" which is 0.001, not 0.0001. Still, multiply the above by ten and you get:
1.76 inches or 44.4 mm
That's a pretty awesome "photo finish."
And for that matter, what about relativistic effects?
Re: (Score:2)
But it has been stated here that the race is fastest time over a fixed course, not a nose-nose competition between multiple vehicles. That makes the short difference of distance not very relevant.
AForge Rocks (Score:1)
AForge has the components you need to compliment a IR system: motion tracking and object identification. I've used it on a similar project for a cup team to get corner exit ride heights and yaw. Camera shutter speed shouldn't be much of an issue with just about any off the shelf camera. Camera position will require a bit of testing but that will be pretty obvious. Using video as an alternative with an off the shelf camera is another matter. Here frame rates rule. Even if you jump through the hoops to
outsource everything! (Score:1)
Bluetooth? (Score:2)
How quickly can Bluetooth establish a connection? Use the optical beams to determine the time that a car passes a point, and give each driver a Bluetooth headset that has been paired with laptops used to record the timing.
You can test the range to make sure it will work--you should only need a few meters. You can get cheap headsets for somewhere around $50, probably less.
I have no idea if this would actually work, but it should be possible to do a test run with parts you probably already have.
Re: (Score:2)
Bluetooth isn't the right tech, you're looking for RFID in this case.
Re: (Score:2)
Yes, RFID would be better, but something like Bluetooth or even turning on WiFi on a cell phone in the car could be sufficient, and it could eliminate the need to purchase equipment that isn't already on-hand. It also has a nice hack spirit if it works, in using something in ways beyond what it was designed for.
Forget autocross, how about foot races? (Score:3)
Re: (Score:2)
Why are timing chips a PIA?
What's the error rate?
Re: (Score:2)
GPS? (Score:2)
I know this has a scalability problem (i.e. the cost of equipment goes up linearly with the number of contestants) but you could build a self-contained GPS device that tracks a car's position throughout the event. Have it record position information to flash as often as possible (Sparkfun has a GPS receiver that will update position 10 times/sec for US $61). At the end of the event, everyone turns in their GPS device and their position recordings are uploaded into a computer.
Now one may argue that GPS pos
Re: (Score:2)
Re: (Score:2)
See traqmate.com
Re: (Score:2)
but too expensive to give to every driver and since newbies can walk on the day of the event the club would also need a good number of "loaner" units. Much like they do with loaner helmets.
Re: (Score:2)
Factoid- prior to national events two parallel timing systems are set up and tested against each other to ensure consistent results. IIRC, anything greater than 5 thousands variation between them calls a timing system into question.
RFID (Score:1)
Don't know if it would work in auto sports but sounds like a use for RFID, http://en.wikipedia.org/wiki/Radio-frequency_identification#Race_timing
Practical experience with autox T&S systems (Score:4, Informative)
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.
Re: (Score:2)
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.
At my local events, there are usually a few people sharing loaner helmets...
Use the open source Predator Tracking (Score:2)
Re: (Score:2)
Don't know if Predator refers to the military UAV, but it got me thinking, float a camera on a balloon and video the whole track from above....
RFID? (Score:2)
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...
Selective Wavelength Emission/Absorption (Score:3)
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.
Yep - if you can do the lifting (Score:2)
There has been a lot of work for recognizing images in video. Here, if you're smart you should be able to do the recognition given a single still, which means it's just ordinary image processing after extraction from the video.
Make it easier on yourself by making the numbers something like bright yellow on blue with a white border (for instance). Then just look for segments of each image with high response for yellow and blue. Then extract the video and pass it through an OCR tool.
Also, put the camer
Great idea but addressing issue of latency? (Score:3)
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.
Re: (Score:2)
Proper race timing needs to be 3 decimal places, at 200kph (124mph) a 1/1000th of a second ammounts to 6cm of difference.
Good math.
AutoX is much slower than that. This may not work for F1, but F1 can afford the fancy equipment.
AutoX top speed is well below 100kph on most tracks, and you can put a turn near the finish line to keep the speed across the line under 50 kph (I suspect the turn near the finish is pretty common anyway, to keep the course exit speed down). It's also rarely more important than who bu
Am I missing something? (Score:2)
The problem I see with having bar codes or RFID measure the time is how the car crosses the finish line. Because the OP mentioned a beam being interrupted I imagine the finish is determined by the front of the car touching the finish line (not unlike any other type of racing) so if the time is measured by a barcode or image on the roof or door then how do you match that with the front of the vehicle. Also, if the time is m
Re: (Score:2)
Similar, for RC (Score:3)
This cannot be hard (Score:2)
I think my cell phone can do this already
Magnetic stickers, eh? (Score:2)
The problem with magnetic stickers is... Corvettes have fiberglass body panels. :-)
I once ran timing, here are my thoughts:
Personally, I don't think that transponders are expensive, and I think they'd be a great solution which would absolutely fail because of politics. "You mean I have to buy a $100 device (or rent for $5/event) to mount to my $40,000 car that has $2,000 rims and $1,400 tires?!? What do you think I am, made of money?!?"
I suspect you won't be able to do good detection except if the
Get the right camera (Score:2)
I've had good luck using GigEVision under Linux. There's a bunch of vendors out there that have Linux drivers for their GigEVision cameras and the specialized acquisition hardware is just an ethernet card. You probably want something that goes at least 30 fps sustained (probably about 1-3k for a camera, depending on resolution and bells and whistles). That's plenty enough to be able to int
Backup (Score:2)
Yes, try to do the identification task immediately, but ensure that the system has the needed abilities to deal with problems. Ra
Magnets? Maybe not (Score:2)
Not all vehicles are steel. Magnets might not hold your barcode on all vehicles.
Eh. What? (Score:2)
Find me someone intimately familiar with an Android phone, or barcodes, or RFID, who can also grok basic SQL, and somone intimately familiar with the particular practical difficulties of SCCA timing, and I'll have your solution in-place, tested and working, before lunch.
This isn't rocket surgery.
(And if you give us until supper, it might even have a fancy web interface.)
Re: (Score:2)
I'm your Huckleberry.
Cat got your tongue? Don't want to spill the beans?
Why not outline some basics of your design and we'll help identify where the weaknesses are. Cause there's a HUGE hole there right now...
All of this is too complicated (Score:2)
How about a big QR code on each door and a camera hooked up to a laptop at the way-points?
Three suggestions based sorted by financial trade (Score:2)
I can think of three options:
1) Expensive, but available immediately:
There is license plate reading software in use on highways in Europe. These turnpike systems use cameras to read the license plates and LIDAR 3D laser scanners to reliably measure the size of a truck. The lase information should provide very reliable timing data, but likely are an overkill.
As others suggested special markers on the cars could be easier to identify then license plates.
2) cheaper in development but higher material cost for e
Work together? (Score:2)
I'll Try This (Score:2)
When the car passes under the start beam the timer is started and is stopped when under the stop beam. At the stop beam the tr
Re: (Score:2)
Fill out the requirements! (Score:2)
So many things missing from the OP's requirements like:
Must work in ALL weather conditions (fog, rain, snow, dust)
Must be accurate to 1 ms
Must identify which DRIVER is in the car as more than one person may be driving any given car, and drivers may have full face helmets
Must handle backward/spinning/sliding finishes
Must process in near realtime ( 20sec between finishes)
Must handle multiple cars on course at once (at least 3 running)
Must handle GoKarts and other strange pieces of machinery that may not have
There are special cameras for this (Score:2)
I don't know how timing is normally done for auto races, but I've been part of the staff at a few track & field events, such as the Nike Indoor Nationals, and seen how the timing is done there. There's a special camera that captures a single column of pixels, carefully aligned with the finish line, that records a rapid sequence of images whenever something changes in its field of view. The software assembles all these one-pixel-wide images into a single image whose horizontal axis is time rather than
Multiple-Exposure (Score:2)
Several posts have objected to the frame rates of consumer video cameras as limiting resolution. However, this can be overcome.
For one, there are high-speed cameras with much higher frame rates. They are quite costly, though, and not necessary for this applicaiton.
I propose you use a multiple-exposure camera. Such things do exist in the digital world. Charge is allowed to accumulate for an extended period. You use a strobe to produce multiple images. You can use an infrared strobe to avoid disturbing partic
Re: (Score:2)
Two companies that I think may make suitable cameras:
http://www.jai.com/EN/Pages/home.aspx [jai.com]
http://www.teledynedalsa.com/mv/products/cameras.aspx [teledynedalsa.com]
I might as well add a plug for my favorite machine-vision camera dealer. Very helpful folk:
http://www.aegis-elec.com/ [aegis-elec.com]
It's been a few years since I've been involved in this stuff, and I'm sure there is new technology. For one, similar cameras are now available with image intensifiers, which helps solve the illumination problem.
Easy - RFID (Score:2)
Contestants (be it cars, people whatever) have an RFID tag (probably passive, 900Mhz RFID) in a name tag or other tag (tag on dash of car) that will give you decent interval timing.
For the finish line, or where timing is more critical, you can supplement with a camera (photo finish if you will).
900Mhz RFID is typically good for 15+ feet (depending on the size of the tag) and can be used reliably up to about 45 feet (big tag on big metal object - like a rail car). Tags can be very cheap - about 25 cents. T
Re: (Score:2)
Because you know nothing. Most systems are too expensive for grassroots racing, even your so called "cheap solutions".