Rolling shutter measurements

Started by a1ex, July 15, 2014, 03:46:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a1ex

When doing some timing analysis from the full-res silent picture thread, I think I've found the formula for measuring the rolling shutter in video mode.

https://bitbucket.org/hudson/magic-lantern/commits/5d0db9024bab25649bfcbde58e0849e0817ab902

Since the formula is based on FPS timers (VerticalRawResolution * TimerA / MainClock), I've added a menu entry for displaying it in the FPS override submenu. I chose to display it in microseconds per line, so it's up to you to know your vertical resolution and find the total distortion per frame. ML tries to do some guessing, which should be a good starting point (it guesses the captured resolution for a 16:9 frame in H.264 1080p - which is slightly lower - but fails at 720p because it doesn't know the exact stretching factor).

Results from 5D3, at Canon default FPS:


24p, 30p : 18.3 µs/line  => 19.6ms in H.264 (1904x1070 captured pixels)
25p      : 20.0 µs/line  => 21.4ms in H.264
50p      : 20.0 µs/line  => 13.4ms in RAW at max res (672 vertically); the menu gets it wrong in H.264
60p      : 18.3 µs/line  => 12.3ms in RAW


Samuel H measured 20.5 ms for 5D3, but he didn't specify the setting. Either way, the numbers are close.

Decreasing timer A will decrease the rolling shutter. There isn't a mode for minimizing timer A in newer cameras, but in many cases, exact FPS will chose a very low value for it. You can also fine-tune timer A manually (push it to the left until it stops decreasing), and with these settings, the "overcranked" rolling shutter values are:


24p,25p,30p : 16.6 µs/line  => 17.7ms in H.264
50p, 60p    : 17.1 µs/line  => 11.5ms in RAW


This feature will be in nightly builds starting from tomorrow. It's just a display thing - the behavior was not changed. Please post screenshots.

jimmyD30

WOW!

Being able to emulate a Global Shutter on CMOS sensor is MAD INSANE 8)

Just imagine shooting RAW with 'global shutter' on a non-CCD DSLR, I'm literally speechless (well, apart my aforementioned speech anyway ;)

a1ex

I highly doubt I'll be able to achieve that (overcranking this timer doesn't go too far). There seems to be a global shutter for starting the exposure, but a rolling one for stopping it. It's visible on the motion blur shape from the full-res silent pictures, which matches the graphs from the other thread.

LiveView uses rolling shutter for both start and stop (unlike photo mode). That's one of the next challenges - figure out how to switch between the two modes.

dubarry

RIDICULOUS!!!

Between rolling shutter adjustments and SRM it's like Christmas again. :'(

Once this is in the nightly will we be able to use it on the 60D?
I only ask because of this previous comment "RAW_PHOTO_EDMAC needs to be changed on all cameras (see these comments in raw.c)"

a1ex

Again, it's just a display thing. The feature has been there for years.

dubarry

Ahh.  Well this is interesting I'm going to have to check it out when it comes down the pipe.  If only I had known this feature existed previously dang it!

I see now... I got turned around I was referring to the full res silent pictures development.
referencing this: "RAW_PHOTO_EDMAC needs to be changed on all cameras (see these comments in raw.c)"

I'll repost accordingly.

budafilms

Trying to translate in my world ;)

A fake global shutter means... hybrid shutter is  referred to as a "global shutter," but strictly speaking, these are still standard rotary shutters that have been adapted for digital use. Rolling shutter artifacts are still possible—especially at higher frame rates and shutter speeds—since the shutter still sweeps across the sensor.

So

shutter is simply a spinning disc between the rear of a lens and the film strip. It has an opening that lets in light once per revolution for each exposure. When the light is obstructed, the film advances to the next frame and the process repeats. For these reasons it's also often referred to as a mechanical or a rotary shutter.

then

In that case, fast-moving subjects can appear angled or sheared, and rapid camera movements are more likely to appear as a wobble. Effects are most pronounced with whip pans, fast subjects, high shutter speeds or run and gun type shots. Strobes can also partially illuminate the frame if they go off when the full sensor area isn't collecting light.

Source: http://www.red.com/learn/red-101/global-rolling-shutter

chmee

dont get me wrong.. isnt it just a measurement, the tuning of timers gives some optimizing but is far from being a rolling-shutter-neutralization?!

on 60fps one frame needs 1/120s (on 180°shutter) = 8ms per frame
on 25fps its 1/50s -> 20ms

by now it was optimized by
17.7ms/21.4ms (in H.264) =~18%
(and thats not bad of course)
[size=2]phreekz * blog * twitter[/size]


a1ex

Yep, their results are pretty close.

BTW, the feature was in the nightly builds for one week, and nobody posted a single screenshot. Guess it's a good candidate for the next cleanup session.

mk11174

Quote from: a1ex on July 24, 2014, 10:20:29 AM
Yep, their results are pretty close.

