<?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>Java byte to int code</title>
        <description>
        Ibrahim,&lt;br&gt;&lt;br&gt;Ok, you are using the extensions ... that is a little different.&lt;br&gt;&lt;br&gt;What you have is a 4 byte per int situation. You need to convert the byte array to an int array using something like &lt;br&gt;&lt;br&gt;int byteToInt(byte data[], int offset)&lt;br&gt;{&lt;br&gt;return (data[offset]&amp;255)|((data[offset+1]&amp;255)&amp;lt;&amp;lt;8)|((data[offset+2]&amp;255)&amp;lt;&amp;lt;16)|((data[offset+3]&amp;255)&amp;lt;&amp;lt;24);&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;int arr = new int[data.length&amp;gt;&amp;gt;2];&lt;br&gt;int j,i;&lt;br&gt;for (j=i=0;i&amp;lt;data.length;i+=4, j++)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arr[j]=byteToInt(data, i);&lt;br&gt;&lt;br&gt;(note .. above is untested and uncompiled code!!)&lt;br&gt;&lt;br&gt;which should give you the final 4 int array that we last talked about. Again this array should be a multiple of 4 and each 4 ints define a line segment.&lt;br&gt;&lt;br&gt;STeven.&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=419</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=419</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>No Title</title>
        <description>
        I was using the example Extension, and in the method ProcessVariables or something I added:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (name.equalsIgnoreCase(&quot;HOUGH_LINES&quot;))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(&quot;Hough lines something&quot;);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(int i=0;i&amp;lt;data.length;i++){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(data[i]!=0) System.out.println(&quot;Position&quot;+i+&quot; holds &quot;+data[i]);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;and data is a byte array with 1024 values. The signature for the function is&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int ProcessVariable(BufferedOutputStream writer, BufferedInputStream reader, ImageDataType imageData, String name, byte data[], int len) throws IOException&lt;br&gt;How can I parse this array into a proper array of points? The example has a method ByteToInt that converts a byte into an int and is used to get the width and height. Should I construct a new string using the byte array? That makes sense I guess. Thanks for the help.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=419</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=419</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>HOUGH_LINES</title>
        <description>
        Ibrahim,&lt;br&gt;&lt;br&gt;You should get back a bunch of number separated by commas that reflect the lines of the hough_transform. For example, if you execute&lt;br&gt;&lt;br&gt;telnet localhost 6060&lt;br&gt;&amp;lt;request&amp;gt;&amp;lt;get_variable&amp;gt;HOUGH_LINES&amp;lt;/get_variable&amp;gt;&amp;lt;/request&amp;gt;&lt;br&gt;&lt;br&gt;assuming one Hough line you would get back&lt;br&gt;&lt;br&gt;&amp;lt;response&amp;gt;&amp;lt;HOUGH_LINES&amp;gt;53,246,548,249&amp;lt;/HOUGH_LINES&amp;gt;&amp;lt;/response&amp;gt;&lt;br&gt;&lt;br&gt;which returns the coordinate for one line as xstart,ystart -&amp;gt; xend, yend&lt;br&gt;&lt;br&gt;Assuming you are using the Java wrapper class you should be getting back the sequence of numbers as a string. &lt;br&gt;&lt;br&gt;Yes, the number are multiple of fours since you need a start and end coordinate of both X and Y numbers.&lt;br&gt;&lt;br&gt;I&apos;m not sure why you are getting back a 1024 byte array. Which API routine are you using or is this custom?&lt;br&gt;&lt;br&gt;STeven.&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=419</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=419</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Java Socket Programming with Hough_lines</title>
        <description>
        How do I make sense of the data that I get from the variable HOUGH_LINES in Java? I&apos;m using sockets and I get a 1024 value byte array, although the vast majority are empty and there are enough values to coordinate with x and y coordinates for the endpoints of each line. The data seems to be randomly put into the array, although most indices are multiples of 4.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=419</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=419</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
