github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/opencv4/include/opencv2/calib3d/calib3d_c.h (about)

     1  /*M///////////////////////////////////////////////////////////////////////////////////////
     2  //
     3  //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
     4  //
     5  //  By downloading, copying, installing or using the software you agree to this license.
     6  //  If you do not agree to this license, do not download, install,
     7  //  copy or use the software.
     8  //
     9  //
    10  //                          License Agreement
    11  //                For Open Source Computer Vision Library
    12  //
    13  // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
    14  // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
    15  // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
    16  // Third party copyrights are property of their respective owners.
    17  //
    18  // Redistribution and use in source and binary forms, with or without modification,
    19  // are permitted provided that the following conditions are met:
    20  //
    21  //   * Redistribution's of source code must retain the above copyright notice,
    22  //     this list of conditions and the following disclaimer.
    23  //
    24  //   * Redistribution's in binary form must reproduce the above copyright notice,
    25  //     this list of conditions and the following disclaimer in the documentation
    26  //     and/or other materials provided with the distribution.
    27  //
    28  //   * The name of the copyright holders may not be used to endorse or promote products
    29  //     derived from this software without specific prior written permission.
    30  //
    31  // This software is provided by the copyright holders and contributors "as is" and
    32  // any express or implied warranties, including, but not limited to, the implied
    33  // warranties of merchantability and fitness for a particular purpose are disclaimed.
    34  // In no event shall the Intel Corporation or contributors be liable for any direct,
    35  // indirect, incidental, special, exemplary, or consequential damages
    36  // (including, but not limited to, procurement of substitute goods or services;
    37  // loss of use, data, or profits; or business interruption) however caused
    38  // and on any theory of liability, whether in contract, strict liability,
    39  // or tort (including negligence or otherwise) arising in any way out of
    40  // the use of this software, even if advised of the possibility of such damage.
    41  //
    42  //M*/
    43  
    44  #ifndef OPENCV_CALIB3D_C_H
    45  #define OPENCV_CALIB3D_C_H
    46  
    47  #include "opencv2/core/types_c.h"
    48  
    49  #ifdef __cplusplus
    50  extern "C" {
    51  #endif
    52  
    53  /* Calculates fundamental matrix given a set of corresponding points */
    54  #define CV_FM_7POINT 1
    55  #define CV_FM_8POINT 2
    56  
    57  #define CV_LMEDS 4
    58  #define CV_RANSAC 8
    59  
    60  #define CV_FM_LMEDS_ONLY  CV_LMEDS
    61  #define CV_FM_RANSAC_ONLY CV_RANSAC
    62  #define CV_FM_LMEDS CV_LMEDS
    63  #define CV_FM_RANSAC CV_RANSAC
    64  
    65  enum
    66  {
    67      CV_ITERATIVE = 0,
    68      CV_EPNP = 1, // F.Moreno-Noguer, V.Lepetit and P.Fua "EPnP: Efficient Perspective-n-Point Camera Pose Estimation"
    69      CV_P3P = 2, // X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem"
    70      CV_DLS = 3 // Joel A. Hesch and Stergios I. Roumeliotis. "A Direct Least-Squares (DLS) Method for PnP"
    71  };
    72  
    73  #define CV_CALIB_CB_ADAPTIVE_THRESH  1
    74  #define CV_CALIB_CB_NORMALIZE_IMAGE  2
    75  #define CV_CALIB_CB_FILTER_QUADS     4
    76  #define CV_CALIB_CB_FAST_CHECK       8
    77  
    78  #define CV_CALIB_USE_INTRINSIC_GUESS  1
    79  #define CV_CALIB_FIX_ASPECT_RATIO     2
    80  #define CV_CALIB_FIX_PRINCIPAL_POINT  4
    81  #define CV_CALIB_ZERO_TANGENT_DIST    8
    82  #define CV_CALIB_FIX_FOCAL_LENGTH 16
    83  #define CV_CALIB_FIX_K1  32
    84  #define CV_CALIB_FIX_K2  64
    85  #define CV_CALIB_FIX_K3  128
    86  #define CV_CALIB_FIX_K4  2048
    87  #define CV_CALIB_FIX_K5  4096
    88  #define CV_CALIB_FIX_K6  8192
    89  #define CV_CALIB_RATIONAL_MODEL 16384
    90  #define CV_CALIB_THIN_PRISM_MODEL 32768
    91  #define CV_CALIB_FIX_S1_S2_S3_S4  65536
    92  #define CV_CALIB_TILTED_MODEL  262144
    93  #define CV_CALIB_FIX_TAUX_TAUY  524288
    94  #define CV_CALIB_FIX_TANGENT_DIST 2097152
    95  
    96  #define CV_CALIB_NINTRINSIC 18
    97  
    98  #define CV_CALIB_FIX_INTRINSIC  256
    99  #define CV_CALIB_SAME_FOCAL_LENGTH 512
   100  
   101  #define CV_CALIB_ZERO_DISPARITY 1024
   102  
   103  /* stereo correspondence parameters and functions */
   104  #define CV_STEREO_BM_NORMALIZED_RESPONSE  0
   105  #define CV_STEREO_BM_XSOBEL               1
   106  
   107  #ifdef __cplusplus
   108  } // extern "C"
   109  
   110  //////////////////////////////////////////////////////////////////////////////////////////
   111  class CV_EXPORTS CvLevMarq
   112  {
   113  public:
   114      CvLevMarq();
   115      CvLevMarq( int nparams, int nerrs, CvTermCriteria criteria=
   116                cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),
   117                bool completeSymmFlag=false );
   118      ~CvLevMarq();
   119      void init( int nparams, int nerrs, CvTermCriteria criteria=
   120                cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),
   121                bool completeSymmFlag=false );
   122      bool update( const CvMat*& param, CvMat*& J, CvMat*& err );
   123      bool updateAlt( const CvMat*& param, CvMat*& JtJ, CvMat*& JtErr, double*& errNorm );
   124  
   125      void clear();
   126      void step();
   127      enum { DONE=0, STARTED=1, CALC_J=2, CHECK_ERR=3 };
   128  
   129      cv::Ptr<CvMat> mask;
   130      cv::Ptr<CvMat> prevParam;
   131      cv::Ptr<CvMat> param;
   132      cv::Ptr<CvMat> J;
   133      cv::Ptr<CvMat> err;
   134      cv::Ptr<CvMat> JtJ;
   135      cv::Ptr<CvMat> JtJN;
   136      cv::Ptr<CvMat> JtErr;
   137      cv::Ptr<CvMat> JtJV;
   138      cv::Ptr<CvMat> JtJW;
   139      double prevErrNorm, errNorm;
   140      int lambdaLg10;
   141      CvTermCriteria criteria;
   142      int state;
   143      int iters;
   144      bool completeSymmFlag;
   145      int solveMethod;
   146  };
   147  
   148  #endif
   149  
   150  #endif /* OPENCV_CALIB3D_C_H */