How to remove borders from aerial photos using a template?
I have many (100's) of Aerial orthographic images which all have the normal borders containing flight information and compass needle etc. I need to remove these border and mosaic the raster images into one large image without overlaps. Could anyone offer a good, well thought out method of doing this with fme?
Hi,
Assume that the sizes of the template raster and all the ortho photo rasters are identical.
- Create a donut which represents the common border area from the template raster, and normalize its extents (e.g. move the left-bottom corner to (0,0)).
- After normalizing the extents of each ortho photo raster to fit the normalized extents of the donut, clip them by the donut with the Clipper.
- Pick the resulting rasters from the Outside port of the Clipper, restore their original extents, and then mosaic them with the RasterMosaicker.
- Create a polygon represents the extents of the merged photo area with the RasterExtentsCoercer (Extents Type: Data Extents), and clip the mosaicked raster by the polygon to remove the most outer border area.
- The way to create the donut in the step 1 is different depending on the properties of the template.
- The BoundsExtractor (or the RasterPropertyExtractor) and Offseter (e.g. X Offset: -xmin, Y Offset: -ymin) can be used to normalize extents of rasters, and another Offseter (e.g. X Offset: xmin, Y Offset: ymin) can be used to restore the original extents.
- If the original ortho photo rasters don't have Nodata definition, you have to define a preferable Nodata with the RasterBandNodataSetter before clipping in the step 2.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.