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.
Hi, here is my little software (Freeware) using LibRaw: TOMYO TiltShiftEasy - http://www.tomyo.org/TiltShiftEasy.php - a small and easy to use tool to create tilt-shift photo effects. I'm using LibRaw because the compatibility with the various RAW formats is outstanding, besides the project comes with clean/working Visual Studio solution (i really appreciate that). Thanks to all LibRaw developers!
1) For some cameras you may get some additional WB data from EXIF/Makernotes fields. LibRaw only parses camera 'as shot' coefficients for most cameras.
2)
cam_mul is camera (as shot) white balance.
pre_mul is daylight white balance (calculated from Adobe camera matrix)
Hi Alex,
1] yes it is clear for me, but must be some reference point for white reconstruct point where camera measure rgb values. It is possible get this reference point from LibRaw? I have function which get CCT from XYZ and I need some reference point from camera to get this white point reference.
and one other question.
2] What is different between pre_mul and cam_mul arrays?
For me working pre_mul as camera temperature setting. I am using matrix
The rule is simple: rgb values, multiplied by WB coeffs will result into equal values (e.g. gray). So, assume Green to be, for example, 1024, than Red/Blue will 1024-divieded-by-WB coeff.
1) rgb_cam is Camera to sRGB. You may multiply this matrix to srgb2xyz matrix to get camera-to-xyz matrix.
2) LibRaw do not do anything with camera CCT/tint
3) Could you please re-formulate your question, I cannot understand what you want to obtain.
Thank you!
I've seen the field LIBRAW_WARN_FALLBACK_TO_AHD in LibRaw 0.17.
I suppose that testing (imgdata.process_warning & LIBRAW_WARN_FALLBACK_TO_AHD) after processing will allow one to display a warning.
I updated to the latest and see the same artifact. Is the thumbnail processed properly for you? No additional steps necessary to handle it as opposed to other bitmap thumbnail formats (which work for me)?
LibRaw::COLOR(row,col) returns color index (it is good idea to cache it; maximum length of pattern in single row is 48)
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.
Thanks!
AsShotNeutral tag is converted to camera 'As Shot' white balance: imgdata.color.cam_mul[]
RawDataUniqueID is not parsed by LibRaw
Wow, bugfixing at Warp 9 :) That was really fast! I just tested the new github Version, and now the file is correctly loaded, thanks!
Fixed and pushed to github repo: https://github.com/LibRaw/LibRaw
Thank you again for pointing to the problem.
Thanks for the sample.
Yes, it looks like camera WB is broken for this camera. To be fixed.
Hi, here is my little software (Freeware) using LibRaw: TOMYO TiltShiftEasy - http://www.tomyo.org/TiltShiftEasy.php - a small and easy to use tool to create tilt-shift photo effects. I'm using LibRaw because the compatibility with the various RAW formats is outstanding, besides the project comes with clean/working Visual Studio solution (i really appreciate that). Thanks to all LibRaw developers!
1) For some cameras you may get some additional WB data from EXIF/Makernotes fields. LibRaw only parses camera 'as shot' coefficients for most cameras.
2)
cam_mul is camera (as shot) white balance.
pre_mul is daylight white balance (calculated from Adobe camera matrix)
Hi Alex,
1] yes it is clear for me, but must be some reference point for white reconstruct point where camera measure rgb values. It is possible get this reference point from LibRaw? I have function which get CCT from XYZ and I need some reference point from camera to get this white point reference.
and one other question.
2] What is different between pre_mul and cam_mul arrays?
For me working pre_mul as camera temperature setting. I am using matrix
for(int row=0; row < 3; row++)
{
for(int col=0; col < 3; col++)
{
cam2RGB[row][col] = rgb_cam[row][col] * pre_mul[col];
}
}
than multiply all RGB values for each pixel
int correction_R = cam2RGB[0][0] * pixel_R[col] + cam2RGB[0][1] * pixel_G[col] + cam2RGB[0][2] * pixel_B[col];
int correction_G = cam2RGB[1][0] * pixel_R[col] + cam2RGB[1][1] * pixel_G[col] + cam2RGB[1][2] * pixel_B[col];
int correction_B = cam2RGB[2][0] * pixel_R[col] + cam2RGB[2][1] * pixel_G[col] + cam2RGB[2][2] * pixel_B[col];
cam_mul working too but image is without color cast and image is not same as in other image editors.
Thanks Ladislav
The rule is simple: rgb values, multiplied by WB coeffs will result into equal values (e.g. gray). So, assume Green to be, for example, 1024, than Red/Blue will 1024-divieded-by-WB coeff.
Thanks for reply.
reformulate 3] Camera must calculate white balance coefficients from some RGB raw values. It is possible get from LibRaw these RGB values?
Thanks
1) rgb_cam is Camera to sRGB. You may multiply this matrix to srgb2xyz matrix to get camera-to-xyz matrix.
2) LibRaw do not do anything with camera CCT/tint
3) Could you please re-formulate your question, I cannot understand what you want to obtain.
Hi Alex,
Can I have some questions to you:
1] When I want convert RAW image to XYZ color space I multiply rgb_cam * cam_xyz * RAW pixel?
2] Does LibRaw contain parameters of camera temperature? Or is there some way how reconstruct this value from camera?
3] Is possible reconstruct from Libraw parameters RAW pixel values where camera measure white balance coeficients?
Thank you Ladislav
Yes, check for this bit if you're worried about AHD fallback
Thank you!
I've seen the field LIBRAW_WARN_FALLBACK_TO_AHD in LibRaw 0.17.
I suppose that testing (imgdata.process_warning & LIBRAW_WARN_FALLBACK_TO_AHD) after processing will allow one to display a warning.
Have you tested simple_dcraw and/or mem-image samples with these kodak samples?
Noted, my code converts all bitmap thumbs to jpg.
Again.
Kodak thumbnails *are not JPEGs*
I was blocked for some reason, so I was never able to post an example of the thumbnail I pulled:
https://drive.google.com/file/d/0B572ihVmygYtZW5PcTlHMHdyOG8/view
I've modified mem-image sample, added line:
after the line
And, yes, mem-image -e writes thumbnail as expected (in PPM format because it it bitmap).
Also, our FastRawViewer (that uses LibRaw::unpack_thumb to extract thumbnails) works fine with these files.
I updated to the latest and see the same artifact. Is the thumbnail processed properly for you? No additional steps necessary to handle it as opposed to other bitmap thumbnail formats (which work for me)?
For both these images, thumbnail type is 2 (LIBRAW_IMAGE_BITMAP)
Checked with LibRaw 0.16 and with current (0.17) version.
I pulled these from a forum topic for testing:
http://s3t.it/data/uploads/rt_kodak_dcs_14nx_raw_photodesk.zip
It should work.
Could you please provide some file(s) for testing (Dropbox or google drive is a good way for file sharing)
Pages