creative commons attribution-noncommercial-noderivatives 4

7
Research Collection Conference Paper Roundness Measure for GPS Routes Author(s): Mariescu-Istodor, Radu; Heng, Por; Fränti, Pasi Publication Date: 2018-01-15 Permanent Link: https://doi.org/10.3929/ethz-b-000225594 Rights / License: Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International This page was generated automatically upon download from the ETH Zurich Research Collection . For more information please consult the Terms of use . ETH Library

Upload: others

Post on 18-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creative Commons Attribution-NonCommercial-NoDerivatives 4

Research Collection

Conference Paper

Roundness Measure for GPS Routes

Author(s): Mariescu-Istodor, Radu; Heng, Por; Fränti, Pasi

Publication Date: 2018-01-15

Permanent Link: https://doi.org/10.3929/ethz-b-000225594

Rights / License: Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International

This page was generated automatically upon download from the ETH Zurich Research Collection. For moreinformation please consult the Terms of use.

ETH Library

Page 2: Creative Commons Attribution-NonCommercial-NoDerivatives 4

Roundness Measure for GPS Routes

Radu Mariescu-Istodor, Por Heng and Pasi Fränti

Machine Learning Unit, School of Computing University of Eastern Finland, Joensuu, Finland Email: {radum,por,franti}@cs.uef.fi

Abstract. We introduce a method to measure roundness of a GPS route. The method is compared to two existing roundness measure and is shown to outperform them in the presence of GPS noise. Our application is recrea-tion outdoor game where players compete who can create roundest route.

Keywords. GPS routes; circle detection; roundness, object detection.

1. Introduction

Measuring roundness is highly needed in quality control of manufactured parts and assembly tasks for two-dimensional objects. In this application area, the objects are physical and usually only small errors appear. Alt-hough roundness is simpler to measure than rectangularity or other more complex shape, it is not trivial. Existing method are based on shape fitting.

Least-squares method (LSC) (Forbes 1989, Petrik et al. 2009) fits the best matching circle to the data using the least-squares method by separating the sum of total areas of the inside and outside it in equal amounts. Maxi-mum inscribed circle (MIC) and Minimum circumscribed circle (Forbes 1989) are defined as the largest (or smallest) circle that can be inscribed inside (or outside) the profile. The roundness error is the largest deviation of the profile from this circle.

Thus, the role of the circle fitting is to find the center point and the bound-ing to measure the difference. These two can be solved separately, as their joint optimization is non-trivial. More complex methods include steepest descent algorithm (Zhu et al. 2003), and a two-dimensional simplex search method (Murthy & Abdin 1980). Rossi (2011) has proposed highly opti-mized solution by Genetic algorithm. None of these methods is optimal.

LBS 2018 http://doi.org/10.3929/ethz-b-000225594

81

Page 3: Creative Commons Attribution-NonCommercial-NoDerivatives 4

However, all these methods are very sensitive to protrusions. Even a narrow spike sticking out of the region can vastly inflate the area of the fitted shape. This kind of problems does not happen in manufacturing but are common in noisy GPS data. We are not aware any existing study on recognizing roundness or other shapes from GPS trajectories. In this paper, we propose a novel method for measuring roundness of GPS. The method is fast, rela-tively simple, and can potentially be used for other shapes as well.

2. Roundness Measure

Our method consists of three steps: (1) filtering, (2) circle fitting, and (3) calculation of the overlap. The given route is first filtered to remove outlier points caused by GPS errors. Even though such peaks would be critical in manufacturing, they are not relevant for the analysis of the travelled route. Second step is to find the best matched circle. Third step is to calculate the roundness by comparing the areas the circle and the route covers.

2.1. Route Filtering

GPS signal has accuracy about 5m or worse when indoor or the signal is shadowed by tall buildings. Noisy points can also be caused when the re-ceiver of the device is covered, position of satellites in the sky relative us is not perfect, or reflections of tall buildings in city area. These inaccuracies lead to errors in calculation of speed and acceleration. We therefore filter the data before circle fitting (Zheng & Zhou 2011) by using four simple rules shown in Fig. 1. These aim at removing outlier points based on speed, speed variant and moving direction.

67 m/s

33 m/s²

104º

P1

P2

P3

P4

0.7 m/s

3.6 m/s²

125º

10.5 m/s

0.5 m/s²

2.5 m/s

