Recent comments

Reply to: Getting crazy cam_mul values   6 years 4 months ago

That makes sense, thanks for answering :)

Reply to: Getting crazy cam_mul values   6 years 4 months ago

LibRaw's goal is to provide access to raw image data either in source form (LibRaw::open_file/unpack) or in processed (LibRaw::dcraw_process())

There is no intention to expose internal sub-functions, this is orthogonal to library purpose.

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Well, it is my understanding that LibRaw can export fully debayered TIFFs, and that there are various debayering algorithms built in (and some that can be added separately).
I am not sure how the internals work, but it would be very useful if either image[] array was fully populated or there was some other array with the proper RGB values.

I tried implementing a few debayering algorithms in my project, but then eventually gave up (I wasn't getting the results I wanted) and just used the quarter of the resolution debayering method, since that should be enough for my project (a program used for making timelapse videos, where any photo 12MP or bigger can yield enough information for a 1920x1080 movie frame).

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Could not understand what part of debayer code you want to export (to C-API?).

LibRaw's debayer code uses lot of internals (image[] array, CFA pattern, etc) and not intended to be used alone.

Reply to: Getting crazy cam_mul values   6 years 4 months ago

I am glad it helped :)
While I am at it, to not open a new thread, would it be possible to expose to C the debayering functions? Maybe I missed something, but I don't think they are exported in C.

Reply to: RGB color transformation   6 years 4 months ago

So far, things are clear. But what's about the sRGB stuff?
I've compared DCRAW (with and without use of rgb_cam matrix filled in by the adobe_coeff()) to FastRawViewer and also to the Canon software and got 4 different results! DCRAW with use of rgb_cam looks worst (warm & greenish look).

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Got it, thanks

Yes, AsShot white balance is broken in DNG tags:
| 25) AsShotNeutral = inf 8.872800664e-007 200 (1000/0 1000/1127039858 1000/5)

LibRaw by default uses daylight WB (calculated from ColorMatrix* DNG tags), so it works ok. If camera WB is specified explicitly (params.use_camera_wb = 1), than image becomes wrong (as expected).

Looks like we need additional check for camera WB range and fallback to Auto if camera wb looks corrupted.

Thank you for the sample.

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Ok, I sent it :) I hope you got it, since it's a large-ish file :)
Let me know if you find anything wrong with it :)

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Yes, we collect any 'strange' DNG/RAW files to make sure LibRaw works fine even in corner cases :)

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Sure, I will send it. But actually, I know what the problem is, I just remembered. The camera is a Canon SD980 running CHDK, and I helped porting that CHDK version (at the time this camera was using a newer API set, so CHDK didn't work on it, it needed quite a bit of reverse engineering). And the port might have had some stuff missing.
The interesting thing is that all programs I tried worked fine with it, so I guess they had some detection for invalid Wb settings, and calculated their own.

So probably the DNG is not too useful for you, as only my camera is affected by it (all my other RAWs from other CHDK cameras are OK). But if you still want it, I can send it to you.

Reply to: Getting crazy cam_mul values   6 years 4 months ago

Use daylight or auto multipliers if camera WB looks wrong (as in this case). As a general rule, red/blue multipliers should be in 0.05..20.0 (or may be less) range after normalization (green one set to 1.0)

BTW, could you please share this DNG (e.g. send link to info@libraw.org if you do not want to share it public) for detailed examination?

Reply to: RGB color transformation   6 years 4 months ago

I use the cam_mul for WB, and then do the debayering (manually) and after that I do the sRGB stuff.
You also have to do channel clipping before the sRGB conversion (and optionally highlight recovery).

Reply to: Variable Contrast   6 years 4 months ago

Fantastic! Thanks for the recommendations!

Reply to: Variable Contrast   6 years 4 months ago

A good place to start IMHO is "Image sensors and signal processingfor digital still cameras", edited by Junichi Nakamura and "Way Beyond Monochrome" by Ralph Lambrecht. One book covers the digital part, the other speaks of photographic process.

Reply to: Variable Contrast   6 years 4 months ago

Got it. Thanks for taking the time to reply.

If you had any book recommendations that help explain how to do this postprocessing, I'd be very interested.

Thanks again, and thanks for making this amazing library available!

Reply to: Variable Contrast   6 years 4 months ago

FRV does not use LibRaw for raw image postprocessing, only raw decode phase is used (LibRaw::open_file/LibRaw::unpack).

'Variable contrast' curves in FRV are based on real photographic film contrast curves.

Reply to: Flattening dcraw_emu output   6 years 4 months ago

To get flatten output you may try samples/unprocessed_raw sample

B-channel pattern you show looks ok (one value in 2x2 square), while R-channel is not. Could you please upload raw somewhere and provide the link for in-depth analysis?

Reply to: Question about auto_scale   6 years 4 months ago

1) To disable auto-brightening of images:
- set params.no_auto_bright to 1
- set params.adjust_maximum_thr to 0.0 (in this case, for some cameras you may need to set params.user_sat /white point/ manually to avoid pink tint in highlights)

Afterh that, images (with same exposure) will be processed with same data maximum and no automatic brightening.

2) To adjust brightness (at output stage) use params.bright to some value above 1.0

Reply to: Question about auto_scale   6 years 4 months ago

Thank you so much! Is there any way that I can scale the colors manually, to make the above two images the same?

Also, what does auto_bright exactly do? You said in some post that it changes the histogram to make the image brighter. Is it histogram equalization on the output sRGB image?

Thanks!

Reply to: Limiting white balance in my raw images   6 years 4 months ago

Hi Iliah,

Rawdigger gave me new insight :-)

I open one of my images in rawdigger and noticed that the min and max values for the colours are really different:
(values are min max avg and sigma)
R 2 2521 307 446
G 8 4045 716 1004
B 1 4046 683 1038
G2 5 4045 716 1004
This pef file can be found here:
https://drive.google.com/file/d/1TcCcoIL-q7K85UAJC4FcwtpDdlihDuoP/view?u...

Is there anything I can do to correct this image (and about 50 other images I have with similar problem)? There are some wedding pictures among them and I'd like to get these fixed...

Regards, Ronald.

Reply to: Limiting white balance in my raw images   6 years 4 months ago

Dear Sir:

There is certain amount of flare, and possibly the exposure was too much, but I can't say for sure without the raw. You can download free trial of our RawDigger and check the exposure yourself of course: https://www.rawdigger.com/download

Reply to: Limiting white balance in my raw images   6 years 4 months ago

Hi Iliah,

I have created a jpg from my raw file, if needed I can also share the raw file. The fact is that for all raw images from a certain day, this effect is present in the same are (left-hand side of each picture). Or is it then the intensity that I need to reduce for the raw image?

Regards, Ronald.

Reply to: Limiting white balance in my raw images   6 years 4 months ago

Dear Sir:

There is no problem with white balance on the image. Possibly you mean that the shot contains blown-out areas, but I can't say how much of those can be brought back as the image you've uploaded is in fact JPEG, not raw PEF.

Reply to: Limiting white balance in my raw images   6 years 4 months ago

Hi Iliah,

if you look at the following picture https://drive.google.com/file/d/1autVVPZejMNJjeltv9E4_o8JqW266qukEw/view... you can see the effect. Does this help to understand the issue with the pictures and what I'd like to accomplish?

Regards, Ronald.

Reply to: Limiting white balance in my raw images   6 years 4 months ago

It is unclear how do you mean saying "white balance set too high". Could you please upload a sample raw and provide a link to it, to better understand the issue?

Pages