Author Topic: Dealing with Focus Pixels in raw video  (Read 139311 times)

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #525 on: January 13, 2018, 09:22:04 PM »
Hey @theBilalFakhouri - @bouncyball updated mlv_dump on steroids with the latest focus pixel maps so going back to your shot, here it is processed through Adobe Camera Raw maxing out on the highlight recovery, clarity, vibrance and saturation. That should bring out any remaining focus pixels.

mlv_dump --dng --white-fix=4931


There is an area that still shows some focus pixel artifacts:



I doubt they would be a problem unless you stretch the image as far as I have. Adding chroma smoothing eliminates it and I don't see any other issues introduced by chroma smoothing.

mlv_dump --dng --white-fix=4931 --cs3x3


Click on the images to see them full size.

I take it you didn't use a VAF filter on your 700D. There are a few post production tricks you can use to get rid of the aliasing.

Let's see what happens.


Hum--is there a problem with the youtube tags on the forum? Here's the link: https://youtu.be/x3uZzVivlzY

Yep, some aliasing issues but that has nothing to do with the focus pixels.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #526 on: January 13, 2018, 11:04:27 PM »
Amazing work, Dfort and Bouncyball! Congratulations!  I can't wait to test the new MLV_Dump on the 100D.   

Dfort, could you please post a download link to the latest focus pixel maps, so I can test with MLVFS?  Do I just replace the old maps with the new ones in the MLVFS directory or there is more to it?  Thank you.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #527 on: January 13, 2018, 11:47:05 PM »
The latest map files are in the ML Focus Pixels Bitbucket repository. Just replace the ones that are in MLVFS with these.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #528 on: January 14, 2018, 12:44:27 AM »
Thanks a lot, Dfort.  I will test as soon as I can.

bouncyball

  • Hero Member
  • *****
  • Posts: 715
Re: Dealing with Focus Pixels in raw video
« Reply #529 on: January 14, 2018, 12:33:21 PM »
MLV App also updated with:

1. Latest focus dots fix (kudos @dfort).
2. Correct aspect ratio according to RAWC block info.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #530 on: January 14, 2018, 10:12:34 PM »
Made some more changes on the fpm.sh script.

When in doubt whether to use mv720 or crop_rec map files, default to crop_rec because it will work with either video mode.

Using the -n option to create full raw buffer sized maps will also default to crop_rec because it is assumed that these map files will be used in MLVFS that can't can't yet differentiate between crop_rec and mv720.

I also looked into removing dependency of the Crop metadata but it turns out that it is necessary to line up the map files properly.

Still todo -- run that 1-pixel offset map for mv1080crop mode only if it is 8...12bit lossless compression. Not a high priority because running additional passes that aren't really needed doesn't seem to hurt the image. At least not much.
5D3.* 7D.206 700D.115 EOSM.203

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #531 on: January 20, 2018, 07:16:32 AM »
Did some testing on the 100D. The 1:1 video modes, mv1080crop and zoom, could also have the focus pixels offset 8-pixels to the right. Discussion on the 100D topic.

Updated the map files for MLVFS, updated the MLVFS pull request and updated the fpm.sh script.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #532 on: January 20, 2018, 04:35:56 PM »

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #533 on: January 21, 2018, 02:08:55 PM »
Dfort,

Testing the latest January 20-th build for the 100D which allows handheld FRSPs with stabilized lenses, I noticed some focus pixels when shooting at Dual ISO 100/800.  Here are the original shot (size reduced) and a 100% crop from the area where they are clearly seen:





This is the original image.

Focus pixel area (100% crop) -> Here the "Add image to post" does not embed the 100% crop.  I don't know why.  So please magnify the above image and you will see the focus pixels along the edges of the cupboard doors.









dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #534 on: January 21, 2018, 10:43:36 PM »
Are you referring to the colored area under the knobs?



