Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Script tool

$
0
0
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...

Viewing all articles
Browse latest Browse all 2485

Trending Articles