Recent comments

Reply to: Use of AND operators in dcraw_common.cpp   12 years 8 months ago

1) Just ignore this for now.
2) The first warning will be eliminated in next release. This is generally an error, but it just prevent IO exception to occur on broken files.
3) The second warning is not an error. The code increments is_raw if get4() returns non-zero (and get4()-returned value is stored in i variable).

Reply to: what to do if imgdata.color.cam_xyz are all 0s   12 years 8 months ago

Thanks a lot for your quick reply. I will have a try

Reply to: what to do if imgdata.color.cam_xyz are all 0s   12 years 8 months ago

Libraw calculates output transform (in RGB) based on output space matrix and xyz-matrix оf camera (see cam_xyz_coeff code).

If you don't have you camera color matrix, you may set output_parameter to 0 and you'll get non-converted (raw) colors from your camera.

Reply to: what to do if imgdata.color.cam_xyz are all 0s   12 years 8 months ago

Hi Alex,
I'm facing the same problem. I get the bayers pattern from an industrial camera. Is there some methods to create the cam_xyz matrix ?

Another question.
Does LibRaw/dcraw need the cam_xyz matrix because it performs the post processing in XYZ color space ? If so, is it possible/easy to disable this transformation, so that one can do the post processing directly in RBG color space if an image is captured from e.g from Canon camera in CR2 format

Reply to: Festina Lente   12 years 8 months ago

The argument of which produces the better quality is pointless. You can produce the same quality with integers as you can with floating points as long as you use a sufficient amount of bits for your maths. One can use integers to implement floating points and it is a common practise on hardware that has no float point operations.

If you do not know how to use integers efficiently then you will need to use float points, of course. It is what floating points were designed for as these take care of precision issues through a non-fixed, floating representation so that you do not have to.

The argument between integer versus floating points, however, is still about speed. Integer operations are often faster, because they can use less bits and they allow you to trade quality for speed in addition.

I suggest that you use floating points. The speed difference between integers and floating points is often not huge, especially when instruction sets like SSE can be used and most compilers will try to use these automatically. Writing, debugging and maintaining precise integer code on the other hand is more difficult and as a result are integers mostly used when quality is not an issue.

Reply to: CrossCompiling for Android   12 years 8 months ago

peterdk, do you can show(or upload) you config.sub and configure? thanks!

Reply to: what to do if imgdata.color.cam_xyz are all 0s   12 years 8 months ago

What camera do you use?

Reply to: ICC profile deactivation   12 years 9 months ago

You may set output_color field of processing parameters structure to 0 to get raw color

Reply to: Noob Compilation question on linux (ubuntu 11.10)   12 years 9 months ago

I saw omp > used my brain. I removed openmp option while configuring and the program compiles and runs perfectly.
I just wanted to know if this is indeed the right way to compile a libraw program.
Thanks and Regards.

Reply to: Greenish again.. why?   12 years 9 months ago

To get linear and balanced (not green) data, you need to
1) subtract black level from raw data
2) apply white balance

Reply to: Green tones into final raw.   12 years 9 months ago

Ummm, let's me think about that...

RFC[] are calculate using: (for 3 images, sorted by exposition, lower exposition first, and so ... )

RFC[0]= 1.0 always
RFC[1]= SUM_A / SUM_B * RFC[0]
RFC[2]= SUM_B / SUM_C * RFC[1]

SUM_A is R,G1 and B from image 0
SUM_B is the same from image 1
SUM_C is the same from image 2

Then this must be refact so RFC[0] + RFC[1] + RFC[0] = 1.0 ?

Reply to: Green tones into final raw.   12 years 9 months ago

Sorry, but the method you are trying to use is wrong. Please have a look at how it is accomplished in, say, Fuji S5. You need to replace noisy and blown pixels altogether. There is no point in mixing good with bad.

If you are smart, do it on per channel basis.

Finally, you may want to check if you understand white balance well enough. Raw without white balance application looks green, search for UniWB.

