Maybe i'm missing a basic concept when it comes to manipulating/removing values from an RGB orthophoto mosaic. Is it possible to completely eliminate the collar (black background) from an orthophoto mosaic that is in an ECW format. I was able to do in a TIFF format but the file needs to be in an ECW format as it is very large. I've had limited success, using FME, to accomplish this but the resultant file always has areas that are not removed. Hope all this make sense.

I'm open to other formats that will work, but as long as it performes to the same level as an ECW.

I have access to FME and ArcInfo.

  • I am trying to do the same. Replacing the collar around an .ECW file. Kan you send me the FME workbench. Thanks,
    – Cecília
    Apr 16, 2013 at 13:05

3 Answers 3


This is a limitation of early versions (<= 3.3) of the ECW format which didn't support NoData values or Alpha transparency. The lossy compression makes it even harder to remove the collars as the black values aren't exactly RGB 0,0,0 but vary.

To get rid of the collar you'll need to mask/clip the collar and convert the image to another format that does support NoData values, mask bands or Alpha transparency. You can use ECWs compressed using version 4 or later of the ERDAS ECW/JP2 SDK, JPEG2000 or Geotiff.

There are a few ways to remove the collar, I tend to either draw a polygon around the "good" data and clip with that or use the GDAL nearblack utility.

  • Thanks for the response. Yes, the problem is that the black, well ... isn't all that black, but varies from 0 to 6 (in my case). I have tried JPEG2000, and although compresion sizes are similar, rendering performance is far superior with an ECW format. Does MrSID support no data?
    – dchaboya
    Jan 27, 2012 at 21:56
  • MrSID has the same problem with the version of the format (GEN3) supported by ArcGIS 10.0, although MrSID GEN4 does support alpha bands. According to this thread, MrSID GEN4 support is targeted for the ArcGIS 10.1 release.
    – blah238
    Jan 27, 2012 at 22:44
  • The GDAL nearblack utility is exactly for the case that the border is not perfectly black. Wit-color c1,c2,c3...cn: (GDAL >= 1.9.0) you can search for pixels near the specified color.
    – markusN
    Jan 28, 2012 at 8:21
  • I'll try the nearblack utility. So it appears that all lossy compression formats don't support nodata. Can anyone briefly explain the reason behind lossy compressions not being capable of supporting nodata.
    – dchaboya
    Jan 28, 2012 at 19:34
  • ECW alpha band transparency was introduced in SDK v4 (2009). ArcGIS 10.2+ and QGIS 2.2+ support it for reading (source: blog.hexagongeospatial.com/help-ecw-speckled-edges, which has good explanation of difference between Nodata Pixels and Alpha Channel). I don't know about writing. Jul 25, 2017 at 17:52

ECW since 2010 has supported alpha transparency that removes what you refer to as "collars". This is a legacy limitation in ECW v3 files only.

ECW v4 files are written automatically by all ERDAS software tagged 2010 and above which includes Imagine and ERMapper. Third party products that use the v4 SDK may support writing or certainly reading this file version (reading is provided free of charge for desktop apps). I do not know off-hand if FME 2012 have updated their ECW support

Note: The ECW format versions are backwards compatible. If you have an ECW v4 file with an alpha band defined but are reading with an application using the v3 SDK, the additional band will simply be ignored. Check the erdas.com website for some free ECW plugins, specifically for your ArcInfo license that will add ECW v4 support

Unfortunately the prevalence of v3 compressors has meant many people assume the limitations remain and is somehow a limitation of wavelet formats. This is not certainly not true



There are ways to manipulate FME 2012 to remove the collar. It is a complicated process and too much to type here. One quick way to show how it can be done is to use the RasterExpressionEvaluator and the expression


Where MAXPIXVALUE is a user parameter set to the max pixle value to be considered black. In my case it was around 8. The expression searches each pixel and band. If any one band has a value less than than the MAXPIXVALUE specified it considers that cell to have no data. If the pixel value is say 9,8,8 it will leave the pixel as is because one band is higher than the specified value.

In my scenario, I used the expression to create a shapefile that fit the imagery exactly and clipped the original ecws to the shapefile created by the expression.

  • Excellent. Will give this a try. I'm suspecting that this operation will take some time to complete on a large dataset.
    – dchaboya
    Oct 30, 2012 at 15:14
  • Yes. Very much so. My data sets run anywhere from 2- 2000 ecws and the workbench runs on average 2-48 hours. Oct 30, 2012 at 16:42
  • I'm getting an error when trying to run it (probably not setting it up correctly). So I replaced MAXPIXVALUE with the max value I want to replace, like so (2). Now, I'm not sure how to use the ports. Any suggestions?
    – dchaboya
    Oct 30, 2012 at 21:31
  • Im not sure. I would need to look at the workbench and see. Email me your workbench with the log file from the last time you ran it. I will see what I can do with it. Oct 31, 2012 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.