Highway Visual Tracking System using Thresholding and Hough Transform

A highway visual tracking system using UAV based digital image. This highway tracking system created by using computer vision. The methods used in this system are the RGB HSV conversion, colour detection, edge detection, thresholding, dilation canny edge detection, Hough transform, and moments. Prior to image processing, capture video of the highway. In image processing, highways video is prepared to enter image preprocessing, then administer the thresholding and dilation process. This was followed by the method of moments to get the coordinates of the first phase tracking. Next, the X-coordinate is used as a reference to determine the region of interest (ROI). ROI is processed using the Canny edge detection followed hough transform to refine the detected lines into the desired line. Coordinates x line average can be computed which then shows the position of the highway. The programs used in the process of road tracking are using OpenCV 2.3.1 and Visual Studio 2010. The programming language used is C++. Tests carried out using video of highway taken directly from Youtube. The highway HSV colour values are in the range of 20, 3, 30-180, 32.169 and the environment around the highway consists of green vegetation, terrain, office buildings, houses, and trade stalls. The materials that affect the outcome of visual tracking are the presence of a vehicle on the highway and other objects that exist around the highway.


Introduction
The highway is a transportation infrastructure that includes all parts of the road, including complementary buildings and equipment that is intended for traffic, which is at ground surface, above ground surface, below ground surface and/or water, and above the water surface, except railroad tracks, lorry roads and cable roads (UU No. 38 of 2004).The monitoring of highway such for traffic monitoring is needed as a first step to track the position of the highway itself [1].One of the media that can be used for highway visual tracking is Unmanned Aerial Vehicle (UAV).UAV is capture the condition of the highway from the top, the video can be processed using digital image processing [2].
The UAV visual tracking system related with a lot of knowledge such as image processing, computer visualization, flight mechanics, automatic control, electronic machines and so on [3].Digital image processing is a study discipline matters relating to improving image quality (contrast enhancement colour transformation, image restoration) [4].Research that develops and test a robust algorithm and novel with a static sparse online dictionary and dynamic is updated based on distribution, which can adapt to change appearance and limit drifting [5].
Image processing is a method of extracting some useful information by converting image into digital inform by performing some operations on it.Object detection and tracking are the task that is important and challenging such as video surveillance and vehicle navigation.Video surveillance is a technology which works in dynamic environment in various events such as sports, public safety, and management of traffic.[6].
The system can make image detection from runaway that is processed become output as data coordinate.The system detects the white line of the runaway [7].This research uses RGB to HSV converter, thresholding, blob, segmentation, and region of interest [8].
The river tracking system created by using computer vision.The method used this system are moment method, thresholding, dilation.Prior to image processing, the steps being taken are making a river's video.On image processing, river's video to be processed captured image preprocessing is then performed, followed by thresholding and dilation to detect the colour of the river, followed by a moment method for tracking the river, and the latter displays the results of tracking the river [9].

Statement of the Problem
From the description of the background, it can be identified with the following issues.Highway tracking needs to differentiate the highway and the surrounding area.We can differentiate the highway with its surrounding area by using digital image processing.Highway visual tracking needs the algorithm to process the captured image from the highway.

System Design
System design of highway visual tracking has consisted of 3 steps: video capturing, video processing, and highway tracking.First, video capturing we used Quadcopter and camera GO Pro Hero 2. Second, video processing that using openCV 2.3.1 and Visual Studio 2010 on the laptop.Video processing is show result in the coordinate of UAV position.By using this data can be tracking the highway.Figure 1 shows the system design of highway visual tracking.

Figure 1. Visual Tracking System Design
The system can import the video file, that is processed to detect the highway by using colour detection and line detection.The result is shown as x coordinate from the calculation after line detection.
This design software in the visual tracking system has been found in the image processing process.The input is a video that taken using the camera from an Unmanned Aerial Vehicle.Software design is divided into three parts: preprocessing image, highway detection using thresholding and Hough transform, and highway visual tracking.

Preprocessing Image
The video file from the camera import to the system as an input.An algorithm is implemented in this system to read the input file, the input file must be in .mp4format.Figure 2 showing the video reading flowchart.
Video file is shown with resolution 480 x 720 pixel in order to make computation faster.This resolution configuration also can reduce the consumption memory.Resolution 480 x 720 pixels is the ideal size, even this size is not too big or small.The system is purposed the property from the video file and preview this video on the mainframe.