These aren't focus pixels. You should get similar artifacts on the 7D (camera no focus pixels) as you do on the 100D (camera with focus pixels). That's why some ML users won't shoot without a VAF filter on their camera. Well, except for 5D3 users, note that you can't even get a VAF filter for the 5D3.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #535 on: January 23, 2018, 06:28:46 PM »
No, I am referring to the long vertical colored edges of the cupboard doors.  They look like a string of red/magenta  dots.  Please have a look at the photo at 100% magnification and you should be able to see them.  When I get back home, I will try to find the 100% crop from the original where these dots are clearly seen. 

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #536 on: January 23, 2018, 06:40:33 PM »
Ok. This is a Dual ISO image? I'm surprised it looks this good. My understanding of how MLVFS fills in the focus pixels for Dual ISO is that it only samples the neighboring pixels on the horizontal axis. This is because Dual ISO has a different ISO every 2-pixels vertically. That's why it is difficult to remove the focus pixels on high contrast vertical lines. Someone please correct me if I'm wrong on this.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #537 on: January 23, 2018, 06:51:05 PM »
Dfort,

Following your request, I have now prepared a complete (almost) set of clips of the Pixel Scanner pattern for you to test and see whether you have totally and once for all killed all focus pixels on the 100D or there are still a few left.  Using the October 23-rd, 2017 build I shot the clips in the RAW-video mode as follows:

1) Uncropped (at 1736x976 resolution)
2) Movie Crop Mode (at 1736x976 resolution) and
3) 5x-magnification mode (at 2520x1080 resolution)

In all these three modes I shot a clip at 14, 12 and 10 bit uncompressed and 14, 12 and 11...8 bit losslessly compressed bit rates.  Here are the download links for the original MLV files that will be active for the next 7 days:

For the 5x_Magnification_100D_FP.rar and the Movie_Crop_Mode_100D_FP.rar archives:

https://we.tl/Kr6ltVMayi

And for the Uncropped_100D_FP.rar archive:

https://we.tl/ttpzKYjXHy

Please note that some of the files (e. g. the ones shot at 10 and 12 bit uncompressed in the Movie Crop Mode) contain corrupt frames but there should still be enough sound frames for you to check for focus pixels.  Shooting the moving test pattern was quite a challenge for the 100D!  I had to repeat the shots several times to get a few OK.

I hope, this helps.

Happy birthday to you, Dfort and thank you so much for all the presents we received from you lately!






IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #538 on: January 23, 2018, 07:06:25 PM »
Ok. This is a Dual ISO image? I'm surprised it looks this good.

Oh, don't be surprised!  This is the 100D - a hell of a camera!  Even more so now, that A1ex has added working image stabilization to the silent module which allows for hand held low-light Dual ISO FRSP-pictures with amazingly clean results using stabilized lenses.  Once the hiccup issue is fixed, we should be able to shoot even Dual ISO video with comparably clean results at 2520x1080 resolution!   For now, the 100D is second best after the 5DMkIII for Magic Lantern work.  Now you understand why I am so eager to get the 100D working properly. 

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #539 on: January 23, 2018, 10:30:21 PM »
Please note that some of the files (e. g. the ones shot at 10 and 12 bit uncompressed in the Movie Crop Mode) contain corrupt frames...

Add to that 14 bit uncompressed. That's strange, all of the uncompressed settings show corrupted frames in Movie Crop Mode. You should probably report that on the 100D topic. Maybe that "hiccup" build I made also fixes this issue?

I just processed everything into movie files and need to take a closer look but first impression is very good--at least as far as focus pixels are concerned.

...Now you understand why I am so eager to get the 100D working properly. 

Maybe a little less eager on the 7D? Getting 10/12bit working on that camera is a tough nut to crack.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #540 on: January 23, 2018, 11:27:43 PM »
Absolutely!  I can't wait for 7D to become Number 2!

By the way, you did a hell of of a job with the focus pixels on the 100D.  Congratulations!  Did you notice that also sound is working on the 8...11bit ant 12bit lossless?

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #541 on: January 24, 2018, 07:35:49 AM »
I looked closely at the latest 100D tests and the new maps are working quite well when pixel peeping still frames but look what happens when you put things in motion:


