1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2014 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #ifndef LIBMV_C_API_AUTOTRACK_H_
21 #define LIBMV_C_API_AUTOTRACK_H_
22 
23 #include "intern/frame_accessor.h"
24 #include "intern/tracksN.h"
25 #include "intern/track_region.h"
26 #include "intern/region.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 typedef struct libmv_AutoTrack libmv_AutoTrack;
33 
34 typedef struct libmv_AutoTrackOptions {
35   libmv_TrackRegionOptions track_region;
36   libmv_Region search_region;
37 } libmv_AutoTrackOptions;
38 
39 libmv_AutoTrack* libmv_autoTrackNew(libmv_FrameAccessor *frame_accessor);
40 
41 void libmv_autoTrackDestroy(libmv_AutoTrack* libmv_autotrack);
42 
43 void libmv_autoTrackSetOptions(libmv_AutoTrack* libmv_autotrack,
44                                const libmv_AutoTrackOptions* options);
45 
46 int libmv_autoTrackMarker(libmv_AutoTrack* libmv_autotrack,
47                           const libmv_TrackRegionOptions* libmv_options,
48                           libmv_Marker *libmv_tracker_marker,
49                           libmv_TrackRegionResult* libmv_result);
50 
51 void libmv_autoTrackAddMarker(libmv_AutoTrack* libmv_autotrack,
52                               const libmv_Marker* libmv_marker);
53 
54 void libmv_autoTrackSetMarkers(libmv_AutoTrack* libmv_autotrack,
55                                const libmv_Marker* libmv_marker,
56                                size_t num_markers);
57 
58 int libmv_autoTrackGetMarker(libmv_AutoTrack* libmv_autotrack,
59                              int clip,
60                              int frame,
61                              int track,
62                              libmv_Marker *libmv_marker);
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif  // LIBMV_C_API_TRACKS_H_
69