@@ -6,7 +6,7 @@ namespace HoloLensWithOpenCVForUnityExample
6
6
[ System . Serializable ]
7
7
public struct CameraParameters
8
8
{
9
- public string calibration_date ;
9
+ public string calibration_date ;
10
10
public int frames_count ;
11
11
public int image_width ;
12
12
public int image_height ;
@@ -15,9 +15,9 @@ public struct CameraParameters
15
15
public double [ ] distortion_coefficients ;
16
16
public double avg_reprojection_error ;
17
17
18
- public CameraParameters ( int frames_count , int image_width , int image_height , int calibration_flags , double [ ] camera_matrix , double [ ] distortion_coefficients , double avg_reprojection_error )
18
+ public CameraParameters ( int frames_count , int image_width , int image_height , int calibration_flags , double [ ] camera_matrix , double [ ] distortion_coefficients , double avg_reprojection_error )
19
19
{
20
- this . calibration_date = DateTime . Now . ToString ( ) ;
20
+ this . calibration_date = DateTime . Now . ToString ( ) ;
21
21
this . frames_count = frames_count ;
22
22
this . image_width = image_width ;
23
23
this . image_height = image_height ;
@@ -27,15 +27,15 @@ public CameraParameters (int frames_count, int image_width, int image_height, in
27
27
this . avg_reprojection_error = avg_reprojection_error ;
28
28
}
29
29
30
- public CameraParameters ( int frames_count , int image_width , int image_height , int calibration_flags , Mat camera_matrix , Mat distortion_coefficients , double avg_reprojection_error )
30
+ public CameraParameters ( int frames_count , int image_width , int image_height , int calibration_flags , Mat camera_matrix , Mat distortion_coefficients , double avg_reprojection_error )
31
31
{
32
32
double [ ] camera_matrixArr = new double [ camera_matrix . total ( ) ] ;
33
- camera_matrix . get ( 0 , 0 , camera_matrixArr ) ;
33
+ camera_matrix . get ( 0 , 0 , camera_matrixArr ) ;
34
34
35
35
double [ ] distortion_coefficientsArr = new double [ distortion_coefficients . total ( ) ] ;
36
- distortion_coefficients . get ( 0 , 0 , distortion_coefficientsArr ) ;
36
+ distortion_coefficients . get ( 0 , 0 , distortion_coefficientsArr ) ;
37
37
38
- this . calibration_date = DateTime . Now . ToString ( ) ;
38
+ this . calibration_date = DateTime . Now . ToString ( ) ;
39
39
this . frames_count = frames_count ;
40
40
this . image_width = image_width ;
41
41
this . image_height = image_height ;
@@ -45,17 +45,17 @@ public CameraParameters (int frames_count, int image_width, int image_height, in
45
45
this . avg_reprojection_error = avg_reprojection_error ;
46
46
}
47
47
48
- public Mat GetCameraMatrix ( )
48
+ public Mat GetCameraMatrix ( )
49
49
{
50
- Mat m = new Mat ( 3 , 3 , CvType . CV_64FC1 ) ;
51
- m . put ( 0 , 0 , camera_matrix ) ;
50
+ Mat m = new Mat ( 3 , 3 , CvType . CV_64FC1 ) ;
51
+ m . put ( 0 , 0 , camera_matrix ) ;
52
52
return m ;
53
53
}
54
54
55
- public Mat GetDistortionCoefficients ( )
55
+ public Mat GetDistortionCoefficients ( )
56
56
{
57
- Mat m = new Mat ( distortion_coefficients . Length , 1 , CvType . CV_64FC1 ) ;
58
- m . put ( 0 , 0 , distortion_coefficients ) ;
57
+ Mat m = new Mat ( distortion_coefficients . Length , 1 , CvType . CV_64FC1 ) ;
58
+ m . put ( 0 , 0 , distortion_coefficients ) ;
59
59
return m ;
60
60
}
61
61
}
0 commit comments