ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Open Images from Nikon D3200
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ruekaka

Germany
25 Posts

Posted - Apr 15 2013 :  02:36:10  Show Profile  Reply
Hi everybody,

I have problems to open images (*.nef) made with a Nikon D3200.
Without dcrawlib.dll I get an image that looks like random noise, with dcrawlib.dll it opens the image, but it's much to dark (nearly black) (See attached image)
How can I load this image correct?

Thanks in advance for any help.
With kind regards,
Ruediger Kabbasch


570.77 KB

With kind regards,
Ruediger Kabbasch

fab

1310 Posts

Posted - Apr 15 2013 :  03:40:22  Show Profile  Reply
This model is supported only by the external dcrawlib.dll.
I can read correctly some samples from D3200, tested from:

http://www.photographyblog.com/reviews/nikon_d3200_review/sample_images/

You could try to change some parameters like:

ImageEnView.IO.Params.RAW_UseCameraWB
ImageEnView.IO.Params.RAW_AutoAdjustColors
ImageEnView.IO.Params.RAW_Gamma
ImageEnView.IO.Params.RAW_UseAutoWB

Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Apr 15 2013 :  04:34:31  Show Profile  Reply
Thanks for your reply.

I played with these parameters
ImageEnView1.IO.Params.RAW_UseCameraWB := True; // Default False
ImageEnView1.IO.Params.RAW_AutoAdjustColors := False; // Needs EXIF thumbnail
ImageEnView1.IO.Params.RAW_Gamma := 1.0; // default 0.6;
ImageEnView1.IO.Params.RAW_UseAutoWB := False;

but the only one that makes a difference seems to be RAW_UseCameraWB. If set to TRUE it's the best result, but it's still much to dark. Changing the other params seems not to change anything.

Could you please provide your example code how you open the reference image?

Thanks again for any help.

With kind regards,
Ruediger Kabbasch
Go to Top of Page

fab

1310 Posts

Posted - Apr 15 2013 :  07:09:46  Show Profile  Reply
All images on the previous link can be opened just executing:

IEFileFormatRemove(ioRAW);
IEAddExtIOPlugIn('dcrawlib.dll');
ImageEnView.IO.LoadFromFileRAW('filename.nef');

Without playing with Params.RAW_XX properties.
Maybe your image needs more processing (this is still a raw...).
Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Apr 15 2013 :  09:07:59  Show Profile  Reply
Thanks again for your reply, I apreciate it.
But I still could not found what I'm doing wrong.

I use the RealRaw demo.
I modify the FormCreate event to

procedure TMainForm.FormCreate(Sender: TObject);
begin
{ RKK ->}
IEFileFormatRemove(ioRAW);
IEAddExtIOPlugIn('dcrawlib.dll');
{<- RKK }

// we cannot use Windows Bitmaps!
ImageEnView1.LegacyBitmap:=False;
// do not convert pixels formats to 1 bit or 24 bit!
ImageEnView1.IO.NativePixelFormat:=True;
end;

I modify the OpenFile1Click event to

procedure TMainForm.OpenFile1Click(Sender: TObject);
var
fileName : String;
begin
fileName := ImageEnView1.IO.ExecuteOpenDialog('','',true,0,'');
ImageEnView1.IO.LoadFromFileRAW(fileName);
end;
(Now using LoadFromFileRAW)
I take an image from the Nikon-Testimages (nikon_d3200_17.nef). After open the image it's still to dark and to red (see attached file).

How does the image looks like when you open it? More like the one opened in ImageEn (top of the screenshot) or more like the one in ViewNX2?



784.29 KB

With kind regards,
Ruediger Kabbasch
Go to Top of Page

Uwe

284 Posts

Posted - Apr 16 2013 :  09:05:53  Show Profile  Reply
Rüdiger,

your problem is this line:

quote:
ImageEnView1.IO.NativePixelFormat:=True;

If set to true, you will be dealing with 48bit images instead of 24bit. You might also want to read the "Why is 16-bit output dark" part of the DCRAW FAQ... ;)

http://www.cybercom.net/~dcoffin/dcraw/#faq

HTH
Uwe
Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Apr 16 2013 :  09:53:43  Show Profile  Reply
Thanks Uwe,

the reference image is indead better (not perfect, but better).
But an interesting effect happens with the images taken from the camera. It seems that only the preview image is loaded not longer the image itself after changing the parameter to true.

BTW thanks for the link. It has some interesting informations.

Seems that I need to adjust my expections what's possible with ImageEn and RAW images. I never worked with RAW files before and naivly thought it would be as easy as with other image formats, too.

With kind regards,
Ruediger Kabbasch

With kind regards,
Ruediger Kabbasch
Go to Top of Page

Uwe

284 Posts

Posted - Apr 16 2013 :  10:41:54  Show Profile  Reply
Rüdiger,

quote:
It seems that only the preview image is loaded not longer the image itself after changing the parameter to true.

That shouldn't happen unless you specifically retrieve the preview image. As a reference: on a very slow PC I'm able to load a 26 MB camera RAW file (*.cr2) in about 3 secs. That includes the creation of the histogram and the retrieval of the available metadata.

