raw subtract - General Discussion and Assistance - CHDK Forum

raw subtract

  • 3 Replies
  • 6296 Views
*

Offline reyalp

  • ******
  • 13399
raw subtract
« on: 08 / August / 2008, 05:15:41 »
Advertisements
Here's a patch against jucifox branch rev 473 that implements raw subtract.

This allows you to subtract one raw image from one or more other raw images on the camera. This could be useful for dark frames, but see below.

Configuration:
Four options are added to the raw settings page:
Raw subtract prefix and Raw subtract extension control the name of the output file. It should not be the same as the name of the files you will be subtracting.

Subtract input dark value sets what value in the file being subtracted is considered zero. This should be around lowest value that occurs in your dark frames. On my camera, this appears to be in the range of 20-30, but lower values appear to give better looking results, at the expense of darkening the entire image very slightly.
Subtract output dark value sets the minimum value that will produced by subtracting. What this should be depends on what you intend to do with the file. If you are going to convert it using dcraw or similar, 0 will probably give the best results, but be warned that dcraw may do strange things to a file that has large areas of zeros.

User interface:
Using the file browser, mark one or more files with the "right" key, and then navigate to the file you wish to subtract from them. Click the "left" key and select "sub from marked" in the popup. Currently, all files must be in the same directory.

Each pixel in the selected file will be subtracted from the corresponding pixel in each of the marked files. The results will be written to PFX_NNNN.EXT, where PFX and EXT are whatever you selected in the raw options menu, and NNNN is the number of the input file. This is fairly slow, since it has to read two raw files and write one, and it does it a row at a time to keep memory use sane.

Is this actually useful ? I'm not so sure.

I haven't included my darkframe control code mentioned earlier, because its ugly, requires quite a bit of hacking for each camera, and is not nearly as useful as directly controlling the shutter.
Don't forget what the H stands for.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: raw subtract
« Reply #1 on: 08 / August / 2008, 08:43:38 »
i think either me or jucifer will submit this to the svn. nice.

by the way if people are wondering why dont update the trunk that often anymore is because we are merging with the trunk sooner or later anyway, besides most features in "juciphox" are to be considered beta.

btw reyalp, since you already modified the filebrowser (it was too complicated for me, that i can tell ya!) do you think it is possible to move "develop" raw from the Alt-menu (in raw submenu) to the filebrowser? it kinda sucks to average/sum/subtract raw files in the filebrowser and then as a next step to open alt-menu, raw, develop and then enter the filebrowser again. do you know what i mean? this would simplify it's use greatly. and along those lines: maybe three more filebrowser options: RAW sum & Develop, RAW average & Develop and Raw subtract & develop. this way, after averaging 10 raws, the resulting raw file will automatically put into the "raw develop queue", so all you have to do is set your cam to rec mode and shoot. this also saves alot of steps and simplifiys CHDKs use vastly. damn, lenghty feature request, i know, but i'm sure you can maybe handle the load :)

*

Offline reyalp

  • ******
  • 13399
Re: raw subtract
« Reply #2 on: 08 / August / 2008, 17:40:55 »
It wouldn't be hard to add raw develop to the popup, but it's starting to get pretty big. Adding an "and develop" option for each raw operation would definitely be too many (it wouldn't fit on the screen, and it would be cumbersome to use). You could perhaps make "raw develop" default to the last file that you created with one of the other raw ops.

Another way to deal with this would be to make a "raw processing" screen, kind of a dialog box where you set up the files and operations you want to do.
Don't forget what the H stands for.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: raw subtract
« Reply #3 on: 12 / August / 2008, 08:59:51 »
added in 0.3.0 of juciphox. did a few tests, this makes for some interesting effects :D

p.s.: still a "develop" menu entry in filebrowser would be grand :D


 

Related Topics