Friday, September 4, 2009

Interface for sprayer software

Software development was done using Visual Basic programming languages. Using this setup real- time testing can be done conveniently in the laboratory SFTL. ITMA, UPM.

Figure 10: The development of GUI to control an autonomous sprayer system.

Experiment on the nozzle sprayer areas

On this pixels selection a sample experiment is show on figure 9, if grass viewed in all areas (100%) of nozzle area partition, equal to the percent of pixels for green grass is average 20% and so on show on the table 1. End the last simple result for this system show on figure 9.
Figure 9: Percentage of green grass selection

Thursday, September 3, 2009

Percentage of the pixels count

Grass object for sprayer
Images grass on the picture, it’s must to be spraying on the real word. Where the system will be automatically on the pump for give air pressure in the poison tank and on the nozzle for start spraying the grass. But the system not to spraying the grass if quantity of grass on the spray area is vary small to spraying, so we describe percentage of green grass for spraying, show on figure 8.

Figure 8: Percentage of green grass for sprayer

See figure 8, if grass size bellow 0% to 20% the system not spraying the grass because it’s in small quantity of grass. So the system only automatically spraying if the quantity of grass area over then 20% on the spraying area.

Green Grass ditected by pixel value

The green grass color selected in is depend by user clicked on the image screen. From user clicked, we get RGB color pixel. On the RGB pixel value selected on the system, we set the range plus and minus 10 from the RGB selected pixel value, see Figure 6 show the algorithm for color pixel range from pixel selected.
R pixel value range = ( R > R pixel value selection -10 ) and ( R < R pixel value selection +10)
G pixel value range = ( G > G pixel value selection -10 ) and ( G < G pixel value selection +10)
B pixel value range = ( B > B pixel value selection -10 ) and ( B < B pixel value selection +10)

Figure 6: show the algorithm for color pixel range from pixel selected

Figure 7: Algorithm count the grass pixels value.

From RGB pixel value range the system must to be find out how many pixels on the images grab, The pixels selected used the RGB pixel value range, the condition to count total its show on figure 7, where the group of this pixels total it’s call color of grass for the grass object. Now the images grass object will find out from the images. Images grass on the picture, it’s must to be spray on the real word, we discuss about images grass object for spraying on the next paragraph.

Wednesday, September 2, 2009

Get pixel value on coordinate pixel

In the Visual Basic programming languages used the basic API pixel routines. This program system can read the RGB value every each pixels at all area of the image size. It’s still used function, f(x,y), with the array variables, function read one by one from first pixel to the end of pixel coordinate (see figure 1). The algorithm for read all pixels on that image is show on figure 5.

From two-dimension function, f(x,y);
  Read for f(x) = 0 until image width value
     Read for f(y) = 0 until image height value
        Get pixel value on coordinate pixel, f(x,y);
     End loop
  End loop

Figure/diagram 5: algorithm for get pixel value from image.

This algorithm (figure 5) will be showing all pixels value at all coordinate in image size on program, the total coordinate value is 108900 pixels locations. Using pixel value will be extract to the Red, Green, and Blue values, it call RGB color pixel. RGB output color pixel values that range from 0 to 255. as a result images can be analysis using the RGB color pixel, then from this result in any image grab conclusion is; the system can know what is color on that images have every each coordinates . From the knowledge the color of image, the system will be see that images grass and can know it’s the green grass. It’s need to spray, be discuss on the next paragraph.

Create partitions on your picture grab

1 picture grab (see figure 1) for 3 units nozzle. So this picture will be divided to 3 partition (see figure 3) for 3 nozzle spraying area. Every portion area for handle 1 nozzle. See figure 4 show algorithm for create 3 partition area from image pixel.

If x < and x =< 121 then
    [Partition for 1st nozzle area]
Else If x < 121 and x =< 242 then
    [Partition for 2nd nozzle area]
Else If x < 242 and x =< 363 then
    [Partition for 3rd nozzle area]
End if

figure/diagram 4: show algorithm for create 3 partition area from image pixel.