Update the changelog
[opencv] / filters / CalibFilter / iCalibFilter.h
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 //  By downloading, copying, installing or using the software you agree to this license.
6 //  If you do not agree to this license, do not download, install,
7 //  copy or use the software.
8 //
9 //
10 //                        Intel License Agreement
11 //                For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
14 // Third party copyrights are property of their respective owners.
15 //
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
18 //
19 //   * Redistribution's of source code must retain the above copyright notice,
20 //     this list of conditions and the following disclaimer.
21 //
22 //   * Redistribution's in binary form must reproduce the above copyright notice,
23 //     this list of conditions and the following disclaimer in the documentation
24 //     and/or other materials provided with the distribution.
25 //
26 //   * The name of Intel Corporation may not be used to endorse or promote products
27 //     derived from this software without specific prior written permission.
28 //
29 // This software is provided by the copyright holders and contributors "as is" and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
39 //
40 //M*/
41 #pragma once
42
43 typedef enum _CalibState
44 {
45     CalibState_Initial            = 0,
46     CalibState_NotCalibrated      = 1,
47     CalibState_Calibrated         = 2,
48     CalibState_CalibrationProcess = 3
49 }
50 CalibState;
51
52 typedef enum _CalibEtalonType
53 {
54     CalibEtalon_ChessBoard = 0
55 }
56 CalibEtalonType;
57
58 typedef struct _CvCameraParams
59 {
60     float   focalLength[2];
61     float   distortion[4];
62     float   principalPoint[2];
63     float   matrix[9];
64     float   rotMatr[9];
65     float   transVect[3];
66 }
67 CvCameraParams;
68
69 typedef struct _CalibFilterParams
70 {
71     CalibEtalonType  etalon_type;
72     long        etalon_params_count;
73     float       etalon_params[7];
74     long        etalon_points;
75     long        show_feature_points_flag;
76     long        frame_interval;
77     long        frames_to_collect;
78     long        frames_collected;
79     long        frames_passed;
80         double      last_frame_time;
81     CalibState  calib_state;
82     long        enable_undistortion;
83     long        show_3d_window;
84 }
85 CalibFilterParams;
86
87 #ifdef __cplusplus
88 extern "C" {
89 #endif
90
91     // 0x1010045, 0x1d0, 0x6, 0x1, 0x0, 0x0, 0x0, 0x0, 0xe5, 0x12, 0x0  
92     DEFINE_GUID(IID_ICalibFilter, 0x1010045, 0x1d0, 0x6, 0x1, 0x0, 0x0, 0x0, 0x0, 0xe5, 0x12, 0x0 );     
93     DECLARE_INTERFACE_(ICalibFilter, IUnknown)
94     {
95         STDMETHOD(get_EtalonParams ) (THIS_
96             CalibEtalonType*   etalon_type,
97             float*  etalon_params,
98             long*   etalon_param_count
99         ) PURE;
100
101         STDMETHOD(set_EtalonParams ) (THIS_
102             CalibEtalonType    etalon_type,
103             float*  etalon_params,
104             long    etalon_param_count
105         ) PURE;
106         
107         STDMETHOD(get_FrameInterval) (THIS_
108             long*   interval
109         ) PURE;
110
111         STDMETHOD(set_FrameInterval) (THIS_
112             long    interval
113         ) PURE;
114
115         STDMETHOD(get_FramesToCollect) (THIS_
116             long*   frames
117         ) PURE;
118
119         STDMETHOD(set_FramesToCollect) (THIS_
120             long    frames
121         ) PURE;
122
123         STDMETHOD(get_EnableUndistortion) (THIS_
124             long*   enable
125         ) PURE;
126
127         STDMETHOD(set_EnableUndistortion) (THIS_
128             long    enable
129         ) PURE;
130
131         STDMETHOD(get_Show3DWindow) (THIS_
132             long*   enable
133         ) PURE;
134
135         STDMETHOD(set_Show3DWindow) (THIS_
136             long    enable
137         ) PURE;
138
139         STDMETHOD(StartCalibrate)  (THIS
140         ) PURE;
141
142         STDMETHOD(SaveCameraParams)  (THIS
143         ) PURE;
144         
145         STDMETHOD(LoadCameraParams)  (THIS
146         ) PURE;
147
148         STDMETHOD(Update3DWindow)  (THIS
149         ) PURE;
150
151         STDMETHOD(GetCameraParams)  (THIS_
152            CvCameraParams*  params
153         ) PURE;
154
155         STDMETHOD(GetState) (THIS_
156            CalibState*   calib_state,
157            long*   frames_collected,
158            long*   frames_passed,
159            double* last_frame_time
160         ) PURE;
161     };
162
163 #ifdef __cplusplus
164 }
165 #endif
166