Once an object is captured on camera, the vision system first takes a
binary process to save memory and to ease image processing. The
binary process is based on the threshold value, but this varies on
environment. Thus, a histrogram is introduced to determine an
appropriate threshold value for captured image. Next, an edge
detection technique is employed to calculate the size and shape
of obstacles. In this work, Prewitt mask is used because it provides
thinner edges compared with Sobel mask. In Fig. 11 two results of
edge detection are shown where the left image is done by Sobel
mask and the right one is done by Prewitt mask. As seen the results,
even after edge detection is done, undesirable noise remains. The
noise is eliminated by median filter.
Once the image is converted to edged image, the center of
obstacle is computed from maximum and minimum pixel in
x- and y-direction, respectively. In other words, the center of
obstacle is calculated as follows.