Wednesday, April 16, 2014

Comparison of Group and Hull Results

With the functions to grab a group's concave hull up and running, now seems a good time to stop and compare the results of the holistic group grabbing functions versus those of the hull grabbing functions. To preface, none of the results were in the least bit surprising, and they have shown me that further modifications are needed to accurately represent a group with the least amount of data possible. If, however, only the hull is needed, the hull functions provide no more or less than the tightest concave hull possible.

Below is the numeric output representation of one of the groups I used to compare the two function sets. This group was made by cupping my left and and placing it horizontally on the sensor, pinky-side down. It took several tries to get the shape just right such that the top was a straight horizontal line, one of the necessary testing conditions for determining whether or not the hull functions perform to my specifications.

0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 135228141617349 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 427 1153168628043562224115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240838351020442 56 474 15641568598 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 43 1394920 0 0 0 0 28 904 1249870 357 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 115910410 0 0 0 0 0 0 559 125214151153725 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 317 52 0 0 0 0 0 0 0 0 1247185614361648124538 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 434 1597196417731189369 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 905 190718851292353 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 834 14161579117623 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0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0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


Center: 22.099086 14.843965


I'll begin by describing the reason for creating this particular shape. As mentioned above, the top of the shape contains a stretch of linear, horizontal hull points. As only the end points of that line are necessary to determine its shape, the algorithm checks for and excludes these kinds of points. It does so by excluding points that contain a linear sequence of adjacent edge points wherein the excluded points are adjacent to exactly three zero-points and those three zero-points are vertically or horizontally linear. If a point is adjacent to exactly three linear zero-points, then it is guaranteed to have one edge-point neighbor on each side in the same direction; thus, that point lies within a linear edge. If, on the other hand, the point has four adjacent zero-points, it is guaranteed to be an end point. If the edge is adjacent to exactly one or exactly two points, then it is in a concave portion of the shape. The only case that needs be excluded is the case in which a point is adjacent to exactly three linear zero-points.

This shape also affords the opportunity to determine whether or not the hull-grabbing algorithm truly generates a concave hull, due to the curvature on the bottom. Convex hull wrapping would ignore the entire concave portion of the shape, leaving too many extraneous zero-points in the group data set. It would also give an inaccurate impression of the group's shape. This particular group allowed me to see if the algorithm actually did what I intended: picking up the concave hull of the group.

Since only one group was picked up from this pressure array, the results are easy to see side-by-side. The group centers and points within the group are listed below.

  Holistic Group Grab  Hull Grab

Centers (x y):
22.099086 14.843965 17.866549 13.251164

Data Points (x y data):
13 15 1159 13 15 1159
13 16 317 13 16 317
14 14 434 14 14 434
14 15 1041 14 15 1041
14 16 52 14 16 52
15 13 2408 15 13 2408
15 14 1394 15 14 1394
16 13 3835 16 13 3835
16 14 920 16 14 920
17 12 427 17 12 427
17 13 1020 17 13 1020
18 12 1153
18 13 442 18 13 442
19 11 1352 19 11 1352
19 12 1686
19 13 56 19 13 56
20 11 2814 20 11 2814
20 12 2804
20 13 474
21 11 1617 21 11 1617
21 12 3562
21 13 1564
21 14 28 21 14 28
22 11 349 22 11 349
22 12 2241
22 13 1568
22 14 904
22 15 559 22 15 559
23 12 15 23 12 15
23 13 598
23 14 1249
23 15 1252
23 16 1247
23 17 434 23 17 434
24 13 17 24 13 17
24 14 870
24 15 1415
24 16 1856
24 17 1597
24 18 905 24 18 905
25 14 357 25 14 357
25 15 1153
25 16 1436
25 17 1964
25 18 1907
25 19 834
25 20 20 25 20 20
26 15 725
26 16 1648
26 17 1773
26 18 1885
26 19 1416
26 20 691
26 21 15 26 21 15
27 15 3 27 15 3
27 16 1245
27 17 1189
27 18 1292
27 19 1579
27 20 1317
27 21 27 27 21 27
28 16 38 28 16 38
28 17 369 28 17 369
28 18 353
28 19 1176
28 20 1241
28 21 23 28 21 23
29 19 23 29 19 23
29 20 34 29 20 34


The blank lines were intentionally place in the hull group point list to underscore the difference between these two point lists. The hull point set is, as expected, much smaller than the holistic set (33 points, as compared to 69).


No comments:

Post a Comment