CRW(1)

NAME
crw - Process RAW Canon PowerShot photos

SYNOPSIS
crw [-c] [-s num] [-g num] [-b num] [-r num] [-l num] [-B num] [-L num] [-bw] [-inside] [-2] [-3] [-4] files

DESCRIPTION
The crw utility processes RAW output files (.crw) from Canon Powershot digital cameras, typically converting them into .ppm files. By default, crw uses a gamma of 0.8 (the lower the brighter) and a low-light compensation value of 16 (higher values == more compensation, 0 disables). Different CCDs also have different scaling factors for their filter components. This program will automatically scale filter components for the CCD (though our values may not be entirely correct. The red scaling for the CanonG2 was wrong in the original program, before I fixed it). The program renormalizes the data to a scaling of 1.0/1.0/1.0 before applying adjustments specified on the command line.

The resolution of the output file will typically be somewhat smaller then the resolution of the raw .crw file due to edge effects during processing. RAW files contain one color per pixel in a matrix which must be processed to synthesize the missing colors and generate photo output. You can see the raw CCD matrix (with thermal noise and filter compensation by default) by running the program with the option: -s -1.

The following options are available:

-c  Generate the converted image file on the standard output. If not specified the image file is generated using the input filename with an appropriately replaced extension.

-s num
    Specify the smoothness factor. Currently only -1 and 0 may be specified. -1 will cause crw to transfer the raw CCD pixels to the standard output in the requested image file format. The default is 0. You can produce a certain degree of smoothing by changing the low-light adjustment, which is the

-L  option.

-g num
    Set the gamma. The default is 0.8. A value of 1.0 will produce output with no gamma correction. Lower values will produce brighter output images. Gamma is a non-uniform exponential adjustment of the image brightness that tends to bring out darker areas of an image. This only works for .ppm image output.

-b num
    Set the brightness. Brightness is a more uniform, linear brightening of the image. The default is 1.0. A higher value will produce a brighter image. We recommend using the gamma adjustment whenever possible instead of the brightness adjustment.

-r num
    Set the red scaling. The default is 1.0. The red and blue scaling factors are typically used to compensate for artificial lighting.

-l num
    Set the blue scaling. The default is 1.0. The red and blue scaling factors are typically used to compensate for artificial lighting.

-B num
    This option may be used to set the thermal noise compensation. The only valid values are 0 or 1. The default is 1, enabling compensation. Setting this option to zero disables thermal noise compensation. Thermal noise produces a baseline value for the CCD pixels. The actual CCD data contains a 'black border' area on all four sides which the processing program uses to determine the baseline. The baseline is then subtracted from the data. It is not typically useful to disable noise compensation.

-L num
    Set the lowlight compensation factor. The default is 16. A value of 0 will disable lowlight compensation. Lowlight compensation changes the bleedover in the weighted compensation algorithm used to generate the missing colors in the output photo. The higher the value, the more of an 'averaging' effect we get (the weighting becomes less important). The result is a softening of the edge enhancement processing and more blending of adjacent pixels, reducing the apparent noise in the output image when you view it. Lowlight compensation does not seem to adversely effect normal photos so the default is set fairly high.

-bw Black-and-white output. This only works for .ppm image output. The magnitude is calculated and stored into all three color guns to produce a black and white picture.

-inside

-indoor
    Set the red scale to 0.7 to compensate for indoor lighting (same as using -r 0.7). If not specified we assume outdoor lighting (par 1.0 for red and blue scale options).

-2  Generate a 24-bit PPM file (default)

-3  Generate a 48-bit PSD (Adobe Photoshop) file

-4  Generate a 48-bit PNG

files
    Specify one or more files to process. Unless -c is specified crw will generate an output file named after the input file with an appropriate extension change.

SEE ALSO
/usr/ports/graphics/s10sh

HISTORY
The crw utility was created by Dave Coffin in 1997. Matt Dillon reworked the main interpolation algorithm extensively in this port and is currently maintaining it for FreeBSD.