tag16h5.c
Go to the documentation of this file.
1 /* Copyright (C) 2013-2016, The Regents of The University of Michigan.
2 All rights reserved.
3 This software was developed in the APRIL Robotics Lab under the
4 direction of Edwin Olson, ebolson@umich.edu. This software may be
5 available under alternative licensing terms; contact the address above.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 The views and conclusions contained in the software and documentation are those
24 of the authors and should not be interpreted as representing official policies,
25 either expressed or implied, of the Regents of The University of Michigan.
26 */
27 
28 #include <stdlib.h>
29 #include "tag16h5.h"
30 
31 static uint64_t codedata[30] = {
32  0x00000000000027c8UL,
33  0x00000000000031b6UL,
34  0x0000000000003859UL,
35  0x000000000000569cUL,
36  0x0000000000006c76UL,
37  0x0000000000007ddbUL,
38  0x000000000000af09UL,
39  0x000000000000f5a1UL,
40  0x000000000000fb8bUL,
41  0x0000000000001cb9UL,
42  0x00000000000028caUL,
43  0x000000000000e8dcUL,
44  0x0000000000001426UL,
45  0x0000000000005770UL,
46  0x0000000000009253UL,
47  0x000000000000b702UL,
48  0x000000000000063aUL,
49  0x0000000000008f34UL,
50  0x000000000000b4c0UL,
51  0x00000000000051ecUL,
52  0x000000000000e6f0UL,
53  0x0000000000005fa4UL,
54  0x000000000000dd43UL,
55  0x0000000000001aaaUL,
56  0x000000000000e62fUL,
57  0x0000000000006dbcUL,
58  0x000000000000b6ebUL,
59  0x000000000000de10UL,
60  0x000000000000154dUL,
61  0x000000000000b57aUL,
62 };
64 {
65  apriltag_family_t *tf = calloc(1, sizeof(apriltag_family_t));
66  tf->name = strdup("tag16h5");
67  tf->h = 5;
68  tf->ncodes = 30;
69  tf->codes = codedata;
70  tf->nbits = 16;
71  tf->bit_x = calloc(16, sizeof(uint32_t));
72  tf->bit_y = calloc(16, sizeof(uint32_t));
73  tf->bit_x[0] = 1;
74  tf->bit_y[0] = 1;
75  tf->bit_x[1] = 2;
76  tf->bit_y[1] = 1;
77  tf->bit_x[2] = 3;
78  tf->bit_y[2] = 1;
79  tf->bit_x[3] = 2;
80  tf->bit_y[3] = 2;
81  tf->bit_x[4] = 4;
82  tf->bit_y[4] = 1;
83  tf->bit_x[5] = 4;
84  tf->bit_y[5] = 2;
85  tf->bit_x[6] = 4;
86  tf->bit_y[6] = 3;
87  tf->bit_x[7] = 3;
88  tf->bit_y[7] = 2;
89  tf->bit_x[8] = 4;
90  tf->bit_y[8] = 4;
91  tf->bit_x[9] = 3;
92  tf->bit_y[9] = 4;
93  tf->bit_x[10] = 2;
94  tf->bit_y[10] = 4;
95  tf->bit_x[11] = 3;
96  tf->bit_y[11] = 3;
97  tf->bit_x[12] = 1;
98  tf->bit_y[12] = 4;
99  tf->bit_x[13] = 1;
100  tf->bit_y[13] = 3;
101  tf->bit_x[14] = 1;
102  tf->bit_y[14] = 2;
103  tf->bit_x[15] = 2;
104  tf->bit_y[15] = 3;
105  tf->width_at_border = 6;
106  tf->total_width = 8;
107  tf->reversed_border = false;
108  return tf;
109 }
110 
112 {
113  free(tf->bit_x);
114  free(tf->bit_y);
115  free(tf->name);
116  free(tf);
117 }
uint32_t ncodes
Definition: apriltag.h:64
bool reversed_border
Definition: apriltag.h:71
static uint64_t codedata[30]
Definition: tag16h5.c:31
apriltag_family_t * tag16h5_create()
Definition: tag16h5.c:63
uint64_t * codes
Definition: apriltag.h:67
uint32_t h
Definition: apriltag.h:79
char * name
Definition: apriltag.h:82
uint32_t nbits
Definition: apriltag.h:74
uint32_t * bit_y
Definition: apriltag.h:76
uint32_t * bit_x
Definition: apriltag.h:75
int width_at_border
Definition: apriltag.h:69
void tag16h5_destroy(apriltag_family_t *tf)
Definition: tag16h5.c:111


apriltag
Author(s): Edwin Olson , Max Krogius
autogenerated on Mon Jun 26 2023 02:26:12