Home | History | Annotate | Download | only in db_vlvm
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /* $Id: db_utilities_constants.h,v 1.2 2011/06/17 14:03:31 mbansal Exp $ */
     18 
     19 #ifndef DB_UTILITIES_CONSTANTS
     20 #define DB_UTILITIES_CONSTANTS
     21 
     22 /*****************************************************************
     23 *    Lean and mean begins here                                   *
     24 *****************************************************************/
     25 
     26 /****************Constants********************/
     27 #define DB_E             2.7182818284590452354
     28 #define DB_LOG2E         1.4426950408889634074
     29 #define DB_LOG10E        0.43429448190325182765
     30 #define DB_LN2           0.69314718055994530942
     31 #define DB_LN10          2.30258509299404568402
     32 #define DB_PI            3.1415926535897932384626433832795
     33 #define DB_PI_2          1.57079632679489661923
     34 #define DB_PI_4          0.78539816339744830962
     35 #define DB_1_PI          0.31830988618379067154
     36 #define DB_2_PI          0.63661977236758134308
     37 #define DB_SQRTPI        1.7724538509055160272981674833411
     38 #define DB_SQRT_2PI      2.506628274631000502415765284811
     39 #define DB_2_SQRTPI      1.12837916709551257390
     40 #define DB_SQRT2         1.41421356237309504880
     41 #define DB_SQRT3         1.7320508075688772935274463415059
     42 #define DB_SQRT1_2       0.70710678118654752440
     43 #define DB_EPS           2.220446049250313e-016 /* for 32 bit double */
     44 
     45 /****************Default Parameters********************/
     46 /*Preemptive ransac parameters*/
     47 #define DB_DEFAULT_NR_SAMPLES 500
     48 #define DB_DEFAULT_CHUNK_SIZE 100
     49 #define DB_DEFAULT_GROUP_SIZE 10
     50 
     51 /*Optimisation parameters*/
     52 #define DB_DEFAULT_MAX_POINTS 1000
     53 #define DB_DEFAULT_MAX_ITERATIONS 25
     54 #define DB_DEFAULT_IMP_REQ 0.001
     55 
     56 /*Feature standard deviation parameters*/
     57 #define DB_POINT_STANDARDDEV (1.0/(826.0)) /*1 pixel for CIF (fraction of (image width+image height)/2)*/
     58 #define DB_OUTLIER_THRESHOLD 3.0 /*In number of DB_POINT_STANDARDDEV's*/
     59 #define DB_WORST_CASE 50.0 /*In number of DB_POINT_STANDARDDEV's*/
     60 
     61 /*Front-end parameters*/
     62 #define DB_DEFAULT_TARGET_NR_CORNERS 5000
     63 #define DB_DEFAULT_NR_FEATURE_BLOCKS 10
     64 #define DB_DEFAULT_ABS_CORNER_THRESHOLD 50000000.0
     65 #define DB_DEFAULT_REL_CORNER_THRESHOLD 0.00005
     66 #define DB_DEFAULT_MAX_DISPARITY 0.1
     67 #define DB_DEFAULT_NO_DISPARITY (-1.0)
     68 #define DB_DEFAULT_MAX_TRACK_LENGTH 300
     69 
     70 #define DB_DEFAULT_MAX_NR_CAMERAS 1000
     71 
     72 #define DB_DEFAULT_TRIPLE_STEP 2
     73 #define DB_DEFAULT_DOUBLE_STEP 2
     74 #define DB_DEFAULT_SINGLE_STEP 1
     75 #define DB_DEFAULT_NR_SINGLES 10
     76 #define DB_DEFAULT_NR_DOUBLES 1
     77 #define DB_DEFAULT_NR_TRIPLES 1
     78 
     79 #define DB_DEFAULT_TRIFOCAL_FOUR_STEPS 40
     80 
     81 #define DB_DEFAULT_EPIPOLAR_ERROR 1 /*in pixels*/
     82 
     83 ////////////////////////// DOXYGEN /////////////////////
     84 
     85 /*!
     86  * \def DB_DEFAULT_GROUP_SIZE
     87  * \ingroup LMRobust
     88  * \brief Default group size for db_PreemptiveRansac class.
     89  * Group size is the number of observation costs multiplied together
     90  * before a log of the product is added to the total cost.
     91 */
     92 
     93 /*!
     94  * \def DB_DEFAULT_TARGET_NR_CORNERS
     95  * \ingroup FeatureDetection
     96  * \brief Default target number of corners
     97 */
     98 /*!
     99  * \def DB_DEFAULT_NR_FEATURE_BLOCKS
    100  * \ingroup FeatureDetection
    101  * \brief Default number of regions (horizontal or vertical) that are considered separately
    102  * for feature detection. The greater the number, the more uniform the distribution of
    103  * detected features.
    104 */
    105 /*!
    106  * \def DB_DEFAULT_ABS_CORNER_THRESHOLD
    107  * \ingroup FeatureDetection
    108  * \brief Absolute feature strength threshold.
    109 */
    110 /*!
    111  * \def DB_DEFAULT_REL_CORNER_THRESHOLD
    112  * \ingroup FeatureDetection
    113  * \brief Relative feature strength threshold.
    114 */
    115 /*!
    116  * \def DB_DEFAULT_MAX_DISPARITY
    117  * \ingroup FeatureMatching
    118  * \brief Maximum disparity (as fraction of image size) allowed in feature matching
    119 */
    120  /*!
    121  * \def DB_DEFAULT_NO_DISPARITY
    122  * \ingroup FeatureMatching
    123  * \brief Indicates that vertical disparity is the same as horizontal disparity.
    124 */
    125 ///////////////////////////////////////////////////////////////////////////////////
    126  /*!
    127  * \def DB_E
    128  * \ingroup LMBasicUtilities
    129  * \brief e
    130 */
    131  /*!
    132  * \def DB_LOG2E
    133  * \ingroup LMBasicUtilities
    134  * \brief log2(e)
    135 */
    136  /*!
    137  * \def DB_LOG10E
    138  * \ingroup LMBasicUtilities
    139  * \brief log10(e)
    140 */
    141  /*!
    142  * \def DB_LOG10E
    143  * \ingroup LMBasicUtilities
    144  * \brief log10(e)
    145 */
    146 /*!
    147  * \def DB_LN2
    148  * \ingroup LMBasicUtilities
    149  * \brief ln(2)
    150 */
    151 /*!
    152  * \def DB_LN10
    153  * \ingroup LMBasicUtilities
    154  * \brief ln(10)
    155 */
    156 /*!
    157  * \def DB_PI
    158  * \ingroup LMBasicUtilities
    159  * \brief Pi
    160 */
    161 /*!
    162  * \def DB_PI_2
    163  * \ingroup LMBasicUtilities
    164  * \brief Pi/2
    165 */
    166 /*!
    167  * \def DB_PI_4
    168  * \ingroup LMBasicUtilities
    169  * \brief Pi/4
    170 */
    171 /*!
    172  * \def DB_1_PI
    173  * \ingroup LMBasicUtilities
    174  * \brief 1/Pi
    175 */
    176 /*!
    177  * \def DB_2_PI
    178  * \ingroup LMBasicUtilities
    179  * \brief 2/Pi
    180 */
    181 /*!
    182  * \def DB_SQRTPI
    183  * \ingroup LMBasicUtilities
    184  * \brief sqrt(Pi)
    185 */
    186 /*!
    187  * \def DB_SQRT_2PI
    188  * \ingroup LMBasicUtilities
    189  * \brief sqrt(2*Pi)
    190 */
    191 /*!
    192  * \def DB_SQRT2
    193  * \ingroup LMBasicUtilities
    194  * \brief sqrt(2)
    195 */
    196 /*!
    197  * \def DB_SQRT3
    198  * \ingroup LMBasicUtilities
    199  * \brief sqrt(3)
    200 */
    201 /*!
    202  * \def DB_SQRT1_2
    203  * \ingroup LMBasicUtilities
    204  * \brief sqrt(1/2)
    205 */
    206 #endif /* DB_UTILITIES_CONSTANTS */
    207 
    208 
    209