QiuJueqin / MatRaw

Read and Process Camera Raw Data with MATLAB
MIT License
76 stars 33 forks source link

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

Open jinmeng opened 4 years ago

jinmeng commented 4 years ago

Would you please add these two files? Thanks very much

QiuJueqin commented 4 years ago

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

jinmeng commented 4 years ago

多谢,最近才知道你也是我司员工:)

Qiu Jueqin notifications@github.com 于2020年3月31日周二 下午5:24写道:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QiuJueqin/MatRaw/issues/1#issuecomment-606505415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE574P5RT3TWGPYU67IHUTRKGZDPANCNFSM4LGKT6KQ .

Roger-Breton commented 8 months ago

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 commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

@Roger-Breton The link above was deprecated. Try this one: https://1drv.ms/u/s!AniPeh_FlASDhX1uPAMavMUt5pUd?e=7a8BoS, and https://1drv.ms/u/s!AniPeh_FlASDhVzyI-R4kPuh_Ve7?e=EZ4kZY