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

Loading...
Searching...
No Matches
featureSet.h
Go to the documentation of this file.
1/*
2 * AR2/featureSet.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 2018 Realmax, Inc.
32 * Copyright 2015 Daqri, LLC.
33 * Copyright 2006-2015 ARToolworks, Inc.
34 *
35 * Author(s): Hirokazu Kato, Philip Lamb
36 *
37 */
38
39#ifndef AR2_FEATURE_SET_H
40#define AR2_FEATURE_SET_H
41#include <ARX/AR2/config.h>
42#include <ARX/AR2/imageSet.h>
43
44
45#ifdef __cplusplus
46 extern "C" {
47#endif
48
49 typedef struct {
50 float *map;
51 int xsize;
52 int ysize;
53} AR2FeatureMapT;
54
55 typedef struct {
56 int x;
57 int y;
58 float mx;
59 float my;
60 float maxSim;
61} AR2FeatureCoordT;
62
63// One AR2FeaturePointsT holds the feature coordinates for one scalefactor of one image.
64 typedef struct {
65 AR2FeatureCoordT *coord;
66 int num;
67 int scale;
68 float maxdpi;
69 float mindpi;
70} AR2FeaturePointsT;
71
72// Structure to hold a set of one or more AR2FeaturePointsT structures for one image.
73 typedef struct {
74 AR2FeaturePointsT *list;
75 int num;
76} AR2FeatureSetT;
77
78
79 AR2_EXTERN AR2FeatureMapT *ar2GenFeatureMap( AR2ImageT *image,
80 int ts1, int ts2,
81 int search_size1, int search_size2,
82 float max_sim_thresh, float sd_thresh );
83
84 AR2_EXTERN AR2FeatureMapT *ar2ReadFeatureMap( char *filename, char *ext );
85
86 AR2_EXTERN int ar2SaveFeatureMap( char *filename, char *ext, AR2FeatureMapT *featureMap );
87
88 AR2_EXTERN int ar2FreeFeatureMap( AR2FeatureMapT *featureMap );
89
90
91 AR2_EXTERN int ar2PrintFeatureInfo( AR2ImageT *image, AR2FeatureMapT *featureMap, int ts1, int ts2, int search_size2, int cx, int cy );
92
93 AR2_EXTERN AR2FeatureCoordT *ar2SelectFeature( AR2ImageT *image, AR2FeatureMapT *featureMap,
94 int ts1, int ts2, int search_size2, int occ_size,
95 float max_sim_thresh, float min_sim_thresh, float sd_thresh, int *num );
96
97 AR2_EXTERN AR2FeatureCoordT *ar2SelectFeature2( AR2ImageT *image, AR2FeatureMapT *featureMap,
98 int ts1, int ts2, int search_size2, int occ_size,
99 float max_sim_thresh, float min_sim_thresh, float sd_thresh, int *num );
100
101 AR2_EXTERN AR2FeatureSetT *ar2ReadFeatureSet( const char *filename, const char *ext );
102 AR2_EXTERN int ar2SaveFeatureSet( const char *filename, const char *ext, AR2FeatureSetT *featureSet );
103 AR2_EXTERN int ar2FreeFeatureSet( AR2FeatureSetT **featureSet );
104
105#ifdef __cplusplus
106}
107#endif
108#endif
config.h
AR2_EXTERN
#define AR2_EXTERN
Definition: config.h:56
ar2FreeFeatureSet
AR2_EXTERN int ar2FreeFeatureSet(AR2FeatureSetT **featureSet)
Definition: featureSet.c:163
ar2SaveFeatureMap
AR2_EXTERN int ar2SaveFeatureMap(char *filename, char *ext, AR2FeatureMapT *featureMap)
Definition: featureMap.c:62
ar2ReadFeatureSet
AR2_EXTERN AR2FeatureSetT * ar2ReadFeatureSet(const char *filename, const char *ext)
Definition: featureSet.c:44
ar2SelectFeature
AR2_EXTERN AR2FeatureCoordT * ar2SelectFeature(AR2ImageT *image, AR2FeatureMapT *featureMap, int ts1, int ts2, int search_size2, int occ_size, float max_sim_thresh, float min_sim_thresh, float sd_thresh, int *num)
Definition: featureMap.c:271
ar2PrintFeatureInfo
AR2_EXTERN int ar2PrintFeatureInfo(AR2ImageT *image, AR2FeatureMapT *featureMap, int ts1, int ts2, int search_size2, int cx, int cy)
Definition: featureMap.c:533
ar2SaveFeatureSet
AR2_EXTERN int ar2SaveFeatureSet(const char *filename, const char *ext, AR2FeatureSetT *featureSet)
Definition: featureSet.c:125
ar2GenFeatureMap
AR2_EXTERN AR2FeatureMapT * ar2GenFeatureMap(AR2ImageT *image, int ts1, int ts2, int search_size1, int search_size2, float max_sim_thresh, float sd_thresh)
Definition: featureMap.c:120
ar2ReadFeatureMap
AR2_EXTERN AR2FeatureMapT * ar2ReadFeatureMap(char *filename, char *ext)
Definition: featureMap.c:83
ar2SelectFeature2
AR2_EXTERN AR2FeatureCoordT * ar2SelectFeature2(AR2ImageT *image, AR2FeatureMapT *featureMap, int ts1, int ts2, int search_size2, int occ_size, float max_sim_thresh, float min_sim_thresh, float sd_thresh, int *num)
Definition: featureMap.c:389
ar2FreeFeatureMap
AR2_EXTERN int ar2FreeFeatureMap(AR2FeatureMapT *featureMap)
Definition: featureMap.c:54
imageSet.h
AR2FeatureCoordT
Definition: featureSet.h:55
AR2FeatureCoordT::x
int x
Definition: featureSet.h:56
AR2FeatureCoordT::maxSim
float maxSim
Definition: featureSet.h:60
AR2FeatureCoordT::my
float my
Definition: featureSet.h:59
AR2FeatureCoordT::mx
float mx
Definition: featureSet.h:58
AR2FeatureCoordT::y
int y
Definition: featureSet.h:57
AR2FeatureMapT
Definition: featureSet.h:49
AR2FeatureMapT::map
float * map
Definition: featureSet.h:50
AR2FeatureMapT::xsize
int xsize
Definition: featureSet.h:51
AR2FeatureMapT::ysize
int ysize
Definition: featureSet.h:52
AR2FeaturePointsT
Definition: featureSet.h:64
AR2FeaturePointsT::mindpi
float mindpi
Definition: featureSet.h:69
AR2FeaturePointsT::num
int num
Definition: featureSet.h:66
AR2FeaturePointsT::scale
int scale
Definition: featureSet.h:67
AR2FeaturePointsT::maxdpi
float maxdpi
Definition: featureSet.h:68
AR2FeaturePointsT::coord
AR2FeatureCoordT * coord
Definition: featureSet.h:65
AR2FeatureSetT
Definition: featureSet.h:73
AR2FeatureSetT::num
int num
Definition: featureSet.h:75
AR2FeatureSetT::list
AR2FeaturePointsT * list
Definition: featureSet.h:74
AR2ImageT
Definition: imageSet.h:53