1: Importing and Calibrating images

First download the image files. These are the images used in this obsevation. Each image has a seperate image label file that will need to be downloaded with the image. The files are in the LBL and IMG links. These are the images used in this observation.

Import the images into Isis 3. Commands:
  1. Import the images
    • gllssi2isis from=5000R.LBL to=5000r.cub
  2. Use spiceinit to add camera pointing
    • spiceinit from=5000r.cub
  3. Calibrate the images using gllssical
    • gllssical from=5000r.cub to=5000r_cal.cub
  4. Some images are stored in segments in seperate files. If this is the case, use handmos to combine the segments into a full image. The image listed in from will be pasted on top of the mosaic image.
    • handmos from=5001r_cal.cub mosaic=5000c_cal.cub

Most of the images will have a few rows of bright and dark pixels at the edges. Open the image in qview, and remove these pixels with the image editing tool.

2: Registration

All of the latitude and longitude infomation will be misaligned with the images. The space craft gives it's best estimate, but all of the images are off and need to be adjusted by hand. Use qtie to tie one of the images to the basemap. This image will be the camera pointing reference for the other images:

The latitude and longitude before and after qtie:

Load the images into qnet and add match points between all images. Use jigsaw to update the camera pointing based on the match points. Make sure the image adjusted with deltack is in the held image list. All of the other images will be adjusted to the camera pointing of this image.

3: Creating image mosaics

Use the pad command to add enough padding to fit the other images into the frame. Use the cam2cam to align the other images to the padded image.

Combine the images of each color filter into mosaic using handmos.
9680 filter
7560 filter
green filter
violet filter

4: Replacing the missing upper left image

The upper left frame is missing in each filter. These images must be substituted using these images:

I've found that qnet and jigsaw has a lot of difficult tying this particular group of images together. Instead, use qtie to align these images to the basemap. Make sure that the camera pointing of the color global mosaics hasn't gone off from the basemap. Use cam2cam to reproject these images to match each mosaic, and combine them using handmos.

After the images are aligned using qnet and jigsaw, reproject the substituted image to match the global mosaic using cam2cam. Next, use either tonematch or histmatch on the reprojected image to match it to the brightness of the global image. To get the brightness a reasonably close match, the match image should only be the areas where the reprojected image overlaps with the global mosaic. Use the image editing tool in qview to create the match image by editing out most of the globe and saving the areas where these images overlap.

The lighting of the subtituted image will not completely match the lighting of the global image. A number of additional steps will need to be taken to match up the images better.

Take the reprojected upper left image and divide the image into segments using the photrim command. Trim along the incidence angle, and make sure that the image segments overlap. Use camstats on the unreprojected upper left image to get the range of incidence values.

The stretch command will be used to adjust the brightness of each image segment. This command remaps pixel values using a series of pairs of pixel values, that are ordered in ascending order. The pair is used to shift input pixels values to the output pixels with a colon as a delimiter: input_pixel:output_pixel.

Use handmos the mosaic one of the image segments to the global image. Open the image in qview and use the cursor to figure out which pixel values need to be adjusted. In this example the hightlights need to be brightened and dark areas darkened slightly.

Use the stats command to get the minimum and maximum pixel values of the image segment.
      Group = Results
        From                    = 5152r_trim4.cub
        Band                    = 1
        Average                 = 0.41515265457043
        StandardDeviation       = 0.039987231599299
        Variance                = 0.001598978690976
        Median                  = 0.41902149943799
        Mode                    = 0.40800476197548
        Skew                    = -0.29025601769527
        Minimum                 = 0.22398422658443
        Maximum                 = 0.60801714658737
        Sum                     = 33552.222389728
        TotalPixels             = 4016416
        ValidPixels             = 80819
        OverValidMaximumPixels  = 0
        UnderValidMinimumPixels = 0
        NullPixels              = 3935595
        LisPixels               = 0
        LrsPixels               = 2
        HisPixels               = 0
        HrsPixels               = 0
Use the stretch command to change the brightness and contrast of the image strip. If there are any negetive pixel values, it's best to remove them by mapping them to a pixel value of 0. For example, the beginning of the pairs would look like this: -0.5:0 0:0. Anything from -0.5 to 0 would be mapped to 0, and 0:0 would make sure anything above 0 would not be changed. Next use handmos to mosaic the stretched image to the global image to see how well the image segment is blended. This will take a lot of trial and error, and many small adjustments. Once all of the image segments have been adjusted thay will need to be blended together with the noseam command. The noseam command requires that all the images are in a map projection. It best to use a map projection that closely matches the non-map projected camera view, so pixels won't get too stretched out of shape when the image is projected back to the camera view. For this case an orthographic projection will be the best.

5: Filling gaps in the image mosaics

Fill in the gaps in each mosaic by substituting parts of mainly the green image since it's the most complete of the mosaics. Use histmatch and/or tonematch to match the brightness and contrast of the image parts to the color filter mosaics they are going to be used in. Since most of the 7560 image is missing, the 9680 image will be used to fill in the rest of the image.
9680 filter
7560 filter
green filter
violet filter

6: Framing images for scattered light correction

Take the original image frame and add 400 pixels of padding. Do this will all of the original image frames.

pad from=4900c_cal.png to=green_lowerleft_pad400.png top=400 bottom=400 left=400 right=400

Reproject the global image mosaics to match the the padded images using cam2cam. Mosaic the padding image and reprojected global mosaic together using handmos. Use cam2cam on the resulting mosaic, and use one of the 1600x1600 pixel images and the match image. This will remove the sky, without changing the projection. When an image is reprojected, all of the pixels outside the lat/lon range are removed.

