bablokb
Posts: 25
Joined: Fri Nov 07, 2014 7:45 am

dcraw support for raw images

Wed Nov 26, 2014 8:31 am

Hi all,

there is some (limited) support for raw images within the current version of dcraw, so there is no need to convert the image to DNG anymore. To use it, you have to tweak the exif-information of the image first (dcraw expects the model-name to start with ov):

Code: Select all

exiftool -Model='ov' rpi_0000.jpg
dcraw -f -o 1 -v  -6 -T -q 3 rpi_0000.jpg
The last command converts the image to 16-bit TIF (omit -6 for 8-bit TIF). You might also add the -a option for automatic white balance.

Colors look very muted, since there is no color-matrix available yet. I have pointed the author of dcraw to http://bealecorner.org/best/RPi/, maybe he can extract the color-matrix from one of the test-chart images there.

Bernhard

User avatar
jbeale
Posts: 3491
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: dcraw support for raw images

Sat Nov 29, 2014 7:35 pm

I made a few mods to dcraw.c ( https://www.cybercom.net/~dcoffin/dcraw/dcraw.c Revision: 1.467 dated 2014/07/03 21:19:24 ) and it now works OK with both older (pre- 24_May_2014) and newer R-Pi RAW images without first needing to alter the exif model name. The color matrix may be improved later but this seems to work for now:

at line 7390:

Code: Select all

    { "OmniVision ov5647", 0, 0,	/* DJC */
	{ 12782,-4059,-379,-478,9066,1413,1340,1513,5176 } },
    { "OmniVision RP_OV5647", 0, 0,	/* DJC */
	{ 12782,-4059,-379,-478,9066,1413,1340,1513,5176 } },
at line 8163:

Code: Select all

  if (make[0] == 0) {
    parse_jpeg(0);
    if (!strncmp(model,"ov",2) && !fseek (ifp, -6404096, SEEK_END) &&
	fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
      strcpy (make, "OmniVision");
      data_offset = ftell(ifp) + 0x8000-32;
      width = raw_width;
      raw_width = 2611;
      load_raw = &CLASS nokia_load_raw;
      filters = 0x16161616;  // pre-24 May 2013 RPi firmware
    } else if (!strncmp(model,"RP",2) && !fseek (ifp, -6404096, SEEK_END) &&
	fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
      strcpy (make, "OmniVision");
      data_offset = ftell(ifp) + 0x8000-32;
      width = raw_width;
      raw_width = 2611;
      load_raw = &CLASS nokia_load_raw;
      filters = 0x49494949;  // post-24 May 2013 RPi firmware
    } else is_raw = 0;
  }

aphextwin
Posts: 10
Joined: Tue Dec 02, 2014 5:46 pm

Re: dcraw support for raw images

Fri Feb 13, 2015 10:31 am

Can you offer your compiled dcraw?
When I try to compile it on my rpi or ubuntu-machine I get this error (tail):

Code: Select all

/tmp/cc2bjWu2.o: In function `main':
dcraw.c:(.text.startup+0x0): multiple definition of `main'
/tmp/cc3Twzz8.o:dcraw.c:(.text.startup+0x0): first defined here
/tmp/cc2bjWu2.o:(.rodata+0xba0): multiple definition of `d65_white'
/tmp/cc3Twzz8.o:(.rodata+0xba0): first defined here
/tmp/cc2bjWu2.o:(.rodata+0xbb0): multiple definition of `xyz_rgb'
/tmp/cc3Twzz8.o:(.rodata+0xbb0): first defined here
/tmp/cc2bjWu2.o:(.data+0x30): multiple definition of `greybox'
/tmp/cc3Twzz8.o:(.data+0x30): first defined here
/tmp/cc2bjWu2.o:(.bss+0x4528c): multiple definition of `no_auto_bright'
/tmp/cc3Twzz8.o:(.bss+0x4528c): first defined here
/tmp/cc2bjWu2.o:(.bss+0x45284): multiple definition of `med_passes'
/tmp/cc3Twzz8.o:(.bss+0x45284): first defined here
/tmp/cc2bjWu2.o:(.bss+0x45290): multiple definition of `output_tiff'
/tmp/cc3Twzz8.o:(.bss+0x45290): first defined here
/tmp/cc2bjWu2.o:(.data+0x68): multiple definition of `output_bps'
/tmp/cc3Twzz8.o:(.data+0x68): first defined here
/tmp/cc2bjWu2.o:(.data+0x64): multiple definition of `output_color'
/tmp/cc3Twzz8.o:(.data+0x64): first defined here
/tmp/cc2bjWu2.o:(.data+0x60): multiple definition of `use_camera_matrix'
/tmp/cc3Twzz8.o:(.data+0x60): first defined here
/tmp/cc2bjWu2.o:(.bss+0x5244): multiple definition of `use_camera_wb'
/tmp/cc3Twzz8.o:(.bss+0x5244): first defined here
/tmp/cc2bjWu2.o:(.bss+0x5240): multiple definition of `use_auto_wb'
/tmp/cc3Twzz8.o:(.bss+0x5240): first defined here
/tmp/cc2bjWu2.o:(.bss+0x4018): multiple definition of `verbose'
/tmp/cc3Twzz8.o:(.bss+0x4018): first defined here
/tmp/cc2bjWu2.o:(.bss+0x5248): multiple definition of `highlight'
/tmp/cc3Twzz8.o:(.bss+0x5248): first defined here
/tmp/cc2bjWu2.o:(.bss+0x45288): multiple definition of `document_mode'
/tmp/cc3Twzz8.o:(.bss+0x45288): first defined here
/tmp/cc2bjWu2.o:(.bss+0x524c): multiple definition of `four_color_rgb'
/tmp/cc3Twzz8.o:(.bss+0x524c): first defined here
/tmp/cc2bjWu2.o:(.bss+0x4014): multiple definition of `half_size'
/tmp/cc3Twzz8.o:(.bss+0x4014): first defined here
/tmp/cc2bjWu2.o:(.bss+0x522c): multiple definition of `threshold'
/tmp/cc3Twzz8.o:(.bss+0x522c): first defined here
/tmp/cc2bjWu2.o:(.bss+0x5230): multiple definition of `user_mul'
/tmp/cc3Twzz8.o:(.bss+0x5230): first defined here
/tmp/cc2bjWu2.o:(.data+0x6c): multiple definition of `bright'
/tmp/cc3Twzz8.o:(.data+0x6c): first defined here
/tmp/cc2bjWu2.o:(.data+0x0): multiple definition of `gamm'
/tmp/cc3Twzz8.o:(.data+0x0): first defined here
/tmp/cc2bjWu2.o:(.data+0x40): multiple definition of `aber'
/tmp/cc3Twzz8.o:(.data+0x40): first defined here
/tmp/cc2bjWu2.o:(.bss+0x45294): multiple definition of `multi_out'
/tmp/cc3Twzz8.o:(.bss+0x45294): first defined here
/tmp/cc2bjWu2.o:(.bss+0x4010): multiple definition of `shot_select'
/tmp/cc3Twzz8.o:(.bss+0x4010): first defined here
collect2: ld returned 1 exit status

User avatar
jbeale
Posts: 3491
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: dcraw support for raw images

Fri Feb 13, 2015 7:55 pm

I see that the current version of dcraw.c from https://www.cybercom.net/~dcoffin/dcraw/dcraw.c

Code: Select all

Revision: 1.470  Date: 2015/02/13 03:48:53  DCRAW_VERSION "9.23"
accepts the newer (post-2013) R-Pi RAW format header (RP-OV instead of rp) but unfortunately does not correct for the reversed Bayer filter order. In dcraw.c at line 8375 you need to change filters = 0x16161616; to instead read filters = 0x4944949; when it's the newer post-2013 firmware version (RP-OV string).

Code: Select all

  if (make[0] == 0) {
    parse_jpeg(0);
    if (!(strncmp(model,"ov",2) && strncmp(model,"RP_OV",5)) &&
        !fseek (ifp, -6404096, SEEK_END) &&
        fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
      strcpy (make, "OmniVision");
      data_offset = ftell(ifp) + 0x8000-32;
      width = raw_width;
      raw_width = 2611;
      load_raw = &CLASS nokia_load_raw;
      filters = 0x16161616;
    } else is_raw = 0;
  }
Here's what I did. Download dcraw.c into an empty directory:

Code: Select all

mkdir test; cd test
wget https://www.cybercom.net/~dcoffin/dcraw/dcraw.c
Edit dcraw.c to replace filters = 0x16161616; at line 8375 with this:

Code: Select all

      if (!strncmp(model,"ov",2))
        filters = 0x16161616;  /* pre-24 May 2013 R-Pi firmware */
      else
        filters = 0x49494949;  /* post-24 May 2013 R-Pi firmware */
Compile and test. Note: compiling this takes just over 6 minutes on a RPi Model B.

Code: Select all

gcc -o dcraw -O4 dcraw.c -lm -DNODEPS
raspistill -r -o test.jpg
./dcraw -T test.jpg
convert test.tiff test-out.jpg
Last line above assumes you have installed ImageMagick (sudo apt-get install imagemagick).
Now compare the two .jpg files and see if you get what you expect.

User avatar
jbeale
Posts: 3491
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: dcraw support for raw images

Sat Feb 14, 2015 2:41 am

Drat! I thought I had this solved, and I wrote Dave Coffin with the patch for his dcraw.c code. He wrote back with this observation:

> This [ the bayer pattern change ] does not coincide with the name change; I have
> an image with the new name and the old filter pattern.
> Its firmware build date is Jan 6, 2014, so the change
> happened sometime between then and Oct 31, 2014.
> [...] To change the filter pattern as they did without
> changing the sensor hardware, you'd have to mirror-flip
> the image left to right. That clearly didn't happen,
> because both image types show text that is not mirrored.

Help! Can anyone tell me the actual firmware date / revision (or anything that can be read from the file) that the RAW output bayer sample ordering changed ? Could it have been something in the flurry of updates before the team left BCM employment? Maybe jamesh or 6by9 know?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: dcraw support for raw images

Sat Feb 14, 2015 7:45 am

Two commits look likely:
Date: Tue Apr 23 14:00:09 2013 +0000

Added missing code to flip and mirror camera output as requested.
Date: Wed May 22 15:29:39 2013 +0000

Fix up HFLIP to default correctly on OV5647/RaspberryPi.
Added missing flip code that deals with default in driver.
Nothing related to flips has changed since.
NB That adding -hf and/or -vf to the raspistill will alter the Bayer pattern. I suspect Dave's images were captured with extra flips set.

I can't make comments as to what is in the 32kB header before the raw data, so I couldn't possibly suggest you try doing a set of captures with each combination of flips but fixed exposure time & gains to compare the header blocks....

Also discussed on http://www.raspberrypi.org/forums/viewt ... 20#p646171 and on. Referenced is
https://github.com/raspberrypi/firmware ... cdc7ed8d21
24 May 2013 "firmware: Fix for unwanted hflip in camera output"
which would tally with the firmware source commit of May 22 2013.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aphextwin
Posts: 10
Joined: Tue Dec 02, 2014 5:46 pm

Re: dcraw support for raw images

Mon Feb 16, 2015 12:58 pm

John,

your code works just fine for me. Thanks a lot for this!

pootle
Posts: 336
Joined: Wed Sep 04, 2013 10:20 am
Location: Staffordshire
Contact: Website

Re: dcraw support for raw images

Sun Jul 17, 2016 11:17 am

jbeale wrote:I see that the current version of dcraw.c from https://www.cybercom.net/~dcoffin/dcraw/dcraw.c

Code: Select all

Revision: 1.470  Date: 2015/02/13 03:48:53  DCRAW_VERSION "9.23"
accepts the newer (post-2013) R-Pi RAW format header (RP-OV instead of rp) but unfortunately does not correct for the reversed Bayer filter order. In dcraw.c at line 8375 you need to change filters = 0x16161616; to instead read filters = 0x4944949; when it's the newer post-2013 firmware version (RP-OV string).
Here's what I did. Download dcraw.c into an empty directory:

Code: Select all

mkdir test; cd test
wget https://www.cybercom.net/~dcoffin/dcraw/dcraw.c
Edit dcraw.c to replace filters = 0x16161616; at line 8375 with this:

Code: Select all

      if (!strncmp(model,"ov",2))
        filters = 0x16161616;  /* pre-24 May 2013 R-Pi firmware */
      else
        filters = 0x49494949;  /* post-24 May 2013 R-Pi firmware */
Compile and test. Note: compiling this takes just over 6 minutes on a RPi Model B.

Code: Select all

gcc -o dcraw -O4 dcraw.c -lm -DNODEPS
raspistill -r -o test.jpg
./dcraw -T test.jpg
convert test.tiff test-out.jpg
Last line above assumes you have installed ImageMagick (sudo apt-get install imagemagick).
Now compare the two .jpg files and see if you get what you expect.
I've tried this, but dcraw just immediately complains 'cannot decode file'.

I also tried raspiraw from github, but the dng file it produces has very scrambled looking data (lots of coloured stripes), and neither dcraw nor lightroom make sens of it (they don't crash, but no meaningful picture emerges)

Here's a sample file http://imgur.com/PdfhBAA

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: dcraw support for raw images

Sun Jul 17, 2016 1:18 pm

pootle wrote:I've tried this, but dcraw just immediately complains 'cannot decode file'.

I also tried raspiraw from github, but the dng file it produces has very scrambled looking data (lots of coloured stripes), and neither dcraw nor lightroom make sens of it (they don't crash, but no meaningful picture emerges)

Here's a sample file http://imgur.com/PdfhBAA
Based on the fact that your image is 3280 × 2464 I'm guessing you're using the rev 2.1 sensor, which being 8MPix is different raw proportions to the 5MPix OV5647 V1.3 sensor.
There's an updated version in https://github.com/6by9/RPiTest/tree/ma ... aw/dcraw.c that supports the IMX219 V2.1 sensor, and automatically compensates for H&V flips. (Please ignore the binary in that directory as I didn't update it - jbeale made one somewhere after I first published the source file, but I can't see it quickly).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

pootle
Posts: 336
Joined: Wed Sep 04, 2013 10:20 am
Location: Staffordshire
Contact: Website

Re: dcraw support for raw images

Sun Jul 17, 2016 3:22 pm

6by9 wrote: Based on the fact that your image is 3280 × 2464 I'm guessing you're using the rev 2.1 sensor, which being 8MPix is different raw proportions to the 5MPix OV5647 V1.3 sensor.
quite so, I've downloaded this version
6by9 wrote: There's an updated version in https://github.com/6by9/RPiTest/tree/ma ... aw/dcraw.c that supports the IMX219 V2.1 sensor, and automatically compensates for H&V flips.
and compiled on my pi Zero.
It works quite happily with jpegs from raspistill. It doesn't like jpegs from RPi cam control, but I really intend to drive the camera from python, but will need quite a bit of parameter tweaking by the looks of it!

logician
Posts: 7
Joined: Thu Sep 01, 2016 4:49 am

Re: dcraw support for raw images

Sat Sep 03, 2016 5:35 am

Thanks for the great contributions here! I am having trouble getting dcraw to decode .raw files generated by raspiraw. It prints the following message:

Code: Select all

Cannot decode file raw0001.raw
It has no problem decoding the raw content in a .jpeg created by raspistill.

I compiled the dcraw from the code in the indicated github repository.

Any ideas?

-Juan

User avatar
jbeale
Posts: 3491
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: dcraw support for raw images

Sat Sep 03, 2016 3:36 pm

If you are talking about https://github.com/illes/raspiraw which source code is named raspi_dng.c, that program is intended to convert JPEG+RAW format files to a .DNG format that can be read by the Adobe DNG tool. The dcraw program also reads JPEG+RAW files and converts them to a standard image format, but as far as I know, dcraw does not read the output of raspi_dng.

logician
Posts: 7
Joined: Thu Sep 01, 2016 4:49 am

Re: dcraw support for raw images

Wed Sep 07, 2016 3:16 pm

Hey jbeale,

Thanks for the reply! Seems there are two raspiraw programs. The one I'm referring to is this one written by @6by9:

> https://github.com/6by9/userland/blob/r ... raspiraw.c
> viewtopic.php?f=43&t=109137&p=750285

It captures raw data off the camera and saves a sequence of images to disk as .raw files. As I understand it, the raw data is equivalent to the raw data saved by raspistill when using the "-raw" option. I saw in this thread that dcraw was modified to support those "raspistill -raw" images. But it doesn't appear to understand the .raw files which are presumably the same format raw data.

Thanks!
-Juan

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: dcraw support for raw images

Wed Sep 07, 2016 3:26 pm

logician wrote:Hey jbeale,

Thanks for the reply! Seems there are two raspiraw programs. The one I'm referring to is this one written by @6by9:

> https://github.com/6by9/userland/blob/r ... raspiraw.c
> viewtopic.php?f=43&t=109137&p=750285

It captures raw data off the camera and saves a sequence of images to disk as .raw files. As I understand it, the raw data is equivalent to the raw data saved by raspistill when using the "-raw" option. I saw in this thread that dcraw was modified to support those "raspistill -raw" images. But it doesn't appear to understand the .raw files which are presumably the same format raw data.
My raspiraw (yes, we do get name conflicts!) writes SOLELY the raw image data. There's no JPEG on the front, nor the header reporting image size, Bayer order, Bayer format, etc.
dcraw could be adapted to use that, but it'll then need to be told lots of information, and that's not something that it is likely to like. I seem to recall when I was testing, I hacked dcraw to assume that all files were raw10 - not something that could be considered at all generic.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

logician
Posts: 7
Joined: Thu Sep 01, 2016 4:49 am

Re: dcraw support for raw images

Wed Sep 07, 2016 5:37 pm

Ah, makes sense. Thanks for the quick reply! -Juan

Hodapp87
Posts: 11
Joined: Tue Jul 31, 2012 12:51 pm

Re: dcraw support for raw images

Mon Sep 26, 2016 3:20 pm

I picked up an Arducam module (M12 mount, still OV5647) from Amazon in the past month, and it looks like another update has occurred. Current dcraw won't handle images from this. It simply returns, "Cannot decode file". I notice that the Model tag now has "RP_ov5647" (note different capitalization), the header has "BRCMo" rather than "BRCMn", and the Bayer grid seems to have changed (filters = 0x49494949 rather than 0x16161616). I arrived at 0x49494949 by quick experimentation on a few images; it could potentially be wrong.

If anyone else wants to try, see this example image. Note that it's sideways due to the rig I used.

Below is my fairly rough patch from dcraw.c revision 1.477 (2016/05/10 21:30:43):

Code: Select all

--- dcraw.c.orig	2016-09-25 21:19:39.462711642 -0400
+++ dcraw.c	2016-09-25 21:28:33.560192579 -0400
@@ -8607,15 +8607,21 @@
   if (make[0] == 0) parse_smal (0, flen);
   if (make[0] == 0) {
     parse_jpeg(0);
-    if (!(strncmp(model,"ov",2) && strncmp(model,"RP_OV",5)) &&
+    if (!(strncmp(model,"ov",2) && strncmp(model,"RP_OV",5) &&
+          strncmp(model,"RP_ov",5)) &&
 	!fseek (ifp, -6404096, SEEK_END) &&
-	fread (head, 1, 32, ifp) && !strcmp(head,"BRCMn")) {
+	fread (head, 1, 32, ifp) &&
+        !(strcmp(head,"BRCMn") && strcmp(head,"BRCMo"))) {
       strcpy (make, "OmniVision");
       data_offset = ftell(ifp) + 0x8000-32;
       width = raw_width;
       raw_width = 2611;
       load_raw = &CLASS nokia_load_raw;
-      filters = 0x16161616;
+      if (!strcmp(head,"BRCMn")) {
+        filters = 0x16161616;
+      } else if (!strcmp(head,"BRCMo")) {
+        filters = 0x49494949;
+      }
     } else is_raw = 0;
   }
I haven't passed these changes along to Dave Coffin, but probably will soon.

The modified dcraw in https://github.com/6by9/RPiTest.git accepts this image, but produces garbage (see here for the 15 MB TIFF of it).

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: dcraw support for raw images

Mon Sep 26, 2016 6:43 pm

In theory the Arducam sensor is functionally identical to the official one, but any differences are not down to Pi Towers to sort as it is a 3rd party product.

I'm not certain why the string case has changed - I'd have to trace back through the history. It wasn't a conscious change.
I ought to contact Dave Coffin myself to get my updates merged upstream. Life is too easy with github pull requests. As he seems to have some magic scripts for colour conversion matrices, I may try to get the appropriate captures done for the Sony sensor to get it calibrated.

I will have a look at your images when I get a chance.
The bayer order is now read out of the header so is correct no matter what flips are applied in the sensor. Flips are the most likely cause of you changed filter order.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Hodapp87
Posts: 11
Joined: Tue Jul 31, 2012 12:51 pm

Re: dcraw support for raw images

Mon Sep 26, 2016 9:22 pm

6by9 wrote:The bayer order is now read out of the header so is correct no matter what flips are applied in the sensor. Flips are the most likely cause of you changed filter order.
Wow, I must have been testing too late last night.

I swore that I couldn't get your code to work when I tried to patch it for the new image - but just now, I looked to see what you meant about detecting the order in the header, added a trivial change, and it works fine. I did a pull request.

loverui1221
Posts: 1
Joined: Thu Mar 09, 2017 1:29 pm

Re: dcraw support for raw images

Thu Mar 09, 2017 1:51 pm

6by9 wrote:
logician wrote:Hey jbeale,

Thanks for the reply! Seems there are two raspiraw programs. The one I'm referring to is this one written by @6by9:

> https://github.com/6by9/userland/blob/r ... raspiraw.c
> viewtopic.php?f=43&t=109137&p=750285

It captures raw data off the camera and saves a sequence of images to disk as .raw files. As I understand it, the raw data is equivalent to the raw data saved by raspistill when using the "-raw" option. I saw in this thread that dcraw was modified to support those "raspistill -raw" images. But it doesn't appear to understand the .raw files which are presumably the same format raw data.
My raspiraw (yes, we do get name conflicts!) writes SOLELY the raw image data. There's no JPEG on the front, nor the header reporting image size, Bayer order, Bayer format, etc.
dcraw could be adapted to use that, but it'll then need to be told lots of information, and that's not something that it is likely to like. I seem to recall when I was testing, I hacked dcraw to assume that all files were raw10 - not something that could be considered at all generic.
Hey 6by9
Thanks for your work in dcraw. I'v downloaded the daraw.c from github.My mechine is raspberry 3B,camera is NOIR V2(IMX219PQ).However,after my code" gcc dcraw.c -o dcraw",i saw lots of errors in the screen, just like " dcraw.c:39225:72: error: stray ‘#’ in program <td d="LC9603" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">ifndef</span> NO_LCMS</td> ''.Maybe its my mothod of fault. My aim is obtaining the raw captures of the camera which are visible before AWB ,etc.Hope for your help sincerely. If possible,could you send your suggentions to my email --469289264@qq.com .

ethanol100
Posts: 585
Joined: Wed Oct 02, 2013 12:28 pm

Re: dcraw support for raw images

Thu Mar 09, 2017 3:46 pm

I think something went wrong with your download. I guess you have downloaded the website instead of the program. Just look in the dcraw.c file, if it does not start with

Code: Select all

/*
   dcraw.c -- Dave Coffin's raw photo decoder
...
you can try to download it again(including download some dependencies):

Code: Select all

sudo apt-get install liblcms2-dev libjpeg-dev libjasper-dev
wget https://raw.githubusercontent.com/6by9/RPiTest/master/dcraw/dcraw.c -O dcraw.c
wget https://raw.githubusercontent.com/6by9/RPiTest/master/dcraw/buildme -O buildme
chmod +x buildme
./buildme
./dcraw

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: dcraw support for raw images

Thu Mar 09, 2017 4:32 pm

ethanol100 wrote:I think something went wrong with your download. I guess you have downloaded the website instead of the program.
Almost certainly that is what has happened - there's HTML in that error message.
Thanks ethanol100 for getting in before I did (for some reason the forum hadn't shown me the new post).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”