Photo Finish options

General timing system discussions.
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

PineNut wrote:Stan,

At first I wasn't understanding your comparisons, but after thinking about it, I think I got it (time vs x-axis).

Yeah, it is a different view of the world ... looking "up time" rather than "up track".
PineNut wrote:Its time to get some hardware and start playing around. I do know that Logitech sells a webcam (30 fps) that would be great for mounting on top of the finish line - looking down, and has built in software to record and replay video clip. You could trigger manually - start before you trigger the gate, then stop once they all went through and replay it. The cheapest logitech that comes with the software is the Pro 9000 camera (software called RightLight). Its $70-90 depending on where you can find it.
I figured that a web cam that does 30 fps will make a new frame about every 2 inches of car travel. Improve to 90 fps, the few frames arrive about every 0.6 inches of car travel. The down-side is that the car images are pretty blurry either way.!

It would be interesting to decompose a few frames and then reassemble one line from each with time rather than up track being the y-axis! I don't know how long the CCD collects light ... so might still be blurry, or if the lens is fast, they might sharpen up. In any case, the car in the picture will be very, very short ... like 3 to 12 pixel lines long!
Stan
"If it's not for the boys, it's for the birds!"
knavekid
Journeyman
Journeyman
Posts: 32
Joined: Mon Jan 07, 2008 2:17 pm
Location: Orlando, FL

Re: Photo Finish options

Post by knavekid »

I was searching for USB line scan cameras regarding this subject and found this:

Pinewood Derby Timing System Using a Line-Scan Camera

This is a PowerPoint presentation file so you will need PowerPoint to view it. This was an Electrical Engineering senior design project described as follows:

"The intent of this project was to build a line scan camera that would determine the finishing order and race time of cars in a pinewood derby car race with a high degree of accuracy and a final picture. The project involved creating a printed circuit board interfacing an FPGA, DRAM, and a CCD together. The FPGA processes the image acquired from the sensor, inputs it into DRAM and then outputs the raw data to a computer via USB cable. The camera can cover up to 4 lanes and is placed 12 to 14 inches above the finish line."

The 102x1 line scan camera CCD device, TSL3301-LF, is available for under $10 each. By the time you add optics and interface electronics, the cost and complexity rises.
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

knavekid wrote:I was searching for USB line scan cameras regarding this subject and found this:

Pinewood Derby Timing System Using a Line-Scan Camera
Outstanding! I recommend two gold stars and a kiss on the cheek from your best girl! :)

Seriously, thank you! Well done!

The keys "line scan" was something I didn't know to use. It would probably have been among the several thousand responses that Google gave me, but I think I'd not have gotten to it!
Stan
"If it's not for the boys, it's for the birds!"
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

Okay, what knavekid found is that the hardware is not expensive and that the technology is within the scope of a typical EE degree program. Now, if the firmware satisfies (or can be adjusted to satisfy) the USB Video Class 1.1 specs, the driver is already available in Vista! So it reduces to "a dab of application software" and, probably, some patent licenses! :)

And, there are a raft of such cameras out there that improve on the 0.17" square pixel size of the project's camera.

knavekid, I'd suggest more than that "kiss on the cheek from your best girl" but this is a family site! :)
Stan
"If it's not for the boys, it's for the birds!"
knavekid
Journeyman
Journeyman
Posts: 32
Joined: Mon Jan 07, 2008 2:17 pm
Location: Orlando, FL

Re: Photo Finish options

Post by knavekid »

What I did notice from that implementation is that the camera was situated above the track and looking down. This is as opposed to the common photo-finish application where the camera is looking across the finish line from the side.

From the side, it is more readily evident which car is the winner as long as the cars are easily identifiable from the photo or image. The winning lane is not so evident. A high number of pixels is not as important from the side as only the height of the car must be imaged.

From the top, the winning car and lane is easily identifiable, but the winning order could be a bit more subjective without an electronic aid that compares each scanned line with a reference line (with no cars present), and looks for a difference. This top-view solution requires more pixels to make a good image as three or more lanes must be imaged.

