Quantcast
Viewing all 4036 articles
Browse latest View live

Get DNG Date Created from dng sdk

I have successfully compiled the dng sdk and the validate app and I wondered what is a simple way to just get the date created out?


Crash when creating a Lossless-jpeg compressed DNG

Hi all,

 

everything is in the title i guess. I work on a legacy system, using DNG SDK 1.1 (upgrading is not an option). The software was originally desgined under win, and is now ported to mac os X. When saving an image to a dng format, an exception is thrown during the lossless jpeg encoding. Do you have any idea of what it might be? What tests can I run?

 

thansk

S.

From dng_image to pixel buffer?

Various things of the DNG SDK return a dng_image. The stage1, stage2 and stage3 are an RGB image. And if you use dng_render, you also get a dng_image.

 

I'd like to get a buffer of pixels (with for example R, G, B values). However, I haven't found any way in the API to get such a buffer.

 

For example, dng_image has member functions to get its width and height, but nothing to get the pixel buffer or even the value of a single pixel.

 

And I experimented a bit with the "Get" method of dng_image, but if I don't put anything in fArea of the buffer parameter, I didn't manage to get anything interesting, while if define a rectangle there, the whole program corrupts and crashes a bit after using dng_image.Get.

 

So, basically, my question is: how can I get the pixel buffer from a dng_image?


This is for displaying it on a computer monitor BTW.

 

Unfortunately the dng_validate sample doesn't help me out, because they don't get any pixel values there, they just call an API method to convert the dng_image to a TIFF file, which doesn't help me at all because I need RGB pixels on a screen, not a TIFF file on a disk.

 

Thanks.

The current DNG Profile Editor cannot interpret 7.1 raw settings

Hi,

 

I am frustrated that the DNG Profile Editor is not able to apply Lightroom's or Camera Raw's settings since the new Process 2012 has been in effect.

 

This SEVERLY limits the usefulness of the Profile Editor. And yes I know it is a beta.

 

However, are there no plans to release a compatible version?

 

 

Thanks,

Juan

Rather basic question:

I'm currently writing a lens correction and image optimization program that (if everything works as planned) will perform the following functions:

 

1. Removal of image blurring introduced by the lens, camera AA filter, diffraction, and RAW converter demosaic algorithm.

 

2. Correction of radial and longitudinal chromatic aberrations.

 

3. Correction of coma, spherical aberrations, and other similar distortions.

 

4. Correction of barrel, pincushion, and the most complex forms of mustache distortion.

 

5. Vignetting correction.

 

6. Stacking multiple DNG images for focus or exposure blending.

 

The biggest hassle I'm encountering right now is figuring out the DNG SDK. I've downloaded it and browsed through it, but there's a huge number of classes, and the object hierarchy and their intended usages aren't clear to me yet. I'm trying to figure out how to accomplish the following tasks:

 

1. Open a DNG file (preferably the demosaiced linear RGB flavor), and read the image and metadata (especially camera model, lens model, focal length, and aperture) into memory.

 

2. Once the image has been processed, write it to a new linear RGB DNG file that can be opened in any DNG-aware application, with all original tags and metadata correctly preserved.

 

All of the internal correction operations are done on linear RGB data in the camera's native color space, so that setting white balance, selection of color profile, etc. is unaffected by the image correction operation. The user will have the exact same color processing options, ability to select white balance, exposure adjustments, and output color space selection as when working with the original RAW(s).

 

