Week 6 (29/3 – 04/4) – Improvement of gradient grids and creation of sobel filter grids

Although being fully functional, the work developed in previous weeks needed improvement, as the program used too many computational resources and becoming increasingly slow with the addition of new features.

In that line, the code already developed was reformed to become faster and more efficient. The cube list markers were replaced with occupancy grid maps, allowing to define the probability of each grid square to be an obstacle.

The grids are basically defined by its height, width, and resolution, and allow its placement in a specific frame, in this case, the moving_axis frame, as previously decided. The occupancy maps provide better and faster visualization, being much easier to see areas with higher densities or gradients, as visible in video 1.

Also to decrease the computational resources used, instead of counting how many points were in each square, which requested N x M x np (number of points in the point cloud) iterations, now, for each point cloud point, the program calculates instead in which square it belongs. This requires np iterations, resulting in a very significant decrease in the number of iterations.

Video 1 shows that the gradient direction seems to have little significance in road limits detection, unlike the gradient magnitude and its components, where darker lines are clearly visible. It’s also worth noting that the algorithm was developed to mark positive and negative gradients as an obstacle, meeting the initial goals.

Vid. 1: Improved density and gradient occupancy grids. (Daniela Rato, 2019)

Despite the good results obtained from gradient filters, testing other solutions is important to select the best one. In that line, a new grid was created, calculating edges with a Sobel filter (fig. 1) applied to the gradient matrix. The obtained results are visible in videos 2 and 3, that show the algorithm running with different parameters.

The Sobel filter is a good edge detecting filter, and by the analysis of the video, it produces good results in edge detection in the point cloud data, although there are more defined lines when it comes to cars and buildings.

Fig. 1: Sobel filter – horizontal and vertical directions. (https://blog.saush.com/2011/04/20/edge-detection-with-the-sobel-operator-in-ruby/)

Vid. 2: Sobel filter occupancy grid. (Daniela Rato, 2019)
Vid. 3: Sobel filter occupancy grid with different parameters (Daniela Rato, 2019)

Edit: Also, Prewitt and Kirsh’s filters were tested in point cloud density edge detection. Both filters show good results detecting road limits, but still identify road as an obstacle in some cases, depending on road conditions, car velocity, and inclination. Video 4 shows the results obtained in recorded rosbag around University of Aveiro.

Vid. 4: Prewitt and Kirsh edge detection applied to an occupancy grid map (Daniela Rato, 2019)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s