This sounds like a very fun project, and I would probably take it on if I had any free time. For those who are interested, my parts list would likely include the following components (for a side view system):

1 x CY7C68015A High-speed USB controller
1 x TSL1401R-LF 128x1 sensor
1 x AD7492ARU 12-bit ADC

This would be able to handle at least 3000 lines per second. The required line rate is determined by the required resolution of the image and the speed of the cars as they cross the finish line. If the 128 pixel array height images about 4" tall, the length of a car is about 256 pixels for square pixels. If the car traversed the finish line in 1/10 second, this would be about 2560 lines per second. If the car is slower than this, the required line rate may be reduced accordingly.

The electronics design should be fairly straight forward. The difficult part is the software for the USB microcontroller and PC to tie all of this together and generate the image.
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

Setup requires careful alignment of the line scan with the finish line. Then the interpretation of the pic is done with a computer generated index line on the display that is parallel to the line scan. The index line can have an elapsed time associated with each position, and moved about (forward or backward in time) with a mouse or trackball. Interpretation requires starting with the index line in front of the first car to the line and moving it forward in time until it touches each car in turn.

Printed, the picture should also be pretty easy to interpret, although a close heat between the cars in lanes 1 and 4 might be a bit of a challenge without the reference line.

I'm concerned at the size of the square pixels ... each spans a distance of about 1/6" across the finish line and the image is captured every 0.0005 sec, during which time the car moves a small fraction of 1/6". This suggests that there will be a bunch of overlap between what the adjacent pixels show unless the scan rate is carefully matched to the car speed. Worse, the front of a car may show in the pixel (and, therefore, "at the finish line") when it is still almost 1/12" away from the finish line. This makes me think that smaller pixels may be necessary. Am I not understanding something?
Stan
"If it's not for the boys, it's for the birds!"
PineNut
Journeyman
Journeyman
Posts: 46
Joined: Tue Mar 27, 2007 12:41 pm
Location: Pittsburgh, PA

Re: Photo Finish options

Post by PineNut »

Stan,

I have been going back and forth on this whole thing...especially after I looked at the links you provided with photo finish technology/concept.

I liked your analogy of the scanner but this time instead of the scanner moving over the document, the camera is stationary and the object moves past the camera - which would explain why fast objects look shorter and slower objects longer w.r.t. the camera speed.

However, where I am struggling is looking at the images of a horse race finish. The background is blurred but the horse image is crystal clear, which would indicate that the camera is moving with the horse. This would be hard to time. If stationary, the slit would be a small width at the finish and record the image as it goes past the camera. In one of the examples you had, the polaroid film was pulled at the same speed as the object being filmed. If the camera is stationary, why don't the images overlap? Unless the film is being moved (as in your example with the polaroid). For the example in Wikipedia, the slit must be as wide in width as the whole horse to capture that instant in time, otherwise, as soon as the horse's leg moved, wouldn't it look distorted?

Also, when you use the term 'lines', what does that correlate too? For instance if your tv is 1080p, you've got 1080 lines. How does this differ from resolution (example 1.3 mp camera)? Aren't they one and the same?
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

PineNut wrote: However, where I am struggling is looking at the images of a horse race finish. The background is blurred but the horse image is crystal clear, which would indicate that the camera is moving with the horse. This would be hard to time. If stationary, the slit would be a small width at the finish and record the image as it goes past the camera. In one of the examples you had, the polaroid film was pulled at the same speed as the object being filmed.
The "background" is whatever is stationary at the 1 pixel width of finish line. The same image is recorded over and over.
PineNut wrote:If the camera is stationary, why don't the images overlap? Unless the film is being moved (as in your example with the polaroid). For the example in Wikipedia, the slit must be as wide in width as the whole horse to capture that instant in time, otherwise, as soon as the horse's leg moved, wouldn't it look distorted?
Remember that the camera only "sees" the one pixel width of the finish line... it does not see or record what is ahead of or beyond the finish line. If the scan rate is equal to the competitor's speed, then the competitor will be recorded in a way that its length in the picture is comparable to its real relative length, and its length to height ratio will appear "normal". A picture of "the whole horse" is composed of those portions of the horse that were aligned with the finish line at successive instants. Something funny happens to the pictures if there is both forward motion and vertical motion... a trailing leg that is being lifted at the competitor crosses the finish line will appear to be curved wierdly!
The object is not fuzzy because the camera does not see that part of the object that is ahead of or beyond the finish line
PineNut wrote:Also, when you use the term 'lines', what does that correlate too? For instance if your tv is 1080p, you've got 1080 lines. How does this differ from resolution (example 1.3 mp camera)? Aren't they one and the same?
Lets take the simple 600 X 800 (old) computer display standard. That consisted of 600 lines of 800 pixels each or 480,000 total pixels. Each line corresponds to a specific height of the object and each pixel across the line corresponds to a specific part of the width of the object.

