JeVoisBase  1.20
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
ARMarkerSquare.h
Go to the documentation of this file.
1 /*
2  * ARMarkerSquare.h
3  * ARToolKit5
4  *
5  * Demonstration of ARToolKit NFT with models rendered in OSG,
6  * and marker pose estimates filtered to reduce jitter.
7  *
8  * Press '?' while running for help on available key commands.
9  *
10  * Disclaimer: IMPORTANT: This Daqri software is supplied to you by Daqri
11  * LLC ("Daqri") in consideration of your agreement to the following
12  * terms, and your use, installation, modification or redistribution of
13  * this Daqri software constitutes acceptance of these terms. If you do
14  * not agree with these terms, please do not use, install, modify or
15  * redistribute this Daqri software.
16  *
17  * In consideration of your agreement to abide by the following terms, and
18  * subject to these terms, Daqri grants you a personal, non-exclusive
19  * license, under Daqri's copyrights in this original Daqri software (the
20  * "Daqri Software"), to use, reproduce, modify and redistribute the Daqri
21  * Software, with or without modifications, in source and/or binary forms;
22  * provided that if you redistribute the Daqri Software in its entirety and
23  * without modifications, you must retain this notice and the following
24  * text and disclaimers in all such redistributions of the Daqri Software.
25  * Neither the name, trademarks, service marks or logos of Daqri LLC may
26  * be used to endorse or promote products derived from the Daqri Software
27  * without specific prior written permission from Daqri. Except as
28  * expressly stated in this notice, no other rights or licenses, express or
29  * implied, are granted by Daqri herein, including but not limited to any
30  * patent rights that may be infringed by your derivative works or by other
31  * works in which the Daqri Software may be incorporated.
32  *
33  * The Daqri Software is provided by Daqri on an "AS IS" basis. DAQRI
34  * MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
35  * THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
36  * FOR A PARTICULAR PURPOSE, REGARDING THE DAQRI SOFTWARE OR ITS USE AND
37  * OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
38  *
39  * IN NO EVENT SHALL DAQRI BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
40  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
41  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
42  * INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
43  * MODIFICATION AND/OR DISTRIBUTION OF THE DAQRI SOFTWARE, HOWEVER CAUSED
44  * AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
45  * STRICT LIABILITY OR OTHERWISE, EVEN IF DAQRI HAS BEEN ADVISED OF THE
46  * POSSIBILITY OF SUCH DAMAGE.
47  *
48  * Copyright 2015 Daqri LLC. All Rights Reserved.
49  * Copyright 2011-2015 ARToolworks, Inc. All Rights Reserved.
50  *
51  * Author(s): Philip Lamb.
52  *
53  */
54 
55 #ifndef __ARMarkerSquare_h__
56 #define __ARMarkerSquare_h__
57 
58 #include <AR/ar.h>
59 #include <AR/arFilterTransMat.h>
60 #ifndef _MSC_VER
61 # include <stdbool.h>
62 #else
63 typedef unsigned char bool;
64 #endif
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
70 typedef struct {
71  ARdouble v[3];
72 } ARVec3;
73 
74 typedef struct {
75  ARdouble T[16]; // Position and orientation, column-major order. (position(x,y,z) = {T[12], T[13], T[14]}
76 } ARPose;
77 
78 extern const ARPose ARPoseUnity;
79 
80 typedef struct _ARMarkerSquare {
81  // ARMarker protected
82  bool valid;
83  bool validPrev;
84  ARdouble trans[3][4];
86  ARdouble marker_width;
87  ARdouble marker_height;
88  // ARMarker private
89  ARFilterTransMatInfo *ftmi;
91  ARdouble filterSampleRate;
92  // ARMarkerSquare
93  int patt_id; // ARToolKit pattern ID.
94  int patt_type;
95  ARdouble marker_coord[4][2]; // Window coords. of marker corners.
99 
100 #define AR_PATTERN_TYPE_TEMPLATE 0
101 #define AR_PATTERN_TYPE_MATRIX 1
102 
103 void newMarkers(const char *markersConfigDataFilePathC, ARPattHandle *arPattHandle, ARMarkerSquare **markersSquare_out, int *markersSquareCount_out, int *patternDetectionMode_out);
104 
105 void deleteMarkers(ARMarkerSquare **markersSquare_p, int *markersSquareCount_p, ARPattHandle *arPattHandle);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 #endif // !__ARMarkerSquare_h__
_ARMarkerSquare::marker_width
ARdouble marker_width
Definition: ARMarkerSquare.h:86
ARVec3
Definition: ARMarkerSquare.h:70
deleteMarkers
void deleteMarkers(ARMarkerSquare **markersSquare_p, int *markersSquareCount_p, ARPattHandle *arPattHandle)
Definition: ARMarkerSquare.c:242
_ARMarkerSquare::matchingThreshold
ARdouble matchingThreshold
Definition: ARMarkerSquare.h:96
_ARMarkerSquare::trans
ARdouble trans[3][4]
Definition: ARMarkerSquare.h:84
_ARMarkerSquare::patt_type
int patt_type
Definition: ARMarkerSquare.h:94
_ARMarkerSquare::patternPathname
char * patternPathname
Definition: ARMarkerSquare.h:97
_ARMarkerSquare::filterCutoffFrequency
ARdouble filterCutoffFrequency
Definition: ARMarkerSquare.h:90
_ARMarkerSquare::filterSampleRate
ARdouble filterSampleRate
Definition: ARMarkerSquare.h:91
_ARMarkerSquare::marker_height
ARdouble marker_height
Definition: ARMarkerSquare.h:87
ARPose
Definition: ARMarkerSquare.h:74
_ARMarkerSquare::pose
ARPose pose
Definition: ARMarkerSquare.h:85
ARPoseUnity
const ARPose ARPoseUnity
Definition: ARMarkerSquare.c:66
_ARMarkerSquare::ftmi
ARFilterTransMatInfo * ftmi
Definition: ARMarkerSquare.h:89
_ARMarkerSquare::validPrev
bool validPrev
Definition: ARMarkerSquare.h:83
_ARMarkerSquare::marker_coord
ARdouble marker_coord[4][2]
Definition: ARMarkerSquare.h:95
_ARMarkerSquare
Definition: ARMarkerSquare.h:80
_ARMarkerSquare::patt_id
int patt_id
Definition: ARMarkerSquare.h:93
newMarkers
void newMarkers(const char *markersConfigDataFilePathC, ARPattHandle *arPattHandle, ARMarkerSquare **markersSquare_out, int *markersSquareCount_out, int *patternDetectionMode_out)
Definition: ARMarkerSquare.c:89
ARMarkerSquare
struct _ARMarkerSquare ARMarkerSquare
_ARMarkerSquare::valid
bool valid
Definition: ARMarkerSquare.h:82