Ad
Ad
Ad
Pages: [1]   Bottom of Page
Print
Author Topic: DNGvalidate?  (Read 12771 times)
ostonica
Newbie
*
Offline Offline

Posts: 18


« on: April 23, 2008, 06:39:30 PM »
ReplyReply

I posted this question earlier in, I now see, the wrong area. My apologies.

Jeff, in the ACR Video, you referred to a DNGvalidate program that allowed you to show a pre-demosaiced image of a RAW file. Is this program publicly available and, if so,  how did you actually use it to get that image?

Thanks

Jim Swift
Logged
madmanchan
Sr. Member
****
Offline Offline

Posts: 2101


« Reply #1 on: April 23, 2008, 07:06:33 PM »
ReplyReply

Quote
I posted this question earlier in, I now see, the wrong area. My apologies.

Jeff, in the ACR Video, you referred to a DNGvalidate program that allowed you to show a pre-demosaiced image of a RAW file. Is this program publicly available and, if so,  how did you actually use it to get that image?

Thanks

Jim Swift
[{POST_SNAPBACK}][/a]


It is part of the DNG SDK, which can be downloaded for free from the Adobe site.

[a href=\"http://www.adobe.com/support/downloads/dng/dng_sdk.html]http://www.adobe.com/support/downloads/dng/dng_sdk.html[/url]

You can also pull raw image data (without demosaicing and linearization, etc.) using other free tools such as dcraw.
Logged

ostonica
Newbie
*
Offline Offline

Posts: 18


« Reply #2 on: April 24, 2008, 08:28:49 AM »
ReplyReply

Quote
It is part of the DNG SDK, which can be downloaded for free from the Adobe site.

http://www.adobe.com/support/downloads/dng/dng_sdk.html

You can also pull raw image data (without demosaicing and linearization, etc.) using other free tools such as dcraw.
[a href=\"index.php?act=findpost&pid=191514\"][{POST_SNAPBACK}][/a]

Thanks, Eric, now to figure out how to get that tiff that Jeff showed in the video. dcraw looks very interesting.

Jim
Logged
madmanchan
Sr. Member
****
Offline Offline

Posts: 2101


« Reply #3 on: April 24, 2008, 12:24:40 PM »
ReplyReply

dcraw and dng_validate aer both command-line tools. Not sure if you're familiar with using these.

For dcraw you can use the -D option to dump the raw data without demosaicing.

For dng_validate you can use the -1 option to do the same thing.
Logged

Panopeeper
Sr. Member
****
Offline Offline

Posts: 1805


« Reply #4 on: April 24, 2008, 12:50:26 PM »
ReplyReply

If you are working with Windows and want to *analyse* raw images on display (i.e. without creating a TIFF or JPEG from them), take a look at Raw analysis
Logged

Gabor
ostonica
Newbie
*
Offline Offline

Posts: 18


« Reply #5 on: April 25, 2008, 12:03:33 AM »
ReplyReply

Quote
dcraw and dng_validate aer both command-line tools. Not sure if you're familiar with using these.

For dcraw you can use the -D option to dump the raw data without demosaicing.

For dng_validate you can use the -1 option to do the same thing.
[a href=\"index.php?act=findpost&pid=191639\"][{POST_SNAPBACK}][/a]

Thanks for that information, Eric.

-2 with dng_validate gave me what I wanted along with the -D option.

But I also would like to see the colours of the Bayer Mosaic in the output file. It's for a talk I am giving in a few weeks.

I understand that dcraw can be patched to do this, but I have not been able to apply that patch correctly yet.  My progamming skills are very rusty, dormant for many years.

Thanks again for the help

Jim
Logged
bjanes
Sr. Member
****
Offline Offline

Posts: 2756



« Reply #6 on: April 25, 2008, 05:58:06 AM »
ReplyReply

Quote
Thanks for that information, Eric.

-2 with dng_validate gave me what I wanted along with the -D option.

But I also would like to see the colours of the Bayer Mosaic in the output file. It's for a talk I am giving in a few weeks.

I understand that dcraw can be patched to do this, but I have not been able to apply that patch correctly yet.  My progamming skills are very rusty, dormant for many years.

Thanks again for the help

Jim
[a href=\"index.php?act=findpost&pid=191777\"][{POST_SNAPBACK}][/a]

If you want to see the Bayer colors in color rather than in black and white as with dng_validate, I would recommend Rawanalyze as suggested by Panopeeper in a previous post. Below are a couple of screen shots with the program.

[attachment=6255:attachment]

[attachment=6256:attachment]
Logged
ostonica
Newbie
*
Offline Offline

Posts: 18


« Reply #7 on: April 25, 2008, 08:42:41 AM »
ReplyReply

Quote
If you want to see the Bayer colors in color rather than in black and white as with dng_validate, I would recommend Rawanalyze as suggested by Panopeeper in a previous post. Below are a couple of screen shots with the program.
[a href=\"index.php?act=findpost&pid=191816\"][{POST_SNAPBACK}][/a]
Thanks, yes, I took a look at that program and can use that as a fallback position. But, ideally, I would like to replicate what Jeff Schewe showed in the video, synching the bayer mosaic image with the processed image, both as tif files. I could not save the Rawanalyze image as a tif, and could not cut the entire image from RawAnalyze since the zoom out (-) key has a limited range.

Many thanks for the suggestion.

Jim
Logged
capital
Full Member
***
Offline Offline

Posts: 109


« Reply #8 on: April 27, 2008, 02:08:00 AM »
ReplyReply

Quote
I posted this question earlier in, I now see, the wrong area. My apologies.

Jeff, in the ACR Video, you referred to a DNGvalidate program that allowed you to show a pre-demosaiced image of a RAW file. Is this program publicly available and, if so,  how did you actually use it to get that image?

Thanks

Jim Swift
[a href=\"index.php?act=findpost&pid=191509\"][{POST_SNAPBACK}][/a]



I too am in interested in extracting the color mosaic file, and SDK and dcraw appear to only allow grayscale versions of the mosaic to be extracted. So if the procedure could be made known, I too would be much appreciative.
Logged
ostonica
Newbie
*
Offline Offline

Posts: 18


« Reply #9 on: April 27, 2008, 03:37:52 PM »
ReplyReply

Quote
I too am in interested in extracting the color mosaic file, and SDK and dcraw appear to only allow grayscale versions of the mosaic to be extracted. So if the procedure could be made known, I too would be much appreciative.
[a href=\"index.php?act=findpost&pid=192084\"][{POST_SNAPBACK}][/a]

Dave Coffin, the author of dcraw, generously sent me a patch to apply to the dcraw code. After amending the source code and recompiling with gcc, I now have a version of dcraw (renamed dcraw-bayer) that just generates a coloured version of the mosaic.

Here is the message that Dave sent me, posted here with his permission.

Apply this patch and use the "-W" flag:

--- dcraw.c   2008/04/20 08:09:37   1.402
+++ dcraw.c   2008/04/24 18:51:16
@@ -8403,6 +8403,7 @@
     if (is_foveon && !document_mode) foveon_interpolate();
     if (!is_foveon && document_mode < 2) scale_colors();
     pre_interpolate();
+    goto thumbnail;
     if (filters && !document_mode) {
       if (quality == 0)
    lin_interpolate();

Jim Swift
Logged
capital
Full Member
***
Offline Offline

Posts: 109


« Reply #10 on: April 27, 2008, 04:24:22 PM »
ReplyReply

Quote
Dave Coffin, the author of dcraw, generously sent me a patch to apply to the dcraw code. After amending the source code and recompiling with gcc, I now have a version of dcraw (renamed dcraw-bayer) that just generates a coloured version of the mosaic.

Here is the message that Dave sent me, posted here with his permission.

Apply this patch and use the "-W" flag:

--- dcraw.c   2008/04/20 08:09:37   1.402
+++ dcraw.c   2008/04/24 18:51:16
@@ -8403,6 +8403,7 @@
     if (is_foveon && !document_mode) foveon_interpolate();
     if (!is_foveon && document_mode < 2) scale_colors();
     pre_interpolate();
+    goto thumbnail;
     if (filters && !document_mode) {
       if (quality == 0)
  lin_interpolate();

Jim Swift
[a href=\"index.php?act=findpost&pid=192159\"][{POST_SNAPBACK}][/a]

Jim thank you for the follow up.

I am not familiar with C coding, so when I looked at the source for dcraw I don't see a place to insert the above code as well as which of the lines I include.

Incidentally, it appears the above code is missing a closing brace.

Did you compile this on a windows machine? (I don't have linux installed)

Thank you again!
Logged
ostonica
Newbie
*
Offline Offline

Posts: 18


« Reply #11 on: April 27, 2008, 07:21:39 PM »
ReplyReply

Quote
Jim thank you for the follow up.

I am not familiar with C coding, so when I looked at the source for dcraw I don't see a place to insert the above code as well as which of the lines I include.

Incidentally, it appears the above code is missing a closing brace.

Did you compile this on a windows machine? (I don't have linux installed)

Thank you again!
[{POST_SNAPBACK}][/a]
No there is no { missing. That code is a patch. So the other } is later in dcraw.c The line to be inserted is the single line with the + sign.  All the other lines are lines from the existing dcraw.c , so I just did a search for  
pre_interpolate();
and inserted

goto thumbnail;

after that line.

Dave provided this reference for a compiler, run in a CMD windows on XP
  "You need to download the appropriate ZIP files from
[a href=\"http://www.delorie.com/djgpp/]http://www.delorie.com/djgpp/[/url] , unpack them all into C:\DJGPP,
and do:

   gcc -o dcraw.exe -O4 dcraw.c -lm -DNO_JPEG -DNO_LCMS  "
Be sure to use the Zip Picker.
Logged
capital
Full Member
***
Offline Offline

Posts: 109


« Reply #12 on: April 28, 2008, 12:28:14 AM »
ReplyReply

Quote
No there is no { missing. That code is a patch. So the other } is later in dcraw.c The line to be inserted is the single line with the + sign.  All the other lines are lines from the existing dcraw.c , so I just did a search for 
pre_interpolate();
and inserted

goto thumbnail;

after that line.

Dave provided this reference for a compiler, run in a CMD windows on XP
  "You need to download the appropriate ZIP files from
http://www.delorie.com/djgpp/ , unpack them all into C:\DJGPP,
and do:

   gcc -o dcraw.exe -O4 dcraw.c -lm -DNO_JPEG -DNO_LCMS  "
Be sure to use the Zip Picker.
[a href=\"index.php?act=findpost&pid=192205\"][{POST_SNAPBACK}][/a]

Alright, I've  used the zip picker and got all the files into the directories but I am encountering the following problem when I go to compile the program:

Did you ever get this message:

dcraw.c: In function 'main':
dcraw.c:8443: warning: incompatible implicit declaration of built-in function 's nprintf'
dcraw.c: In function 'convert_to_rgb':
dcraw.c:7775: warning: passing arguement 1 of 'pseudoinverse' from incompatible pointer type
c:/djgpp/tmp/cc126fMh.o:dcraw.c:(.text+0x370aa): undefined reference to '_snprintf'
collect2: ld returned 1 exit status



Then when I check the directory there is no outputted executable.

I've tried this on the untouched dcraw.c file and the patched and both give similar error messages.
« Last Edit: April 28, 2008, 12:29:04 AM by capital » Logged
ostonica
Newbie
*
Offline Offline

Posts: 18


« Reply #13 on: April 28, 2008, 08:42:05 AM »
ReplyReply

Quote
Alright, I've  used the zip picker and got all the files into the directories but I am encountering the following problem when I go to compile the program:

Did you ever get this message:

dcraw.c: In function 'main':
dcraw.c:8443: warning: incompatible implicit declaration of built-in function 's nprintf'
dcraw.c: In function 'convert_to_rgb':
dcraw.c:7775: warning: passing arguement 1 of 'pseudoinverse' from incompatible pointer type
c:/djgpp/tmp/cc126fMh.o:dcraw.c:(.text+0x370aa): undefined reference to '_snprintf'
collect2: ld returned 1 exit status
Then when I check the directory there is no outputted executable.

I've tried this on the untouched dcraw.c file and the patched and both give similar error messages.
[a href=\"index.php?act=findpost&pid=192238\"][{POST_SNAPBACK}][/a]
Yes, I did get that at first and had forgotten about that. I commented out the lines that involved snprintf. The lines were
   /*  if (multi_out)
   sprintf (ofname+strlen(ofname), "_%0*d",
      snprintf(0,0,"%d",is_raw-1), shot_select); */

I still got the convert to rgb warning but dcraw.exe was compiled.

I left a message for you off-forum

Jim
Logged
Pages: [1]   Top of Page
Print
Jump to:  

Ad
Ad
Ad