ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Remove Raster Segment Tiling Artifacts

Available with Spatial Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Some regional processes, such as image segmentation, will have inconsistencies near image tile boundaries. This tool corrects segments or objects cut by tile boundaries during the segmentation process performed as a raster function.

This processing step is included in the Segment Mean Shift tool; therefore, it should only be used on a segmented image that was not created from that tool.

Usage

  • This tool can be used with the Generate Raster from Raster Function geoprocessing tool, which allows you to use the segmentation raster function in a parallel processing environment and write the output to disk.

Syntax

RemoveRasterSegmentTilingArtifacts(in_segmented_raster, {tileSizeX}, {tileSizeY})
ParameterExplanationData Type
in_segmented_raster

Select the segmented raster with the tiling artifacts that you want to remove.

Raster Dataset; Mosaic Dataset; Raster Layer; Mosaic Layer; Image Service; String
tileSizeX
(Optional)

Specify the tile width from Segment Mean Shift. If left blank, the default is 512 pixels.

Long
tileSizeY
(Optional)

Specify the tile height from Segment Mean Shift. If left blank, the default is 512 pixels.

Long

Return Value

NameExplanationData Type
out_raster_dataset

The path and name of the segmented raster from which you are removing tiling artifacts.

Raster

Code sample

RemoveRasterSegmentTilingArtifacts example 1 (Python window)

This example removes raster tiling segments.

import arcpy
from arcpy.sa import *

refined_seg_raster = arcpy.sa.RemoveRasterSegmentTilingArtifacts("C:/test/segmented_raster.tif","512","512")
refined_seg_raster.save("C:/test/refined_segmented_raster.tif")
RemoveRasterSegmentTilingArtifacts example 2 (stand-alone script)

This example removes raster tiling segments.

# Import system modules
import arcpy
from arcpy.sa import *

# Set local variables
inRaster = "C:/test/segmented_raster.tif"
tile_width = "512"
tile_height = "512"

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute 
refined_seg_raster = arcpy.sa.RemoveRasterSegmentTilingArtifacts(inRaster, tile_width, tile_height)

# Save the output 
refined_seg_raster.save("C:/test/refined_segmented_raster.tif")

Environments

  • Compression
  • Current Workspace
  • Extent
  • Geographic Transformations
  • NoData
  • Output CONFIG Keyword
  • Output Coordinate System
  • Parallel Processing Factor
  • Pyramid
  • Resampling Method
  • Scratch Workspace
  • Snap Raster
  • Raster Statistics
  • Tile Size

Licensing information

  • Basic: Requires Spatial Analyst
  • Standard: Requires Spatial Analyst
  • Advanced: Requires Spatial Analyst

Related topics

  • An overview of the Segmentation and Classification toolset
  • What is image classification?

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal