Author Topic: Finish line & high speed single line camera  (Read 970 times)

rkantos

  • New to the forum
  • *
  • Posts: 2
Finish line & high speed single line camera
« on: June 20, 2018, 01:14:36 AM »
Hello,

I know what I'm requesting might not be able to be done due to framework and SoC or hardware limitations, but I'll throw it out there anyway. Since there is some effort done to high speed imaging @ 120fps with Magic Lantern, I thought my requirements could be filled with a Magic Lantern powered Canon camera! Basically I am asking if it would it be possible to mimic a finish line camera by reading a single line of the image sensor at 400fps to 2000fps with Magic Lantern? I'm no software nor a hardware expert, but for what I know, maybe it could be possible to read a single line from the camera at several hundred frames per second and either create a video file from the capture of the single line. A image file could work fine too, since the actual required bandwidth isn't that great by modern standards. I imagine maybe the 2nd option would be easier to implement because one wouldn't need to tune the feature to work with a video encoder. Perhaps even RAW video could be shot.

For use cases there are the obvious; cycling races, winter sports, motor racing and athletics. Then there are also more ambiguous uses, for example industrial or production line usage, especially if you can somehow pull the camera feed live. I imagine it wouldn't be too difficult to take it even further than this, even as a timing equipment, since some Magic Lantern supported camera's support a GPS receiver, which could be used for accurate timing of the image/images. I understand timing several hundred images per second would get a lot more difficult, but even getting an accurate time for just the first image would make the camera feasible as accurate timing equipment.

This kind of implementation, even if implemented just half way @ 500fps would dramatically reduce the cost of acquiring and using a high speed line scan camera (finish line cameras with certified hw & sw cost 7-15k$, and industrial line cameras are in the same range)

Thanks

mothaibaphoto

  • Senior
  • ****
  • Posts: 385
  • pesky kid
Re: Finish line & high speed single line camera
« Reply #1 on: June 20, 2018, 07:06:02 AM »
... Since there is some effort done to high speed imaging @ 120fps with Magic Lantern...
Whaaaaat? I missed something?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 6700
Re: Finish line & high speed single line camera
« Reply #2 on: June 20, 2018, 09:24:51 AM »
Kudos for setting up a proper use case!

But I think you accidently killed this feature request, too.

Explanation:
IMO killing happened by introducing the term "certified". I have troubles seeing competitions in need of finish line equipment *and* willing/able to go with uncertified equipment.
So - IMO again - this ML-feature-to-be has to be certified to be used. Those procedures are not exactly free and AFAIK there are some organizations doing them (for different regions and different sports).
ML is not represented by an organization/company and there is no person with proper authorization to sign a paper.

And industrial/production line usage shares similiar problem: Nobody there to sign and fulfill a contract. Who will be accountable for long-time support?
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

rkantos

  • New to the forum
  • *
  • Posts: 2
Re: Finish line & high speed single line camera
« Reply #3 on: June 20, 2018, 03:55:02 PM »
Kudos for setting up a proper use case!

But I think you accidently killed this feature request, too.

Explanation:
IMO killing happened by introducing the term "certified". I have troubles seeing competitions in need of finish line equipment *and* willing/able to go with uncertified equipment.
So - IMO again - this ML-feature-to-be has to be certified to be used. Those procedures are not exactly free and AFAIK there are some organizations doing them (for different regions and different sports).
ML is not represented by an organization/company and there is no person with proper authorization to sign a paper.

And industrial/production line usage shares similiar problem: Nobody there to sign and fulfill a contract. Who will be accountable for long-time support?

I understand your view however; Of course such an implementation would never be used in the top of the sport, but I still see many cases where it could enhance the current use of hand timing. In some countries hand timing is used to very high level's of a specific sport. And although a hand timer that is being used could even be "certified", it would be trivial to modify even the sporting regulations to allow for such use of any timing or camera device, provided they just are better than the hand timer. (which is obvious)

The same kind of applies to industrial use. Nobody with proper capita is going to buy canon dslr to support their manufacturing lines. However, again, there are a range of groups that could use such a feature for even actual manufacturing, as long as an insurance company is willing to insure something that the company is required to insure by law. (e.g. third party liability). Students, startups, moonshots etc. could readily use this kind of "technology", and it would still go a long way in my opinion.

Is there someone who knows whether the features I am asking for are possible to be implemented and if not what are the limitations? I imagine the hardware should be capable from a bandwidth point of view. I can only see that there is some fundamental hardware/ SoC -limitations that set a ceiling for a framerate. Is it possible to "overclock" the cmos/cmos driver, and just output the first/middle/last line from the censor to the image processor? What happens if you just ask the camera for a single line of  full frame resolution at 1000fps? :D What is the maximum shutter speed when filming video?

