Modify the values of pixels in a raster image by using an Area of Interest (AOI) polygon and manually edited points to interpolate a new surface. The Interpolate process is useful for correcting errors within DEMs or to remove artifacts in imagery.
Locate Area of Interest
- Open your raster image in a 2D View. For this workflow, a DEM raster file is used.
- Zoom into the area to modify; for this workflow an area of NoData values (hole) within a DEM is the AOI.
- Open the Inquire Cursor.
- Move the Inquire Cursor crosshair in the AOI and surrounding area, noting the file pixel values reported in the Inquire Cursor dialog.
In this workflow, the file pixel values in the NoData area are -32767, but the file pixel values range from 458 to 515 in the surrounding area.
Draw AOI Polygon Element
- Click Drawing tab > Insert Geometry group > Polygon.
This creates an AOI layer in the View, as noted in the Contents panel.
- Digitize a polygon around the NoData pixels.
See Rules for Pixel Inclusion within Polygons topic.
Fill Pixels with New Values
- In Contents panel, click the name of the raster layer to make it active.
- Click Panchromatic tab > Edit group > Interpolate.
The Interpolate dialog opens.
- You will digitize points surrounding the AOI to collect accurate file pixel values. Click , then click in the View close to the NoData area.
Pnt_1 annotation is placed in the View, and the point coordinates are listed in the dialog CellArray.
- Continue to digitize at least 12 points surrounding the NoData area, noting the point coordinates and file pixel values listed in the CellArray. See Figure 1.
- Move any of the digitized points by dragging the point annotation.
- Delete a point by selecting the Point # in the CellArray, right-click then click Delete Selection.
The set of reference points used in the Interpolation process is automatically selected from explicitly digitized points (listed in the CellArray) and from an additional set of points, called buffer points. The buffer points are located just outside the periphery of the AOI. Buffer Distance option is the exact pixel distance from the edge of the AOI. Buffer Points option is the number of buffer points to use in the computation.
- When you are finished digitizing points, in the Interpolate dialog under Buffer Points, enter 25.
- Click Apply.
- A attention message opens asking if you want to remove the data stretch lookup table. Click Yes.
- A warning message opens explaining that since this function modifies the pixel values of the image, you may wish to recalculate the statistics and histogram for the layer before doing any other operation that depends on this data. Click OK.
The new surface displays inside the AOI. See Figure 2.
- Move the Inquire Cursor around in the new surface and note the file pixel values which should be within the range of the surrounding area.
To undo each raster edit, click . Click multiple times to undo a series of edits.
Save changes to your image either as a separate file or to the original file.
If you want to save to the original file, an Attention message opens explaining that some edits could permanently change pixel values in the image and asks if you want to continue. Click Yes.
Figure 1: File Pixel Value in NoData Area
Figure 2: File Pixel Value after Interpolation