In Geomatica 2018 mosaicking changed from previous versions to a standalone tool on the Geomatica toolbar - Mosaic Tool. The Mosaic Tool allows the user flexibility to prepare, edit and create a seamless mosaic.
This tutorial applies if you have the Automatic Mosaicking tools available with the Ortho Production Toolkit module. If you do not have a license for Ortho Production Toolkit you can run Manual Mosaicking.
The flowchart below outlines the different workflows for initializing a mosaic project, adding source images, defining the output mosaic file, applying mosaic preparation steps, editing the images and generating a mosaic in Geomatica. Section 1 of this tutorial outlines the different methods of initializing a mosaic project: OrthoEngine, the Mosaic Tool or the MOSPREP algorithm (EASI/Python). Once the mosaic project is created, all editing and generating of the final mosaic is completed in the Mosaic Tool.
The Mosaic Tool is the third icon on the Geomatica toolbar.
You can work on the entire mosaic or, with a larger mosaic project, work with a subset of the mosaic images that you open from the Mosaic Overview window.
The following figure identifies the basic elements you will work with in the Mosaic Tool window. Information about the Mosaic Tool menus, toolbars, control pane and view pane are available from the Geomatica Help – Mosaic Tool > About the Mosaic Tool window.
There are a number of options available from Mosaic Tool > Tools > Options. A particularly useful option is Performance – Bypass Mosaic Overview… When opening a large mosaic project, the mosaic overview window will open instead of automatically loading all of the images into the Mosaic Tool (which can be time consuming). You can change the image threshold at which the Mosaic Overview window appears when you open a mosaic project. See section 7.3 Mosaic Overview Window for more information
There are three methods of initially creating a mosaic project:
- OrthoEngine – If your data needs to be orthorectified, complete an orthorectification workflow in OrthoEngine first. The Mosaic Tool can then be opened from the Mosaic OE step.
- Mosaic Tool (Geomatica Toolbar) – If your data is ready to be mosaicked, open the Mosaic Tool directly from the Geomatica toolbar and load prepared images.
- Scripting – If you are preparing and orthorectifying the imagery in a script, you can run MOSPREP in the script. You can then open the output .MOS or .XML (Geomatica 2017 and previous) file in Mosaic Tool.
If you generated orthorectified images in an Orthoengine project, you can open the Mosaic Tool from Orthoengine.
- From the Mosaic Processing Step, click Mosaicking
- The Mosaic Tool opens and your ortho images will be automatically loaded into the New Project Wizard.
If you have images that are ready to mosaic, you can open the mosaic tool directly from the Geomatica Toolbar.
- Once the Mosaic Tool opens, click New Project to open the New Project Wizard
- The Source Images window is the first window in the Wizard. Click Open to select images that you want to add to the mosaic project.
If you are running Geomatica functions in a scripting environment you would run the MOSPREP algorithm to create the original mosaic project file. More information about running Geomatica in Python is available from the developer zone: http://dev.pcigeomatics.com/developer-zone.
The Mosaic Tool accepts three different project file formats: MOS, PRJ and XML. A MOS file is created by saving a project in the Mosaic Tool or by running the MOSPREP function in Geomatica 2018. You can also open mosaic projects that were created in previous versions of Geomatica – PRJ and XML.
- Open the Mosaic Tool from the Geomatica toolbar
- Once the Mosaic Tool opens, click the File menu, and then click Open Project
- You can proceed to Section 4 – Edit Source Images
Whenever a new project is started the New Project Wizard is automatically opened. The three windows of the New Project Wizard are outlined in detail below.
On the Source Images page of the New Project Wizard window, select the images you want to include in your mosaic and, if necessary, enter a NoData value for the source images.
After you select the source images you want, they appear in the Source file list box. For now, only the footprints appear but you will see your imagery later, when you generate the mosaic preview.
For information on the toolbars in the New Project Wizard, please see the Geomatica Help - New Project Wizard toolbars
- If you created a new project in the Mosaic Tool you will need to add the source images, by clicking the Open button.
- If you opened the Mosaic Tool from OrthoEngine, the images will already be loaded
- Add or remove images as required and then click Next
After you add the source images you want to use, your next step is to enter information about the output mosaic file. You can specify the following information in this panel
- Mosaic output
- Single File - well suited for use with smaller, less complex projects. The entire mosaic is written to an individual file with a tile-definition layer of only one polygon shape.
- Tiled - well suited for use with larger, more complex projects. That is, when mosaicking large volumes of data, it is more practical to create the mosaic as a series of smaller tiles rather than one (potentially) large file.
- Defined by polygons - uses a file you specify that has an existing vector-polygon layer containing the tile definitions you want to use for the mosaic.
- Output file name and format
- The name you enter for Output file will be the file name of the mosaic according to the format you select. For example, <file_name>.pix or <file_name>.tif, as applicable
- Channels, and Channel mapping
- Original channel number is based on your source images. You can enter a different number of channels for the output mosaic (typically, this is to reduce the number of channels). You can also map the channels between the input and output images.
- Output NoData
- You can enter one or more NoData values in the output imagery. For example, to specify that channel 1 has a NoData value of -9999, channel 2 is 0 and channel 3 is 255, enter -9999,0,255. You can also skip a channel. For example, channel 1 has no defined NoData value, but you want to use 0 and 255, respectively, for channel 2 and channel 3, enter ,0,255 (notice the comma before the zero).
- Mosaic extents and Mosaic size
- You can change the extents by selecting a file or by dragging the blue Mosaic Extents polygon in the viewer. You can also specify the mosaic size to adjust the blue extents rectangle
- Pixel size (x and y)
- Projection Information
- Select the projection type (Pixel, UTM, Long/Lat, Meter, SPCS, Other) and then enter the correct projection string
- Bounds and UL, LR coordinates
- Select Geocoded (easting, northing) or Geographic (latitude, longitude) to specify how to display the coordinates of the mosaic file
- If necessary adjust the UL and LR coordinates based on the coordinate system
Enter the correct information for all of the Mosaic definition options and then do one of the following:
- Click Next – You will move onto the last windows which will allow you to run mosaic preparation and create the mosaic preview.
- Click Finish - The source images will be added to the Mosaic Tool and the output mosaic file will be defined. Note that the mosaic preparation has not been completed and the mosaic preview and full mosaic have not yet been generated.* Continue onto Section 3 - Mosaic Preparation in Mosaic Tool
Before you can create a mosaic, you must first prepare it. This step will generate cutlines, apply colour balancing, determine the sorting order and apply normalization to the images that are added to the mosaic. Additional information about each of the preparation steps and their additional options is available from the Geomatica Help. Click on the Mosaic Preparation window to open the Help.
- Compute Cutlines
- Specify the cutline computation method to use for the mosaic: Minimum squared difference, Minimum Difference, Minimum relative difference, Edge, Maximum data, Import, File extents. Minimum squared difference is suitable for most mosaicking projects and in most cases produces the cleanest cutlines.
- Apply Colour Balancing
- Choose one of the colour balancing Methods: None, Bundle, Histogram, Overlap area, Reference image, Lookup table, Neighborhood.
** Note: In order to make use of advanced colour balancing tools such as dodging points you must choose the Bundle method
- Sort Images
- This section allows you to define the order that the images are added to the mosaic: Nearest to center or Maximum Intersection
- Enter the mosaic preparation options that you wish to use or leave the default values. You can also choose to skip some or all of the mosaic preparation steps by un-checking the box beside the step.
- Once you have selected the mosaic preparation options click Generate Preview
- The mosaic preview will then be loaded into the display window
If you are satisfied with the result, you can do one of the following, as outlined in the flowchart at the beginning of the tutorial.
- Click Finish – The images will then be added into the mosaic tool with the preparation steps applied. Note that the actual mosaic will not yet be generated. You can further edit the colour balancing, cutlines, normalization and image order in the Mosaic Tool. Continue onto the Section 4 - Edit Source Images
- Click Generate Mosaic – The full mosaic based on the mosaic preview will be generated. You would then click Finish to add the full mosaic to the Mosaic Tool. At this time, the mosaic is complete. However, you can choose to restore images from the mosaic to further edit the mosaic. Continue onto the Section 6 - Restore Images
Once the source images are loaded into the Mosaic Tool you can run Mosaic Preparation. You would need to complete this step if you skipped it in the New Project Wizard. If you completed this step in the New Project Wizard you can choose to change the preparation settings and re-run the preparation steps, or move onto Section 4 – Edit Source Images.
- Right-click Source Images and select Mosaic Preparation from the drop-down menu. Mosaic Preparation is also available from the Tools
- Select the Mosaic Preparation options that you wish to apply. Information on these options is available in Section 2.3 – Mosaic Preparation
- The mosaic preview will be updated to display the new colour balancing, cutlines, order and normalization options selected.
The order of the images in the Source Images list is determined by the Sort method that you specified in the Mosaic Preparation. You can change the order of the images by doing one of the following:
- Change the order in the Source Images list: You can hold and drag the images in the sources images list to change the order that they appear in the mosaic. As you move the images in the list, the mosaic preview will be updated to show the changes
- Re-run Mosaic Preparation > Sort: Open the Mosaic Preparation panel and uncheck everything except for Sort Images. Adjust the Method or Starting image and then click Run
- Change images Z-Order: Right-click on an image in the Source Images list and click Properties. The Z-Order of the image is in the General tab. In the Z-order box, you can type or select a number to indicate the order in which the image will be added to the mosaic. A higher value represents top-most positioning. The mosaic image always has a z-order value of zero, meaning it is at the bottom of the image "stack".
When you create a mosaic, you want to crop the images so the best portions of the images are seamlessly joined together. You can edit the cutlines to ensure that the seams between the images are not as noticeable.
To individually recreate cutlines for a single image you can right-click the image and choose Compute Cutlines
Cutlines should avoid:
- buildings or man-made features, since they may lean in different directions in the imagery
- large bodies of water, because waves may look different in different images, and water tends to have different color in different images
- areas that are significantly different in color and texture, such as forests and cultivated land, since they may look different from image to image
- To edit a cutline select an image from the Source Images list. You can expand the image to ensure that the cutline is currently visible
- On the toolbar click the vector editing icon to open the vector editing toolbar
- Select one of the image cutlines using the Find tool
- Two different representations for cutlines are shown – a solid line and a dotted line.
- A solid cutline represents a cutline on the top of the image
- A dotted cutline represents a cutline underneath an image
- Zoom into a section of the image where you want to adjust the cutline. In the example below, we can edit the cutline to pass around the water and not through the water.
- Select the Reshape tool from the Vector Editing Toolbar
- Click on the image near a cutline where you want the new reshaped cutline to be placed.
- Continue to click along the feature in the image where the cutline should be located.
- Click enter once you are done editing to exit the reshaping tool
- You can also add vertices or move specific vertices by selecting them with the Find tool and dragging them to a new location.
You can choose to apply normalization to all of the images, or individual images in the Source Images list. There are three different normalization methods that you can apply:
None – This does not apply any normalization
Hot Spot - A hot spot is a common distortion in aerial photographs and optical-satellite images. The distortion is caused by solar reflections, which often appear circular in photographs. Hot spot normalization removes distortion from aerial and optical-satellite images. It normalizes the brightness over the image by fitting a Gaussian surface to the brightness values. Hot spot normalization does not remove smaller spot reflections from lakes, cars, and buildings.
Adaptive Filter - Use Adaptive filter normalization with images that have a large, irregular bright-and-dark pattern that cannot be modeled to a Gaussian surface. Patterns that model to a Gaussian surface are better handled by Hot spot. Adaptive filter normalization adjusts the brightness and contrast over local areas, thereby improving image detail, while reducing the bright-and-dark pattern over the entire image.
Note: Because of the intensive processing required, Adaptive filter normalization is not dynamic; that is, the display is not updated when you apply the command, but applied in the output mosaic. Also, any color-balancing effects in the normalized image are visible only in the output mosaic.
- To adjust the normalization on a single image: Right-click the image > Normalization > Choose Method.
Before Hot Spot Normalization After Hot Spot Normalization
- To adjust the normalization on all images: Right-click the Source Images header > Normalization > Choose Method.
- To adjust the normalization on more than one image: Select the images in the Source Images section and click the Normalize button on the toolbar .
One of the key requirements with mosaicking is ensuring that the colors of adjacent images on either-side of a cutline are as similar as possible.
When running mosaic preparation a colour balancing method was chosen. However, there may still be areas of the mosaic that need additional adjustments.
Note: In order to make use of advanced colour balancing methods such as dodging points, you must apply the BUNDLE colour balancing method to your images.
Changing the colour balancing method
- To change the colour balancing method, select the images that you wish to edit, or right-click the Source Images header. You can then choose Colour Balancing > Select Method. For this tutorial the Bundle method will be selected.
Colour balance editing
If the Bundle colour balancing method was chosen then the Colour Balancing Editing toolbar will be available. More information on all of these tools is available from the Geomatica Help.
The first tools apply changes to the entire image.
- Image Contrast and Brightness allow you to edit the entire image.
- Dodging Surface Adjustment - You can set this to Image Only or Image + Dodging. This setting adjusts whether edge dodging points are affected when changing image brightness or contrast. If Image Only is set and you adjust the image brightness and contrast, only the selected image will be adjusted. If Image + Dodging is set and you adjust the image brightness and contrast, the selected image will be adjusted, as well as the areas in adjacent images that correspond to an edge dodging point. This will allow for the brightness/contrast adjustment to “ripple” out to adjacent images so the colour matching is continuous.
The next set of tools allows you to add dodging points and make edits to the dodging points.
- Edge dodging points - Applicable in pairs. The edge points are connected to the cutlines between images to minimize the difference between the images. The dodging value is applied along the entire length of the edge between other edge points.
- Floating dodging points - Standalone and affect a localized area of an image. You use them to brighten or darken a specific area, such as when you want to reduce a patch of haze in an image.
You can then edit the dodging points.
- Dodging Point Contrast and Brightness - Edit the dodging point area, instead of the entire image.
- Automatch Edge Point - Automatically match a selected edge dodging point with its point on the opposite side of the cutline.
- Store Statistics – Store adjustment statistics derived from a selected region. When you apply the stored statistics to any other point, the color balancing of the region of stored statistics is applied.
- Automatch to Statistics - Apply the saved settings of a dodging point to which you applied Store Statistics command.
- Adjust Pair Point - Switch between the two sides of the edge of a selected edge dodging point.
- Display All Cutlines - Switch between showing and hiding the cutlines. This is a handy way to see the seam lines more clearly and assess the quality of the color balancing.
- Color Balancing Editing Settings - Edit the settings for color balancing.
Using Edge Dodging Points
In the example below, you will notice that the colour of the two images does not match well at the cutline. You can turn off the cutline to better see the seamline between the two images.
In this case we can add an edge dodging point to improve the colour balancing between the images.
- Make sure that the image that you would like to edit is selected. In this case the left image is selected.
- Click on the Edge Dodging Point button and add a point to the cutline. You can change the behavior of the dodging point by clicking the small error beside the button. If you choose Automatch Both Sides, both images will be automatically colour matched when you add the edge point. In this case, Use Current Adjustment was selected.
You can select each of the adjacent images to see that there is an edge dodging point on both images.
- You can then use the Dodging Contrast and Brightness buttons to adjust the dodging point brightness and contrast. As you adjust these options, the left image will change. The adjustment is applied along the entire length of the edge between other edge points.
- To limit the extent of the adjustments, you can add additional edge points along to cutline. The adjustment will only be applied until the next dodging point. The following image shows an exaggerated example using additional edge dodging points. You will notice the brightness adjustment does not extend past the upper and lower edge dodging points.
- To adjust the brightness/contrast of a specific band, open the Color Balancing Editing Settings and change the channel selection.
- Use the Adjust Pair Point button to switch which side of the cutline (image) you are applying the dodging point edits to.
- Alternatively, instead of manually editing the brightness and contrast, you click Automatch Edge Point to adjust the image. From the drop down, you can choose whether to adjust both images or only the single image with the edge point.
Using Floating Dodging Points
Floating dodging points can be used to adjust a specific section in the middle of an image. In this example we can increase the brightness of an underexposed section of forest.
- Add a floating dodging point to the dark forest.
- In order to prevent the color changes made to this point from spreading to the rest of the image, you can place other dodging points around the one you created.
- You can then increase the brightness and lower the contrast of this area. Notice that the changes will not extend past the cutlines and the other dodging points.
- You can place additional dodging points in this area to improve the other dark areas of the forest.
- Another method that you can use to adjust the color balancing of dodging points is the dodging statistics tools .With these tools you can copy the image statistics from one area and apply them to a different area using dodging points.
- Place one or more dodging points in the area that you want to adjust
- Using the Store Statistics tool select an area with the desired color balancing. You can choose to extract the statistics using a point, rectangle or polygon.
- Once you have the statistics stored, select the dodging point that you place before and then click Automatch to Statistics . You may need to click this a few times to produce the desired results. Once you Automatch you can also change the brightness and contrast to further improve the color.
The final step in the mosaic creation process is to add the edited source images to the defined mosaic.
- To add all of the images from the Source Images list to the mosaic, right-click Source Images and click Add to Mosaic. At this time, the full mosaic will begin to generate. The images will be added to the mosaic file in the order that they appear in the Source Images list.
You can also choose to add individual images to the mosaic file by right-clicking the image in the Source Images list and selecting Add to Mosaic.
** Note – If Add to Mosaic is not available from this drop-down menu, the mosaic file may not yet be defined. You can right-click Output Mosaic and choose Define Output Mosaic. Define Output Mosaic is also available from the Tools menu.
- Once the mosaic generation is complete, the images will be added to the mosaic and will no longer be available in the Source Images list.
- You can expand the mosaic file to check which images are added to the mosaic.
After generating the mosaic file, you can choose to reprocess any of the images if you notice a problem in the mosaic.
- Right-click on the Output Mosaic heading and click Restore to source.
- In the Restore to Source window select the images that you would like to restore.
- Once the images are reloaded into the Source Images section you can edit them and add them back to the mosaic, as per Section 4 and Section 5
The tools outlined in the section below are optional steps that could be taken with your mosaic. The tools shown below are particularly beneficial when working with larger mosaics that require quality control and verification from multiple users.
Potential problems in the mosaic can be identified using the Quality Control layer along with reference vectors and the mosaic preview. These problems can be addressed before generating the final output mosaic.
- From the Mosaic Tool main menu, select: File > New Quality Control Layer.
Note: If the mosaic project already contains a Quality Control layer, this option is disabled.
- The new Quality Control layer appears in the Mosaic Tool's Control pane.
The Quality Control toolbar opens automatically.
- To turn the Quality Control Layer on and off, clear the check mark besides Quality Control Layer in the Image Tree List.
- In the Mosaic Tool view pane, zoom to an area that you want to flag for quality control purposes.
- From the Quality Control toolbar, select Point New .
- Click to place the new point.
- You can then modify the Type and Comment for the point.
This tool is particularly useful with a larger mosaic. When you inspect the quality of your mosaic and, if necessary, modify any images, you can change the status of one or more. Typically, this is to change the status to Verified from the default Unverified. Assigning a status helps you keep track of images you have and have not modified. Images marked as Verified will appear in green.
- In the Mosaic Tool window, click the Map Layer Selection tool
- Select the image or images for which you want to change the status.
- Click the Image Status button arrow and select Verified or Unverified.
- On the Mosaic Tool toolbar, click on the Mosaic Overview button. The Mosaic Overview window will open with all images selected
- In the Mosaic Overview window, on the Selection toolbar, you can click Select to define a new working area. Defining a working area is to select the images you want to display and modify in the Mosaic Tool window. The working area you define determines the extents in the Mosaic Tool window and all of the data from the images you select will be displayed.
- In the Mosaic Overview window, on the Selection toolbar, click Select, and then do one of the following:
- Drag to select one or more images. Each image that intersects the rectangle you draw is selected.
- To select an individual image, click the image you want. To select the next overlapping image, and thereby use its extents, at the same location, click again
The selected images are now locked for editing by you, and other users can neither select nor edit the images.
- After you select the images you want to modify, click Open Selection.
- The selected images are opened in the Mosaic Tool window based on the defined working area.
- You can edit the selection that was loaded as per Section 4.
- Once the edits are complete you can mark the images that you edited as Verified. The images will also show up as verified in the Mosaic Overview window.