LibRaw technical support

Stable LibRaw versions: technical support, errors, API questions

Trying to derive linear image from NEF, how do I use cam_mul?

I am trying to derive a linear image from a D7000 NEF 14-bit. I need both color and gray. I am using opencv cv::cvtColor(rawMat, debayeredMat, cv::COLOR_BayerBG2BGR) to convert to RGB CV_16UC3 (3 component ushort).
I believe I need to use cam_mul to get proper wb.

I am getting these values for cam_mul
cam_mul[0] = 486
cam_mul[1] = 256
cam_mul[2] = 371
cam_mul[3] = 256

I am not sure how to use these values to get anything sensible.

Thanks for any help you can provide!

Forums: 

Author Information on EOS550D CR2-Files

Hello,

i have started to use libraw for raw image data processing of CR2-files from the Canon EOS 550D.
Doing:

LibRaw iProcessor;
iProcessor.open_file(fullfilename);
iProcessor.unpack()

I cannot get the author information from:

iProcessor.imgdata.other.artist

Its just an empty string there. I have checked the corresponding CR2-file and my name is in there - clearly readable as ASCII text. Why i cannot get it using your library??

Greetings,
Lops

Forums: 

How to tell if dcraw_make_mem_image() was called?

Hi comrads,

I would like to know how i can know that this call has happened:
image = iProcessor.dcraw_make_mem_image(&rc);

The reason is that i need to clear 'image':
LibRaw::dcraw_clear_mem(image);

But ofcourse only when dcraw_make_mem_image has been called. However, i have no idea to tell *if* it has been called in the first place. For example, testing for iProcessor.data!=NULL or image == NULL or .data or something similar has not worked for me, please assist.

Forums: 

cam_xyz is not available for DNG files

Hello

I noticed that imgdata.color.cam_xyz is not available for DNG files, even for cameras for which it is available in their native format. It is written in adobe_coeff(). DCRaw jumps over the code that calls to adobe_coeff() when the file is DNG. Then, it loads the cam_xyz information in parse_tiff_ifd(), but it is not copied into imgdata.color.cam_xyz. So, I suggest you copy it at the end of parse_tiff_ifd(), similarly to what is done in adobe_coeff(). Something like:

Forums: 

Focal length and aperture in CR2

Hi,
I`v found that aperture and focal length that returned from libraw is different. https://dl.dropboxusercontent.com/u/7392238/Raw%20camera%20samples/IMG_0...

From libraw:
1. Focal length - 28.0
2. Aperture - 6,4
3. Shutter - 24,7

From exiftool:
1. Focal length - 24
2. Aperture - 22,0
3. Shutter - 20

Am I miss something?

Thanks in advance,
Victor

Forums: 

Half sized image with raw output color

Hi all, i perform this:
iProcessor.imgdata.params.half_size =1;
iProcessor.imgdata.params.output_color = 0;

That means i want a half sized output image with raw color. The resulting image gives undefined behavior that reminds me of severe memory leakages/problems. Technically, it should work, also given the fact that the dcraw equivalent command "dcraw -h -o 0 " gives a normal result.
If i change the output_color to any other variable than 0, it works.

Tim

Forums: 

Only decode specific area.

Hi. Great library.
I wish to decode only part or parts of the image, kind of as what happens in the 'half size' mode. If not, i can demosaic myself and for that i need to acces the bayer data in parts. How do i do that?
The reason is
(1) that i often only want one part of the image processed.
(2) i want to speed it up by multithreading, as i cant use openmp (using clang). I could just cut the image in quadrants and process them to have a 4x speedup.

Tim

Forums: 

NEF missing values

I used libraw to decode NEF images and looked at the r, g, b values. It turns out that certain r and b values never occur. I.e., some histogram values are zero.

In fact, the pattern of zeros is very regular. So for red, we have no samples with values 5, 14, 23, 33, 42, 51, 61, 70, 80, 89, 98 ... etc. For blue, there are no samples with values 4, 12, 20, 28, 36, 44, 52, 60, 68, 76, 84, 93.

Every 9th or 10th red value is missing. Every 8th or 9th blue value is mission.

The images were taken in 14 bit mode on a Nikon D7000.

Forums: 

Pages

Subscribe to RSS - LibRaw technical support