-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcalibrate.hpp
43 lines (40 loc) · 2.25 KB
/
calibrate.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// calibrate.hpp
// AugmentedReality
//
// Created by Shivani Naik and Pulkit Saharan on 04/11/22.
// Function definitions of AR and Calibration
#ifndef calibrate_hpp
#define calibrate_hpp
#include <stdio.h>
#include <iostream>
#include<opencv2/opencv.hpp>
#include <opencv2/calib3d.hpp>
#include<opencv2/opencv.hpp>
#include <opencv2/core/types_c.h>
using namespace cv;
using namespace std;
void extract_draw_corners(cv::Mat& src, std::vector<std::vector<cv::Vec3f> >& point_list, std::vector<std::vector<cv::Point2f> >& corner_list);
void add_to_image_set(std::vector<cv::Point2f> corner_set, std::vector<std::vector<cv::Vec3f> >& point_list, std::vector<std::vector<cv::Point2f> >& corner_list);
void create_image_set(string path, std::vector<std::vector<cv::Vec3f> >& point_list, std::vector<std::vector<cv::Point2f> >& corner_list);
float calibrate_camera(std::vector<std::vector<cv::Vec3f>> &point_list,
std::vector<std::vector<cv::Point2f>> &corner_list,
cv::Mat &camera_matrix, cv::Mat &distortion_coeff);
bool camera_position(cv::Mat& src,cv::Mat &camera_matrix, cv::Mat &distortion_coeff,
cv::Mat& rotational_vec, cv::Mat& trans_vec, string objType,
vector<cv::Point3f> vertices = vector<cv::Point3f>(),
vector<std::vector<int>> face_vertices=vector<std::vector<int>>());
void draw_axes(cv::Mat& src,cv::Mat &camera_matrix, cv::Mat &distortion_coeff,
cv::Mat& R, cv::Mat& T);
void draw_chair(cv::Mat& src,cv::Mat &camera_matrix, cv::Mat &distortion_coeff,
cv::Mat& R, cv::Mat& T);
void draw_3d_obj_object(cv::Mat &src,cv::Mat &camera_matrix, cv::Mat &distortion_coeff,
cv::Mat& R, cv::Mat& T, vector<cv::Point3f> vertices, vector<std::vector<int>> face_vertices);
void draw_cube(cv::Mat& src, cv::Mat& camera_matrix, cv::Mat& distortion_coeff,
cv::Mat& R, cv::Mat& T);
void draw_table(cv::Mat& src, cv::Mat& camera_matrix, cv::Mat& distortion_coeff, cv::Mat& R, cv::Mat& T);
bool aruco_marker_detection(cv::Mat& src, cv::Mat& output);
void aruco_out(cv::Mat& target, cv::Mat& actual, cv::Mat& output);
void ORB_matching(cv::Mat& img_1, cv::Mat& img_2);
void harris_corner(cv::Mat& src);
#endif /* calibrate_hpp */