Skip to content
  • Richard Hughes's avatar
    huey: add a test program 'gcm-calculate-fudge' to find calibration parameters · f217586f
    Richard Hughes authored
    The Vec3 found in the EEPROM is very similar to the dark offset, which I
    always theorised was required. Just subtracting this from the raw RGB value
    gives the wrong answer, and removing it after the calibration matrix is
    even more wrong.
    
    Using the values from argyll -v9 we can get the raw USB values. These can
    be decoded (we know how) and compared against the argyll XYZ values.
    By using two nested loops we can find the optimal value of pre and post
    multipliers. This gives us the ideal pre-ratio of 1982, which seems
    pretty random. 2000 makes more sense.
    
    Using the new pre-and-post multipliers, and the dark calibration vector,
    we can get within 0.8% of the argyll values. That's close enough for me,
    it's late here and I'm tired.
    f217586f