I have just converted RGB-TIF images to RGB-ECW for reasons of space and performance in ArcGIS. However, after the conversion, there are relics outside of the images which are not nodata values but have the values 0,1,0 or 1,1,0 or 1,2,1 etc. All very low values which are shown as black remnants after I set nodata values to transparent. (See attatchment)

I have ArcInfo and FME at hand and would like to either change these rgb values to 0,0,0 or clip all values outside of the aerial extents. Could anyone offer a tip on the most efficient way to achieve this?

Image remnants:

Image remnants


You could make a mask of just the areas you want and then use that to clip the mosaic. You can do this either by getting the extents of the parts of the image or it looks simple enough to digitize quickly and accurately.

Another alternative would be to use GDAL. Although you don't list it, it is free so you effectively have access to this too. There is a utility called nearblack. You could use nearblack to set allthese bits to be black (0,0,0).

My preferred option would be the clip/masking one because you do not risk effecting any pixels within the area you want to keep. It is also very simple.

  • Thanks. I have many other images which also have this problem. How could I get the extents of the images? Until know I could only find out how to get the envelope - which obviously included the black areas too. Feb 20 '14 at 13:51
  • Can you say a little bit about the origin of the images and any processing prior to mosaicing? Feb 20 '14 at 14:20
  • They are originally TIFs 2kmx2km in resolution 20cm which are been first converted to ecw and mosaiced using the RasterMosaicker Transformer in FME2014 Feb 20 '14 at 14:26
  • Also it seems that gdal can´t write to ecw due to it being a propreitary format. The Plugin for ecw is read only according to the docs. Feb 20 '14 at 14:36
  • I'd do all the mosaicing and 'nearblack' work before I convert to ecw. Since that's my final desired format, I'd make the conversion the final step. Feb 21 '14 at 8:35

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.