<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0">
<channel>
    <title>RoboRealm Forum</title>
    <link>http://www.RoboRealm.com/</link>
    <description>The newest forum threads.</description>
    <lastBuildDate>Tue, 30 Nov 1999 00:11:00 EST</lastBuildDate>
    <language>en-us</language>
    <copyright>Copyright: (C) RoboRealm, http://www.RoboRealm.com/</copyright>
    <docs>http://www.RoboRealm.com/</docs>

    <item>
        <title>No Title</title>
        <description>
        There are a couple ways of doing this ... doing the entire thing in VB is possible but will be slow.&lt;br&gt;&lt;br&gt;1. The structure of the GetPixels is litterally a red, green and blue number from 0 to 255 for every pixel in the current image. So one can expect that array to be width * height * 3 big.&lt;br&gt;&lt;br&gt;2. There are many ways of doing this. A quick answer is to just use the green value (i.e. 2nd value in each pixel triplet) since that represents gray the best or use (red + green + blue)/3 as the gray/intensity value. You can try both to see which way better suits you.&lt;br&gt;&lt;br&gt;Alternatively, I would use the Crop module to remove all but the part of the image that you want to check. Then you don&apos;t have to worry about the region limits from then on.&lt;br&gt;&lt;br&gt;I would then use the Threshold module to eliminate all the pixels not inbetween Min and Max.&lt;br&gt;&lt;br&gt;Finally, adding the Color_Statistics module would give me &quot;Area&quot; or the number of non-black pixels ... which is therefore the number of pixels that lay between min and max.&lt;br&gt;&lt;br&gt;Then you don&apos;t need any VBScript at all and its operating near realtime!&lt;br&gt;&lt;br&gt;See attached example.&lt;br&gt;&lt;br&gt;STeven.&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=5846</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=5846</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Counting Pixels With VBScript</title>
        <description>
        I would like to count the number of pixels in a specified region that fall within a specified grayscale range using VBScript.&lt;br&gt;&lt;br&gt;Input parameters: x1,y1,x2,y2,min,max&lt;br&gt;Output: num_pixels&lt;br&gt;&lt;br&gt;Where:&lt;br&gt;&lt;br&gt;x1,y1 = lower left coordinate of rectangular region measured in pixels&lt;br&gt;x2,y2 = upper right coordinate of rectangular region measured in pixels&lt;br&gt;min = lower grayscale threshold&lt;br&gt;max = upper grayscale threshold&lt;br&gt;num_pixels = number of pixels in the rectangular region that fall within the specified thresholds&lt;br&gt;&lt;br&gt;Perhaps this boils down to understanding:&lt;br&gt;&lt;br&gt;1) The structure of the array returned by GetPixels.&lt;br&gt;2) How to translate RGB values to grayscale.&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=5846</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=5846</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