Reply to: Green tones into final raw.   12 years 9 months ago

1) You do your calculations before white balance procedure, or after that?
2) What WB method is used

Reply to: Green tones into final raw.   12 years 9 months ago

Yes, m1 = 1 - m2. But drFC1*m1 + drFC2*m2 will generally not being equal to 1.0

Reply to: Green tones into final raw.   12 years 9 months ago

Thanks, lexa.

I do this when is it a mixed pixel.

// It's a mix pixel from various images
gray16_pixel1 = *vct_gray16ViewSrc_iterator[i-1];
gray16_pixel2 = *vct_gray16ViewSrc_iterator[i];
drFC1 = vectorRFC[i-1];
drFC2 = vectorRFC[i];
m2 = static_cast<double>(*dbl_vct_it) - static_cast<double>( i );
m1 = static_cast<double>(1) - m2;
mul1 = drFC1 * m1;
mul2 = drFC2 * m2;
 
gray16_pixel1 = gray16_pixel_t(round( static_cast<double>(gray16_pixel1) * mul1 +
                                                                static_cast<double>(gray16_pixel2)   * mul2 ) );

If you look m1 and m2 they are weight compensed to 1 in a cell. see m1= 1 - m2

Sorry, when you talk about 'pixel' ... it is a cell, like 'R' or is it about four cell like the group(R,G1,B,G2) ?

NOTE: I use gray16_pixel_t because are simple values, from 0 to 65535 and dont have components (like red,green,blue)

Reply to: Green tones into final raw.   12 years 9 months ago

Well, looks like the greens that appear are those of the raw nature of the files, I mean:

If I catch any raw file, and modify the values of all cells ('or pixels') such as multiplying by a value less than 1, it appears greenish around the resulting raw file. All this before demosaicing.

I have a suspicion it's because in a raw, there are 2 green cells for each cell red and blue.

Anyone can confirm me this?

Can you lower the brightness of a raw without the appearance of these greens, or what is the same I can multiply by something less than 1 without getting this effect?

Thank you.

Reply to: Green tones into final raw.   12 years 9 months ago

I guess, for correct output you need to have sum of weight factors equal to 1.0 in each pixel

Reply to: list of supported file extension   12 years 9 months ago

thanks

Reply to: list of supported file extension   12 years 9 months ago

You can start with list from digiKam sources.

Unfortunately, KDE/digiKam has moved to git repsitory, so I'm unable to find right place to point to.

Try to download entire digiKam source distribution (e.g. from here: http://www.digikam.org/drupal/download) and find .h file with extensions list (rawfiles.h or so).

Reply to: list of supported file extension   12 years 9 months ago

Thanks for reply.
I've need this list to filter files that could be opened by libraw in my application.
And official raw camera use official extension (cr2,crw, ...).

Reply to: libraw support in delaboratory   12 years 9 months ago

LibRaw does not contains complete color library.

You may consider use of lcms2 and try to set Lab as output profile.

Reply to: list of supported file extension   12 years 9 months ago

There is no such list in LibRaw distribution, because LibRaw does not rely on file extension.
You may use list from digiKam distribution, although it may be incomplete.

For example, some cameraw write .tif or .tiff files, adding this extension to list is not good idea in general case.

Reply to: PURE RAW. Is it possible access bayer-pattern cell before demosaicing ?   12 years 10 months ago

Yes:

1) the imgdata.image[] (constructed by raw2image() call) have 4 components per pixel and only one non-zero component

2) the rawdata.raw_image have only one non-zero component per pixel

Reply to: PURE RAW. Is it possible access bayer-pattern cell before demosaicing ?   12 years 10 months ago

Ok, thanks, Lexa

No zeroes.. but why my cuestion ? Because, long ago, I was debugging the raw-demosaicing to tiff process into dcraw, and I could see these zeroes into memory, but of course, these zeroes are not in the raw file.

Reply to: PURE RAW. Is it possible access bayer-pattern cell before demosaicing ?   12 years 10 months ago

No, there are no such call.

Pages