>>  Research >>  Sentinel

 Navigator

# 5. Discretized Image Data

After receiving the image from the web cam and reducing it to its binary equivalent, we processed the image and retrieved information on its area, centroid, and borders. What we have found was that the centroid did not provide any useful information. Border and area analysis proved to be far more useful in recognizing unique properties for the left, right, and fork commands. Below is a pictographic representation of the data we have collected - area data, border data, and horizontal line percentage. For optimization, all data was gathered from one double for-loop through all the pixels in the image.

## 5.1 Area Data

The single letters in the area diagram can be inferred to be left, right, center, top, middle, and bottom. We had devised a nine grid quadrant hoping to provide enough information for us to make decisions, based on activity in specific regions. Within each quadrant, the area is calculated.

The border diagram below illustrates how we use "pixels at the edges" to localize a few characteristics of decisions.

 Figure 1.9: Area Data

## 5.2 Border Data

The number of pixels in each border zone are recorded and saved (e.g. left top, center top, and right top would all equal zero pixels). The borders can be thresholded in this data retrieval algorithm as well. This is a way of ensuring better accuracy. For example, if the border was a thickness of 1 pixel and the line flowed towards the "left left top" border but did not actually touch that border, this delivers misinformation. Having a thresholded border of 5 pixels gives enough cushion to counteract that glitch.

 Figure 1.10: Border Data

## 5.3 Horizontal Line Percentage

This intuitively does not seem useful as a generalized function, but we required it to counteract some of the domain engineering problems. The horizontal line percentage variable stores the highest percentage of white pixels to total pixels in one particular line (to understand its usage, please read 'Solutions to Environmental Issues' below).