4 m/s²

74º

Filtered RouteOriginal Route

Rules:

A. Speed > 50 m/s

B. Speed > 2MedianSpeed

C. Variance > 5 m/s2

D. Variance > 1 m/s2 AND DirectionChange > 60°

E. Neighbor of an outlier

Original route

Filtered route

Filtered points:

P1 because of Rule A,B,C,D P2 because of Rule DP3 because of Rule EP4 because of Rule D

Figure 1. Route before and after filtering with four outlier points.

LBS 2018 http://doi.org/10.3929/ethz-b-000225594

82

Page 4: Creative Commons Attribution-NonCommercial-NoDerivatives 4

2.2. Fitting a Circle

The purpose is to find best matching circle for a given set of points in 2-dimensional space so that the sum of squared distances from the points to the circle is minimized. We use the method in (Umbach & Jones, 2003) called modified least square method. Once the circle centre has been ob-tained, the radius is computed as the average distance.

We only consider closed routes whose start and end points are close to each other, and exclude all open shapes, see Fig. 2. The route is closed if the dis-tance between the start and end point is less than 40% of the circle radius.

2.9 km

1.5 km

4 km

1 km

Figure 2. Example of a valid closed route (left) and non-valid open route (right).

2.3. Roundness Measurement

We compute the roundness based on the intersection approximated by grid. Firstly, we calculate bounding box enclosing the route and the circle. We

then divide it into grid of size 20m20m and calculate the number of grid cells inside the two shapes, see Fig. 3. We analyse each cell individually to conclude whether it is inside the circle (o), the route (R), or both (x).

To find out whether a given cell is inside the route, we use ray casting algo-rithm (Ye et al. 2013). The method works by projecting an infinite straight line from the centre point of a given cell in the horizontal direction. If the number of intersection points is odd, the cell is inside the route polygon. Fig. 4 shows an example of the ray-casting algorithm. It works in O(n) time where n is the number of points. The time complexity also depends linearly on the sizes of the grid cell and the bounding box.

The roundness is defined as the size of the intersection (Ain) divided by the size of the union, which can be calculated as follows:

incircleroute

in

AAA

Aroundness

LBS 2018 http://doi.org/10.3929/ethz-b-000225594

83

Page 5: Creative Commons Attribution-NonCommercial-NoDerivatives 4

Fig. 5 shows the result of four sample routes. The measure works even if the route forms a self-intersecting polygon (the examples on the right). Howev-er, routes with loops are problematic for the ray casting process.

A

B

Figure 3. Grid-based approximation and the measured intersection.

Figure 4. Example of ray-casting algorithm where cell A is inside and cell B outside.

87%87% 69%69% 54%54% 8%8%

Figure 5. Example of roundness measure from 4 different routes.

3. Experiments