Next, the images will be converted into vicar format. All of the special pixel values and negetive pixel values will need to be removed. Use the stats command to get the range of pixel value and idetify lrs and hrs pixel values. Use the stretch command to remove the negetive and special pixel values. Set the null pixels to 0.
      Group = Results
        From                    = green_lowerleft_cam2.cub
        Band                    = 1
        Average                 = 0.35207211523667
        StandardDeviation       = 0.10881912057188
        Variance                = 0.011841601002037
        Median                  = 0.35367223852169
        Mode                    = 0.36346874627334
        Skew                    = -0.044113293967349
        Minimum                 = -0.028592174872756
        Maximum                 = 0.70179933309555
        Sum                     = 358776.27245501
        TotalPixels             = 2560000
        ValidPixels             = 1019042
        OverValidMaximumPixels  = 0
        UnderValidMinimumPixels = 0
        NullPixels              = 1540958
        LisPixels               = 0
        LrsPixels               = 0
        HisPixels               = 0
        HrsPixels               = 0

7: Direct wiener filter

Next, these images will be imported into vicar to run the direct wiener filter on them:

The direct wiener filter subtracts light from the globe and spreads it out into the sky.
This image shows the small decrease of the brightness globe between the original image and the direct wiener filtered image. The light is the sky is slightly visible.
A brightened image to show how the light spreads away from the globe and into the sky.

8: Noise measurments and signal to noise ratios

For the scattered light correcting process, we'll need to find the ideal signal to noise ratio for each color filer to use with the wiener filter. The SN parameter is necessary because without such a parameter, the restoration filter cannot distinguish random noise from high-spatial-frequency real data. Without the SN parameter, the restoration filter will would end up push the scattered light into the background noise as if it were high resolution detail.

In order to measure the noise for each filter, take a patch of sky cropped out of one of the original unprocessed images from each color filter. Each of these patches are taken from the same part of the sky.
9680 filter
7560 filter
green filter
violet filter
The stats command on these images, and the standard deviation is use to represent the noise levels. The noise levels fit general noise behavior of the SSI camera. The green filter has the least amount of noise since it is the closest to the most sensitive range of the instrument, while the 9680 filter has the most because it's near the the limit of the instrument sensitivity.

Next the the SN parameter needs to be found for a single filter as a reference to the other filters. The 9680 filtered images have the most noise, and are the most effected by differing SN values, so these will be used to figure out the reference SN value. If the SN value is 1 or under, the image will be slightly blurred and the sky will be brightened and the glode will be dimmed. This is the opposite of the effect we are looking for. Once the the SN value is increased beyond a certain point, the pixel values in the sky will start to become negetive and the image noise and brightness in the globe will increase dramatically. For these examples, too much scattered light is getting pulled for the sky and distributed into the high-frequency noise.
Original unfiltered image
Wiener filter with sn=0.1
Wiener filter with sn=2
Wiener filter with sn=10

Since the sn=2 image most closely matches the original image, it will be used as the best signal to noise value for the other 9680 images. The sn values for the other filters were scaled base on the standard deviation values and signal to noise value for 9680 images.

9: Scatter light correction

The images are now ready for scatter light correction. This is done by using the wiener filter with the SN values. When the image is scattered light corrected, the light that had been spread out into the sky, is now pushed back into the globe. There is a small increase brightness and contrast in the globe.

The center image frame before and after the scattered light correction process. When the image is corrected there will be a small increase in contrast.
These samples show the changes in pixel values between light and dark terrain in the corrected and uncorrected images.

Light terrain
# uncorrected corrected
1 0.660055 0.680946
2 0.583332 0.598998
3 0.515018 0.528248
4 0.495808 0.508168

Dark terrain
# uncorrected corrected
5 0.359805 0.359360
6 0.292049 0.280538
7 0.261298 0.252473
8 0.215826 0.211129

10: Creating the color image mosaics

Complete the scattered light correction on all of the other image frames. When this is completed, mosaic all the color filtered images into their individual mosaics using the same process that was used for the creating the context images. Use the pad command to add enough padding to fit the other images into the frame. I generally use left, center image as the padded image to use as the reference to reproject the other image to using cam2cam. Use handmos to mosaic the color bands into a color image.
The color image using the 9680, green, and violet bands.
The color image using the 7560, green, and violet bands.

11: Creating the Presentation image

For the presentation version of this image, the 9680 band is used for red channel because it much more complete than the 7560 band. Remove the image noise from all the frames using noisefilter. The noise is left is in the science version of this image in order to avoid noise hits when take samples of pixel values.
Next, all the gaps in the mosaics should be filled using qnet and jigsaw. Use histmatch and or tonematch, along with stretch for finer adjustments to match the brightness between image frames. This will be close to the same process as creating the orginal global image mosaics.

In order to to smooth over the seams between images, noseam should be used to mosaic each color band together. Since noseam need images to be in a map projection, reproject all the images using cam2map and the previously created map template file: orth.map. Create a text file (with a .lis file extension) with all of the map projected image frames and patches for the image gaps for each color band. Use noseam with each of these images lists. The high and low frequency box car parameters can be adjust with trial and error to see which value blend the image seams the best. After the images are mosaiced together, you can reproject the mosaics back to the original camera projection using map2cam. Use one of the previous global mosaics as the match image. This step is optional, and up to your preference. Use handmos to create the final color mosaic.

The image can be refined to a certain point in Isis 3. Any detailed refinements with Isis 3 tools can be time consuming and diffcult. The upper left frame can be particularing challenging to work with. Having the color of the patched image gaps match up with the color of the original image frames is another challenging area. From this point onwards, photoshop is used for the final refinement. To make sure no surface features are altered, only adjustment layers are used such as: hue/saturation, levels, curves, and color balance.