Colour Detection
Highway detection process using colour detection and edge detection.Figure 3 illustrates the colour detection process in highway detection.After getting the colour image we convert the image from RGB to HSV.Then, thresholding is processed to distinguish the desired object from the background.Thresholding is made a minimum HSV scalar limit and a maximum scalar the colour, the colour range is defined as an object [10].In research, the colour that is defined as an object is the colour of the highway.While colours other than highway colours are defined as background colours.To smooth the existing biner image, a dilation process is carried out.After the process is dilated, the moment is calculated to find the midpoint of the object resulting from the thresholding itself.From the moment calculation process, the coordinates (x, y) values are generated.In this study, the reference x coordinates were taken from the calculation of moments to extend to the right and left of each 150 pixels as the region of interest.This value of 150 is taken by considering the area coverage including the size of the road width plus the remaining width as tolerance for bends or bends.While setting the region of interest for scale y is used the whole y value on the width of the existing video.After obtaining the set region of an interesting area that is then the area it is processed for edge detection.Starting the edge detection process is used the canny edge detection method which is display the edge boundaries in the video exists.To do line filter from the edge-boundary edge in the video is used hough transform method that shown in Figure 4.After used that process, it is visible the desired lines which form the angles below the set point governed by the vertical axis.The next step is to detect the position of the line from x-axis perspective (x pixel coordinates) and made an average from the detected line.To refine the value of x that is still inside the specified value range which is carried out by the function, if the calculation still in threshold (+ 50 from the previous value) it is used reference the latest x value.However, if the value of x is outside the above conditions, the new x value can be accessed the previous value again.A value of 50 in the above calculation too considered from the maximum limit of deviation which is still considered sufficient nice.It means is not too small or too big to do smoothing of existing values.The indicator is still in the width of the existing road.This matter can be softened the movement of the average x value which indeed shifts in a relatively small range.After the position value is obtained then the x coordinate value is displayed and given a marker to show highway tracking movement.

Experiment Result and Discussion
This part is explained the highway visual tracking method uses unmanned aerial vehicles.Testing this method done by applying the method to the video taken from YouTube.The sample highways is a road with quite varied edges, ranging from houses, home yards, to green vegetation.Road colour is grey.In video capture, the camera can be said to be relatively upright straight against the highway.Then, in taking the coverage video entering into frames other than the highway is also quite a lot.Whereas for the road conditions are quite varied in colour, the colour includes grey from enough bright to dark black.As for the number of vehicles crossing includes cars and buses which in one frame are around 1-2 vehicles caught in the frame.Shows tracking results from the highway taken from YouTube. Figure 5 shows results end of highway track.There are two blue lines shows the boundary area to be processed using the Hough transform method.This area is obtained from the value of x moments which are then expanded to the left and right each of 150 pixels.So that this area has a width (value of x) as long as 300 pixels while for y values are made according to the width of the windows so it's maximized.For the red line is an indicator of road tracking done.The direction of movement of highway tracking signs follows the direction of the UAV.Testing using this video is 20 seconds.With the highway tracking method that has been made, the red line as highway tracking markers are not always in the middle of the highway, but there are also out of the highway area.Figure 6.The best condition from the sample highway Figure 7.The worst condition from the sample highway Figure 7 is the worst condition when tracking the sample highway.From the results of thresholding, at the time of the condition the worst highway tracking results from bad thresholding.Not only the colour of the highway is detected, but other objects with almost the same colour also detected as a highway.Because the colour is still in HSV threshold of this system.It is affected the region of interest (ROI) area to be processed through the Hough transform.Even though the ROI function here is very it's important to go to the next process, Hough transform.Figure 6 is the best condition of the highway visual tracking.Based on the Figure after the thresholding process produces a good binary image.This can be seen from the accuracy of the position of the ROI area formed in the highway area.As we can see on both of the Figure, thresholding is very influential on the results highway track.In addition, the Hough transform process is also very influential on tracking results.Hough transform that is only detect lines with a predetermined slope.So, the road with slope outside of that order certainly produce lines that also have slopes outside of what we specify in the Hough transform parameter.This have had an effect at the value x the result of tracking the highway.

Roadside Area Analysis
The various roadsides i.e. house, yard, and vegetation green.Based on Figure 8, the colour variant is quite small because of the majority the roadside is covered by greenery vegetation.So that in Figure 8 the thresholding process has been clearly seen between the image of the object and the background.
Meanwhile, based on Figure 9, there is a field has the colour almost the same as the colour of the highway.Therefore, the result is shown to look less good after the thresholding process is carried out.It can make the calculation of the region of interest in the area is not accurate.The value of these moments affects the area of interest marked with a blue line boundary as shown.
Highway Visual Tracking System using Thresholding and Hough Transform (P.A. Rosyady)

Conclusion
Based on this research, we can be concluded with a conclusion as follow.The system has successfully implemented a digital image processing system for highway visual tracking with a combination of thresholding and methods Hough transform.The system can only be used optimally for visual tracking highway through thresholding in colour in the range of HSV values (20, 3, 30) -(180, 32, 169).Matters that affect the results of highway tracking include the presence of vehicles on the highway and other objects around the highway.

Figure 5 .
Figure 5. Visual tracking from the sample highway

Figure 8 .Figure 9 .
Figure 8.The best roadside area from the sample highway