We use GPS routes 2012-2015 from MOPSI (http://cs.uef.fi/mopsi) (Mariescu-Istodor & Fränti 2017). There are a total of 6023 routes includ-ing walking, running, cycling and car tracks. Their average size is 2000 points and average length is 12.8 km. The running time consists of three steps: route filtering (20%), circle fitting (5%), and ray-casting (75%). The total processing time is 2.7 s, on average. Top most round routes are in Fig. 6.

To study the accuracy we generate a set of perfect circles and modify them by adding (1) Gaussian noise, (2) flatten the circle by changing the latitude values: latnew = mean + (lat-mean)*a, where mean is the average latitude, and a is the flattening parameter (Fig. 7). The resulting noisy shapes are

LBS 2018 http://doi.org/10.3929/ethz-b-000225594

84

Page 6: Creative Commons Attribution-NonCommercial-NoDerivatives 4

plotted on the streets of Joensuu, and Leuven using Open Street Map rout-ing. The roundness of the resulting routes is then measured.

Fig. 8 shows that the proposed method is more accurate than LSC and MCC. The expected results are: roundness=100% (noise), and roundness=a (flattening). Average differences from the expected values are for the pro-posed measure (7%), LSC (20%) and MCC (18%). Results for the flattened routes are: proposed (11%), LSC (22%) and MCC (18%).

Rank :#2

User: Pasi

28.10.2014

9 km 70 m

00:47

Rank :#2

User: Pasi

28.10.2014

9 km 70 m

00:47

Rank : #8

User: matti

9.2.2015

5 km 37 m

00:26

Rank : #8

User: matti

9.2.2015

5 km 37 m

00:26

90%

Rank : #1

User: Jukka

22.10.2014

10 km 4 m

00:53

Rank : #1

User: Jukka

22.10.2014

10 km 4 m

00:53

Rank : #3

User: Low3

9.11.2014

9 km 14 m

00:46

Rank : #3

User: Low3

9.11.2014

9 km 14 m

00:46

Rank : #4

User: Jukka

19.10.2014

11 km 520 m

1:56

Rank : #4

User: Jukka

19.10.2014

11 km 520 m

1:56

89% 87% 85%

81% 81% 80% 80%

85%

82%

Rank : #5

User: matti

31.3.2015

5 km 500 m

00:26

Rank : #5

User: matti

31.3.2015

5 km 500 m

00:26

Rank : #6

User: Kari

30.8.2013

3 km 91 m

1:24

Rank : #6

User: Kari

30.8.2013

3 km 91 m

1:24

Rank : #7

User: Jukka

24.1.2014

3 km 123 m

00:26

Rank : #7

User: Jukka

24.1.2014

3 km 123 m

00:26

Rank : #9

User: matti

9.4.2015

5 km 462 m

00:26

Rank : #9

User: matti

9.4.2015

5 km 462 m

00:26

Rank : #10

User: Jukka

13.6.2015

11 km 604 m

1:4

Rank : #10

User: Jukka

13.6.2015

11 km 604 m

1:4

Figure 6. Five most roundest routes and their details.

Figure 7. Round routes generated in Joensuu and Leuven (left) reference circle is also shown. The routes are transformed by adding noise (middle) and by flattenning (right).

4. Conclusion

We have introduced a grid-based method to measure roundness of GPS routes using ray-casting algorithm. It provides more accurate estimation than LSC and MCC. The measure provides meaningful result as long as the route does not have multiple loops.

LBS 2018 http://doi.org/10.3929/ethz-b-000225594

85

Page 7: Creative Commons Attribution-NonCommercial-NoDerivatives 4

Proposed

MCC

LSC

Proposed

MCC

LSC

Proposed

LSCMCC

MCC

LSC

Propose

dProposed

MCC

LSC

Proposed

MCC

LSC

Joensuu Joensuu

LeuvenLeuven

a

Noise (%)

Noise (%)

a

Figure 8. Roundness result (%)with increased amount of noise and increased flattening.

References

Forbes A B (1989) Least-squares best-fit geometric elements, NPL Rep DITC 140/89, Na-tional Physics Laboratory, UK.

Jywe W Y, Liu C H, Chen C K (1999) The min-max problem for evaluating the form error of a circle. Measurement, 26, 273-282.

Mariescu-Istodor R, Fränti P (2017) Grid-based method for GPS route analysis for retrieval. ACM Trans. on Spatial Algorithms and Systems, 3, paper 8: 1-28.

Murthy T S R, Abdin S Z (1980) Minimum zone evaluation of surface. International Journal of Machine Tool Design and Research, 20 (2), 123–136.

Petrik M, Kovac J, Kat’uc P, Bednarcikova L, Hudak R, Zivcak J (2009) Roundness: deter-mining the Reference Circle for MCCI and MICI System. Int Conf Measurement, 352–355.

Rossi A, Antonetti M, Barloscio M, Lanzetta M (2011) Fast genetic algorithm for roundness evaluation by the minimum zone tolerance (MZT) method. Measurement, 44, 1243-1252.

Rossi A, Lanzetta M (2013) Roundness: a closed form upper bound for the centroid to mini-mum zone center distance by worst-case analysis. Measurement, 46 (7), 2251-2258.

Umbach D, Jones K N (2003) A few methods for fitting circles to data. IEEE Trans. on In-strumentation and Measurement, 52, 1880-1885.

Ye Y, Quangrui F, Shiqui O (2013) An algorithm for judging points inside or outside a poly-gon. Int Conf on Image and Graphics (ICIG), 690-693.

Zheng Y, Zhou X (2011) Computing with Spatial Trajectories. ISBN: 978-1-4614-1628-9.

Zhu L M, Ding H, Xiong Y L (2003) A steepest descent algorithm for circularity evaluation. Computer Aided Design, 35 (3), 255–265.

LBS 2018 http://doi.org/10.3929/ethz-b-000225594

86