A similar analogue can be made with film making... Big budget films rarely employ dslr cameras in their films.

Whaaaaat? I missed something?

My bad... I blame google :)

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1463
  • 6d - Nightly build user
Re: Finish line & high speed single line camera
« Reply #4 on: June 20, 2018, 04:13:54 PM »
I'm not sure but I think if you make the vertical resolution small enough, one could make faster fps possible.
There are two timers in the Canons, Timer A and Timer B, both together determine the fps speed and resolution.
Timer A is connected to horizontal resolution and Timer B is connected to vertical resolution, the smaller the value of the timers, the faster the fps.
So higher fps goes at a cost of resolution.
I do know a little how Timer A works and what is possible, but I have no idea how to change Timer B to logic values.

I have a Canon 6d.
And I do know that you can readout the full width of the sensor (with 3x pixel binning enabled for faster readout) in 60fps.
In that mode it only scans about 600 lines of vertical resolution.
As far as my knowledge goes, this means that the above can be translated to 600fps readout with 1824 pixels full width (3xbinned) resolution and 60 lines vertical resolution, theoretically that is...

But I have no idea for the correct values for the B timer to get this setting. And I'm not sure if there are other physical limits for the sensor ?






a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12198
  • Maintenance mode
Re: Finish line & high speed single line camera
« Reply #5 on: June 20, 2018, 07:08:21 PM »
Almost there - timer B is the one that needs to be adjusted for vertical resolution, alongside with a few other registers (including HEAD timers, PowerSaveTiming and ReadOutTiming).

Current state: we are able to increase the vertical resolution on many DIGIC 5 models. At some point, this change requires lowering the frame rate (by increasing the FPS timer B, to allow reading out more lines). Each additional line requires adding 1 to the timer B and the other registers, so this part appears straightforward.

With the current crop_rec_4k build for 5D3, you can enable the full-res LiveView preset, then reduce the vertical resolution from the crop_rec submenu; this will also increase the frame rate. You can go until 5796x400 @ 48 FPS; beyond that, the image breaks. Figure out why.

The above full width 1:1 readout is achieved with timer A = 792 and timer B = 625. If we figure out how to decrease vertical resolution below 400px, that would give a theoretical limit of 24e6 / 792 / (625-399) = 134 FPS for an active area of 5796x1.

You can push timer B to 580 to get 52 FPS (or to 4050 from 4095 to get 7.48 FPS instead of 7.4); that gives the theoretical frame rate for 1 scan line: 24e6 / 792 / (580-399) = 167 FPS. Operating near limits increases the risk of corrupted frames, but ~ 150 FPS should be reasonable.

So, we can say there is a readout overhead of about 200 lines on this camera, which limits the maximum frame rate (half resolution != double FPS). That overhead includes the top optical black bar (30px) and whatever else the readout process requires.

Cross-checking:
1040p48: A = 400, B = 1250, overhead = 210 (170 if we push to 1080, but this gives corrupted frames).
4096x3072 12.5p: A = 585, B = 3282, overhead = 210.
4096x1440 25p: A = 579, B = 1658, overhead = 218.

TLDR:
- 5796x400 @ 48 FPS with current experimental build on 5D3.
- 5796x1 @ up to 150 FPS (theoretical limit, unless one figures out where the overhead comes from, and how to reduce it).

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1463
  • 6d - Nightly build user
Re: Finish line & high speed single line camera
« Reply #6 on: June 20, 2018, 07:38:07 PM »
What if you use 1080p mode so you 'only' need 1920 pixels for full frame width (3x binned) ? (For finish line purposes, 3x binning would be sufficient)
Then timer A would be something around 264, if B timer stays 625 that would theoretically give around 145 fps ?

But you certainly must have already tried the above and it didn't work for some reason right ?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12198
  • Maintenance mode
Re: Finish line & high speed single line camera
« Reply #7 on: June 20, 2018, 10:08:11 PM »
Well said - "it didn't work for some reason". No luck going past A=410 / B=873 (67 FPS from 60). Reducing vertical resolution in 720p60 has no effect on maximum frame rate; there must be something else to tweak, that I'm missing.

Timer A reaches 400 in 1080p, but doesn't go below 410 in 720p. Can't really understand why, since horizontal readout size is the same in both cases. Why it doesn't get close to 264 = 792/3, is another mystery.