| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
kpmType.h
Go to the documentation of this file.
1/*
2 * kpmType.h
3 * artoolkitX
4 *
5 * This file is part of artoolkitX.
6 *
7 * artoolkitX is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * artoolkitX is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with artoolkitX. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * As a special exception, the copyright holders of this library give you
21 * permission to link this library with independent modules to produce an
22 * executable, regardless of the license terms of these independent modules, and to
23 * copy and distribute the resulting executable under terms of your choice,
24 * provided that you also meet, for each linked independent module, the terms and
25 * conditions of the license of that module. An independent module is a module
26 * which is neither derived from nor based on this library. If you modify this
27 * library, you may extend this exception to your version of the library, but you
28 * are not obligated to do so. If you do not wish to do so, delete this exception
29 * statement from your version.
30 *
31 * Copyright 2015 Daqri, LLC. All rights reserved.
32 * Copyright 2006-2015 ARToolworks, Inc. All rights reserved.
33 * Author(s): Hirokazu Kato, Philip Lamb
34 *
35 */
36
37#pragma once
38
39#if !BINARY_FEATURE
40#include <ARX/KPM/surfSub.h>
41#endif
42
43//-------------------------------------------------------------------------
44// Corner points
45//-------------------------------------------------------------------------
46
47#define MAX_CORNER_POINTS 2000
48
49 typedef struct _Point2f {
50 float x;
51 float y;
52} Point2f;
53
54 typedef struct _Point2i {
55 int x;
56 int y;
57} Point2i;
58
59 typedef struct _CornerPoints {
60 int num;
61 Point2i pt[MAX_CORNER_POINTS];
62} CornerPoints;
63
64//-------------------------------------------------------------------------
65// Correspondence
66//-------------------------------------------------------------------------
67
68 typedef struct _MatchPoint {
69 float x1, y1; // Coordinates of corner points in an input image
70 float x2, y2; // Coordinates of corner points in a reference image
71} MatchPoint;
72
73 typedef struct _CorspMap {
74 int num; // Same as the number of corner points in the input image
75 MatchPoint *mp;
76} CorspMap;
77
78#if BINARY_FEATURE
79
80#define FREAK_SUB_DIMENSION 96
81
82//FREAK feature vector
83 typedef struct _FreakFeature {
84 unsigned char v[FREAK_SUB_DIMENSION];
85 float angle;
86 float scale;
87 int maxima;
88} FreakFeature;
89#else
90//-------------------------------------------------------------------------
91// Surf feature vector
92//-------------------------------------------------------------------------
93
94 typedef struct _SurfFeature {
95 float v[SURF_SUB_DIMENSION];
96 int l;
97} SurfFeature;
98#endif
99
100 typedef struct _FeatureVector {
101 int num;
102#if BINARY_FEATURE
103 FreakFeature *sf;
104#else
105 SurfFeature *sf;
106#endif
107
108} FeatureVector;
109
Point2i
struct _Point2i Point2i
MatchPoint
struct _MatchPoint MatchPoint
CorspMap
struct _CorspMap CorspMap
Point2f
struct _Point2f Point2f
FeatureVector
struct _FeatureVector FeatureVector
MAX_CORNER_POINTS
#define MAX_CORNER_POINTS
Definition: kpmType.h:47
SurfFeature
struct _SurfFeature SurfFeature
CornerPoints
struct _CornerPoints CornerPoints
_CornerPoints
Definition: kpmType.h:59
_CornerPoints::pt
Point2i pt[MAX_CORNER_POINTS]
Definition: kpmType.h:61
_CornerPoints::num
int num
Definition: kpmType.h:60
_CorspMap
Definition: kpmType.h:73
_CorspMap::num
int num
Definition: kpmType.h:74
_CorspMap::mp
MatchPoint * mp
Definition: kpmType.h:75
_FeatureVector
Definition: kpmType.h:100
_FeatureVector::num
int num
Definition: kpmType.h:101
_FeatureVector::sf
SurfFeature * sf
Definition: kpmType.h:105
_MatchPoint
Definition: kpmType.h:68
_MatchPoint::x1
float x1
Definition: kpmType.h:69
_MatchPoint::y2
float y2
Definition: kpmType.h:70
_MatchPoint::y1
float y1
Definition: kpmType.h:69
_MatchPoint::x2
float x2
Definition: kpmType.h:70
_Point2f
Definition: kpmType.h:49
_Point2f::y
float y
Definition: kpmType.h:51
_Point2f::x
float x
Definition: kpmType.h:50
_Point2i
Definition: kpmType.h:54
_Point2i::y
int y
Definition: kpmType.h:56
_Point2i::x
int x
Definition: kpmType.h:55
_SurfFeature
Definition: kpmType.h:94
_SurfFeature::v
float v[SURF_SUB_DIMENSION]
Definition: kpmType.h:95
_SurfFeature::l
int l
Definition: kpmType.h:96