Take me to pcigeomatics.com

PCI Geomatics Help Center

How can we help you today?

Smart GeoFill 2017

PCI Geomatics -

Geomatica Focus features the Smart GeoFill tool which allows you to alter aspects in your imagery, such as copying features or terrain elements, or filling an area of interest with content from an overlapping image to replace an unwanted aspect. You can adjust settings for blend width, color balance, contrast, and brightness of the source area to enhance or adjust its appearance in the destination layer.

The following tutorial outlines some common Smart GeoFill workflows: Replacing Values in a Single Image, Replacing Values from Another Image - Cloud Removal, Replacing Values from a Stack of Images, and DEM Ortho Preview with DEM Editor.

There are two video tutorials available on the PCI Geomatics YouTube channel which outlines two Smart GeoFill workflows:

 

Tool Overview

Smart GeoFill can be accessed through the Focus toolbar under the Tools dropdown menu. Information about the Smart GeoFill tool, including the following table is available from the Geomatica Help (Focus > Help > General): Geomatica Help > Focus > Image Processing > Using Smart Geofill

image001.png

 

Replacing values in a single image

This workflow replaces pixels in an image with different pixels from the same image. This is useful if you do not have other overlapping images and there is an artifact in your image that needs to be removed. In this example, we will copy pixels from a different part of the image to remove a cloud.

  1. Open your image in Focus and then open the Smart GeoFill Tool (Tools > Smart GeoFill). We will be replacing the cloud and shadow with different pixels from the same image.

image003.png

  1. The Selection Mode button is automatically selected. With this tool selected you can create a polygon around the cloud in the image.

image005.png

  1. If you click on the Selection Mode button’s drop-down arrow you will notice there are two options: Copy and Fill. We want to leave this as the default In Fill mode, Smart GeoFill uses the concept of source and destination polygons. That is, you draw a polygon, to define the area you want to fill. This polygon is then designated as the destination polygon. In Copy mode, Smart GeoFill copies the pixels inside the polygon you have drawn (or selected), which you can then paste to suit.

image008.jpg

  1. If you hover over the polygon, your pointer will switch to a four pointed arrow. You can click on the polygon and drag the source (yellow) polygon to choose the pixels that will fill the destination (blue) polygon. Try and choose pixels that are similar to your destination polygon.

image009.png

  1. Hide the polygons image010.png to check if the edges match. You can check off Blend width box and set a blend value to blend the edge of the destination.image012.png

image013.png

  1. Once the filled section looks correct you can choose Paste image015.png
  2. I will repeat these steps to remove the corresponding shadow.

image017.png

  1. Make sure to save the image once you have made your edits.image019.png

 

Replace values from another image – Cloud removal

This workflow is a very common use for the Smart GeoFill tool. You can fix problem areas in your images by replacing the pixels in the problem area with pixels from a different image. This is particularly useful if you have an image with clouds. You can replace the cloudy section of the image with cloud free pixels from a different image.

  1. Load the two images into Focus: Original image and cloud free image. In this example pixels from the cloud free image will be copied into the original image to replace the clouds in the original image.

image020.png

  1. Select the Original Image in the Focus Maps Tab

image022.png

  1. Open the Smart GeoFill tool (Tools > Smart GeoFill)

image024.png

  1. The Selection Mode button is automatically selected. With this tool selected you can create a polygon around the clouds in your image. I’m also making sure to create the polygon around the cloud’s shadows.

 image026.png

*Note: You can also import polygons from an existing vector layer. To do this, deselect the selection mode button from the Smart GeoFill window and select the polygon from your vector layer. You may need to click the Selection tool image028.png on the Focus toolbar. With the polygon selected, click Import Selected image030.png  from the Smart GeoFill window.

  1. The dashed polygon is now visible on the image. In order to copy pixels from another image you will need to change the Smart GeoFill Source In this case we will switch this to Project File Set as we have already loaded the cloud free image into our Focus project.

image032.png

  1. You will immediately notice that the pixels inside the polygon have been replaced by pixels from the cloud free image. However, at this point the colors do not match well.

image034.png

  1. We can now adjust the colours of the copied pixels to match the original image. In many cases, clicking Automatically apply colour balancing will match the copied pixels. If required you can adjust the contrast and brightness manually using the sliders.

image036.png

image038.png

  1. Before pasting the copied pixels you can turn off the vector image040.jpg to check how the pixels will look when copied. If the edges of the copied section are very obvious you can check off and adjust the Blend width. image041.png

 image043.png

  1. When you are satisfied with the appearance of the copied pixels you can paste them to the original image image045.jpg
  2. You will want to make sure to save the image so the edits are permanently applied before closing out of the Smart GeoFill window image019.png

 

