Recent comments

Reply to: photon statistics and LibRaw   5 years 3 months ago

Thank you Lexa! I appreciate the pointers.

Reply to: photon statistics and LibRaw   5 years 3 months ago

samples/unprocessed_raw.cpp sample is also a good starting point if you need unaltered raw values.

Reply to: photon statistics and LibRaw   5 years 3 months ago

Quote from above:

> You can use 4channels sample to split source RAW into four separate TIFF files.

(or you can use 4channels sample source as reference for your code)

Reply to: photon statistics and LibRaw   5 years 3 months ago

OK, but it's not possible to get the R/G/B/G2 values without postprocessing, or am I confused?

Reply to: photon statistics and LibRaw   5 years 3 months ago

RawDigger calculated statistics on unaltered RAW values, the only processing performed is black level subtraction (if not turned off by user).

Reply to: photon statistics and LibRaw   5 years 3 months ago

I am trying to recreate the pixel statistics (min/max/avg/σ) that appear in RawDigger (per channel). Am I correct in assuming you are the authors of this software? If yes, then which LibRaw parameter was used to obtain these values?
Thanks

Reply to: photon statistics and LibRaw   5 years 3 months ago

Well, I was originally trying to perform my analysis on difference images (subtract one image with identical parameters from another in order to remove flat field effects) but I'm getting ridiculously large values for the std dev (in the 1000s) which doesn't seem right. Am I being naive in assuming I can simply subtract the values of one raw array from the other?

Reply to: photon statistics and LibRaw   5 years 3 months ago

To add to what Alex just said, what demosaic, when what you want is sensor PTCs?

Reply to: photon statistics and LibRaw   5 years 3 months ago

You can use 4channels sample to split source RAW into four separate TIFF files.

Reply to: photon statistics and LibRaw   5 years 3 months ago

Yes but... if I just use raw_image I only get a 2D array back.
If I need colour channels I need to manually demosaic?

Reply to: photon statistics and LibRaw   5 years 3 months ago

You do not need postprocessing step(s) if you want to analyze unaltered raw data

Reply to: Convert Raw Bayer data to.dng file.   5 years 3 months ago

Some examples of `light` DNG creation tools:

http://a1ex.magiclantern.fm/bleeding-edge/pgm2dng.c (needs a few more files from CHDK)
https://github.com/fastvideo/pgm2dng

Reply to: Convert Raw Bayer data to.dng file.   5 years 3 months ago

LibRaw only reads files, not writes.

DNG format is TIFF format + some additional tags.
So your options are:
- Adobe DNG SDK
- libtiff (you'll need to add tags using libtiff calls)
- plain write w/o addional libraries.

Reply to: HELP to compile with LibRaw QT / MingW64 / Windows 8   5 years 3 months ago

Thanks a lot Alex !
It work well now !

Lucien

Reply to: HELP to compile with LibRaw QT / MingW64 / Windows 8   5 years 3 months ago

You need this only for Microsoft or Intel compilers. For others LIBRAW_WIN32_DLLDEFS is not defined automatically.

Reply to: HELP to compile with LibRaw QT / MingW64 / Windows 8   5 years 3 months ago

For the static library, you must define LIBRAW_NODLL when compiling programs that link to it.

Reply to: Noticeable difference between LibRaw and dcraw in DNG processing   5 years 3 months ago

In this specific case LibRaw/dcraw_emu works better (more correctly) than dcraw.

This is especially true for DNG files with multiple sub-images and different color data (e.g. DNG w/ fast-load JPEG data): LibRaw/dcraw will select correct matrix, while dcraw will always use the last one.

Reply to: Noticeable difference between LibRaw and dcraw in DNG processing   5 years 3 months ago

Thanks for your reply!

Yes, I've done a side-by-side debug run of dcraw and LibRaw example, and I've found the divergence point.

Can dcraw_emu be used as a replacement of dcraw, or it is just an example program that is not intended for everyday use?

Reply to: Noticeable difference between LibRaw and dcraw in DNG processing   5 years 3 months ago

dcraw parses DNG tags one-by-one, in order (in file being processed), both ColorMatrix1 and ColorMatrix2 tags are parsed into same (cmatrix) structure. So, latest one wins.

LibRaw w/ default settings (without LIBRAW_PROCESSING_DONT_CHECK_DNG_ILLUMINANT flag) analyzes CalibrationIlluminant1/2 tags too and selects color matrix which is closer to D65/daylight.

Usually (e.g. files created by Adobe DNG SDK) the last matrix is the one that corresponds to daylight (resulting in same dcraw/dcraw_emu results), but not in this specific file (CameraMatrix1 => D65, CameraMatrix2 => Ill.A).

So, LibRaw is right in this specific case, while dcraw is not.

(dcraw is *much* worse if DNG file contains multiple sub-images w/ different color data).

Reply to: Help required for understanding coordinates   5 years 3 months ago

Thanks for the quick reply!

Reply to: Help required for understanding coordinates   5 years 3 months ago

imgdata.image is already cropped to visible area.

Reply to: Help required for understanding coordinates   5 years 3 months ago

Thank you Alex,
but is the coordinate with or without the border?
If it's with border, is the border always the same size left/right and top/bottom. So the "real" picture is always centred?
And where is the viewport? Is it at top/left or bottom/left or even somewhere else?
Thanks once again!

Reply to: Help required for understanding coordinates   5 years 3 months ago

coordinate is (y * width) + x (unless you use half_size option).

Values in imgdata.image array are 16 bit/linear space, IrfanView values are, most likely, 8bit/gamma corrected.

Reply to: Color correlated temperature: fallback strategy for non supported cameras ?   5 years 3 months ago

I do not think that fallback to older model is safe. Newer camera may have different sensor, or different CFA filters, or different calibration, or different raw adjustments in firmware. You could not know it without new raws analysis.

Reply to: HELP to compile with LibRaw QT / MingW64 / Windows 8   5 years 3 months ago

Alex,

I have removed any .dll or . a librairy before compiling.
Just i use libraw.a as soon as created

( I am probably a dummy with librairies )

In my project just i have this :

INCLUDEPATH += C:\LibRaw-0.19.5\libraw
LIBS += -LC:\LibRaw-0.19.5\lib -llibraw.a
and :
#include

I have still the trouble with static library. but '.exe' files in /bin work well !.

Lucien

Pages