ledoge / novideo_srgb

Calibrate monitors to sRGB or other color spaces on NVIDIA GPUs, based on EDID data or ICC profiles
GNU General Public License v3.0
1.03k stars 39 forks source link

Testing feedback #1

Open provanguard opened 3 years ago

provanguard commented 3 years ago

Hi @ledoge ,

I have calibrated my ASUS monitor PG329Q with DisplayCAL, with and without using the clamp tool. As requested I am providing the icc profiles.

ICCs.zip

provanguard commented 3 years ago

I am not an expert in color science, but I have noticed that the sRGB color space coverage is slightly lower than without using the clamp tool. Perhaps I need to use some other settings during calibration?

ledoge commented 3 years ago

Thanks, these profiles are very useful!

It seems to work pretty well, but there's a bit of a discrepancy between the coordinates reported in the EDID and the actual ones of your monitor. I believe that explains both the slight oversaturation that's still present and the reduced color space coverage. As a test, I took the exact red, green and blue coordinates of your display according to the unclamped profile and made a build that uses those instead of the EDID values. I believe this should result in the volume being much closer to 100% sRGB. You can get the build here – please make another profile with it enabled and post it here.

provanguard commented 3 years ago

I may need some pointers how to approach calibration with this tool. When I use DisplayCAL or i1profiler, and target D65 color temperature, in the calibration app I am setting the levels for R, G and B to achieve temperature as close to 6500K as possible. Am I understanding correctly that the actual values of R G B coordinates are adjusted by these settings? If so, would they nearly always be different from some hardcoded values in the EDID? Given the above, what are the steps I should take to perform calibrations?

provanguard commented 3 years ago

By the way, the R, G, B levels configured in the monitor were slightly different when both profiles were created. So the chromaticity values are a bit different in both profiles I uploaded above. I suspect I need to run calibrations again and ensure that the RGB levels on the monitor are same. Then, I can build the tool with my new coordinates.

provanguard commented 3 years ago

I just run calibrations again, ensuring the same settings of the monitor. I rebuilt the app with the coordinates reported by DisplayCAL before the calibration with the clamp enabled. I enclose both profiles for your review. The percentage of sRGB coverage was reported as same for both profiles. One thing I am not sure about is why the chromaticity coordinates are reported as different in the clamped calibrated profile. ICCs2.zip

ledoge commented 3 years ago

Thanks again for the profiles! Nice to see that the coverage isn't reduced now, though I'm not sure why the volume is still around 110% and not closer to 100%. The measured coordinates of the primaries haven't really changed, so it could maybe be related to the color space conversion using sRGB gamma while you're calibrating to 2.2 gamma? I really don't know though.

As for how it works: Adjusting RGB gain shouldn't change the xy coordinates of the primaries, as it's just a per-channel brightness control. So if you reduce the red gain, (255,0,0) is still going to be the same color on the screen, just a bit less bright. The color space conversion matrix applied by this tool doesn't change the white point, but it assumes D65. So you should always use D65 white with it, but it doesn't matter if you adjust the RGB gain with it enabled or not, as it should stay the same (excluding potential rounding errors). The reported coordinates in the clamped profile should be equivalent (or close to) the sRGB primaries, since the conversion matrix remaps colors so that the monitor's "native" color space (including the conversion in the GPU pipeline) becomes more or less sRGB.

provanguard commented 3 years ago

Alright, please let me know If I can do something more to provide the feedback you need. What's your plans for this app?

ledoge commented 3 years ago

Not entirely sure – I'll probably leave it as it is for now, but I do want to add some way of customizing the coordinates used to calculate the matrix in the future. Either by loading a ICC profile or by entering the values manually.

Proktitis commented 3 years ago

Found this last night. It saved my sanity! So far working as expected. I will keep poking around an report any bugs if I find them.

Windows 11 beta

hiccupx commented 3 years ago

Read about this srgb clamp on reddit, thanks a lot for this solution.

dylanraga commented 3 years ago

/u/defet_ here -- I saw this tool in your repo coming from dwm_lut. This is a much more elegant solution with no overhead/VRAM increase, and it works great!

