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
49typedef struct _Point2f {
50 float x;
51 float y;
53
54typedef struct _Point2i {
55 int x;
56 int y;
58
59typedef struct _CornerPoints {
60 int num;
63
64//-------------------------------------------------------------------------
65// Correspondence
66//-------------------------------------------------------------------------
67
68typedef 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
72
73typedef struct _CorspMap {
74 int num; // Same as the number of corner points in the input image
77
78#if BINARY_FEATURE
79
80#define FREAK_SUB_DIMENSION 96
81
82//FREAK feature vector
83typedef 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
94typedef struct _SurfFeature {
95 float v[SURF_SUB_DIMENSION];
96 int l;
98#endif
99
100typedef struct _FeatureVector {
101 int num;
102#if BINARY_FEATURE
103 FreakFeature *sf;
104#else
106#endif
107
109
struct _Point2i Point2i
struct _MatchPoint MatchPoint
struct _CorspMap CorspMap
struct _Point2f Point2f
struct _FeatureVector FeatureVector
#define MAX_CORNER_POINTS
Definition: kpmType.h:47
struct _SurfFeature SurfFeature
struct _CornerPoints CornerPoints
Definition: kpmType.h:59
Point2i pt[MAX_CORNER_POINTS]
Definition: kpmType.h:61
int num
Definition: kpmType.h:60
Definition: kpmType.h:73
int num
Definition: kpmType.h:74
MatchPoint * mp
Definition: kpmType.h:75
Definition: kpmType.h:100
int num
Definition: kpmType.h:101
SurfFeature * sf
Definition: kpmType.h:105
Definition: kpmType.h:68
float x1
Definition: kpmType.h:69
float y2
Definition: kpmType.h:70
float y1
Definition: kpmType.h:69
float x2
Definition: kpmType.h:70
Definition: kpmType.h:49
float y
Definition: kpmType.h:51
float x
Definition: kpmType.h:50
Definition: kpmType.h:54
int y
Definition: kpmType.h:56
int x
Definition: kpmType.h:55
Definition: kpmType.h:94
float v[SURF_SUB_DIMENSION]
Definition: kpmType.h:95
int l
Definition: kpmType.h:96