MaherUPM

Script tool

Discussion created by MaherUPM on Apr 18, 2014
Latest reply on Apr 20, 2014 by lpinner
Hello,
excuse me can someone make this code for me a script tool, I do not know what is the problem with me...
the code is working in python window...



import scipy.ndimage as ndi
import scipy
import numpy
import Image
import math
import arcpy
inpRaster= arcpy.GetParameterAsText(0)
sigma= arcpy.GetParameter(1)
desc = arcpy.Describe(inpRaster)
f = desc.catalogPath
img = Image.open(f).convert('L') #grayscale
imgdata = numpy.array(img, dtype = float)
G = ndi.filters.gaussian_filter(imgdata, sigma)
scipy.misc.imsave('D:\SEMETER ONE\DIGITAL IMAGE PROCESSING\Edge Detection Project\G.jpg', G)

please if you know the reason way the script tool do not save the result( output ) infer me.
thank you...

Outcomes