All I care about is opening a linear RGB DNG file (already demosaiced, so I don't have to open that can of worms) processing the image data, and then saving to a new DNG file that is identical except for the actual image data. Where do I start?

White balance

Hello,

 

Is there any posible to read vector (rgb or hsv) witch is used for white balancing?  In fact I mean light temperature witch was measured by camera. My project is based on dng_validate.exe. Images use this format negative->HasCameraNeutral() == true.

 

I don't know why there are two temperatures. I need only one Image may be NSFW.
Clik here to view.

 

profile->CalibrationTemperature1();

profile->CalibrationTemperature2();

 

 

 

Thank you

Petr Kocich

raw image size > 2.147 Gb?

Hello,

 

Is there a dng specification raw image size limit? I would like to save huge raw images. We changed the kMaxImageSide from 65000 to 300000. I know the dng's which are bigger then 65000 per size can't be opened in other dng readers. But also if you just have a raw image 30000x30000 it can be bigger then 2.147Gb. It's depends on bits per pixels. For now we have images like 7500 x 60000, but soon we want to save raw images like 7500 x 314169 or better 7500 x 628328. That means for the first image we have raw image data like 4.4Gb and for the other 8.8Gb. Of course this is just possible on a 64bit system.

 

Is there any plan to support huge raw images (64bit dng sdk)? If so when will you release it?

 

Best regards,

Marius

monochrome dng

Hello,

 

I have been writing my own DNG headers to raw sensor grabs successfully for a while now. These have all been CFA sensors but now I have a monochrome sensor in the mix and I would like to save these as DNG as well. I have tried a variety of settings with the PhotometricInterpretation, CFAPattern, CFARepeatPatternDim tags and have had no success. Excluding the latter two tags will produce a greyscale image with dcraw but photoshop will not open these DNGs. I could just save these images as PNG but everything else is DNG and it just looks nice when everything is the same.

 

Any ideas on header tags for a monochrome DNG?

 

 

Thanks!

jt


Enable multithreading in DNG SDK

Hi all,

I have to process very fast a large amount of DNG files (couple of thousands) and I have to do this on a regular basis. The processing is a simple conversion to TIF, white balance, and all other parameters are left default. The output is RGB 8 bit per pixel. I have tried libraw but it gets to 2.5 seconds per image and it is a bit slow.

 

Currently I get the following results from dng_validate:

Raw image read time: 0.064 sec
Linearization time: 0.020 sec
Interpolate time: 0.273 sec
Render time: 0.541 sec

This is about 1 second per file.

 

Is it possible to use multiple threads when calling render.Render()? It would be great to reduce the time to 0.3/0.2 seconds for this/

 

Are we talking about features that are not documented/flags to pass when compiling the library/complete re-write since the library was not designed with this in mind?

 

I poked through the code and found that there is some threading in the code:

void dng_area_task::Perform (dng_area_task &task,
                               const dng_rect &area,
                               dng_memory_allocator *allocator,
                               dng_abort_sniffer *sniffer)
    {
   
    dng_point tileSize (task.FindTileSize (area));
       
    task.Start (1, tileSize, allocator, sniffer);
   
    task.ProcessOnThread (0, area, tileSize, sniffer);
           
    task.Finish (1);
   
    }

but it seems that regardless how many threads they are, the tasks are perfromed single threaded.

 

thank you,

 

Calin

DNG/XMP AppendProperties/ApplyTemplate

I downloaded the latest DNG SDK (1.3) and XMP Toolkit SDK (CS6).  The DNG SDK expects "AppendProperties", while the XMP has replaced that with "ApplyTemplate".

 

I then tried an earlier version of the XMP Toolkit (4.4.2), but then multple Quicktime SDK linking problems arose.

 

Are there any DNG/XMP versions which are compatable, or method of converting the function?

 

Thanks.

SubIFD1 tags not updating

Hey,

 

I'm currently developing code to write raw camera image data to dng files (I'm doing some processing in between so I'm not using the DNG Converter exe). I have not been able to find any tutorial on the dng sdk, so my code is based partly on the dng_validate code and partly on incomplete code provided by others.

 

Anyway, my problem is that the dngs are not being written correctly. When I run dng_validate on the created dng, I get the following: "Error: Missing or invalid SamplesPerPixel (SubIFD 1)". However, when I set the SamplesPerPixel tag in SubIFD 1, the change is not reflected in the output of dng_validate when run on the created dng. Similarly, when I set the PhotometricInterpretation tag to CFA (32803), the output of dng_validate still shows it as being set to LinearRaw. My question is are there other SubIFD 1 tags that can have the effect of overwriting the above tags?

 

Thanks,

 

aubrey

DNG SDK cannot write files with floating point pixels?

I'm trying to create a DNG with 32 bit floating point pixels. The reason is to create a file which is not demosaiced but contains a large dynamic range. It goes well for the major part, but it fails in the linearization step (BuildStage2Image) when I'm generating a thumbnail. Looking into the code it seems like the floating point case is not handled, so it is easy to understand why it does not work.

 

Is this a bug in the SDK, or does not the DNG standard support floating point pixels?

 

(I'm using the latest release at time of writing, version 1.4)

 

Edit: I patched the SDK to support floating point pixels (like 4 lines of code), so it is quite simple to do. But not surprisingly it cannot be interpreted even by Lightroom.

DNG SDK thinks 0xFFFFFFFF is invalid white level for 32 bit integers

As discussed in another message the DNG SDK does not seem to be able to write floating point DNGs. Since I need higher dynamic range than a 16 bit sample I instead went for 32 bit integers.

 

This works, and I manage to create a file but when I run dng_validate on it it says the white level is invalid. The white level I have of course set to 0xFFFFFFFF to make use of the full 32 bit range. Looking into the code in dng_ifd.cpp where this test is made it seems like the default max white level is set to 65535.0 and the file's white level is compared against that, regardless if the sample type is 16 or 32 bit. This means that I can only make use of 16 bits of the 32 bit integer which seems kind of strange. Looking into the DNG spec I don't see anything there that forbids using the full 32 bit range of 32 bit samples. So this looks like a bug to me.

 

This is with version 1.4

 

the created file can be opened in Lightroom 4, so the only problem seems to be that dng_validate does not think its valid.

 

Message was edited by: torger76, removed clipping issue, that was a fault in my code.

Newbie - getting started

Hi,

Hopefully someone can help me here.  I'm looking to place either simulated or camera raw output (and here I mean a matrix of 8 or 10 bit values without debayering) into a RAW format so that I can experiment with the debayering, white balance, colour profiles, linearization or LUTs that I need to shift my camera output into a useable image.  I was thinking about using the Adobe DNG format - but I'm struggling to understand where to start with this.

 

What I'd like to do to start with is simply create a DNG file with, say, a 10x10 image size, 8 bit data with a ramp profile: e.g.

0 20 40 60 80 100 120 140 160 180

0 20 40 60 80 100 120 140 160 180

.

.

.

0 20 40 60 80 100 120 140 160 180

 

I've been looking at using the dng_validate example and creating a new function:

 

static

 

dng_error_code dng_createsim (constchar *filenameOut)

{

 

 

}

 

After several attempts at this, I've sort of guessed that I need to access the data buffer in negative->Stage1Image(), but I've not succeeded in this.

 

Thanks for any help.

 

Simon

From Stage3Image() to sRGB color space

I get my image this way dng_image* image = (negative->Stage3Image()); I have to manimulate with it and then I want to covtert it to sRGB color space. I tryed to do gamma 2.2 and white balance with white point from camera, but colors are still different.

 

I think that I should use this matrix camera2RGB for conversion but I don't know how.

 

dng_camera_profile* profile = negative->CameraProfileToEmbed();

dng_color_spec spec(*negative,profile);

const dng_matrix camera2RGB = dng_space_sRGB::Get ().MatrixFromPCS () * spec.CameraToPCS ();

 

profile->HasColorMatrix1(); returns true

profile->HasColorMatrix2(); returns true

negative->HasCameraNeutral(); returns true

 

Sorry for my language skill

 

Thank you

Petr Kocich


DNG data production

I have a camera which delivers a data stream of pure pixel values. Pixels are 12 bit packed data.

There is no header in front of the data. Software like Irfan has no problem to open it.

What I search, is the possibility to convert these images to DNG.

As far as I understood, DNG Converter cannot read in pure pixel data.

How to write manipulated image back to negative?

Hi all,

I would like to do some simple dng raw image manipulation like black image subtraction.

 

Therfore I though I would get the stage2 image (because working on stage1 is not  correct right?) of both the main-image and the black-image and create an image "main minus black".

 

Now I want to have this image saved back as dng as if it was the main dng.

 

just setting the new image as stage2 does not work because writeDNG uses the stage1 image which is set as fRawImage in buildStage2Image.

 

Setting as stage1 does not work too because it is already a linearized image.

 

How can I reverse the linearization?

 

Or are there other way to do this correctly?

 

Thank you all and best regards

Andreas

Saving a DNG

Hello, i have opened up a DNG profile and gotten a bit of info out of it. The stream is open as readonly. I want to make 1 change to it, that is the camera profile name. So after i have done this, i want to save the DNG profile back out. I know it's some sort of combination of host, a writeable stream, a negative and a writer, but the writer takes a thumbnail which i dont have. Can anyone point me to simple sample code for saving my profile out. Just an open profile and save to another filename would be fine.

 

thx for the help.

 

AC

Transparency examples in DNG (SDK 1.4)

Hi All, I am new on this forum. I just started to assess the possibilities of DNG (and its SDK) for my photo processing pipeline. Being able to add (semi-) transparent pixels to sets of photos is one of my requirements, and since DNG SDK v1.4 this seems supported. Also, I was wondering how these transparent are pixels would be treated when popular end-user tools such as LightRoom and Adobe Camera Raw are used to further post-process the resulting DNGs.

I searched this forum and skimmed the DNG SDK source code, but effectively I haven't been able to generate results.

Does anyone have pointers here to:

  • Sample DNG file(s) with transparent layer ?
  • Code snippets for adding/accessing (an existing image as) a layer in an existing DNG file ?

How to import a real raw CFA image into a DNG ?

Hello everybody, I have searched this discussion forum and the net as good as I could, but unfortunately I was not able to find a way

to import properly an absolute raw CFA image generated by an image sensor with Bayer pattern into DNG file.

Not to mention on how to import a monochrome raw image .

I have read the documentation that comes with the SDK but it's really lacking, basically totally missing any concept description or, God forbid,

having some simple examples to help somebody start. The dng_validate example is another complex beast and it seems that the documentation spends

more time in describing various command line switches than talking about the architecture and the process of building a DNG image.

Actually, I wasn't able to find any clear explanation of the architecture of this complex software project, nor any sensful explanation about the classes hierarchy Image may be NSFW.
Clik here to view.
.

If this things exists somewhere I would be greatfull if somebody could kindly point me to them but I'm not holding my breath.

Anyway, if somebody has a working piece of code detailing on how to import a CFA blob into a DNG ( only stage 1 is needed but pointers/examples for other stages are

appreciated as well ) and it could share it I will be very, very gratefull.

I'm just an engineer working on vegetable/fruit sorting machines but I don't need a complete hand holding but just a starting point, I really don't know where to start and what is the

class that have to be instantiated to start filling it with data.

Any help is appreciated and please excuse the spelling/grammar, English is not my native language.

 

Cheers,

M.D.

Viewing all 4036 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>