Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PDAF lines pattern for Sony ILCE-7RM2 #6807

Merged
merged 1 commit into from
Aug 6, 2023

Conversation

Lawrence37
Copy link
Collaborator

The current PDAF lines pattern values incorrectly assume the pattern repeats every 420 rows. It actually repeats after 840 rows. The procedure for obtaining the corrected PDAF lines from #6801 (comment) is as follows.

  1. Export the raw data from RawTherapee
    • Start with the Neutral profile
    • Demosaicing method: none
    • Border: 0
    • White balance: disabled
    • Input color profile: no profile
  2. Find zero values from blue pixels
    • Import raw data into GIMP
    • Take the blue channel and discard the other channels
    • Apply a grid to make the red and green color filter locations non-zero
    • Threshold the image so that any non-zero pixels become white
  3. Find likely PDAF rows
    • Use G'MIC to sort the pixels horizontally
    • Rows with longer black bars are more likely to be PDAF lines
  4. Identify the pattern
    • Duplicate the result from the previous step
    • Move the duplicate downward pixel by pixel and compare with the original until the lines match
    • The total movement downward is the pattern repetition size
    • Identify the row indices of the PDAF pixels for the first instance of the pattern.

The first half of the PDAF row numbers match the current values in camconst.json. All new values are spaced 12, 24, or 36 pixels apart just like the old values. I also double-checked the new values by comparing the value spacing with the spacing I observed with the result of step 3.

@Lawrence37 Lawrence37 added the scope: calibration Camera calibration (camconst.json) label Jul 30, 2023
@Lawrence37 Lawrence37 added this to the v5.10 milestone Jul 30, 2023
@Lawrence37 Lawrence37 self-assigned this Jul 30, 2023
@Lawrence37 Lawrence37 merged commit 7e0f0b6 into Beep6581:dev Aug 6, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: calibration Camera calibration (camconst.json)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant