2020-01-04 13:10:36 +00:00
|
|
|
#ifndef _OPENCV3_CALIB_H_
|
|
|
|
#define _OPENCV3_CALIB_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
#include <opencv2/calib3d.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
//Calib
|
2024-04-02 17:24:34 +00:00
|
|
|
double Fisheye_Calibrate(Points3fVector objectPoints, Points2fVector imagePoints, Size size, Mat k, Mat d, Mat rvecs, Mat tvecs, int flags);
|
|
|
|
void Fisheye_DistortPoints(Mat undistorted, Mat distorted, Mat k, Mat d);
|
2020-01-04 13:10:36 +00:00
|
|
|
void Fisheye_UndistortImage(Mat distorted, Mat undistorted, Mat k, Mat d);
|
|
|
|
void Fisheye_UndistortImageWithParams(Mat distorted, Mat undistorted, Mat k, Mat d, Mat knew, Size size);
|
2021-09-01 20:08:47 +00:00
|
|
|
void Fisheye_UndistortPoints(Mat distorted, Mat undistorted, Mat k, Mat d, Mat R, Mat P);
|
|
|
|
void Fisheye_EstimateNewCameraMatrixForUndistortRectify(Mat k, Mat d, Size imgSize, Mat r, Mat p, double balance, Size newSize, double fovScale);
|
2020-01-04 13:10:36 +00:00
|
|
|
|
|
|
|
void InitUndistortRectifyMap(Mat cameraMatrix,Mat distCoeffs,Mat r,Mat newCameraMatrix,Size size,int m1type,Mat map1,Mat map2);
|
|
|
|
Mat GetOptimalNewCameraMatrixWithParams(Mat cameraMatrix,Mat distCoeffs,Size size,double alpha,Size newImgSize,Rect* validPixROI,bool centerPrincipalPoint);
|
2021-12-24 15:53:47 +00:00
|
|
|
double CalibrateCamera(Points3fVector objectPoints, Points2fVector imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, Mat rvecs, Mat tvecs, int flag);
|
2020-01-04 13:10:36 +00:00
|
|
|
void Undistort(Mat src, Mat dst, Mat cameraMatrix, Mat distCoeffs, Mat newCameraMatrix);
|
2021-09-01 20:08:47 +00:00
|
|
|
void UndistortPoints(Mat distorted, Mat undistorted, Mat k, Mat d, Mat r, Mat p);
|
2024-04-02 17:24:34 +00:00
|
|
|
bool CheckChessboard(Mat image, Size sz);
|
2021-09-01 20:08:47 +00:00
|
|
|
bool FindChessboardCorners(Mat image, Size patternSize, Mat corners, int flags);
|
2021-12-24 15:53:47 +00:00
|
|
|
bool FindChessboardCornersSB(Mat image, Size patternSize, Mat corners, int flags);
|
|
|
|
bool FindChessboardCornersSBWithMeta(Mat image, Size patternSize, Mat corners, int flags, Mat meta);
|
2021-09-01 20:08:47 +00:00
|
|
|
void DrawChessboardCorners(Mat image, Size patternSize, Mat corners, bool patternWasFound);
|
|
|
|
Mat EstimateAffinePartial2D(Point2fVector from, Point2fVector to);
|
2024-04-02 17:24:34 +00:00
|
|
|
Mat EstimateAffinePartial2DWithParams(Point2fVector from, Point2fVector to, Mat inliers, int method, double ransacReprojThreshold, size_t maxIters, double confidence, size_t refineIters);
|
2021-12-24 15:53:47 +00:00
|
|
|
Mat EstimateAffine2D(Point2fVector from, Point2fVector to);
|
2022-06-09 14:40:23 +00:00
|
|
|
Mat EstimateAffine2DWithParams(Point2fVector from, Point2fVector to, Mat inliers, int method, double ransacReprojThreshold, size_t maxIters, double confidence, size_t refineIters);
|
2024-04-02 17:24:34 +00:00
|
|
|
void TriangulatePoints(Mat projMatr1, Mat projMatr2, Point2fVector projPoints1, Point2fVector projPoints2, Mat points4D);
|
|
|
|
void ConvertPointsFromHomogeneous(Mat src, Mat dst);
|
|
|
|
void Rodrigues(Mat src, Mat dst);
|
|
|
|
bool SolvePnP(Point3fVector objectPoints, Point2fVector imagePoints, Mat cameraMatrix, Mat distCoeffs, Mat rvec, Mat tvec, bool useExtrinsicGuess, int flags);
|
2020-01-04 13:10:36 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-06-09 14:40:23 +00:00
|
|
|
#endif //_OPENCV3_CALIB_H
|