@@ -0,0 +1,1067 @@
+import arcpy%0Aimport skimage.filter%0A%0A# Using a subset to avoid memory problems. This is better in 64-bit.%0Atest = arcpy.Clip_management(%22027-044_rgb.tif%22,%22749250 1127500 750250 1128000%22, %22test%22) %0A%0A# Convert our raster image to a numpy array.%0Animg = arcpy.RasterToNumPyArray(%22test%22)%0A%0A# Break out each band of the image for edge detection.%0Arband = nimg%5B0%5D%0Agband = nimg%5B1%5D%0Abband = nimg%5B2%5D%0A%0A#Detect edges with the Sobel filter.%0Aredge = skimage.filter.sobel(rband)%0Agedge = skimage.filter.sobel(gband)%0Abedge = skimage.filter.sobel(bband)%0A%0A#Composite results and make raster.%0Aedges = redge + gedge + bedge%0Aeimg = arcpy.NumPyArrayToRaster(edges,arcpy.Point(749250,1127500), 0.5, 0.5)%0Aeimg.save(u'sobeledges')%0A%0A#Detect edges with the Canny filter.%0Arcanny = skimage.filter.canny(rband)%0Agcanny = skimage.filter.canny(gband)%0Abcanny = skimage.filter.canny(bband)%0A%0A#Composite results and make raster.%0Acannyedges = rcanny.astype(int) + gcanny.astype(int) + bcanny.astype(int)%0Acimg =  arcpy.NumPyArrayToRaster(cannyedges,arcpy.Point(749250,1127500), 0.5, 0.5)%0Acimg.save(u'cannyedges')%0A

Create usingSkimage.py