Recent comments

Reply to: LibRaw 1.7beta1 vs dcraw 9.26 result   8 years 9 months ago
Yes, LibRaw performs automatic maximum adjustment to prevent 'pink clouds' (and other highlights) problem seen on many cameras where real maximum varies with ISO or other camera settings.

To turn it off, use '-c 0' switch of dcraw_emu (or set imgdata.params.adjust_maximum_thr to 0.0).

Simple test:

$ ./bin/dcraw_emu -h -c 0 ~/temp/camera04_01.CR2
$~/dcr926/dcraw -h ~/temp/camera04_01.CR2
$ md5 ~/temp/camera04_01.*ppm
MD5 (/home/lexa/temp/camera04_01.CR2.ppm) = 6bc70a092bb0096bd75d1f9ef54714b4
MD5 (/home/lexa/temp/camera04_01.ppm) = 6bc70a092bb0096bd75d1f9ef54714b4
So, two PPMs (from dcraw 9.26 and from LibRaw's dcraw_emu) are binary the same.
Reply to: optimisation/bug in convert_to_rgb() ?   8 years 9 months ago

raw_color is, indeed, to avoid color matrix multiplication in convert-to-rgb loop.
This flag is set not only in this ifdef, but in some other cases too (NikonScan files, Leaf HDR files)

Reply to: optimisation/bug in convert_to_rgb() ?   8 years 9 months ago

Apologies I reversed the ifdef in my head, I should have pasted the else branch, it too sets the same variable, which appears to be part of the context of dcraw rather than the LibRaw code which is testing in convert_to_rgb_loop the value in the libraw_internal_data.internal_output_params.raw_color. I had imagined the intent was to avoid the matrix multiply when the matrix is unity.

Re subclassing - fine with me I'm probably going to combine that and some other code into a single pass over the memory as easy wins in performance.

Thanks for your efforts in producing the library much easier to use than the dcraw code direct.

Kevin

Reply to: VS 2013 Express simple program   8 years 9 months ago

You don't have to port you simple app on windows, it is simple enough and doesn't contain and system dependent part.
You should just download latest libraw binary and compile your app with proper toolchain (mignw or visual studio) and use proper include and library options during compilation (-I"your_libraw_include_path" -L"your_libraw_lib_path" -lraw options for mingw/gcc or "Additional Include directories" "Additional Library directories" and "Additional libraries" for Visual studio project settings)

Reply to: optimisation/bug in convert_to_rgb() ?   8 years 9 months ago

This code is under #ifndef LIBRAW_LIBRARY_BUILD, so it is not compiled into LibRaw (because LibRaw is compiled with LIBRAW_LIBRARY_BUILD defined).
LibRaw's code snippet is mostly the same, but without document_mode into account. And it is not wrong.

Histogram: LibRaw calls convert_to_rgb_loop() virtual function. If you do not need histogram calculation, you may provide your own convert_to_rgb_loop() in derived class. The histogram is needed for automatic brightness correction (if used).

Reply to: Modify parameters of raw image   8 years 9 months ago

LibRaw is definitely not the solution for your problem

Reply to: Modify parameters of raw image   8 years 9 months ago

I am doing a project about raw file processing.I do not know how to use C++ to write source code to modifies some parameters of RAW file . I have thought about the question for days. Can you give me some suggestion about it.
Thank you!

Reply to: Modify parameters of raw image   8 years 9 months ago

LibRaw opens files in read-only mode and never modifies file data.

Try to use exiftool (or other tools) to modify image metadata.

Reply to: How get correct RGB? No need auto levels   8 years 9 months ago

use imageProcessor.imgdata.params.no_auto_bright=1 before processing;

http://www.libraw.org/docs/API-datastruct-eng.html#libraw_output_params_t

Reply to: Standalone WIN32 program   8 years 9 months ago

Most likely you need Visual Studio runtime installed (or just copied into program folder)

Reply to: VS 2013 Express simple program   8 years 9 months ago

Could you please explain your problem in more details?

Reply to: How do I install the Demosaic Packs?   8 years 11 months ago

There is no any runtime check to check demosaic pack compiled in.

Make sure that you compile LibRaw with LIBRAW_DEMOSAIC_PACK_GPL2 and LIBRAW_DEMOSAIC_PACK_GPL3 defines.

Reply to: Any benchmarks?   8 years 11 months ago

There are two phases on raw processing:
- raw data decoding (decompressing)
- and postprocessing (black subtraction, white balance, demosaic, color conversion)

For Canon files, decoding is relatively slow, thanks for huffman compression used. RawSpeed is faster than LibRaw for these files (but you can use RawSpeed indirectly via LibRaw).

Postprocessing speed varies from method to method. For timelapse (e.g. video output in 1080p?) you don't need full resolution, so 'half' demosaic may be used.

The LibRaw's benchmark is 'samples/postprocessing-benchmark.cpp' which is included in LibRaw since v0.15

Reply to: Chromatic Abberation errors, blue halo   8 years 11 months ago

Any news on this? At least i confirm something's up with tiles, also in CA_correct_RT.cc,
`#define TS 256 // Tile sizez

Reply to: Difference dcraw and dcraw_emu in sequential brightness.   8 years 11 months ago

Worked great alex, you're the man. No problem, you need to make a donation button somewhere, i'd get your some coffee ;).

Reply to: Compatability Matrix   8 years 12 months ago

Actual camera list is returned by LibRaw::cameraList() call (http://www.libraw.org/docs/API-CXX-eng.html#cameraList )

There is no list on site, because the list updates frequently (if you use development branch), also actual list depends on actual version you use.

Nikon D610 is supported in LibRaw 0.16, D750 in 0.17(-Alpha1)

Also, to use LibRaw as library you definitely need to spend 'more than minute'.

Reply to: Difference dcraw and dcraw_emu in sequential brightness.   8 years 12 months ago

Sure, I mean to say -c 0:
-c float-num Set adjust maximum threshold (default 0.75)

Sorry for inconvenience, I need to sleep more :)

Reply to: Difference dcraw and dcraw_emu in sequential brightness.   8 years 12 months ago

Hi Alex, Thanks. But:
Tims-:bin tzaman$ ./dcraw_emu -T -w -W -e 0 /Volumes/TZ_USB3_32G/*.nef
Unknown option "-e".
Tim:bin tzaman$ ./dcraw_emu -T -w -W -e /Volumes/TZ_USB3_32G/*.nef
Unknown option "-e".

edit 1
Although i think you meant to say '-W'. This should turn auto brightening off, but it clearly does not for my images.

edit 2
Did you mean to say '-c 0' ?

Reply to: Difference dcraw and dcraw_emu in sequential brightness.   8 years 12 months ago

Followup: maximum values in two files are differ: 12335 and 14213 in G1 channel. May be hotpixel, may be just signal variation

Reply to: Difference dcraw and dcraw_emu in sequential brightness.   8 years 12 months ago

LibRaw (and dcraw_emu) with default settings uses automatic maximum level detection (to prevent 'pink clouds effect', 5 years ago I've written small article about it, it is in Russian, but google translate will help: http://blog.lexa.ru/2010/03/28/taina_rozovykh_oblakov.html )

To turn this detector off (and produce results nearly the same as dcraw) use -e 0 switch of dcraw_emu.

Reply to: Relations between cam_xyz and rgb_cam   8 years 12 months ago

cam_xyz[] matrix is the same matrix as DNG 'ColorMatrixN' (XYZ to Camera). For most cameras (ones without built-in color data) it is identical to Adobe's Color Matrix for Daylight.

rgb_cam[] is camera-to-sRGB conversion.

Reply to: MetaData   9 years 1 month ago

LibRaw::COLOR(row,col) returns color index (it is good idea to cache it; maximum length of pattern in single row is 48)

Reply to: MetaData   9 years 1 month ago

I thought I had found CFA_PATTERN in imgdata.rawdata.iparams.cdesc, but it appears that field is used for the general description of the chip. I don't seem to be able to find the CFA_PATTERN equivalent.
Thanks.

Reply to: MetaData   9 years 1 month ago

Thanks!

Reply to: MetaData   9 years 1 month ago

AsShotNeutral tag is converted to camera 'As Shot' white balance: imgdata.color.cam_mul[]

RawDataUniqueID is not parsed by LibRaw

Pages