Fig. 6 shows the flowchart of the system. In the preprocessing phase is generated a copy of the image captured by the camera. This
image is converted from the RGB (red, green, blue) to grayscale image.
The histogram function allows specifying a tolerance value in the search for the minimums and maximums..
On this image, smoothing is performed, which removes many of the high-frequency noise