The calibration flow with this tool can be a bit tricky. I believe your program performs the XYZ colorspace transformation using the piecewise sRGB tone response curve, which can be a problem when gamma 2.2 is the more common monitor target. What makes calibration tricky is that the "clamp transformation" is modified by monitor gamma and the 1D VCGT, so if your monitor/ICC differs from the transformation TRC then the primaries won't line up. Therefore, applying an ICC profile after an initial clamp can change the clamped primary coordinates if the ICC target TRC differs from the monitor gamma. What I ended up doing was manually modifying your tool's supplied MonitorData chromaticities with my own, offsetting them until my meter measured them spot-on with my target 1D VCGT applied, and re-running calibration for the same TRC.

provanguard commented 3 years ago

@dylanraga Could you provide more details instruction of what steps you took to perform the calibration for 2.2 gamma?

provanguard commented 3 years ago

Hi @ledoge, based on the input from @dylanraga I assume that my calibration can be potentially improved, if I knew/understood what he did. I use gamma 2.2 for calibration. Unfortunately, I did not get enough details from his post about what he did to reproduce it myself. If you have time and interest in helping me out, then I can also help with more testing. I have VS2019 so I can rebuild the tool with whatever parameters are needed.

dylanraga commented 3 years ago

@provanguard Sorry for the delay.

First, apply your 2.2 Gamma ICC profile, and use novideo_srgb to clamp your primaries to your monitor's primaries measured from your meter, hard-coding these into MonitorData.cs like so:

var colorSpace = new Colorimetry.ColorSpace { Red = new Colorimetry.Point {X = 0.671728, Y = 0.313108}, Green = new Colorimetry.Point {X = 0.274290, Y = 0.652436}, Blue = new Colorimetry.Point {X = 0.154565, Y = 0.057566}, White = Colorimetry.D65 }; Then build. You need to copy over EDIDParser.dll, MathNet.Numerics.dll, and NvAPIWrapper.dll from release.zip and place them into the bin directory to build successfully.

Next you need to use a program that can quickly measure your primaries. You can use DisplayCal -> Verification -> Testchart: Testchart for colorimeter correction (this just measured RGBW) I personally use CalMan, but it costs money.

What I do is manually edit the hardcoded primaries in MonitorData.cs until the primaries are accurate. Adjust, rebuild, clamp, measure, repeat. For example, when corrected the red primary, if your display's measured primary after the clamp is to the left of the target, decrease the x-coordinate you send to MonitorData.cs, and vice versa. If the measured primary after the clamp is below the target, decrease the y-coordinate, and vice versa. Adjust by ~0.005 at a time, then reduce the difference as you get near.

Once the primaries are lined up with your Gamma 2.2 ICC profile, re-run your calibration+characterization to improve your ICC color curves for your new corrected primaries.

provanguard commented 3 years ago

Cool. Thanks @dylanraga. I will give it a spin. When you say to apply the 2.2 gamma profile at the beginning, is it the one I get from a normal calibration done before using the clamp tool?

dylanraga commented 3 years ago

@provanguard Any Gamma 2.2 calibration for your monitor will work. So yes, you can use a Gamma 2.2 ICC profile created before clamp or after, it shouldn't affect the after-clamp measurements as long as you're not measuring color-corrected patches afterwards (Simulation profile should be disabled in DisplayCal Verification if you're going to use it)

Basically, adjusting your monitor's gamma will adjust the location of the clamped primaries. You want to fix your monitor gamma first, then fix the primaries manually, then re-run monitor characterization with the same gamma.

ledoge commented 3 years ago

@dylanraga

You need to copy over EDIDParser.dll, MathNet.Numerics.dll, and NvAPIWrapper.dll from release.zip and place them into the bin directory to build successfully.

There shouldn't be any need to do that, I think. Right clicking the solution and then clicking "Restore NuGet Packages" should download the dependencies automatically.

Also, from my understanding, your method corrects the fully saturated sRGB primaries, but other colors will still be inaccurate due to the gamma mismatch between sRGB and 2.2. Is that correct? What kind of average/max delta E do you get with this setup when verifying against 2.2 gamma?

provanguard commented 3 years ago

I have noticed the new version published. How do we utilize the new additions?

ledoge commented 3 years ago

@provanguard The new version is just some UI changes + slight changes in how the color space conversion matrix is calculated. Just re-apply the clamp using that new release.