In a photo-finish the "height" dimension is replaced by the "time" dimension and the "width" dimension is arranged to show the plane of the finish line.
Stan
"If it's not for the boys, it's for the birds!"
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

Sorry, my bride said "time to leave", so I had to break off the last post. I left some questions unanswered.
PineNut wrote:In one of the examples you had, the polaroid film was pulled at the same speed as the object being filmed. If the camera is stationary, why don't the images overlap?

Because only the finish line and the parts of the object at it were being recorded on the film because of the vertical slit through which the film was exposed. Move the file with time and the slit can cover an interval of time and show what part of the object was at the finish line at each instant.
PineNut wrote:Also, when you use the term 'lines', what does that correlate too? For instance if your tv is 1080p, you've got 1080 lines. How does this differ from resolution (example 1.3 mp camera)? Aren't they one and the same?
Line scan cameras, instead of being designated with number like 600X800 or .480 megapixels, have size designations like 1X800 ... one row of pixels. Because they are so much smaller, the data can be extracted much more frequently, allowing an image to be captured as frequently as every 0.0005 seconds!!!

Your TV should have a pixel count for both width and height. The term "line" refers to one "row of pizels across the picture" and a "frame" refers to the group of lines that make up a whole picture.
Stan
"If it's not for the boys, it's for the birds!"
User avatar
SlartyBartFast
Master Pine Head
Master Pine Head
Posts: 272
Joined: Mon Feb 12, 2007 11:30 am
Location: Montreal, Quebec

Re: Photo Finish options

Post by SlartyBartFast »

To revive an old thread with a new idea:

A good source for a line camera and optics is old scanners. There are quite a few examples of people making panoramic camera and putting them to other uses.

Problem is the limit in width. Might work horizontally for 2 lanes easily enough. Could be mounted vertically, but it would then be too tall and capture (Maybe) only the first place finish. Maybe at an angle it could capture all lanes.

I looked at a couple of CCD sensor specs and it seems it would require a firmware modification of the chip to capture line data. They all seem to have a fixed scan rate and area of the sensor. Changing the resolution just changes which pixels are transmitted and doesn't allow for speeding up the frame rate.

An interesting idea would be to have the finish line camera also serve as as lane judge. Check the colour of a few pixels for a change.

It would be unwise to have a strip camera capture the finish unless aiming of the camera with respect to the finish line can be done in such a way as there is no parallax or difference in perspective between the finishline judge and the finish line camera.

Modular optics anyone?
User avatar
Stan Pope
Pine Head Legend
Pine Head Legend
Posts: 6856
Joined: Sat Jul 05, 2003 7:01 pm
Location: Morton, Illinois
Contact:

Re: Photo Finish options

Post by Stan Pope »

Good thoughts!

I think that scanners use a 1X1 sensor (at least the ones that I've taken apart do, and mechanically aim the optics to the page, moving along and across the page by moving the mirrors. Older scanners even implemented color with a rotating filter. Although the concepts are strongly corrrelated, I think that scanner technology would limit the speed at which the system could operate, probably below need for track finish line.

Used as a photo-finish camera, the page in the scanner model moves without mirrors (time seems to do that!) so the implementation would be that much simpler.
Stan
"If it's not for the boys, it's for the birds!"
Post Reply