Fixing the focus pixels actually seems to help a bit with some of the aliasing issues. I didn't expect that 14-bit lossless exaggerated the aliasing, maybe the camera moved slightly on that take? Not much seems to happen in the 1:1 modes in video but we are seeing the "hiccup" issue in 5x zoom mode. The 14-bit lossless take is a bit short, for obvious reasons, so I slowed it down 50%. Note some glitches in zoom mode but it is perfectly useable. Uncompressed mv1080crop (a.k.a. Movie Crop Mode) was unusable but the lossless footage was quite good--yet another unexpected surprise.

What isn't surprising is the moiré pattern in the 3x3 sampling mv1080 mode caused by the vertical line skipping. The 1:1 sampling modes show almost no moiré pattern or aliasing. The rolling shutter, evident by the slanted lines, is also less in zoom and Movie Crop Mode.

The "no focus pixel fix" footage was processed through mlv_dump and the "with focus pixel fix" was done with MLVFS. I was just trying different workflows in Danne's Switch app. That's part of the reason why there's a slight color shift between the the two. Another reason is because we're removing a bunch of green and magenta dots. In some modes it is predominantly green, in others magenta so even though these are complimentary colors they don't exactly cancel each other out.

Overall, quite an interesting test. I think the take away from this is to avoid shooting moving vertical lines if at all possible! Don't run that video too many times or you might get hypnotized.
5D3.* 7D.206 700D.115 EOSM.203

IDA_ML

  • Senior
  • ****
  • Posts: 464
Re: Dealing with Focus Pixels in raw video
« Reply #542 on: January 24, 2018, 12:25:11 PM »
Dfort,

All clips that I provided were recorded with the camera on a stable tripod.  The only shake that could have occured would be when pressing the record button.  This is the reason why I recorded at least 3-4s. of every clip so that you have enough useable frames.

I am happy to see that the test clips were helpfull to gain new knowledge on the focus pixel/aliasing behavior of the 100D.  I have to say that the camera struggled a lot with this test - the high-contrast periodically moving pattern seemed to bug the camera and very often it would refuse to record the clip, so I had to repeat the recordings several times until I got one recorded, sometimes with lots of corrupt frames.  This never hapened with normal scenes, except those shot at 12 and 10 bits uncompressed in the Movie Crop Mode.  I don't know how to explain this behavior. 

Anyway, you seem to be right by saying that the focus pixel fairy tale is a never ending story, not to mention  Dual ISO!  What I am very happy about though is the fact that under normal shooting conditions, the focus pixels do not seem to be a problem any more.  And I thank you for that!

theBilalFakhouri

  • Member
  • ***
  • Posts: 219
Re: Dealing with Focus Pixels in raw video
« Reply #543 on: February 23, 2018, 10:15:51 PM »
Found the two registers that's related to the lovely pixels dots:

ADTG[8196] N    (dwSrFstAdtg1[2], Line count + 1)      mv1080=0x12e       x5=0x0
ADTG[8197] N    (dwSrFstAdtg1[3])                             mv1080=0x38c       x5=0x0

1-You can make any pattern you want!
Mode=mv1080 | 14bit-lossless | No focus map applied |Original MLVs Here

Normal
Original" border="0

Tweaked registers (vertical pattern on the whole image) click and zoom in.
Custom" border="0

at 0x0 it's become very dim
0x0" border="0

2-You can shift it myabe. (I lost the settings).

In x5 mode maybe more focus pixels appears and I got corrupted frames while recording when I pushed the values up.
In mv720 mode it's really hard to see what is going on because adtg_gui makes the camera freezes in that mode.
In photo mode these registers disappeared.
Make try on your camera (set preview mode to Framing to see the changes directly).

