Sarah Parker | 4dc0f1b | 2016-08-09 17:40:53 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | bde4ac8 | 2016-11-28 15:26:06 -0800 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Sarah Parker | 4dc0f1b | 2016-08-09 17:40:53 -0700 | [diff] [blame] | 3 | * |
Yaowu Xu | bde4ac8 | 2016-11-28 15:26:06 -0800 | [diff] [blame] | 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. |
Sarah Parker | 4dc0f1b | 2016-08-09 17:40:53 -0700 | [diff] [blame] | 10 | */ |
| 11 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 12 | #ifndef AV1_ENCODER_RANSAC_H_ |
| 13 | #define AV1_ENCODER_RANSAC_H_ |
Sarah Parker | 4dc0f1b | 2016-08-09 17:40:53 -0700 | [diff] [blame] | 14 | |
| 15 | #include <stdio.h> |
| 16 | #include <stdlib.h> |
| 17 | #include <math.h> |
| 18 | #include <memory.h> |
| 19 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 20 | #include "av1/common/warped_motion.h" |
Sarah Parker | 4dc0f1b | 2016-08-09 17:40:53 -0700 | [diff] [blame] | 21 | |
David Barker | 15338d5 | 2017-02-13 15:30:59 +0000 | [diff] [blame] | 22 | typedef int (*RansacFunc)(int *matched_points, int npoints, |
emilkeyder@google.com | f347763 | 2017-03-01 16:29:14 -0500 | [diff] [blame] | 23 | int *num_inliers_by_motion, double *params_by_motion, |
| 24 | int num_motions); |
Sarah Parker | 4dc0f1b | 2016-08-09 17:40:53 -0700 | [diff] [blame] | 25 | |
| 26 | /* Each of these functions fits a motion model from a set of |
Debargha Mukherjee | 5dfa930 | 2017-02-10 05:00:08 -0800 | [diff] [blame] | 27 | corresponding points in 2 frames using RANSAC. */ |
emilkeyder@google.com | f347763 | 2017-03-01 16:29:14 -0500 | [diff] [blame] | 28 | int ransac_affine(int *matched_points, int npoints, int *num_inliers_by_motion, |
| 29 | double *params_by_motion, int num_motions); |
emilkeyder@google.com | f347763 | 2017-03-01 16:29:14 -0500 | [diff] [blame] | 30 | int ransac_rotzoom(int *matched_points, int npoints, int *num_inliers_by_motion, |
| 31 | double *params_by_motion, int num_motions); |
| 32 | int ransac_translation(int *matched_points, int npoints, |
| 33 | int *num_inliers_by_motion, double *params_by_motion, |
| 34 | int num_motions); |
Sarah Parker | f9a961c | 2016-09-06 11:25:04 -0700 | [diff] [blame] | 35 | #endif // AV1_ENCODER_RANSAC_H_ |