Replacing values from a stack of images

The Smart GeoFill tool allows you to load multiple images into a file set, draw a polygon and then compare all of the images to select the best pixels to copy.

  1. Open the image that you wish to edit in Focus and then open the Smart GeoFill tool (Tools > Smart GeoFill).
  2. Only a single image is loaded into the Focus Files tab.

image046.png

  1. In the Smart GeoFill tool switch the Source to Custom File Set.
  2. The File Selector window will open. Select and open all of the images from your stack.

image047.png

  1. You can view all of the images that were added to the Smart GeoFill window from the Source File Set window image049.png

image051.png

  1. Click the Selection Mode button and draw a polygon around the area you wish to edit

image053.png

  1. You will notice that the image selector arrows image055.png are available. Also if you open the Source File Set Window again the images that overlap with the polygon will be selected in the Use If there are images you wish to remove from the preview you can uncheck them in this column.

image056.png

  1. Use the selector arrows to navigate through each of the available images. As you navigate through the images, each of the images will be added into the Focus Maps tab. You will notice that the pixels in the polygon change to show the new pixels from the selected image. You can then choose which of the available images matches better with the surrounding pixels.

image058.png

image060.png

  1. You can always click the Source Visibility button image062.png to view the original pixels.
  2. Once you have chosen the best image, you can click paste to paste the pixels from the source image into your original image.
  3. After completing the edit you can click the Reset Selection button to remove the polygon you were using. At this time, all of the source images are removed from the Focus Maps tab. Only the edited destination image remains.
  4. Make sure to save the image once you have made your edits. image019.png

 

DEM Ortho Preview with DEM Editor

More information available in the help: Focus > Image Processing > Using Smart Geofill > Repairing Imagery > Copying from the Full Res. Ortho Preview window

You would use this tool if you have already generated the mosaic from your orthos and then notice an artifact in your final mosaic that is caused by a problem in the DEM. In this example, the wavy road in the mosaic is caused by an error in the DEM. If much editing of the mosaic has already occurred, it may be very time consuming to fix the DEM, regenerate the problem ortho image and then add it into the final mosaic. Instead you can fix the problem in the DEM and then copy this fixed section of the ortho (available in the ortho preview window) into the mosaic using Smart GeoFill.

This section will include editing the DEM using the DEM Editing Tool. More information on this tool is available from the Live DEM Editing Tutorial

1. DEM Editing - Edit the problem in the DEM

a) Open the DEM and the DEM editor (Layer > DEM Editing). Navigate to the section of the DEM that is causing the problem in the mosaic. In this example this road needs to be fixed in the DEM.

  1. image064.png

    image066.png

    image068.png

b) In the DEM Editing Setting tab check off Enable Smart Geofill Special Setting and set the 1:1 Pixel size to the Mosaic image’s pixel size (Right-Click mosaic file in Files tab > Properties > Projection).

  1. image070.png

    image072.png

c) In the DEM Editing window, click Define Preview Region image074.png and then draw a rectangle around the AOI. The Full Res. Ortho Preview will open with the AOI displayed.

  1. image076.png

    image078.png

d) Edit the road in the DEM editor and then regenerate the ortho preview image080.png . A polygon is drawn around the road and then a Road Average Filter is applied. Information on editing roads in a DEM is available in Demo 2 and 3 of the DEM Editing tutorial

  1. image082.png

    image084.png

    image087.png

e) There is another small section above the main road which I will also edit using an Average Filter.

  1. image089.png

    image091.png

    image093.png

 

2. Smart GeoFill - Once the section is fixed in the DEM you can copy the fixed section from the Ortho Preview window and paste it into the mosaic using Smart GeoFill tool.

a) With all the DEM editing windows still open, click on the mosaic in the Maps tab and open Smart GeoFill

image095.png

b) In Smart GeoFill change the Source to DEM Ortho Preview

image097.png

c) You can either draw a new polygon or import the polygon from DEM editing. To import, select the DEM editing polygon and then click import on the Smart GeoFill windowimage099.png . In this example I will draw a new polygon which covers the main road and small road that I edited above.

image100.png

d) In Smart Geofill you can choose which fixed ortho to copy into the mosaic image103.jpg

image104.png

 

e) You can adjust the Smart Geofill colour balancing settings as required and then paste the new section into the mosaicimage106.png. Make sure to save the Ortho Mosaic image before closing out of the Smart GeoFill window.

image108.png

image110.png

Have more questions? Submit a request

Comments

Powered by Zendesk