@dfort
Affected cameras: EOSM, 100D, 600D, 650D, 700D, (and more?)
[EDIT: Pretty sure now that the 600D doesn't show focus pixels in raw video.]

How the 600D was affected in these pixels (same patterns as 700d?) and what is the way that solved it?

@a1ex or @dfort (anyone have 5D3)
Can you check what is the values on 5D3 ? and if can try 700D's values above in mv1080 mode ?
And what is these registers job?
700D 1.1.5 | no more ISOless LV err 8

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #544 on: February 24, 2018, 12:13:41 AM »
How the 600D was affected in these pixels (same patterns as 700d?) and what is the way that solved it?

Actually, nothing was done. The 600D is a Digic 4 camera and only the EOSM/100D/650D/700D (Digic 5 cameras) show focus pixels, as far as we know. The other Digic 5 cameras don't show focus pixels. OK, maybe the EOSM2 because it is from the same family but that has yet to be seen.

Note that if you use the silent module and shoot a simple silent DNG while the camera is in movie mode at the settings that you are trying to test, the saved DNG should also show the focus pixels. Processed through dcraw using the -4 -E options and you'll be able to have a clear idea what needs to be done in order to remove the focus pixels. I know this is a lot to go through but if you read through this discussion you'll see how focus pixel "fixing" works.

You're more than welcome to play around with my script and focus pixel map files:

https://bitbucket.org/daniel_fort/ml-focus-pixels

or try out the more advanced mlv-tools by @bouncyball :

https://bitbucket.org/bouncyball/mlv-tools
5D3.* 7D.206 700D.115 EOSM.203

theBilalFakhouri

  • Member
  • ***
  • Posts: 219
Re: Dealing with Focus Pixels in raw video
« Reply #545 on: February 27, 2018, 09:15:33 AM »
Thanks @dfort
I am trying to find what are these pixels and why we see them in RAW video.
700D 1.1.5 | no more ISOless LV err 8

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #546 on: March 24, 2018, 04:48:42 PM »
Seems like these mysterious focus pixels keep coming back to haunt me. Another user pointed out that the full raw buffer has changed and MLVFS is showing focus pixels again. That should be fixed with some of the recent commits to the crop_rec_4k branch. In addition, 1920x1080 zoom mode should once again be working on the 100D/650D/700D/EOSM.

These commits will also allow us to simplify the focus pixel map files but if we fix them now anything shot with the crop_rec_4k branch in the last few months might show focus pixels so this is just a note to say that we're aware of the issue and a reminder to once again revise the focus pixel map files.
5D3.* 7D.206 700D.115 EOSM.203

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3146
Re: Dealing with Focus Pixels in raw video
« Reply #547 on: June 30, 2018, 08:00:01 PM »
4K and other resolutions are starting to become a reality on the crop sensor cameras including the ones with the focus pixel issue so it is time to start updating the focus pixel maps.

What we need are some frames that show focus pixels at these new crop_rec settings. In addition, we need to capture full raw buffer images of the various settings. The way to do this is to turn on the silent module and set it to simple silent. Next, set the camera to movie settings using the crop_rec settings you want to use. Now simply take some simple silent images by doing half-shutter presses. Make sure to keep the camera in movie mode for this. Upload the MLV and DNG files and post links on this discussion so we can start working on this.
5D3.* 7D.206 700D.115 EOSM.203

theBilalFakhouri

  • Member
  • ***
  • Posts: 219
Re: Dealing with Focus Pixels in raw video
« Reply #548 on: June 30, 2018, 09:47:29 PM »
This is a good idea I was thinking the same but it's too early for now because of some presets need to adjust the horizontal and vertical offset to make it centered in the right way (now it's close to center) and this will change the position of focus dots.

I will try to do this ASAP.

EDIT: Of course if this will not affect the progress ? I mean we can map the focus dots now and shift it later?
700D 1.1.5 | no more ISOless LV err 8

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11721
  • 5D Mark Free
Re: Dealing with Focus Pixels in raw video
« Reply #549 on: June 30, 2018, 10:07:34 PM »
I'd like to automate the centering part (to use generic code for all models, rather than hardcoding values for every single preset), so the cropped position might change a bit. Just FYI.