Have you set -e and -W in the DCRAW parameters by any chance?

quote:
Seems that I need to adjust my expections what's possible with ImageEn and RAW images.

Almost everything is possible, but you have to understand the inner workings of DCRAW.

quote:
I never worked with RAW files before and naivly thought it would be as easy as with other image formats

It's not difficult, but it can get confusing once you start to work with the different development settings of DCRAW. There are quite a few dependencies between them and it requires a lot of reading to understand the theory behind it.

-Uwe
Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Apr 18 2013 :  02:27:54  Show Profile  Reply
quote:
It seems that only the preview image is loaded not longer the image itself after changing the parameter to true.

I'm wrong here, that doesn't effect this. It's just that after loading the first image the demo behaves different, but if I start the demo again it works as expected.

quote:
Have you set -e and -W in the DCRAW parameters by any chance?

Brilliant, that's it (-e, not -W). The image looks at it should now. Although the documentation says "-e Extract the camera-generated thumbnail, not the raw image. You'll get either a JPEG or a PPM file, depending on the camera." I could not see any differenc (at least I didn't expected that the RAW image contains an additional jpeg)

quote:
Almost everything is possible, but you have to understand the inner workings of DCRAW.

quote:
It's not difficult, but it can get confusing once you start to work with the different development settings of DCRAW...


That's true, but it's nothing that I can expect from the average user of my application to find out.

But maybe exequte/imageen can start a sticky thread in this forum where users can post their settings they used to open raw files of specific camera types.

Thanks again for all your help.

With kind regards,
Ruediger Kabbasch
Go to Top of Page

Uwe

284 Posts

Posted - Apr 18 2013 :  15:17:34  Show Profile  Reply
Rüdiger,

glad I could help.

quote:
it's nothing that I can expect from the average user of my application to find out.

No, that's the job of the developer... ;)

quote:
users can post their settings they used to open raw files of specific camera types.

There are no specific settings for each of the different file formats, just different parameters DCRAW uses for the final development of an image.

-Uwe
Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Apr 19 2013 :  02:00:10  Show Profile  Reply
quote:
No, that's the job of the developer... ;)

... of the component ;-) - but only in a perfect world. (Just kidding)


quote:
There are no specific settings for each of the different file formats, just different parameters DCRAW uses for the final development of an image.

I'm not sure if I understand that right.
My understanding is that I have to find out the settings, dcraw parameters, ... for a specific camara raw type to open the image with the best possible quality. Once I found these settings/parameters I would expect that I can open all images made with this camera type with the same settings (at least at a starting point).
So the obvious idea is to offer the end user a dialog to open RAW images where the user should be able to change the settings, but also have an option to select e.g. "Nikon D3200", "Canon EOS" or whatever to get the most probable settings for this camera type. If this is possible it would be helpful to have a kind of list with known settings.

With kind regards,
Ruediger Kabbasch
Go to Top of Page

Uwe

284 Posts

Posted - Apr 19 2013 :  08:15:13  Show Profile  Reply
Ruediger,

quote:
My understanding is that I have to find out the settings, dcraw parameters, ... for a specific camara raw type to open the image with the best possible quality.

DCRAW simply decodes the raw sensor data from the camera RAW file and converts it into a viewable image. How the sensor data is decoded varies not only from file type to file type, but also from camera model to camera model. This is mostly hardcoded and cannot be changed unless you want to tinker with the DCRAW source itself. The end user has only a limited number of commands at his/her disposal to influence the final outcome of the development process, but these parameters are NOT file format specific. They change from image to image, no matter what the file type is. Play with the brightness value for example or with highlight recovery, and you will see what I mean.

The best you can do is to develop a rough image with DCRAW (using an image specific set of parameters, if you want), load it into an ImageEnView and apply the finishing touches there.

Hope this makes it a bit clearer.

-Uwe
Go to Top of Page

Ruekaka

Germany
25 Posts

Posted - Apr 22 2013 :  03:31:18  Show Profile  Reply
Thanks for your explanation.
I will check some more raw formats, but I still expect that it must be possible to find some base settings for a specific camera type (not file type!).

To be clear: I did not expect that all corrections has been done automatically, but the opened image should looks a bit like the preview image. After creating the image the user can use whatever to adjust the image to his needs.

Have to see what can be done.

With kind regards,
Ruediger Kabbasch
Go to Top of Page

Uwe

284 Posts

Posted - Apr 22 2013 :  08:42:23  Show Profile  Reply
Ruediger,
quote:
but I still expect that it must be possible to find some base settings for a specific camera type

How would that be possible? Imagine an underexposed, a correctly exposed and an overexposed photo coming from the same camera. You will not find a common setting, because each picture needs different development parameters. Brightness, noise reduction, highlight recovery - all different.

The preview image was already processed in the camera based on certain hardware settings and MakerNotes, and its quality is often questionable. So why would you want to give away the huge advantage of a camera RAW file to do the processing yourself AFTER it has been loaded?

-Uwe
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: