跳转至

Create a Color-Balanced Mosaic

来源: https://vis-webcontent.s3.amazonaws.com/quickguides/Image+Preprocessing/Create+Color-Balanced+Mosaics/index.html#/

Lesson content

Lesson 1 of 1

Create a Color-Balanced Mosaic

In this quick guide, you will:

Create a mosaic from two U.S. Geological Survey high-resolution orthophotos from different dates. * •

Perform color balancing. * •

Add seamlines along natural features (to blend the images). * •

Choose an output area to subset. * •

Export the mosaic to an ENVI-format image.

Sample Data

Download sample data below. Then extract the contents of the .zip file to a local directory.

[USGS_HighResOrtho.zip

890 MB

DownloadArrow down with horizontal line beneath it](assets/USGS_HighResOrtho.zip)

Select Input Files

  1. 1

In the Toolbox, expand the Mosaicking folder and double-click the SeamlessMosaic tool. The Seamless Mosaic workflow appears. 2. 2

Click the Add Scenes button. The Data Selection dialog appears.

  1. 3

Click the Open button at the bottom of the Data Selection dialog. 2. 4

Go to the location where you saved the sample data, then go to the Color Balanced Mosaic directory. 3. 5

Use the Ctrl or Shift key to multi-select the files 2002apr01.dat and 2004apr13_warp.dat (in that order). Click Open. 4. 6

Click the Select All button in the Data Selection dialog, then click OK. 5. 7

A question dialog appears: "2 scenes need pyramids. Do you want to proceed?" Click Yes. Both scenes and their footprints are displayed. The Show Footprints button is toggled "on." The currently selected scene (2002apr01.dat) is highlighted with a cyan border in the Image window.

Perform Color Balancing

  1. 1

Zoom to the area where the two scenes overlap. You should see subtle color differences between them. You can use color balancing to achieve a more consistent tone between the images.

  1. 2

Click the Color Correction tab, and enable the Histogram Matching option. 2. 3

Click the Main tab, and note the "Color Matching Action" column. 3. 4

Right-click in the table cell that says "Adjust" and select the Reference option. The 2002apr01.dat scene is now the reference scene. Its histogram will be used as the basis for changing the color and tone of the other scene (the adjusted scene).

  1. 5

Enable the Show Preview option to see the result of color balancing and histogram matching. The tone and color of the overlap area is more consistent now.

You have two options for reducing the hard edge between overlapping scenes: (1) enable edge feathering or (2) add seamlines. You can only choose one method. For this exercise, you will add seamlines.

Add Seamlines

A seamline is the line along which overlapping scenes will be mosaicked. They are helpful when overlapping areas have significant differences in features. ENVI uses a geometry-based method to automatically generate seamlines that you can further edit.

  1. 1

Click the Seamlines drop-down list and select Auto Generate Seamlines. When processing is complete, a green seamline is displayed. The following figure on the right shows the result with the magenta footprint boundaries hidden. The seamline is drawn halfway through the overlap area.

The automatically generated seamline provides a starting point for further editing.

You should see a subtle color difference between the two scenes where the seamline is drawn. This effect is especially noticeable when you click the Hide Seamlines button. Here is an example:

Look for features that the seamline could follow that would provide a more natural transition between the two scenes. An example is the path in the image above.

  1. 2

Click the Seamlines drop-down list and select Start editing seamlines. 2. 3

Start drawing a polygon in the image whose features you want to expose in the final mosaic. Start on one side, cross the seamline, click in multiple spots to define line segments, cross the seamline a second time, and double-click to close the polygon. The following figure shows an example. The polygon follows the edge of the path.

Here is a quick video demonstration:

Video Player is loading.

Play Video

Play

Loaded: 0%

0:00

Remaining Time --:-

1x

Playback Rate 1x

  • 2x
  • 1.75x
  • 1.5x
  • 1.25x
  • 1x, selected
  • 0.75x
  • 0.5x
  • 0.25x

Captions

  • captions off, selected

Picture-in-PictureFullscreen

Mute

This is a modal window.

  1. 4

Draw more polygons as needed along the seamline, completing and accepting each one. If there are no natural features along which to draw a polygon, you can skip those areas.

Use the scroll wheel on your mouse to zoom in or out. Click and drag while holding in the middle mouse button or scroll wheel to pan around the display. If you use any tools in the ENVI Toolbar (such as Pan or Zoom), you will lose your seamline edits. * •

Click the Backspace key on your keyboard to remove the last point, if needed. * •

To cancel the drawing, right-click and select Clear Polygon. * •

To start over, click the Seamlines drop-down list again and select Auto Generate Seamlines. * •

To remove all seamlines, click the Seamlines drop-down list and select Delete All Seamlines.

  1. 5

When you are finished, click the Seamlines drop-down list and select Stop Editing Seamlines. 2. 6

Click the Main tab, then scroll to the right side of the table to the Feathering Distance (Pixels) column. 3. 7

Double-click in the table cells for both scenes, and enter a value of 15. Press the Enter key after each entry.

  1. 8

When you are satisfied with the seamlines, continue to the next section to export the mosaic.

Export the Mosaic

You are going to subset the mosaic to the area shown in the dashed box below.

  1. 1

Click the Define Output Area button.

  1. 2

Click and drag the cursor to draw a rectangle around the area shown above. After releasing the mouse button, you can adjust the sides and corners of the rectangle as needed. 2. 3

Right-click and select Accept Subset Area. The subset is displayed with a gray dashed rectangle. Pixels outside of the rectangle will be discarded when you export the mosaic in the steps that follow.

To start over, click the Define Output Area button again, right-click inside the selection, and choose Clear Subset Area. 3. 4

Click the Export tab. 4. 5

Keep the default selection of ENVI for the Output Format. 5. 6

Enter a file name for the mosaic. 6. 7

Keep the default Data Ignore Value of 0. This is the pixel value that will be used to fill areas where no valid image data appear in the final mosaic. There are no regions of invalid data in this mosaic, so you do not need to enter a data ignore value. 7. 8

Leave the Resampling Method selection as Nearest Neighbor. 8. 9

Click Finish. When processing is complete, the mosaic is displayed at full resolution, and ENVI builds a pyramid file for the mosaic. 9. 10

Optional: Use the mosaic in visual presentations. See the following quick guides for examples of the different types of output products you can create:

Create Custom PowerPoint Reports
Create Map Presentations
Create a Screen Capture of the Current View
Export a Full-Resolution View to an Image File

  1. 11

This concludes the exercise.

Additional Resources

Create a Quick Mosaic quick guide

Your input is important to us, please take a few moments to fill out ourQuick Guide Feedback(opens in a new tab)form.

© 2024 NV5 Geospatial Solutions, Inc. This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR).