Problems opening .DNG images with ImageJ - RAW Shooting and Processing - CHDK Forum supplierdeeply

Problems opening .DNG images with ImageJ

  • 3 Replies
  • 7111 Views
Problems opening .DNG images with ImageJ
« on: 28 / July / 2015, 18:03:30 »
Advertisements
Hi!
I am having some problems with opening my RAW images with ImageJ (in .dng format). I am importing the photos through File->Import->Raw, but all the images are not looking right. I have messed around with every setting to try and figure out whats going, but I cant seem to make it come out right. The settings I am pretty sure are correct are the photos 4168x3060, and 12 bits (information I got using ExifTool). I have attatched a sample photo (shot looking at a light integrating sphere, but in jpeg because .DNG too large) as well as the metadata (there are a lot of photos but you can just use the one I am providing). Is anyone familiar with ImageJ enough and can help me get the right settings or figure out how to find them?

Also, I am using a Powershot D20. I also tried using the plugin DCRaw, which look more realistic, but comes out with miscolored pixels and 0 values even though I know they are not.

*

Offline reyalp

  • ******
  • 14120
Re: Problems opening .DNG images with ImageJ
« Reply #1 on: 28 / July / 2015, 22:06:49 »
Hi!
I am having some problems with opening my RAW images with ImageJ (in .dng format). I am importing the photos through File->Import->Raw, but all the images are not looking right. I have messed around with every setting to try and figure out whats going, but I cant seem to make it come out right. The settings I am pretty sure are correct are the photos 4168x3060, and 12 bits (information I got using ExifTool).
I don't know much about imagej, but I wouldn't expect this to produce sensible results for 12 bit bayer data. If it could work, you would need to know the offset of the actual data in the file.

Quote
I also tried using the plugin DCRaw, which look more realistic, but comes out with miscolored pixels and 0 values even though I know they are not.
Is it just a few pixels in an otherwise correct image, or is it completely wrong? dcraw code should be able to handle CHDK DNGs.

If you think there might be a problem with your DNGs, you can upload one to a file hosting site like dropbox, box.com, google drive etc.
Don't forget what the H stands for.

Re: Problems opening .DNG images with ImageJ
« Reply #2 on: 30 / July / 2015, 12:54:38 »
Thanks for the reply!
How would I find or figure out the offset of the actual data? Is there a way to take pictures possibly in a higher bit? Or is that a limitation of our camera?

Its just a few pixels in an otherwise correct image. Its just throwing off the results when measuring the section.
Do you suggest to upload the files to dropbox to see if they are openable after converting, or what is the purpose of uploading to one of those hosting sites?

Thanks!

*

Offline reyalp

  • ******
  • 14120
Re: Problems opening .DNG images with ImageJ
« Reply #3 on: 30 / July / 2015, 17:38:41 »
Thanks for the reply!
How would I find or figure out the offset of the actual data?
From the Strip Offsets tag in the DNG header. Or you can subtract the raw size (width * height * bpp /8) from the file size, since in CHDK the data is always at the end (note this is only valid for CHDK DNGs, not DNG in general.)

Alternately, if you just want raw data without any exif, you could use CHDK raw instead. This is just a framebuffer dump. However, it's in a packed little-endian format that very few programs are likely to understand (In DNG data is always big-endian for bit depths that aren't an integer number of bytes).

FWIW, I was able to open a CHDK DNG using the "file -> import -> image" option in the "fiji" imagej package http://fiji.sc/Fiji

It looks quite distorted, but I don't know how to use ImageJ.

Quote
Is there a way to take pictures possibly in a higher bit? Or is that a limitation of our camera?
It's defined by the hardware.

Quote
Its just a few pixels in an otherwise correct image. Its just throwing off the results when measuring the section.
This sounds like normal bad pixels. The camera sets the pixels it knows are bad to 0, and "fixes" them when creating the jpeg. When only one bayer elment is bad, these will show up as spots of color. If you use DNG 1.1 on the camera, they will be interpolated over. If you use DNG 1.3, your DNG processing software is supposed to take care of them, but most programs don't support this feature, so you see unfixed badpixels instead.

If you are doing some scientific work, you might want to just ignore these pixels values instead.

You will probably also see some hot pixels, especially if you are using long exposures.

Quote
Do you suggest to upload the files to dropbox to see if they are openable after converting, or what is the purpose of uploading to one of those hosting sites?
I was suggesting you could post a sample that we could look at, because if there's a bug in the CHDK port for your camera, it could output broken DNG files.
Don't forget what the H stands for.


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal