Recent comments

Reply to: Requesting to submit a patch for direct raw access?   4 years 4 days ago

Thanks for the quick response!

For this project, I need three things from the raw data: image height, image width, and the bitmap. There's already C calls for get_raw_height and get_raw_width -- all I need past that is the raw bitmap.

Black/white level, bayer pattern, color data, and white balance data are all needed if you need to reconstruct a full color original image-- and for that, yes, dcraw_process() is absolutely the right thing to call, because it manipulates the bitmap to reconstruct the image. This app don't need that level of processing. I also tried using raw2image, and even that appears to do some light debayering work and modifying the base bitmap.

This project needs the raw, unmodified bitmap straight off the camera sensor. It doesn't need any of the white balance data or color information, nor is it trying to recreate the full color picture. However, what's critical is the turnaround time between shutter snaps- in between shutter snaps, the app needs to extract the raw image data, review it for just a couple things, make decisions, and get back to the business of taking pictures as quickly as it can.

The first pass at implementing libraw invoked the unprocessed_raw utility (using the -T switch) to convert the bitstream to a TIFF, and it does exactly what was needed. However, it also adds the overhead of writing to/reading from the disk twice, as well as wrapping the bitmap in a TIFF wrapper.

Ideally the app should get the image from the camera, extract the things it needs from the raw data in memory, and pass everything around in memory buffers. Adding that one routine to the API would streamline the entire process, and make that capability available for anyone else as well.

Reply to: libraw_set_exifparser_handler - what is the void *datap parameter   4 years 4 days ago

Wouldn't it be easier to recompile LibRaw using your compiler?

Reply to: libraw_set_exifparser_handler - what is the void *datap parameter   4 years 4 days ago

Thanks Alex

Unfortunately C++ Builder's C++ name mangling is not compatible with MSVC's. There are nasty ways to get an MSVC class in a DLL to be accessible, but I took the simple way out and extended the LibRaw C API to include the LibRaw_abstract_datastream gets() function, which seems to be all I need.

Andy

Reply to: Requesting to submit a patch for direct raw access?   4 years 4 days ago

Pointer to raw data itself is useless without access to metadata (black/white level, bayer pattern, color data, white balance data, image size, etc, etc, etc).

So you'll need to access all internals anyway.

Reply to: libraw_set_exifparser_handler - what is the void *datap parameter   4 years 4 days ago

