Our vision hardware was an ITEX imaging system consisting of a Modular Vision Computer (MVC) 150/40 and a CCD camera combined with a Sun Ultra 1 already at the laboratory. By mounting the camera approximately 10 feet above the maze, we were able to capture a 256 level gray scale image of the entire maze packaged 512 by 480 pixels with a resolution of 72 pixels per inch.
In order to integrate the computer interface with the vision system, we constrained ourselves to write our computer interface software in C on a Sun Ultra 1 running Solaris so that it could wholly contain proprietary ITEX imaging software.
The CCD camera and the ITEX imaging system capture thirty frames per second. The program mark.c was written to find the robot within the maze. Mark.c was written primarily to run as quickly as possible. In order to accomplish this goal, it was necessary to minimize the number of pixels processed by the routine. A runtime of one-tenth of a second was sought and achieved.
A Java applet, scan.java was written as a testing program to graphically display the individual pixels sampled by proposed algorithms. Scan.java was then compiled into scan.class, a Java applet. This applet also provided a method whereby we could quickly and visually check the alignment of the camera to the maze. Scan.html runs this applet and demonstrates the base algorithm. Scan.html presents an image of the maze as viewed though the CCD camera as a JPEG file. Scan.class scans the image and each scanned pixel is replaced by a white pixel, as it is assessed. The effect is to graphically demonstrate the operation of the algorithm in mark.c. While scan.html and scan.class run fine on both Netscape and Internet Explorer clients in both Windows and Macintosh environments, UNIX browsers have trouble running the applet with the animation.
Mark.c captures a frame of the image of the maze from above and holds that frame in memory. Mark.c then looks at the value of every sixth pixel, a candidate pixel, of the frame. It thresholds the pixel's value and if that value falls within the preset range, the program then looks at four pixels surrounding the candidate. If the candidate pixel is (x,y), the four surrounding pixels whose values are assessed are (x-4, y-4), (x+4, y-4), (x-4, y+4), and (x+4, y+4). If all five pixels fall within the prescribed threshold value, the robot is found within the maze. The robot position is then calculated and the cell (1-15,1-15) the robot occupies is consequently reported.
Mark.c effectively finds the robot within the maze, but processes only about 6,900 of the 245,760 pixels in the image of the maze. The average runtime of mark.c is .1034 seconds. Effectively, this allows us a look at every third frame.
Introduction | Overview | Maze | Interface | Learning | Vision | Robot | Integration | Bibliography