openCV library for Renesas RZ/A

Dependents:   RZ_A2M_Mbed_samples

Committer:
RyoheiHagimoto
Date:
Fri Jan 29 04:53:38 2021 +0000
Revision:
0:0e0631af0305
copied from https://github.com/d-kato/opencv-lib.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RyoheiHagimoto 0:0e0631af0305 1 /***********************************************************************
RyoheiHagimoto 0:0e0631af0305 2 * Software License Agreement (BSD License)
RyoheiHagimoto 0:0e0631af0305 3 *
RyoheiHagimoto 0:0e0631af0305 4 * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
RyoheiHagimoto 0:0e0631af0305 5 * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
RyoheiHagimoto 0:0e0631af0305 6 *
RyoheiHagimoto 0:0e0631af0305 7 * Redistribution and use in source and binary forms, with or without
RyoheiHagimoto 0:0e0631af0305 8 * modification, are permitted provided that the following conditions
RyoheiHagimoto 0:0e0631af0305 9 * are met:
RyoheiHagimoto 0:0e0631af0305 10 *
RyoheiHagimoto 0:0e0631af0305 11 * 1. Redistributions of source code must retain the above copyright
RyoheiHagimoto 0:0e0631af0305 12 * notice, this list of conditions and the following disclaimer.
RyoheiHagimoto 0:0e0631af0305 13 * 2. Redistributions in binary form must reproduce the above copyright
RyoheiHagimoto 0:0e0631af0305 14 * notice, this list of conditions and the following disclaimer in the
RyoheiHagimoto 0:0e0631af0305 15 * documentation and/or other materials provided with the distribution.
RyoheiHagimoto 0:0e0631af0305 16 *
RyoheiHagimoto 0:0e0631af0305 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
RyoheiHagimoto 0:0e0631af0305 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
RyoheiHagimoto 0:0e0631af0305 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
RyoheiHagimoto 0:0e0631af0305 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
RyoheiHagimoto 0:0e0631af0305 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
RyoheiHagimoto 0:0e0631af0305 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
RyoheiHagimoto 0:0e0631af0305 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
RyoheiHagimoto 0:0e0631af0305 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
RyoheiHagimoto 0:0e0631af0305 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
RyoheiHagimoto 0:0e0631af0305 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
RyoheiHagimoto 0:0e0631af0305 27 *************************************************************************/
RyoheiHagimoto 0:0e0631af0305 28
RyoheiHagimoto 0:0e0631af0305 29
RyoheiHagimoto 0:0e0631af0305 30 #ifndef OPENCV_FLANN_DEFINES_H_
RyoheiHagimoto 0:0e0631af0305 31 #define OPENCV_FLANN_DEFINES_H_
RyoheiHagimoto 0:0e0631af0305 32
RyoheiHagimoto 0:0e0631af0305 33 #include "config.h"
RyoheiHagimoto 0:0e0631af0305 34
RyoheiHagimoto 0:0e0631af0305 35 #ifdef FLANN_EXPORT
RyoheiHagimoto 0:0e0631af0305 36 #undef FLANN_EXPORT
RyoheiHagimoto 0:0e0631af0305 37 #endif
RyoheiHagimoto 0:0e0631af0305 38 #ifdef WIN32
RyoheiHagimoto 0:0e0631af0305 39 /* win32 dll export/import directives */
RyoheiHagimoto 0:0e0631af0305 40 #ifdef FLANN_EXPORTS
RyoheiHagimoto 0:0e0631af0305 41 #define FLANN_EXPORT __declspec(dllexport)
RyoheiHagimoto 0:0e0631af0305 42 #elif defined(FLANN_STATIC)
RyoheiHagimoto 0:0e0631af0305 43 #define FLANN_EXPORT
RyoheiHagimoto 0:0e0631af0305 44 #else
RyoheiHagimoto 0:0e0631af0305 45 #define FLANN_EXPORT __declspec(dllimport)
RyoheiHagimoto 0:0e0631af0305 46 #endif
RyoheiHagimoto 0:0e0631af0305 47 #else
RyoheiHagimoto 0:0e0631af0305 48 /* unix needs nothing */
RyoheiHagimoto 0:0e0631af0305 49 #define FLANN_EXPORT
RyoheiHagimoto 0:0e0631af0305 50 #endif
RyoheiHagimoto 0:0e0631af0305 51
RyoheiHagimoto 0:0e0631af0305 52
RyoheiHagimoto 0:0e0631af0305 53 #ifdef FLANN_DEPRECATED
RyoheiHagimoto 0:0e0631af0305 54 #undef FLANN_DEPRECATED
RyoheiHagimoto 0:0e0631af0305 55 #endif
RyoheiHagimoto 0:0e0631af0305 56 #ifdef __GNUC__
RyoheiHagimoto 0:0e0631af0305 57 #define FLANN_DEPRECATED __attribute__ ((deprecated))
RyoheiHagimoto 0:0e0631af0305 58 #elif defined(_MSC_VER)
RyoheiHagimoto 0:0e0631af0305 59 #define FLANN_DEPRECATED __declspec(deprecated)
RyoheiHagimoto 0:0e0631af0305 60 #else
RyoheiHagimoto 0:0e0631af0305 61 #pragma message("WARNING: You need to implement FLANN_DEPRECATED for this compiler")
RyoheiHagimoto 0:0e0631af0305 62 #define FLANN_DEPRECATED
RyoheiHagimoto 0:0e0631af0305 63 #endif
RyoheiHagimoto 0:0e0631af0305 64
RyoheiHagimoto 0:0e0631af0305 65
RyoheiHagimoto 0:0e0631af0305 66 #undef FLANN_PLATFORM_32_BIT
RyoheiHagimoto 0:0e0631af0305 67 #undef FLANN_PLATFORM_64_BIT
RyoheiHagimoto 0:0e0631af0305 68 #if defined __amd64__ || defined __x86_64__ || defined _WIN64 || defined _M_X64
RyoheiHagimoto 0:0e0631af0305 69 #define FLANN_PLATFORM_64_BIT
RyoheiHagimoto 0:0e0631af0305 70 #else
RyoheiHagimoto 0:0e0631af0305 71 #define FLANN_PLATFORM_32_BIT
RyoheiHagimoto 0:0e0631af0305 72 #endif
RyoheiHagimoto 0:0e0631af0305 73
RyoheiHagimoto 0:0e0631af0305 74
RyoheiHagimoto 0:0e0631af0305 75 #undef FLANN_ARRAY_LEN
RyoheiHagimoto 0:0e0631af0305 76 #define FLANN_ARRAY_LEN(a) (sizeof(a)/sizeof(a[0]))
RyoheiHagimoto 0:0e0631af0305 77
RyoheiHagimoto 0:0e0631af0305 78 namespace cvflann {
RyoheiHagimoto 0:0e0631af0305 79
RyoheiHagimoto 0:0e0631af0305 80 /* Nearest neighbour index algorithms */
RyoheiHagimoto 0:0e0631af0305 81 enum flann_algorithm_t
RyoheiHagimoto 0:0e0631af0305 82 {
RyoheiHagimoto 0:0e0631af0305 83 FLANN_INDEX_LINEAR = 0,
RyoheiHagimoto 0:0e0631af0305 84 FLANN_INDEX_KDTREE = 1,
RyoheiHagimoto 0:0e0631af0305 85 FLANN_INDEX_KMEANS = 2,
RyoheiHagimoto 0:0e0631af0305 86 FLANN_INDEX_COMPOSITE = 3,
RyoheiHagimoto 0:0e0631af0305 87 FLANN_INDEX_KDTREE_SINGLE = 4,
RyoheiHagimoto 0:0e0631af0305 88 FLANN_INDEX_HIERARCHICAL = 5,
RyoheiHagimoto 0:0e0631af0305 89 FLANN_INDEX_LSH = 6,
RyoheiHagimoto 0:0e0631af0305 90 FLANN_INDEX_SAVED = 254,
RyoheiHagimoto 0:0e0631af0305 91 FLANN_INDEX_AUTOTUNED = 255,
RyoheiHagimoto 0:0e0631af0305 92
RyoheiHagimoto 0:0e0631af0305 93 // deprecated constants, should use the FLANN_INDEX_* ones instead
RyoheiHagimoto 0:0e0631af0305 94 LINEAR = 0,
RyoheiHagimoto 0:0e0631af0305 95 KDTREE = 1,
RyoheiHagimoto 0:0e0631af0305 96 KMEANS = 2,
RyoheiHagimoto 0:0e0631af0305 97 COMPOSITE = 3,
RyoheiHagimoto 0:0e0631af0305 98 KDTREE_SINGLE = 4,
RyoheiHagimoto 0:0e0631af0305 99 SAVED = 254,
RyoheiHagimoto 0:0e0631af0305 100 AUTOTUNED = 255
RyoheiHagimoto 0:0e0631af0305 101 };
RyoheiHagimoto 0:0e0631af0305 102
RyoheiHagimoto 0:0e0631af0305 103
RyoheiHagimoto 0:0e0631af0305 104
RyoheiHagimoto 0:0e0631af0305 105 enum flann_centers_init_t
RyoheiHagimoto 0:0e0631af0305 106 {
RyoheiHagimoto 0:0e0631af0305 107 FLANN_CENTERS_RANDOM = 0,
RyoheiHagimoto 0:0e0631af0305 108 FLANN_CENTERS_GONZALES = 1,
RyoheiHagimoto 0:0e0631af0305 109 FLANN_CENTERS_KMEANSPP = 2,
RyoheiHagimoto 0:0e0631af0305 110 FLANN_CENTERS_GROUPWISE = 3,
RyoheiHagimoto 0:0e0631af0305 111
RyoheiHagimoto 0:0e0631af0305 112 // deprecated constants, should use the FLANN_CENTERS_* ones instead
RyoheiHagimoto 0:0e0631af0305 113 CENTERS_RANDOM = 0,
RyoheiHagimoto 0:0e0631af0305 114 CENTERS_GONZALES = 1,
RyoheiHagimoto 0:0e0631af0305 115 CENTERS_KMEANSPP = 2
RyoheiHagimoto 0:0e0631af0305 116 };
RyoheiHagimoto 0:0e0631af0305 117
RyoheiHagimoto 0:0e0631af0305 118 enum flann_log_level_t
RyoheiHagimoto 0:0e0631af0305 119 {
RyoheiHagimoto 0:0e0631af0305 120 FLANN_LOG_NONE = 0,
RyoheiHagimoto 0:0e0631af0305 121 FLANN_LOG_FATAL = 1,
RyoheiHagimoto 0:0e0631af0305 122 FLANN_LOG_ERROR = 2,
RyoheiHagimoto 0:0e0631af0305 123 FLANN_LOG_WARN = 3,
RyoheiHagimoto 0:0e0631af0305 124 FLANN_LOG_INFO = 4
RyoheiHagimoto 0:0e0631af0305 125 };
RyoheiHagimoto 0:0e0631af0305 126
RyoheiHagimoto 0:0e0631af0305 127 enum flann_distance_t
RyoheiHagimoto 0:0e0631af0305 128 {
RyoheiHagimoto 0:0e0631af0305 129 FLANN_DIST_EUCLIDEAN = 1,
RyoheiHagimoto 0:0e0631af0305 130 FLANN_DIST_L2 = 1,
RyoheiHagimoto 0:0e0631af0305 131 FLANN_DIST_MANHATTAN = 2,
RyoheiHagimoto 0:0e0631af0305 132 FLANN_DIST_L1 = 2,
RyoheiHagimoto 0:0e0631af0305 133 FLANN_DIST_MINKOWSKI = 3,
RyoheiHagimoto 0:0e0631af0305 134 FLANN_DIST_MAX = 4,
RyoheiHagimoto 0:0e0631af0305 135 FLANN_DIST_HIST_INTERSECT = 5,
RyoheiHagimoto 0:0e0631af0305 136 FLANN_DIST_HELLINGER = 6,
RyoheiHagimoto 0:0e0631af0305 137 FLANN_DIST_CHI_SQUARE = 7,
RyoheiHagimoto 0:0e0631af0305 138 FLANN_DIST_CS = 7,
RyoheiHagimoto 0:0e0631af0305 139 FLANN_DIST_KULLBACK_LEIBLER = 8,
RyoheiHagimoto 0:0e0631af0305 140 FLANN_DIST_KL = 8,
RyoheiHagimoto 0:0e0631af0305 141 FLANN_DIST_HAMMING = 9,
RyoheiHagimoto 0:0e0631af0305 142
RyoheiHagimoto 0:0e0631af0305 143 // deprecated constants, should use the FLANN_DIST_* ones instead
RyoheiHagimoto 0:0e0631af0305 144 EUCLIDEAN = 1,
RyoheiHagimoto 0:0e0631af0305 145 MANHATTAN = 2,
RyoheiHagimoto 0:0e0631af0305 146 MINKOWSKI = 3,
RyoheiHagimoto 0:0e0631af0305 147 MAX_DIST = 4,
RyoheiHagimoto 0:0e0631af0305 148 HIST_INTERSECT = 5,
RyoheiHagimoto 0:0e0631af0305 149 HELLINGER = 6,
RyoheiHagimoto 0:0e0631af0305 150 CS = 7,
RyoheiHagimoto 0:0e0631af0305 151 KL = 8,
RyoheiHagimoto 0:0e0631af0305 152 KULLBACK_LEIBLER = 8
RyoheiHagimoto 0:0e0631af0305 153 };
RyoheiHagimoto 0:0e0631af0305 154
RyoheiHagimoto 0:0e0631af0305 155 enum flann_datatype_t
RyoheiHagimoto 0:0e0631af0305 156 {
RyoheiHagimoto 0:0e0631af0305 157 FLANN_INT8 = 0,
RyoheiHagimoto 0:0e0631af0305 158 FLANN_INT16 = 1,
RyoheiHagimoto 0:0e0631af0305 159 FLANN_INT32 = 2,
RyoheiHagimoto 0:0e0631af0305 160 FLANN_INT64 = 3,
RyoheiHagimoto 0:0e0631af0305 161 FLANN_UINT8 = 4,
RyoheiHagimoto 0:0e0631af0305 162 FLANN_UINT16 = 5,
RyoheiHagimoto 0:0e0631af0305 163 FLANN_UINT32 = 6,
RyoheiHagimoto 0:0e0631af0305 164 FLANN_UINT64 = 7,
RyoheiHagimoto 0:0e0631af0305 165 FLANN_FLOAT32 = 8,
RyoheiHagimoto 0:0e0631af0305 166 FLANN_FLOAT64 = 9
RyoheiHagimoto 0:0e0631af0305 167 };
RyoheiHagimoto 0:0e0631af0305 168
RyoheiHagimoto 0:0e0631af0305 169 enum
RyoheiHagimoto 0:0e0631af0305 170 {
RyoheiHagimoto 0:0e0631af0305 171 FLANN_CHECKS_UNLIMITED = -1,
RyoheiHagimoto 0:0e0631af0305 172 FLANN_CHECKS_AUTOTUNED = -2
RyoheiHagimoto 0:0e0631af0305 173 };
RyoheiHagimoto 0:0e0631af0305 174
RyoheiHagimoto 0:0e0631af0305 175 }
RyoheiHagimoto 0:0e0631af0305 176
RyoheiHagimoto 0:0e0631af0305 177 #endif /* OPENCV_FLANN_DEFINES_H_ */