Select to view content in your preferred language

Remove near black edges off some rasters

5543
2
08-30-2013 09:05 AM
MarkVolz
Frequent Contributor
Hello,

I would like to mosaic hundreds of pictures into a single dataset.  Each individual picture has a near black frame around the edge, and there is a significant overlap between each image.  Currently when I add all the images I cannot see everything because the frame on the top image hides portions of the images below it.  I need to find a way to automatically remove the frames.  I should mention these are black and white air photos.



-The edges are not truly black, nor are they consistent so I cannot set a certain color to "No Data"
-There are legitimate areas that are darker than the boarder.  Therefore I cannot remove a color darker than a certain threshold.
-I cannot use a maximum function as the rasters are not perfectly georeferenced


Possible thoughts:
I created a shapefile that contains each raster boundary.  If there is an overlap could I automatically crop the raster image by a certain number of pixels?  This is the quickest method I can think of.

Any other idea?s
0 Kudos
2 Replies
MichaelStjernholm
Regular Contributor
The solution I have used is to :
a) Create a mosaic data set - if you read the help for manage image and raster data you may find other nice guidance on design and management of mosaic dat sets 🙂
b) Add the images to this mosaic data set
c) "Build footprints" using your black values as ignore/ Nodata values
d) Export the footprints as a polygon feature class and buffer it with a negative length to get the e.g. a shrinkage of 2-3 pixels to get rid of those pixels being gray due to the interpolation process between 0 and the real image data 
e) Import the "shrinked" features to replace the previously build footprints
f) You may now generate overviews or output image based on your preferred mosaicick order

Good luck

Michael Stjernholm
0 Kudos
MarkVolz
Frequent Contributor
Michael,

Thank you for your reply.  Your workflow wont work for me, but I think that I may be able to adjust it so that it will work.

The original images on my map have been scanned so that the edges are not pure "black", a single color, and in some cases the edge color may be the same color portions of the image such as water.  Therefore I cannot just assume a single color is "no data" nor can I use a threshold to set "no data."

But maybe this is what I can do:


1.  Build footprints around each image.
2.  Create a negative buffer of about 35 pixels so that it is large enough to remove any border.
3.  Import the "shrinked" images
4.  Add all the original images under the shrinked images.*
5.  Create a image from that.

Now I just need to figure out the best way of doing this in ArcGIS


*The cropped images will be on top and the originals would be on bottom incase I remove too much overlap in step 2.
0 Kudos