recreate.scm automates the process of combining three grayscale images into a single RGB composite.
you need two things:
installation is very simple.
for more info, read below...
|Begin with three grayscale images:|
|Now, open up the gimp, and navigate through the toolbox menus to find "Recreate Image from RGB".|
|Selecting this menu option brings up a dialog box, in which you
may enter the filenames of the component images.
These filenames are relative to the directory from which you started gimp; it may be necessary to give full paths. It's also a good idea to ensure the name is in double quotes, as shown.
Once the filenames are correct, click on "OK", and the Script-Fu will start working.
|The script creates a new image, and copies the source images
into the new image. When the script finishes, it will display
the new image to you.
The JPEG thumbnail image to the right shows just the original region of the source images. However, if you click on the image, you will see a large JPEG image --- a 640x480 image filled with colorful video garbage, with the 256x256 pattern in the middle. The large JPEG also has very poor image quality, thanks to the nature of the JPEG format...
Before you say, "Good grief, muppet, this script sucks!" let me explain: the TIFF version (linked at right and here) shows none of the JPEG's lossy image artifacts. Look at that image for quality.
As for the large border of video garbage --- this is one of those split-personality bug/feature things. The original intent of this script was to reconstruct video images, and video images are typically at 640x480 resolution. While it's no problem to resize the newly created image to match the size of the component images, it was beyond the scope of the problem when i wrote the script. This is slated as a future enhancement, but has a very low priority. (It is an interesting artifact, however, which illustrates the gimp's tile-based memory management system.)
The rasion d'etre of this script was to reconstruct the color image seen by a 3-ccd color camera from the images captured by the individual color channels. The frame-grabber software captures a grayscale image of the same target from each color channel, saving them as lines_red.tif, lines_green.tif, and lines_blue.tif, respectively. From these images it's rather difficult to find the yellow ink --- is it under the magenta, to the left of the magenta, or to the right? This is easy to determine from the composite image, in which you can see the yellow between the cyan and magenta.
|red channel||green channel||blue channel||composite|
13 May 1999 by Scott Arrington