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

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11908
  • 5D Mark Free
Re: Dealing with Focus Pixels in raw video
« Reply #575 on: October 31, 2018, 07:14:18 AM »
Wonder if something like that is happening with the reduced bit rate lossless compression settings. The focus pixels seem absent at first but upon closer inspection they show up on high contrast boundaries all over the image area--not just the areas where the focus pixels readily show up in 14-bit images.

With reduced bit rate, we are using a different raw type (i.e. not the "minimally processed" Bayer stream we are used to). Just double-checked and had a little surprise - raw type 0x12 (what we use for reduced bit depth) is actually "lv_af_raw" (known to show this kind of dots even on the old 5D2). This is also labeled as DEFCORRE or DEFOE in some firmwares.

Best guess: the focus pixels must be corrected - to some extent - by Canon firmware. Are these dots always the same place? Maybe they are just the result of imperfect interpolation done by Canon?

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3358
Re: Dealing with Focus Pixels in raw video
« Reply #576 on: October 31, 2018, 07:01:24 PM »
Are these dots always the same place?

The dots always follow a defined pattern but that pattern has shifted horizontally on some builds. I believe that commit 5052fab fixed that so I should probably simplify several of my map files. I tried to have them cover all of the builds including the buggy ones but some of my maps are now huge and need multiple passes to clean up all of the possible the focus pixel locations.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103

alpicat

  • New to the forum
  • *
  • Posts: 47
Re: Dealing with Focus Pixels in raw video
« Reply #577 on: December 09, 2018, 07:29:42 PM »
@dfort as discussed in the EOS M thread - below is a link to two PNGs showing focus pixels for the EOS M shooting in 2.5k crop mode (5x zoom) at 2520x1308, in 9-bit lossless raw.
Both files are the same, one is in colour and the other I've switched to b&w in case that's helpful? I had to enhance and combine images together in order to see all the focus pixels (it's very tough to see all of them at once, as certain focus pixels become invisible depending on which colour temperature and other colour settings you set):

https://drive.google.com/drive/folders/1WGDLbFGz-j1UjHnjmigQNqnw28GtpGjL?usp=sharing


dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3358
Re: Dealing with Focus Pixels in raw video
« Reply #578 on: December 09, 2018, 08:59:33 PM »
Very nice:



I'll need a short MLV file to work on the focus pixel map file. Though one thing you can do is to check the size of the full raw buffer:

Code: [Select]
mlv_dump -v [file.MLV]
For example (just for illustration, this isn't a 5x zoom file):

Code: [Select]
Block: RAWI
  Offset: 0x00000034
  Number: 1
    Size: 180
    Time: 0.783000 ms
    Res:  1736x1120 <-- image resolution
    raw_info:
      api_version      0x00000001
      height           1150 <-- full raw buffer height
      width            1808 <-- full raw buffer width

A quick test to see if the current map file is working is to rename the '80000331_2592x1108.fpm' file to the size of your full raw buffer and try it in MLVFS.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103