<?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 Image processing in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339211#M3322</link>
    <description>&lt;P&gt;Dear Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I applied some image processing technics in order to get a more focussed configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7613i1439DE92DD64AADA/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This photo consist of a matrix of 0 (black) and 1 (white).&lt;/P&gt;&lt;P&gt;My objective is identify all the white circles and to fill them with white color (transform 0's to 1's).&lt;/P&gt;&lt;P&gt;Do you think it is possible to detect the circles and then do this action?&lt;/P&gt;&lt;P&gt;Thanks a lot ofr your help.&lt;/P&gt;&lt;P&gt;Krs,&lt;/P&gt;&lt;P&gt;Samir&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 13:05:05 GMT</pubDate>
    <dc:creator>Sam21041979</dc:creator>
    <dc:date>2017-03-08T13:05:05Z</dc:date>
    <item>
      <title>Image processing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339211#M3322</link>
      <description>&lt;P&gt;Dear Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I applied some image processing technics in order to get a more focussed configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7613i1439DE92DD64AADA/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This photo consist of a matrix of 0 (black) and 1 (white).&lt;/P&gt;&lt;P&gt;My objective is identify all the white circles and to fill them with white color (transform 0's to 1's).&lt;/P&gt;&lt;P&gt;Do you think it is possible to detect the circles and then do this action?&lt;/P&gt;&lt;P&gt;Thanks a lot ofr your help.&lt;/P&gt;&lt;P&gt;Krs,&lt;/P&gt;&lt;P&gt;Samir&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 13:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339211#M3322</guid>
      <dc:creator>Sam21041979</dc:creator>
      <dc:date>2017-03-08T13:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Image processing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339227#M3323</link>
      <description>&lt;P&gt;I think this is a difficult task. There have been research papers written in computational&amp;nbsp;geometry and computer vision that address this kind of problem, but there are mathematical as well and computational issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a few reasons it is hard. First, the pixels are discrete, so you have to define rules for recognizing a closed polygon when the edges are pixels. Second, it is not clear what is inside or outside. Third, this is a problem of global&amp;nbsp;geometry, not local geometry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the first problem, consider the following region:&lt;/P&gt;
&lt;P&gt;010&lt;/P&gt;
&lt;P&gt;101&lt;/P&gt;
&lt;P&gt;010&lt;/P&gt;
&lt;P&gt;You would have to define a rule whether to change the middle cell to white,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, consider the following pixels:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;11111111111&lt;/P&gt;
&lt;P&gt;1001001001&lt;/P&gt;
&lt;P&gt;1001111001&lt;/P&gt;
&lt;P&gt;1000000001&lt;/P&gt;
&lt;P&gt;11111111111&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These pixels approximate a self-intersecting loop, but also two nested circles, like this&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7615i1A6FCAE0CFFF2945/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Untitled.png" title="Untitled.png" /&gt;&lt;/P&gt;
&lt;P&gt;It is not clear which zeros should be changed to 1s.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The situation is even worse when some&amp;nbsp;of the pixels touch the boundary, as yours do. Then it is not clear where the INSIDE of the curve is. &amp;nbsp;For example, can you find the inside of the inside of the following image?&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7616iFA48DE1A8FBC587F/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="download.jpg" title="download.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In summary, I think you should discuss this problem with a computer scientist who might know if there is specialized software. I suspect it will be daunting to write&amp;nbsp;an algorithm yourself in a general-purpose language like SAS/IML.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 13:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339227#M3323</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-08T13:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Image processing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339240#M3324</link>
      <description>&lt;P&gt;Firstly that image contains open circles, how would you handle that, or just lines?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS wouldn't be the way I would choose to do this. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would do is this (and you may be able to batch mode this):&lt;BR /&gt;Get a proper image editing package - GIMP for instance.&lt;/P&gt;
&lt;P&gt;Use this package to create another layer to the image, fill the image with white - i.e. so the circles would still be black but everything else would be white.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the two layers to create a merged image, i.e. if black in base layer, and black in top layer then black, if black&amp;nbsp;in top layer then black, else white. &amp;nbsp;Maybe mask top as white is transparent:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.gimp.org/en/gimp-image-merge-layers.html" target="_blank"&gt;https://docs.gimp.org/en/gimp-image-merge-layers.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However this is outside the scope of this forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 13:58:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339240#M3324</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-08T13:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Image processing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339241#M3325</link>
      <description>&lt;P&gt;Firstly that image contains open circles, how would you handle that, or just lines?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS wouldn't be the way I would choose to do this. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would do is this (and you may be able to batch mode this):&lt;BR /&gt;Get a proper image editing package - GIMP for instance.&lt;/P&gt;
&lt;P&gt;Use this package to create another layer to the image, fill the image with white - i.e. so the circles would still be black but everything else would be white.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the two layers to create a merged image, i.e. if black in base layer, and black in top layer then black, if black&amp;nbsp;in top layer then black, else white. &amp;nbsp;Maybe mask top as white is transparent:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.gimp.org/en/gimp-image-merge-layers.html" target="_blank"&gt;https://docs.gimp.org/en/gimp-image-merge-layers.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However this is outside the scope of this forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 13:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339241#M3325</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-08T13:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Image processing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339253#M3326</link>
      <description>&lt;P&gt;This tends to be a very sophisticated problem, not easily soled by a non-programming(EG server) oriented system like SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have poseted a python maze image soltion in SAS-L. However I would investigate&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.pyimagesearch.com/2014/07/21/detecting-circles-images-using-opencv-hough-circles/" target="_blank"&gt;http://www.pyimagesearch.com/2014/07/21/detecting-circles-images-using-opencv-hough-circles/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for circles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is doable in python. I have also posted an interface to python from SAS. As a side note WPS has a python interface. I don't think SAS should waste resources on image processing because Python has easly usable packages?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 14:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339253#M3326</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-03-08T14:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Image processing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339562#M3327</link>
      <description>&lt;P&gt;Dear Everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will do some investigations according to your replies and go back to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Samir&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 08:51:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Image-processing/m-p/339562#M3327</guid>
      <dc:creator>Sam21041979</dc:creator>
      <dc:date>2017-03-09T08:51:25Z</dc:date>
    </item>
  </channel>
</rss>

