The programs decode Minolta's RAW format, perform Bayer pattern interpolation, and color space conversion.
The programs also perform tone control and sharpening in CIELab color space.
Utilities for displaying much of the additional data stored in the RAW file are also included.
The principal programs contained in the package are:
- mrwtoppm, a command line utility for converting raw image files into ppm files.
- a plugin for loading Minolta raw files into the Gimp.
The program is licensed under the Gnu Public License (GPL). Briefly: you can use and copy these programs freely as much as you want, but if you distribute a binary you also have to (be prepared to) include a copy of the source code, including any changes made to it.
Currently the programs work under several versions of Linux. I don't have access to other kinds of systems, but I'd like to make it platform independent. If you can get it working under a different platform, let me know so I can tell others. I'll try to incorporate any portability changes you send me.
As always, I'd like to continue improving the programs. If you've got any ideas for improving the program please let me know. For instance, do I need to implement better algorithms for interpolating the Bayer pattern CCD data? I'm quite happy with the current scheme (vector median color interpolation, vector median filtering, both in CIELab color space), perhaps followed by a bit of unsharp masking in the Gimp.
Downloads.
Installation notes mrwtoppm-0.1.1.tar.gz
mrwtoppm-0.1.0.tar.gz
mrwtoppm-0.0.a13.tgz
mrwtoppm-0.0.a12.tgz
Packages for Your Favorite Linux Distribution.
Several people have let me know that they're developing packages for the various Linux distributions:- Roger has contributed an RPM specfile and source RPM for Mandrake Linux available from here. The specfile should be easily adapted for other RPM-based distributions.
If you are also developing such a package and would like a link to it here, let me know.
Links.
- The Unofficial Moderated Minolta Digital Camera Forum
- Dalibor's DiMAGE Page
- DiMage Color Plugin for Gimp
- Ting Chen's Study of Spatial Color Interpolation Algorithms
- Little Color Management System
- Alain's DiMAGE 7 Tips
This document describes a Gimp plugin for loading Minolta RAW format (.MRW) files as produced by the DiMAGE 5, 7, 7i, 7Hi, and A1 cameras into the Gimp. This plugin is part of the mrwtoppm package.
This document describes version 0.0.a13 of the plugin.
Basic Operation.
When you open a Minolta raw (.mrw) file, a control window like the following will open:The image in the preview panel on the right is a reduced size rendition of the image being opened. By default, the preview image is generated by averaging blocks of pixels, then scaled to fit within the preview pane. In this case it's a DiMAGE 5 image generated by averaging 8x8 pixel blocks. Using the buttons below the preview pane, the preview image can be magnified or shrunk (within limits), rotated, and (if larger than the preview pane) panned. These operations are supported by scaling the preview image, since generating a new one for each such operation is too slow. Note that whenever the image processing parameters are changed, a new preview image is generated. The current state of new image generation can be monitored using the progress bar below the preview pane.
Using averaging produces obvious artifacts, the most obvious being loss of detail and altered sharpening effects. You can change the degree of averaging to use, if any, in the options panel (described below) and set the initial value in the plugin's initialization file.
You can select a subregion of the image by pressing the middle mouse button inside the preview pane and sweeping out the desired subregion. If the control key is pressed when the middle mouse button is pressed, the current selection will be adjusted by moving the corner closest to the mouse.
Pressing the right mouse button over the preview pane will display a popup menu. This menu includes four entries for zooming the image similar to those displayed below the preview pane. It also includes entries for cropping the image and setting the grey world region (described below under color control).
Selecting crop from the preview pane popup menu will restrict the generated image to the selected region. The previous crop region, if any, is saved so that you can undo a crop operation by selecting "pop crop" from preview image pane pop-up menu. In the following screenshot, a region around the barge is selected:
If the crop region is very small, as in the above figure, the reduction in detail caused by pixel averaging will be obvious. To eliminate this affect, the amount of averaging can be reduced. Since the generated image is small, interactive performance is still reasonable:
The crop operations also save and restore the current level of pixel averaging. Thus, you can crop to an interesting region of the image, reduce the amount of averaging to observe detail and fine tune filtering options, and quickly return to the full image view.
After obtaining the desired rendition of the image by adjusting the various parameters in the other controls, clicking on the OK button in the bottom right will cause the image to be loaded into the Gimp and this window to disappear. Note:If the image has been cropped, only the current crop region will be loaded.
The remaining controls are grouped into notebook pages to the left of the preview page. A new notebook page can be selected by clicking on the corresponding tab.
Color Control Page.
The Color Control page determines the white balance used to render the image. At the top of this page is a subnotebook containing pages for the available methods for selecting white balance.The Presets subpage lets you select the desired color balance from a menu of preset color balances or automatic white balance algorithms. You can also mix any two preset color balances by adjusting the slider.
Selecting Auto from a White Balance menu will use the estimated color balance stored by the camera in the RAW file. (So, if you manually select Daylight on the camera before taking the picture, you'll effectively get Daylight balance here too.)
The White Balance menu also includes three algorithms for computing a suitable white balance from the pixels in the currently selected greyworld region (or the entire image if no greyworld region has been selected).
The Manual subpage lets you select the desired color balance by manually adjusting the gain applied to each color channel.
When the Manual color balance subpage is selected, the values in the color gain spinbuttons are set to the appropriate values for the current White Balance.
You can manually adjust the individual color gains by
- Selecting the spin button text field and editing the value. Select outside the text field or type Enter to update the preview.
- Selecting the spin button text field and pressing up (+1) or down (-1) arrow or page up (+10) or page down (-10) to alter the value by the given amount.
- Clicking on one of the up or down scroll buttons with either the left (+/- 1) or middle mouse buttons (+/- 10).
One of the Color Balance menu entries is User Defined. The button below the color selection subpage will set this entry to the current white balance.
The three average level text fields below the button for setting the User Defined balance show the relative average level of each primary color in the picture, after color balancing. The values are normalized so that the brightest color channel has a value of 1. You cannot change these fields directly.
The final control in this section controls the color saturation. A value of zero leaves the colors unchanged. Positive values increase color saturation and negative values decrease it. A value of -5 eliminates all color, giving a grey-level output. The spin button controls can be used to change this control by either 0.1 (arrow keys, left button) or 1.0 (page up/down, middle button).
Exposure Control Page.
The controls in this page modify the image's Luminance levels after it has been converted into the internal CIELab color space.The value of the Darkness spinbutton control is subtracted from the Luminance of each pixel. Each pixel is then scaled so that the maximum pixel brightness does not change. Increasing this control darkens overexposed images.
The Contrast spinbutton control scales the range of Luminance values in the input. Positive values increase the range allowing underexposed images to be lightened without changing (by much) the darkest pixels.
The Shadows spinbutton control adjusts the brightness of midrange values in the input. Positive values lighten the midrange values.
The Tone Curve menu further scales the Luminance values by a non-linear function, usually in order to bring out shadow detail. The default tone curve (Minolta) scales the input in much the same way as the special tone curve found in Minolta's profile for raw images. Other available choices are several tone curves developed by Bryan Biggers, and None. At the moment there is no way to specify your own tone curve interactively.
The Luminance Range output shows the range of luminance values in the image after the above adjustments have been applied, but before any subsequent sharpening or other filters have been applied. The maximum possible range is 0 to 100. The histogram displays graphically the image's luminance values from 0 at the left to 100 on the right. The luminance values in this display have been calculated after the sharpening and other filters described below have been applied, and so will likely contain values outside the range shown in the panel above.
Sharpening Page.
This panel controls the sharpening and/or blurring of the image using unsharp masking.The Radius control determines the number of pixels on each side of the pixel used to compute the blurred pixel value.
The Blur control determines the relative weighting of the center pixels to the perimeter pixels. For exactly what it means I'll need to read the source again.
The Lightness control determines the amount of sharpening to apply to the Luminance of each pixel. Positive values sharpen the luminance, negative values blur it.
The Color control determines the amount of sharpening to each of the color channels. In the above example, the color channels are blurred by 0.5.
NOTE: These controls will be applied to the preview image, but if the final image is a different size, the effect can be quite different.
Filters Page.
If desired, additional filters can be applied.- a Median filter takes the median of each channel separately. If the Color Only control is selected, the luminance channel is not filtered.
- a Vector Median filter takes the vector median across all channels.
This panel controls the size and orientation of the loaded image, and for full-sized images, the method used to interpolate the Bayer pattern data.
For sizes other than full-sized, no interpolation is used. Fixed-size blocks of pixels (2x2, 4x4, 6x6, 8x8, or 10x10) from the input are averaged to get each output pixel. If the CCD size is not an even multiple of the block size, a small number of pixels around the edges of the image are discarded.
Information Page.
This panel displays various pieces of information about the image obtained from data stored in the raw file.Notes:
- For some cameras, the focus distance cannot be determined in autofocus mode.
- The precision displayed under the Zoom entry is ridiculous.
- Aperture and shutter speeds are determined by formula for some cameras and may display slightly different values from what you might expect (as in the above example).
Each time the plugin is used, it reads several parameter values from the mrwtoppm initialization files (the system default file and your personal file: $HOME/.mrwtoppm/mrwtoppm.rc).
These parameters cannot be controlled interactively, but can be changed (with an editor) during a single gimp session. Changed parameters will take effect the next time you open an image.
The following parameters are recognized by the gimp plugin:
- cprofile=filename Sets the name of the camera color space profile.
- oprofile=filename Sets the name of the output color space profile.
- previewSize=N Sets the scale of the preview image. N equals 2 (half-size), 4 (quarter size), or 8.
- hwidth=N Sets the width of the luminance histogram to N pixels.
- hheight=N Sets the height of the luminance histogram to N pixels.
For example, the following entries would force the use of Minolta's DiMAGE5 raw profile as the camera's color space, and Adobe RGB as the output color space for all programs in the package. The gimp-specific options specify a one-quarter sized preview, and a 256 pixel wide by 128 pixel high luminance histogram.
cprofile=MLTDim5r.iccSaved values.
oprofile=AdobeRGB1998.icc
[gimp]
previewSize=4
hwidth=256
hheight=128
When an image is successfully loaded, the control values are saved for use by a subsequent image load in the same Gimp session.
Therefore, you can load an initial preview of the image at a reduced size, say half size. If you open it again, the control values will initially be set to the same control values used to load it previously, allowing incremental adjustment.
There is only one set of saved values, so when loading a different image the initial values may be very inappropriate. For example, if you have to increase the Contrast setting to load an underexposed image, when you subsequently load a properly exposed image it will initially be too bright.
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:
0 comments:
Post a Comment