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

SONY ILCE-7M2 white levels update #3601

Closed
Beep6581 opened this issue Jan 7, 2017 · 11 comments
Closed

SONY ILCE-7M2 white levels update #3601

Beep6581 opened this issue Jan 7, 2017 · 11 comments
Assignees
Labels
scope: file format Camera or image file formats type: enhancement Something could be better than it currently is

Comments

@Beep6581
Copy link
Owner

Beep6581 commented Jan 7, 2017

White levels measured by ISO and LENR and raw mode compressed/uncompressed (firmware version 3.30 allows uncompressed mode).

camconst.json entry follows tomorrow.
https://filebin.net/5l90c60ziqyzhdmm/SONY_ILCE-7M2_Raw_Levels.ods

@Beep6581 Beep6581 added type: enhancement Something could be better than it currently is scope: file format Camera or image file formats labels Jan 7, 2017
@Beep6581 Beep6581 self-assigned this Jan 7, 2017
@iliasg
Copy link
Collaborator

iliasg commented Jan 8, 2017

@Beep6581 can you share the sample files ? .. if not all, the compressed LENR category is enough
(compressed in 7z)

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 8, 2017

@iliasg sure, here they all are: https://filebin.net/3pk460dqp53ekgx6

-- Update, now there is a 7z there as well.

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 8, 2017

As camconst.json doesn't handle separate values for LENR=on vs LENR=off, these are the safe levels:

    { // Quality A, Measured by Morgan Hardwood on 2017-01-07 using firmware 3.30, issue #3601.
        "make_model": "Sony ILCE-7M2",
        "dcraw_matrix": [ 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 ], // DNGv8.7.1
        "ranges": {
            "black": 512, // Read from masked area.
            "white": [
                // With LENR=off, white is always 16372 with raw compression and 16383 without.
                { "iso": [ 50, 100 ], "levels": 16100 },
                { "iso": [ 200, 400 ], "levels": 15900 },
                { "iso": [ 800, 1600, 3200, 6400 ], "levels": 15800 },
                { "iso": [ 12800 ], "levels": 15400 },
                { "iso": [ 25600 ], "levels": 15000 }
            ]
        }
    },

@iliasg what do you think?

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 8, 2017

To be honest there's just about no visible difference between these safe values and 16372. This includes comparisons using highlight reconstruction (CP, HC=200). Then again, as nothing appears to get lost, I'd say better to use these safe values...

@iliasg
Copy link
Collaborator

iliasg commented Jan 8, 2017

I just finished downloading .. I will take a look ASAP .. The LENR WLs are affected more than I could imagine for this model .. and this with only 2sec exposures !! .. what will happen with 30sec ??.

@iliasg
Copy link
Collaborator

iliasg commented Jan 8, 2017

@Beep6581
At the start, after inspecting histograms, I thoughr the above values are overconservative ..
We can tolerate a small percentage of outliers so I usually use a value which leaves out 1/5000 of pixels.
For example with this criterion I would put the ISO25600 WL at 15500.
But If we see the frame we can detect that there is an area at top centre which is affected by the Black frame subtraction while the rest of the frame is OK. This consentration of the problem makes it more visible .. see with "White-point correction" at 1.00
(each 0.01 equals (16300-512)/100 = 158 levels lower than 16300)
25600-1 00
then with 1.05 .. (it's equivalent to WL=16300-(5x158) = 15510) .. not good ..
25600-1 05
at 1.06 equiv to 16300-(6x158) = 16350 .. a small problem remains
25600-1 06
I vote for 1.07 i.e. 16300-(7x158) = 15200 where we need extra push to see some sporadic problems.
25600-1 07-extra

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 8, 2017

@iliasg I used the histogram to find safe white levels where I only allowed brightness levels with <~10 pixels in the frame. It seems like it cut off a lot of values but when I tested extreme highlight recovery in these clipped images as well as in real-life photos with clipping using my safe vs original values in camconst.json there was almost no noticeable difference.

I'll take whatever you suggest.

Please also see LibRaw/LibRaw#82

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 8, 2017

The ISO25600 value I got was from this https://i.imgur.com/w803N8a.png (uncompressed) and this https://i.imgur.com/GbaAC7q.png (compressed).

@iliasg
Copy link
Collaborator

iliasg commented Jan 8, 2017

The problem is that things will get worse with longer exposures ..

If these samples was at longer exposure (say > 10sec) I would go for WL_25600 = 15200, WL_12800 =15700 etc because I think that even with extreme processing nothing is visible when the probability of magenta pixels is very small percentage of the total .. so I use 1000 instead of 10 as limiting population.
(But this 1000 prooved to be optimistic because of the concentration of the problem)
The curve I used in RT at the last sample is 10X more extreme than the most extreme real process* I can imagine (*by real process I mean one which is not hunting for problems ..)

It will be good to examine longer exposures .. Can we have any more samples ?

I am not sure if we must cover the most extreme cases (30sec @ ISO25600) or just use a reasonable value like these WLs caculated from the not so long 2sec and suggest the users to use the "White-point correction" when problems occur.

@iliasg
Copy link
Collaborator

iliasg commented Jan 9, 2017

Another data point .. Sony reports in exif WL = 15360 for all ISOs
I don't know if this is before BlackLevel subtraction or after .. but I suspect it's after
15360 + 512 = 15872 is the WL in RT's (Dcraw's) terminology.

15872 + 512 =16384 (the 14bit limit) !!
This 15872 would accuratelly be the worst case scenario if the black level subtraction (when LENR is on) happens on 14bit data with Black Level at 512. But it looks like Sony subtracts before the final quantization at 14bit with BL = 512 .. or else we should not have values lower than 15872 ;)

@Beep6581
Copy link
Owner Author

Sorry, I have not had time to get back with the new shots. I will probably do that after RT5.

@Thanatomanic Thanatomanic closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: file format Camera or image file formats type: enhancement Something could be better than it currently is
Projects
None yet
Development

No branches or pull requests

3 participants