DNG to PNG conversion

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kvothe
Posts: 2
Joined: 2016-11-09T01:36:41-07:00
Authentication code: 1151

DNG to PNG conversion

Post by kvothe »

I have captured a burst of 5 dng images from a Nexus6P for scientific imaging. The pixel intensities from the image will be mapped to my measurement value. For further processing the 5 dng images are averaged to reduce the noise and converted to png. I am using convert dng:*.dng -average out.png to achieve this.

I would like to know if any processing is being done on the dng image, changing the pixel intensity values while conversion as it would affect my final calibration.

Version: ImageMagick 7.0.3-4, Windows 10
Thank you
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: DNG to PNG clarification

Post by snibgo »

The output from the conversion will be a three channels per pixel, encoded as non-linear sRGB. But your input DNG may be "raw": Bayer filter (hence one channel/pixel), linear RGB, requiring white balance, and so on.

So the answer to your question is: it depends on the DNG file you give it. A quick Google search suggests that Nexus 6 DNG files are indeed Bayer, linear, etc.
snibgo's IM pages: im.snibgo.com
kvothe
Posts: 2
Joined: 2016-11-09T01:36:41-07:00
Authentication code: 1151

Re: DNG to PNG clarification

Post by kvothe »

snibgo wrote:The output from the conversion will be a three channels per pixel, encoded as non-linear sRGB. But your input DNG may be "raw": Bayer filter (hence one channel/pixel), linear RGB, requiring white balance, and so on.

So the answer to your question is: it depends on the DNG file you give it. A quick Google search suggests that Nexus 6 DNG files are indeed Bayer, linear, etc.
On using identify command on the DNG file obtained from Nexus 6P, the colorspace is listed as sRGB. However when I checked the metadata in MATLAB it is specified as CFA (Color Filter Array).
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: DNG to PNG conversion

Post by snibgo »

"identify" tells you about the image after it has been converted.

CFA says nothing about colorspace: CFA could be sRGB or linear. But it is probably linear.

dcraw will give you some information, eg:

Code: Select all

dcraw -i yourfile.dng
snibgo's IM pages: im.snibgo.com
Post Reply