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

Hi, there are no fpn_Nikon_D3x.mat prnu_Nikon_D3x.mat #1

Open
jinmeng opened this issue Mar 12, 2020 · 6 comments
Open

Hi, there are no fpn_Nikon_D3x.mat prnu_Nikon_D3x.mat #1

jinmeng opened this issue Mar 12, 2020 · 6 comments

Comments

@jinmeng
Copy link

jinmeng commented Mar 12, 2020

Would you please add these two files? Thanks very much

@QiuJueqin
Copy link
Owner

These files could be found at https://1drv.ms/u/s!AniPeh_FlASDhV8LayVbCIreBU65 @jinmeng

@jinmeng
Copy link
Author

jinmeng commented Sep 9, 2020 via email

@Roger-Breton
Copy link

Roger-Breton commented Feb 11, 2024

The link is "dead"? As of February 11 2024
(Download sample images here for FPN and PRNU calibration. (optional, only for professional users))
I got the Nikon RAW files but not the FPN files refered to in demo4.m:
fpn_profile = load('.\MatRaw\sample_raw_files\Nikon_D3x\fpn_Nikon_D3x.mat');

I'm especially interested in your "pixel response non-uniformity template" for that it one issue I am running into with my pictire of the ColorChecker SG. I tried your "Camera Color Calibration Toolbox" and only getting 2.86 de00 Avg? I suppose one of the source of errors, in my case, is the lack of unifomity in my SG target. I looked at your target "dsg_Nikon_D3x.tiff" and your white patches were much more "uniform" than mine. That could explain why you are getting such a low deltaE.
By the way, was that image obtained through matrawread()?

Thank you for sharing your expert Matlab coding :-)
Some of the linear optimization procedures are not easy to follow.,..

@QiuJueqin
Copy link
Owner

@Roger-Breton Since I havn't been using OneDrive for a long time, the links are not maintained anymore. I'll check them later after holidays.

You are correct, the uniformity of illumination is a critical factor to get a lower color correction error. But PRNU template is NOT responsible to handle this issue --- it is for correcting non-uniformity of responsing sensitivity of the sensor, which is very very negligible compared to the non-uniformity of illumination. Actually up to 2024, most of CMOS sensors could get very low pixel response non-uniformity either by improved manufacturing tech or built-in correction, and I'll assume you will get a very flat plane for the PRNU template, if you are using a camera model released in recent years.

BTW, if you are look for reducing the non-uniformity of illumination, one common way is to replace the color checker with a white paper while keeping ambient environment unchanged, then you will get an illumination non-uniformity profile (typically a convex surface). Normalize this profile such that the maximum value is 1, and pixel-wise divide color checker raw image with this normalized profile, and you will get a much "uniform" color checker RAW. (you should do all above after matrawread and before running color correction step)

@Roger-Breton
Copy link

Thank you so much for your kind reply.
Using your code and my ColorChecker SG + my custom spectral measurements, I could never get better than:
% mse errors: 0.001987 (avg), 0.0004369 (med), 0.03293 (max, #70)
% ciede00 errors: 3.583 (avg), 3.283 (med), 14.35 (max, #65)
% ciedelab errors: 6.787 (avg), 4.816 (med), 28.63 (max, #40)

I with I knew Linear Algebra better to anayze the errors? And learn how to improve my capture.
But, a friend sent me his shot of the ColorCkecker SG, made with his Canon camera and got:
% mse errors: 5.944E-05 (avg), 8.92E-06 (med), 0.0008559 (max, #23)
% ciede00 errors: 0.7053 (avg), 0.5403 (med), 2.749 (max, #38)
% ciedelab errors: 1.185 (avg), 0.7956 (med), 8.116 (max, #23)
Which I thought was phenomenal.

I suspected illumination on my target wasn't quite uniform?
I thought intuitively it was a conves surface but I could not see how to "model" this in Matlab.
And, frankly, I was not convinced it was best to "cheat" the measurements with a "Flat-fielding" technique?
In addition to your code, I also use a software package for RAW photography called "Raw Digger".
Turns out that Raw Digger offered a proedure for "Flat-field normalization"? Which, at first, I was very skeptical from.
But when I finally tried it, using a picture of a white card at the place of the ColorChecker SG, it made a huge difference in the eveness of the chart.

So, tu use your procedure, I have to use Matlab findit() command to find the maximum value?
I have to think about how to do this in practice but I should be able to come up with the code.

What was the best results you got with Matlab ccmtrain() function? Just curious.
oh! By the way, I was surprised that packages like X-Rite i1Profiler and a few others were able to get good fit out of a ColorChecker SG and turn them into ICC input profiles.

Have you ever experimented with spectral imaging? I took Roy Burns / Mark Fairchild summer classes once and understood that spectral imaging goes way beyond fitting correction matrices to RGB data. But I don't have a monochromator so I would not know where to start.

Thank you so very much for your help and sharing your Matlab code!

@QiuJueqin
Copy link
Owner

QiuJueqin commented Feb 19, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants