Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/ccalib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
set(the_description "Custom Calibration Pattern")
ocv_define_module(ccalib opencv_core opencv_imgproc opencv_calib3d opencv_features2d opencv_highgui opencv_imgcodecs WRAP python)
if(BUILD_TESTS)
add_subdirectory(test)
endif()
32 changes: 29 additions & 3 deletions modules/ccalib/include/opencv2/ccalib/omnidir.hpp
Comment thread
nechami795 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,24 @@
//
//M*/


#ifndef __OPENCV_OMNIDIR_HPP__
#define __OPENCV_OMNIDIR_HPP__

#include "opencv2/core.hpp"
#include "opencv2/core/affine.hpp"
#include <vector>


namespace cv
{
/** following typedefs used in k3 support (github.com/opencv/opencv_contrib/issues/3952)
      should go to opencv2/core/matx.hpp at some point */
typedef Matx<float, 1, 5> Matx15f;
typedef Matx<double, 1, 5> Matx15d;
typedef Matx<float, 2, 5> Matx25f;
typedef Matx<double, 2, 5> Matx25d;
typedef Vec<double, 5> Vec5d;
namespace omnidir
{
//! @addtogroup ccalib
Expand Down Expand Up @@ -270,10 +279,12 @@ namespace internal
void decodeParametersStereo(InputArray parameters, OutputArray K1, OutputArray K2, OutputArray om, OutputArray T, OutputArrayOfArrays omL,
OutputArrayOfArrays tL, OutputArray D1, OutputArray D2, double& xi1, double& xi2);

void estimateUncertainties(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, InputArray parameters, Mat& errors, Vec2d& std_error, double& rms, int flags);
void estimateUncertainties(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, InputArray parameters,
Mat& errors, Vec2d& std_error, double& rms, int flags, bool useK3);


void estimateUncertaintiesStereo(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2, InputArray parameters, Mat& errors,
Vec2d& std_error, double& rms, int flags);
void estimateUncertaintiesStereo(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
InputArray parameters, Mat& errors, Vec2d& std_error, double& rms, int flags, bool useK3);

double computeMeanReproErr(InputArrayOfArrays imagePoints, InputArrayOfArrays proImagePoints);

Expand All @@ -286,12 +297,20 @@ namespace internal
void subMatrix(const Mat& src, Mat& dst, const std::vector<int>& cols, const std::vector<int>& rows);

void flags2idx(int flags, std::vector<int>& idx, int n);
void flags2idx(int flags, std::vector<int>& idx, int n, bool useK3);
Comment thread
nechami795 marked this conversation as resolved.
Outdated



void flags2idxStereo(int flags, std::vector<int>& idx, int n);
void flags2idxStereo(int flags, std::vector<int>& idx, int n, bool useK3);

void fillFixed(Mat&G, int flags, int n);
void fillFixed(Mat& G, int flags, int n, bool useK3);


void fillFixedStereo(Mat& G, int flags, int n);
void fillFixedStereo(Mat& G, int flags, int n, bool useK3);


double findMedian(const Mat& row);

Expand All @@ -302,6 +321,13 @@ namespace internal
void compose_motion(InputArray _om1, InputArray _T1, InputArray _om2, InputArray _T2, Mat& om3, Mat& T3, Mat& dom3dom1,
Mat& dom3dT1, Mat& dom3dom2, Mat& dom3dT2, Mat& dT3dom1, Mat& dT3dT1, Mat& dT3dom2, Mat& dT3dT2);

void computeJacobian(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints,
InputArray parameters, Mat& JTJ_inv, Mat& JTE, int flags, double epsilon, bool useK3);

void computeJacobianStereo(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
InputArray parameters, Mat& JTJ_inv, Mat& JTE, int flags, double epsilon, bool useK3);


//void JRodriguesMatlab(const Mat& src, Mat& dst);

//void dAB(InputArray A, InputArray B, OutputArray dABdA, OutputArray dABdB);
Expand Down
Loading