-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathfind_chessboard_corners.hh
74 lines (57 loc) · 3.72 KB
/
find_chessboard_corners.hh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
#include <vector>
#include <opencv2/core/core.hpp>
#include "point.hh"
namespace mrgingham
{
// these all output the points scaled by FIND_GRID_SCALE in points[].
bool find_chessboard_corners_from_image_array( // out
// integers scaled up by
// FIND_GRID_SCALE to get more
// resolution
std::vector<mrgingham::PointInt>* points_scaled_out,
// in
const cv::Mat& image_input,
// set to 0 to just use the
// image. Values > 0 cut down the
// image by a factor of 2 that
// many times. So for example,
// level==2 means each dimension
// is cut down by a factor of 4
int image_pyramid_level,
bool debug = false,
const char* debug_image_filename = NULL);
bool find_chessboard_corners_from_image_file( // out
// integers scaled up by
// FIND_GRID_SCALE to get more
// resolution
std::vector<mrgingham::PointInt>* points,
// in
const char* filename,
// set to 0 to just use the
// image. Values > 0 cut down the
// image by a factor of 2 that
// many times. So for example,
// level==2 means each dimension
// is cut down by a factor of 4
int image_pyramid_level,
bool debug = false);
int refine_chessboard_corners_from_image_array( // out/int
// initial coordinates on input,
// refined coordinates on output
std::vector<mrgingham::PointDouble>* points,
// level[ipoint] is the
// decimation level used to
// compute that point.
// if(level[ipoint] ==
// image_pyramid_level+1) then
// that point could be refined.
// If I successfully refine a
// point, I update level[ipoint]
signed char* level,
// in
const cv::Mat& image_input,
int image_pyramid_level,
bool debug = false,
const char* debug_image_filename = NULL);
};