-
Notifications
You must be signed in to change notification settings - Fork 0
/
calibration.h
38 lines (26 loc) · 1.18 KB
/
calibration.h
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
/**
Matching Algorithm for Content-based Image Retrieval (CBIR)
Created by Hui Hu for CS 5330 Computer Vision Spring 2023
Functions to extract feature vector and calculate the distance
*/
#ifndef CALIBRATION
#define CALIBRATION
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
using namespace std;
using namespace cv;
// detect a target and extracting target corners
vector<Point2f> detectCorners(Mat &src, Mat &dst);
// rename image and save it to Resources folder
int saveImage(Mat &originalImage, string format = "png");
// save calibration image and corresponding rotations and translations
void saveData(Mat &src, vector<vector<Point2f>> corner_list, vector<vector<Point3f>> point_list, Mat &cameraMatrix, Mat &distCoeffs);
// Project Outside Corners or 3D Axes
void projectCorner(Mat &src, Mat &dst, Mat &rvec, Mat &tvec, Mat &cameraMatrix, Mat &distCoeffs);
// Create a Virtual Object
void goldenGateBridge(Mat &src, Mat &dst, Mat &rvec, Mat &tvec, Mat &cameraMatrix, Mat &distCoeffs);
void tower(Mat &src, Mat &dst, Mat &rvec, Mat &tvec, Mat &cameraMatrix, Mat &distCoeffs);
// Detect Robust Features
void detectRobustFeatures(Mat &src, Mat &dst);
#endif