Recent comments

Reply to: libraw_dcraw_make_mem_image returns image with empty data size   7 years 3 weeks ago

But if an error occurred, dcraw shouldn't return 0, or does it still continue and does not throw an exception which leads to a different result code? Because the dcraw call returns 0 which seems strange.

Reply to: libraw_dcraw_make_mem_image returns image with empty data size   7 years 3 weeks ago

Followup:

if recycle() was called somewhere due to error, it will zero imgdata.sizes structure.
Also, dcraw_make_mem_image do not call CHECK_ORDER_* macros to check is processing stage correct or not (to be fixed sometimes).

Reply to: libraw_dcraw_make_mem_image returns image with empty data size   7 years 3 weeks ago

Yes, sizes.width/height are set on open_file() stage.

Also, files with height or width less than 22 should be rejected on this stage (identify()'s function tail)

Reply to: libraw_dcraw_make_mem_image returns image with empty data size   7 years 3 weeks ago

Well I digged a little into this, and dcraw_process runs without any exception and goes done to the "return 0" properly, but the values it's reporting afterwards (width & height) are just 0. So it seems like dcraw is failing in some kind of decoding stage, but this seems pretty strange since the overall image dimensions should be read at an early stage, shouldn't it? Is there any specific code segment I could may start looking into this more precisely?

Regards Torsten

Reply to: libraw_dcraw_make_mem_image returns image with empty data size   7 years 3 weeks ago

Dcraw does not allocate extra memory buffer (for mem-image), so the problem may be here.

Reply to: Request for software names   7 years 3 weeks ago

I'm planning to use Libraw in Photo Mate R3 (Android editing software), and switchting from dcraw for better mainability and better camera support.

Reply to: dcraw_emu output to specific position   7 years 4 weeks ago

Okay,

I will try, thank you for your reply!

Reply to: dcraw_emu output to specific position   7 years 4 weeks ago

Sorry, no such ability in dcraw_emu sample, output files names are always derived from source file.

BTW, full source code provided with LibRaw, so you may modify samples as you wish.

Reply to: Clipping of over-exposed image   7 years 1 month ago

Yes, -U switch sets auto_bright_thr.

Most likely you do not want to turn off black subtraction.

data_maximum is calculated during processing.

Reply to: Clipping of over-exposed image   7 years 1 month ago

Hi Alex,

Thanks for more information!

Is "-U 0.0" same as "auto_bright_thr = 0.0"?

Also, if I use "user-black = 0", will there be no "black subtraction" before demosaic?

I printed out the "data_maximum" value from a RAW, why the "data_maximum" is 0 before processing and 4095 after processing. Should it be same before and after?

Thanks,

Mio

Reply to: Clipping of over-exposed image   7 years 1 month ago

-U float-number changes auto-brightness threshold (default value is 0.01 so 1% of pixels brightened to clipping), so -U 0.0 may be useful

-W option turns auto-brightness completely off

Reply to: Clipping of over-exposed image   7 years 1 month ago

Hi all,

I take the opportunity of this comment to know what are the options to be used in command line (e.g. through dcraw_emu) to avoid any clipping. It seems that a clipping is done systematically whatever the different options...

By the way, I did not find an explanation of the 'gamma_curve' function which does different things depending on the 'mode' input...

Thanks for the help

Greg

Reply to: Clipping of over-exposed image   7 years 1 month ago

2nd white patch is clipped in G channel too (after WB applied, all channels to be clipped to make color white).

RawDigger overexposed area display (red overlay): https://www.dropbox.com/s/975db7gahr7ba7c/Screenshot%202017-04-06%2007.1...

RAW histogram of area on 2nd patch: https://www.dropbox.com/s/2a52m2057c50fbo/Screenshot%202017-04-06%2007.1...

Reply to: Clipping of over-exposed image   7 years 1 month ago

Hi, thanks for the quick reply!

The file appears to be clipped in the camera in the white patch on the bottom-left; however, the patch directly to the right of it isn’t. The conversion seems to clip both patches to the same or similar value. Can you look into this again?

Thanks so much!

Reply to: Clipping of over-exposed image   7 years 1 month ago

This file is already clipped in RAW.

See histogram peaks in G and B channels: https://www.dropbox.com/s/9ny0sk5easwbo6s/Screenshot%202017-04-05%2021.3...

Reply to: Clipping of over-exposed image   7 years 1 month ago

The last one (the bottom-left patch). Now the bottom-left patch has the similar code values as the ones of the patch next to it on the right.

Thanks a lot!

Reply to: Clipping of over-exposed image   7 years 1 month ago

Is all three files are clipped or only latest one?

Reply to: Clipping of over-exposed image   7 years 1 month ago

Yea - "Data range is 0 to 65535 for 16-bit output, the max is 65535". The RAW file for testing is 4 stops above. I can upload it tomorrow. Thanks!

Reply to: Clipping of over-exposed image   7 years 1 month ago

Actually you can download the RAW from this link:

https://www.dropbox.com/sh/04lf95ywdbihec7/AAB4KAiDLdvhFIONl8yKOt5Za?dl=0

Thanks a lot!

Reply to: Clipping of over-exposed image   7 years 1 month ago

Hi,

I print out the code values after "libraw" processing. They are all within the range of "0 - 65535".

The settings that I use before "dcraw_make_mem_image (...)" are:

"
output_color = 5;
output_bps = 16;
highlight = 0;
use_camera_matrix = 0;
gamm[0] = 1.0;
gamm[1] = 1.0;
auto_bright_thr = 0;
no_auto_bright = 1;
"

I tried to upload the RAW file, but the file size is big and the format cannot be recognized.

Thanks a lot!

Reply to: Clipping of over-exposed image   7 years 1 month ago

Data range is 0...65535 for 16-bit output, what is '1.0' mean?

Also, could you please upload some clipped file to test with?

Reply to: Clipping of over-exposed image   7 years 1 month ago
Hi,

Hi,

I actually set "no_auto_bright" to 1, it actually clipped the white to 1.0.

Thanks a lot!

Reply to: Clipping of over-exposed image   7 years 1 month ago

Try auto_bright_thr set to 0, or no_auto_bright set to 1

Reply to: Which black level should I trust?   7 years 1 month ago

Yes, Sony ARW 2.3 uses 11-bit data (lossy compressed and highlights compressed): https://www.rawdigger.com/howtouse/sony-craw-arw2-posterization-detection (see 'inside Sony cRAW format' chapter)

Reply to: Which black level should I trust?   7 years 1 month ago

Speaking of photographyblog samples and crazy histograms, I've tested my libraw code on samples from other cameras and I haven't seen anything crazier than a Sony RX100 V's histogram. It's coded on 14-bits (actually perhaps more since it says the maximum is 17220), but at the lower end it only needs 12-bits, and it goes down in steps as you go up in values! So there's a 11-bit section, then 10-bit, then 9-bit in the highlights! It probably helps with the compression? Anyway I thought you'd be interested to know about this in case you didn't already.

http://i.imgur.com/4GdKyxk.png

Pages