<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sobel edge detection in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407899#M32125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;try r'D:\Outputs\sobel.jpg'&amp;nbsp; for the filename&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Apr 2014 16:02:37 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2014-04-17T16:02:37Z</dc:date>
    <item>
      <title>Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407893#M32119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody tell what is wrong with this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it works in python window, but when I make it script tool does not work &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;please help &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;..............................................&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import scipy.ndimage&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import numpy,arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import PIL.Image&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;inpRaster=arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;desc = arcpy.Describe(inpRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layersource = desc.catalogPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;imageread=scipy.ndimage.imread(layersource)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sobelimage=scipy.ndimage.sobel(imageread,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outimage=PIL.Image.fromarray(sobelimage)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Out=outimage.save('D:\Outputs\sobel.jpg')&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 14:42:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407893#M32119</guid>
      <dc:creator>MaherAL_ZUHAIRI</dc:creator>
      <dc:date>2014-04-17T14:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407894#M32120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;what is the error message?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 14:54:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407894#M32120</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-04-17T14:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407895#M32121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;what is the error message?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No error message, just after click OK to execute the text file open (Code file).........&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 15:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407895#M32121</guid>
      <dc:creator>MaherAL_ZUHAIRI</dc:creator>
      <dc:date>2014-04-17T15:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407896#M32122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try running this version with an error handler and see if you get an error message to post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# ---------------------------------------------------------------------------
# NeighborScore.py
# Created on: 2013-01-07 13:26:35.00000
# Updated on: 2014-02-12
# Description: Will create output tables based on the average and sum of neighboring polygon values
# ---------------------------------------------------------------------------

#B comment: I believe this is as the script was delivered on Feb 12 2014
#B comment: See most recent NeighborScore_Working version for most current version
try:&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; import sys
&amp;nbsp;&amp;nbsp;&amp;nbsp; import traceback
&amp;nbsp;&amp;nbsp;&amp;nbsp; import scipy.ndimage
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy,arcpy
&amp;nbsp;&amp;nbsp;&amp;nbsp; import string
&amp;nbsp;&amp;nbsp;&amp;nbsp; import PIL.Image

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True

&amp;nbsp;&amp;nbsp;&amp;nbsp; inpRaster=arcpy.GetParameterAsText(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(inpRaster)
&amp;nbsp;&amp;nbsp;&amp;nbsp; layersource = desc.catalogPath
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; imageread=scipy.ndimage.imread(layersource)
&amp;nbsp;&amp;nbsp;&amp;nbsp; sobelimage=scipy.ndimage.sobel(imageread,0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; outimage=PIL.Image.fromarray(sobelimage)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Out=outimage.save('D:\Outputs\sobel.jpg') 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
except arcpy.ExecuteError: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "error"
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = arcpy.GetMessages(2) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "error"
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; tbinfo = traceback.format_tb(tb)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(pymsg)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print pymsg + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:33:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407896#M32122</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2021-12-11T18:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407897#M32123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try running this version with an error handler and see if you get an error message to post.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# ---------------------------------------------------------------------------
# NeighborScore.py
# Created on: 2013-01-07 13:26:35.00000
# Updated on: 2014-02-12
# Description: Will create output tables based on the average and sum of neighboring polygon values
# ---------------------------------------------------------------------------

#B comment: I believe this is as the script was delivered on Feb 12 2014
#B comment: See most recent NeighborScore_Working version for most current version
try:&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; import sys
&amp;nbsp;&amp;nbsp;&amp;nbsp; import traceback
&amp;nbsp;&amp;nbsp;&amp;nbsp; import scipy.ndimage
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy,arcpy
&amp;nbsp;&amp;nbsp;&amp;nbsp; import string
&amp;nbsp;&amp;nbsp;&amp;nbsp; import PIL.Image

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True

&amp;nbsp;&amp;nbsp;&amp;nbsp; inpRaster=arcpy.GetParameterAsText(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(inpRaster)
&amp;nbsp;&amp;nbsp;&amp;nbsp; layersource = desc.catalogPath
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; imageread=scipy.ndimage.imread(layersource)
&amp;nbsp;&amp;nbsp;&amp;nbsp; sobelimage=scipy.ndimage.sobel(imageread,0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; outimage=PIL.Image.fromarray(sobelimage)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Out=outimage.save('D:\Outputs\sobel.jpg') 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
except arcpy.ExecuteError: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "error"
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = arcpy.GetMessages(2) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "error"
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; tbinfo = traceback.format_tb(tb)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(pymsg)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print pymsg + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PYTHON ERRORS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 23, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"" does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcPy ERRORS:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:33:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407897#M32123</guid>
      <dc:creator>MaherAL_ZUHAIRI</dc:creator>
      <dc:date>2021-12-11T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407898#M32124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The error message because the function GetParameterAsText(0), so I used raster data instead , the error message has gone .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in other words, no error message in the code, but the problem I think is in the output function. the code is executed but the save function does not apply.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 15:38:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407898#M32124</guid>
      <dc:creator>MaherAL_ZUHAIRI</dc:creator>
      <dc:date>2014-04-17T15:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407899#M32125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;try r'D:\Outputs\sobel.jpg'&amp;nbsp; for the filename&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 16:02:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407899#M32125</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-04-17T16:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sobel edge detection</title>
      <link>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407900#M32126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Same problem, can I convert the image into raster using RasterCopy Management. so may be that image will be saved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if it is possible how can I do it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 16:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sobel-edge-detection/m-p/407900#M32126</guid>
      <dc:creator>MaherAL_ZUHAIRI</dc:creator>
      <dc:date>2014-04-17T16:10:23Z</dc:date>
    </item>
  </channel>
</rss>

