Skip to main content

I have used RasterMosaicker to mosaic 4 ECW images into a single ECW image. Prior to mosaicking none of the images had black areas around the edges. After mosaicking my output shows two locations that are black on the edge of the image. 

 

I checked and these black areas have data, various values of 1,0,1; 0, 1, 0; 1, 2, 1; and several other values. Any suggestions on how to remove the black areas? I have tried Clipper and it does not clip the black areas, they remain in the output.

Sounds like an aliasing effect due to the mosaicker. You can try to play around with the settings of the RasterMosaicker to see if that improves the result, if not you may have to implement something to "snap" these values to NODATA, e.g. using the RasterCellValueReplacer.


@timh​ Does the workspace here give you what you need?


If by "remove black areas" you're meaning make them transparent, then (if i recall correctly) ECW doesn't support transparency. Additionally, because ECW is a lossy compression, you're going to notice things like this where "black" isn't "black".

 

You can set some range that classifies the "black" edges ( eg 0-10,0-10,0-10) to solid black in the workspace. however,

  1. When writing out to ECW again, you will likely see these change again
  2. You might remove/change valid dark areas in the imgarey
  3. as you get closer to the non black areas, you'll probably still have a "black" shadow as those values exceed the specified range

Reply