datap is pointer to your datablock (context), for example data table to be filled w/ exif callback.
It is passed to callback as 1st parameter (void *, you'll need to explicitly convert type before use).

Input datastream is passed as last parameter to callback as (void*). You'll need it (so, your callback should be C++ function in that case) if you plan to read tag values. If you want to only collect tags/tag types, you may ignore this last parameter.

Know nothing about CodeGear C++, so could not help with it.

Reply to: Questions about black-level and white-levels in colordata   4 years 6 days ago

As mentioned above:
> linear_max is 'specular white' read from metadata (if present in file)

Hope this helps.

Reply to: Questions about black-level and white-levels in colordata   4 years 6 days ago

Alex,
I am trying to implement my own version of subtract_black. Following which I am trying to rescale the image to the range (0,1). For this, I need to know the black-level and white-level. Given, there are two properties that contain white-level information, I was curious to know which one to use if both maximum and linear_max are both populated.

Dinesh

Reply to: Questions about black-level and white-levels in colordata   4 years 6 days ago

I don’t know what exactly you are doing and what you mean by normalization.
Therefore, do as you think is right.

Reply to: Questions about black-level and white-levels in colordata   4 years 6 days ago

Alex,
I am trying to apply my own black-level subtraction and image normalization. So, I just wanted to clarify on what image range I should apply the black-level subtraction. Also, I am not sure if I should use maximum or linear_max for normalization.

Dinesh

Dinesh

Reply to: Questions about black-level and white-levels in colordata   4 years 6 days ago

I do not know what you want to achieve, so I could not answer (both) your questions.

Reply to: Questions about black-level and white-levels in colordata   4 years 6 days ago

Alex,
For the black-levels that are specified in cblack[0]->cblack[3], do those also need to be applied starting at the visible region. I am assuming this is the case because the subtract_black_internal operates on imgdata.image which only operates on the visible image.

Also, for the white-levels, if linear_max is all zeros, then do I just assume maximum applies to all the channels.

Also, if both maximum and linear_max value is present, which value should I use?

Regards,
Dinesh

Reply to: LibRaw 0.20.2 Release   4 years 6 days ago

This depends on beta feedback. Hope to finish Beta-RC-Release cycle in May.

Reply to: LibRaw 0.20.2 Release   4 years 1 week ago

Is there any schedule / target / roadmap currently for when the final release will drop?

Reply to: Questions about black-level and white-levels in colordata   4 years 1 week ago

Followup, 6 is intended value for non-bayer:

int COLOR(int row, int col)
  {
    if (!imgdata.idata.filters)
      return 6; /* Special value 0+1+2+3 */
  ...
Reply to: Questions about black-level and white-levels in colordata   4 years 1 week ago

COLOR() for non-bayer(x-trans) data is useless, check filters too before use.

Reply to: Questions about black-level and white-levels in colordata   4 years 1 week ago

Alex,
Thanks for this clarification. So it looks like my best bet would be to call raw2image() and subtract_black() to leverage libraw to do the black-level correction for me. I still would like to return the CFA data as a rows x columns matrix instead of the output of raw2image. I guess I have to add some custom logic to do the copying.

Also, it appears that raw2image() only returns the visible portion of the image. It typically has only 1 out of the 4 channels as non-zero. I am assuming this does not hold true for Fovean sensors or DNG files that are created from Sigma cameras?

Can I use the COLOR function for non-Bayer sensors? I have a DNG file that appears to be created from a Sigma camera. The output of COLOR(0, 0), COLOR(0, 1) returned 6.

Dinesh

Reply to: Paswword needing to be reset.   4 years 1 week ago

Yes, you're the only person affected.

We do not log authentication data on our sites, so no way to recover the problem source. If you have your HTTP sessions dump it may help.

Reply to: Paswword needing to be reset.   4 years 1 week ago

Hmmm.... That's what you said last time I reported this (about two years ago).

Oh well.

Reply to: LibRaw 0.20.2 Release   4 years 1 week ago

No plans for publishing binaries or source tarballs for beta.

Binaries and tarballs will be updated on 'release' status.

Reply to: Paswword needing to be reset.   4 years 1 week ago

We use this site engine (drupal 7) for many sites for many years. Never seen such problem.

Reply to: LibRaw 0.20.2 Release   4 years 1 week ago
Hi!

Hi!
Is it possible to try Windows binaries of v0.20 beta?
Or when binaries will be available?
Thanks.

Reply to: Camera name in supported camera array doesn't match   4 years 1 week ago

Yes, this camera uses E-M5MarkII string in EXIF 0x0110 tag (Model).
LibRaw 0.20 (Beta1 just published) provides 'E-M5 Mark II' string in normalized_model[]

BTW, LibRaw::cameraList() is 'user readable', it contains some notes and special cases (like 'lossless only' or 'CHDK hack'). It does not targeted to be matched against model/normalized_model.

Reply to: Questions about black-level and white-levels in colordata   4 years 1 week ago

Yes, black/cblack reflects different black level specifications in RAW metadata
black - single black level
cblack[0-3] per channel BL in channel numbering order (channel numbers are returned by COLOR(..))
cblack[4-5] defines pattern BL (e.g. 6x6 for X-Trans)

As a rule: black is base level and cblack is correction, so if black is non-zero and cblack[.. is non-zero (for given channel or row/col), resulting BL for pixel/channel is a sum of black + cblack[channel] + cblack[pattern]. In practice all three are rarely present.

white is either format maximum (defined by bits per pixel), or maximum value defined by metadata (DNG whitelevel).
linear_max is 'specular white' read from metadata (if present in file)

Reply to: Inverting raw_image and getting magenta output   4 years 1 week ago

Yeah, the weird histogram is from the inverted data. I think I'm going to have to deeply familiarize myself with what scale_colors does, because I think something in that process is relying on values that were generated prior to inverting the raw data.

Reply to: Questions about color matrices in colordata   4 years 1 week ago

wb_coeffs are in channel numbering order (as returned by COLOR(row,col))

Pages