• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2016, Alliance for Open Media. All rights reserved
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #ifndef AOM_AV1_ENCODER_RANSAC_H_
13 #define AOM_AV1_ENCODER_RANSAC_H_
14 
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <math.h>
18 #include <memory.h>
19 
20 #include "av1/common/warped_motion.h"
21 
22 typedef int (*RansacFunc)(int *matched_points, int npoints,
23                           int *num_inliers_by_motion, double *params_by_motion,
24                           int num_motions);
25 typedef int (*RansacFuncDouble)(double *matched_points, int npoints,
26                                 int *num_inliers_by_motion,
27                                 double *params_by_motion, int num_motions);
28 
29 /* Each of these functions fits a motion model from a set of
30    corresponding points in 2 frames using RANSAC. */
31 int ransac_affine(int *matched_points, int npoints, int *num_inliers_by_motion,
32                   double *params_by_motion, int num_motions);
33 int ransac_rotzoom(int *matched_points, int npoints, int *num_inliers_by_motion,
34                    double *params_by_motion, int num_motions);
35 int ransac_translation(int *matched_points, int npoints,
36                        int *num_inliers_by_motion, double *params_by_motion,
37                        int num_motions);
38 int ransac_translation_double_prec(double *matched_points, int npoints,
39                                    int *num_inliers_by_motion,
40                                    double *params_by_motion,
41                                    int num_desired_motions);
42 int ransac_rotzoom_double_prec(double *matched_points, int npoints,
43                                int *num_inliers_by_motion,
44                                double *params_by_motion,
45                                int num_desired_motions);
46 int ransac_affine_double_prec(double *matched_points, int npoints,
47                               int *num_inliers_by_motion,
48                               double *params_by_motion,
49                               int num_desired_motions);
50 #endif  // AOM_AV1_ENCODER_RANSAC_H_
51