Mars Anomalies
 Main FeaturesWork in ProgressImage Processing and Miscellaneous ArticlesYouTube VideosResearch Mars at NASA and ESA websitesMars Anomaly WebsitesMars Anomaly Message Boards
This page describes how to take a poor quality color source and overlay it on a detailed grayscale image to derive a detailed color image.


You can find some examples of color micros here:

Eric's site:

and here on youtube, coutesy of LunarExplorerItalia:

I was wondering how to do color micros, so I did a search, and found the basic instructions at MarsRoverBlog from Hortonheardahoo, an expert image processor. These are his instructions:

"Here's the alchemy:

In ImageJ:

1) convert the RGB image to a stack;
2) turbo regiser the stack with the target MI ( manual affine transform); [co-register]
3) convert the type of registered RGB image to a HSB stack;
4) replace the B slice with the MI image;
5) convert back to RGB image.


This is a link to Horton's thread:

After several hours of wrestling with those instructions, I finally got a decent image.

Horton gives the basic instructions, but if you are unfamiliar with ImageJ, you may have some trouble without a little more detail in the directions, so here you go:

To do this, you'll need a free graphics program called "ImageJ."

You'll also need "turboreg." Turboreg is a plug-in for use in the imagej program which is used to finely align two different images; match them to one another so that they can be seamlessly combined.

To add the turboreg plug-in, unzip the turboreg download, then copy the unzipped folder called turboreg and all of its contents to c:\programfiles\imagej\plugins\

Imagej should now automatically recognize turboreg as a plugin, and it will now be available to you in the ImageJ program.

Before you begin, you'll need to select your grayscale micro image that you'd like to create in color. Unfortunately, you can't just choose any image. Your selection needs to be an image that has also been photographed from a distance in color. You will use the more distant color photograph to add the color to the micro close-up image. You'll have to choose one in which you have a close-up detailed image as well as a more distant color image of the same location. The rovers often take more distant pancam images of the spots where they do their micro work, so you will have a number of possibilities to choose from.

Find your color source image, and process it in the usual methods to create a color (usually pancam) image of the same scene containing a more distant picture of the micro target. (i.e. combine L4L5L6 as RGB in your own graphics program).

Create your micro image. You can just use a portion of the micro image as provided, or stitch a bunch of micros together using your favorite graphics program. Autostitch is recommended for the task.

Cut the color pancam image so that it encompasses only your targeted micro-image area.

Resample your color source to an image which is roughly the same size as your target image (i.e. enlarge 1000%, if necessary), and rotate it (i.e. 180 degrees), matching it as closely as possible to the same exact pixel size and orientation as your target micro area.

Okay, now you have a roughly correct match of color to add to your detailed image. But you will want a finely correct match.

Now go to ImageJ:

Open your pancam color image. This will be your color source. After opening it convert it to an RGB stack. These are the commands: Image>Type>RGB STACK. Done.

Next, open your micro image and convert it to rgb. These are the commands: Image>Type>RGB Color; You're not finished. You now have to convert this RGB image into an RGB stack. Use these commands: Image>Type>RGB stack. Done.

Now, with both of those images open, and both converted to RGB stacks, we are ready to use our turboreg plug-in.

Use these commands: Plug-Ins>TurboReg>TurboReg.

In a moment, another small window, the turboreg window, will open. You will enter your information into this window. First, make sure to set "source" as your color RGB stack. This is the color source, the one you have enlarged and oriented to match your target as closely as possible. Once you have set your source, assuming you have no other images open, the target image will automatically change to your target microscopic image to which you want to add the color from the first image.

Next, you need to select either "affine" or "bilinear." I typically choose bilinear since it will give you four points with which to align your image. Affine only gives you three alignment points, but it also works well.

Also, in this little turboreg window, select "--accurate-."

Now you are ready to set your alignment points. Click on your image windows to bring up your source and target images, and adjust them on your screen so that they are side by side.

Look VERY closely at these images. They now have 3 or 4 tiny colored dots on the screen. It will be up to you to click and drag these tiny little color dots with your mouse pointer into identical positions on both your color source image and your target image. These will yield the points that turboreg uses to align the two images, so choose points that are distant from each other at the outsides of the image. This will yield an alignment for the largest possible color image using this source and target pair.

Now, go back to the turboreg window. Click on the button that says "manual."

In a moment, turboreg will produce a new image for you based on your manual alignments of the dots.

Now save the resulting image to disk. The resulting image (if you have done a good job) is a color image which has been finely coregistered and matched to your target image. This is the image that you will use to use as your new color source to add to your target image - already well aligned and matched.

Go back to your own graphics program with which you are comfortable (or stay in ImageJ if you are familiar with its commands).

Open your target image, and your new Registered color source image.

Convert the Registered color image to an HSB stack.

Now go back to your target image and copy it.

Return to the "B" frame of your HSB stack and paste, center, and combine your target (your grayscale microscopic image) image into the "B" frame of the HSB group.

Now, you will want to recombine your HSB channels into a single image. (i.e. Commands may be Image>Combinechannels>HSB).

Now, save your new resulting color image.



What is interesting, is that we can apply these same concepts to other detailed images. For instance, we can take color information from wide angle MOCs, Color context Viking images, or ESA images from HRSC, and add the color source to more detailed images. Similarly, we can take pancam color shots which encompass navcam images - such as images of dust devils, and add the color to dust devil images to create color movies of the dust devils.

Here is an attempt I made using this process on the famous Crown Face image:


Here is a youtube video I made, taking advantage of this process (on repeated frames) of a dust devil video:

I hope this saves some of you some time if you decide to give this a try.
Raw Images Courtesy of NASA and ESA.  Special thanks to EVERYONE who has contributed in the search for Mars anomalies.  Also thanks to Google, Picasa, ImageShack, and Photobucket. 
hit counter

Main FeaturesWork in ProgressImage Processing and Miscellaneous ArticlesYouTube VideosResearch Mars at NASA and ESA websitesMars Anomaly WebsitesMars Anomaly Message Boards