Removing the white border from a raster

4325
4
11-18-2017 09:17 PM
iankirschner
New Contributor

I have a high resolution ecw raster that has a white border around the imagery. The pixel values for the white border are not 1 RBG value so I am not able to set a No data value and apply no color. I have tried clipping but it has not worked.

Tags (1)
0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

what do you mean by clipping has not worked?  You can set a new analysis extent that effectively 'trims' off a border area and export it to a new raster doing

Your image is a big confusing, is that one image on top of the other? If that is the result of clipping then it suggests another issue

0 Kudos
larryzhang
Occasional Contributor III

ian,

For ECW file (created by ER Mapper or ERDAS Imagine), users very often see this type of black or white edge issue. Right now, Hexagon Spatial (ERDAS Intergraph) usually recommend users to use JP2 (rather than ECW) for interoperation.

In order to remove the black or white edge issue around the ECW file, you may try below:

1. to import ECW into IMG by ERDAS Imagine, then clip dirty edge of this IMG file in ERDAS, or manage this IMG dataset in MD via manually editing footprint (preferable);

2. directly add ECW into MD and then manually edit footprint in MD to remove white edge (not recommendable)

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi

If you build a Mosaic Dataset you can digitize the boundary of your raster to anything you like. You can even try to use BuildFootprint to digitize it for you. It can give you nice results if you select the correct parameters.

You can even export the mosaic dataset tile and will get NoData outside the footprint polygon but you cannot export to ECW.

Have fun

0 Kudos
juliaha
New Contributor II

Hi Ian,

I found a nice description of exactly your problem: https://support.esri.com/en-us/knowledge-base/how-to-remove-the-background-of-raster-imagery 

and https://support.esri.com/en-us/knowledge-base/how-to-remove-the-white-background-of-a-tiff-image 

The topic might not be relevant for you anymore, but maybe for the rest of the community.