BTW, the feature was in the nightly builds for one week, and nobody posted a single screenshot. Guess it's a good candidate for the next cleanup session.
actually,  I tried to get you a screen shot I used the latest tool,  and it did show fps menu, but did not show me any results after I took the pictures, the script took the 2 pictures fine,  but the tool did not give me any info to capture, I went back into the menu of the tool and it still showed the same thing it should before I took the pictures?
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

What pictures? This thread is about rolling shutter in video mode.

You only need some screenshots of the FPS override submenu, or just write down the numbers.

mk11174

Quote from: a1ex on July 24, 2014, 12:20:33 PM
What pictures? This thread is about rolling shutter in video mode.

You only need some screenshots of the FPS override submenu, or just write down the numbers.
I thought you wanted a silent picture and a cr2 with a screenshot of the fps menu?
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

That's another test, from another thread.

mk11174

Quote from: a1ex on July 24, 2014, 01:49:20 PM
That's another test, from another thread.
Gotcha, I started with the fullres thread then you broke off into this one, I thought it was the same test needed, but then cool, will post results then if that is all that is needed.

1920x1080@30fps


1920x1080crop


1280x720@60fps
11.4ms at 1280x689

For RAW I can pretty much only do [email protected] while in 1920x1080@24 Canon Mode
500D/T1i  550D/T2i  600D/T3i  700D/T5i

budafilms

A1ex, this thread are not very promoted, for example it's not in Facebook, where ML have 61.000 people!
I think it's misunderstanding the way we get the the new info of ML - I'm a FAN -  this is important:

a) most people go ONLY to the Home folder and check @Autoexec twitter - twitter is not a good place to contact today. If the first line is about ML with Leds - like right now - people go there and downloads.
b) other people check " Show new reply to your post" in FORUM - if they have a problem - and stay weeks around a couple of threads.
c) very few go to "unread post since last visit".

A couple of mont ago, other sites promote a lot the activity of ML, because have 5D or Canon products. But it's strong the other brands advertising and have buy this sites with products or banners, I don't know - I'm not judging. But it's a fact that ML have less present in other sites and "public figures".

I think one solution is re-edit (no aesthetic redesign) the front page, I mean only the HOME with the LAST investigations or research to stay up to date with all the ML work.


This is my test:

FPS OVERRIDE (RAW 1280X720)

DESIRED FPS 24 (FROM 25)
OPTIMIZED FOR EXACT FPS
FPS TIMER A: 400 (-80)
CTUAL FPS 24.000
ROLLING SHUTTER 16.7

Rolling Shutter: 21.4ms at 1932 x 1290

FPS OVERRIDE (H264 1920X1080)

DESIRED FPS 24 (FROM 25)
OPTIMIZED FOR EXACT FPS
FPS TIMER A: 398 (FT-2)
ACTUAL FPS 24.005
ROLLING SHUTTER 16.6

Rolling Shuter: 17.7ms at 1904x 1070


escho

600D h264

How can I see the resolution? I only see the instruction: "Start recording to find out the vertical resolution". To be able to start a record, I have to exit this menue. Reenabling the menue after starting the record is not possible. I only can acces the ML main menue, Q on fps-override does not work then. So, no clue, how to help...

Edgar
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

a1ex

The important number is displayed without starting to record.

When Q doesn't work, you can press INFO. Probably this should be printed somewhere on the interface (it used to be, long before the menu facelifts).

escho

The info button did the trick. Thanks
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

dpjpandone

Alex,

here are all the different fps modes on 7D with canon Q set to 24p and 30p then override to 23.976

http://www.filedropper.com/vram0


a1ex

Hm, I expected the 7D sensor to be a little faster.

21.7 microseconds in 24p/30p default, 20.8 overclocked. Multiply these by your vertical resolution to get milliseconds.

2blackbar

canon EOS M reports 20.6 and 16.4 on exact fps , alex can you enable sound when fps override is 23.976 anyway? I guess sound wont be out of sync but its always disabled when you use fps override even with default canon speeds.

a1ex

Yep, makes sense.

However, the EOS-M has a quirk: in standby, its LiveView is in 50/60 fps mode IIRC. Can you double-check the numbers while recording H.264?

dpjpandone

Quote from: a1ex on July 25, 2014, 07:10:50 AM
Hm, I expected the 7D sensor to be a little faster.

21.7 microseconds in 24p/30p default, 20.8 overclocked. Multiply these by your vertical resolution to get milliseconds.

Can you comment on my findings that recorded image is torn when canon Q set to 24p, but tearing is not present when Q is set to 30p and fps override is used to get 24p? (this only happens when hdmi monitor is connected) One percent eliminated this problem, but he can't seem to pinpoint how. He suggested that it may be due to using faster edmacs....

a1ex

Nope, that's beyond my current level of understanding Canon code.