blob: 1019055ede18bd065ac1e077e1375cbef12d2905 [file] [log] [blame]
Sarah Parker4dc0f1b2016-08-09 17:40:53 -07001/*
Yaowu Xubde4ac82016-11-28 15:26:06 -08002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Sarah Parker4dc0f1b2016-08-09 17:40:53 -07003 *
Yaowu Xubde4ac82016-11-28 15:26:06 -08004 * 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 Parker4dc0f1b2016-08-09 17:40:53 -070010 */
11
Yaowu Xuf883b422016-08-30 14:01:10 -070012#ifndef AV1_ENCODER_RANSAC_H_
13#define AV1_ENCODER_RANSAC_H_
Sarah Parker4dc0f1b2016-08-09 17:40:53 -070014
15#include <stdio.h>
16#include <stdlib.h>
17#include <math.h>
18#include <memory.h>
19
Yaowu Xuf883b422016-08-30 14:01:10 -070020#include "av1/common/warped_motion.h"
Sarah Parker4dc0f1b2016-08-09 17:40:53 -070021
David Barker15338d52017-02-13 15:30:59 +000022typedef int (*RansacFunc)(int *matched_points, int npoints,
emilkeyder@google.comf3477632017-03-01 16:29:14 -050023 int *num_inliers_by_motion, double *params_by_motion,
24 int num_motions);
Sarah Parker4dc0f1b2016-08-09 17:40:53 -070025
26/* Each of these functions fits a motion model from a set of
Debargha Mukherjee5dfa9302017-02-10 05:00:08 -080027 corresponding points in 2 frames using RANSAC. */
emilkeyder@google.comf3477632017-03-01 16:29:14 -050028int ransac_affine(int *matched_points, int npoints, int *num_inliers_by_motion,
29 double *params_by_motion, int num_motions);
emilkeyder@google.comf3477632017-03-01 16:29:14 -050030int ransac_rotzoom(int *matched_points, int npoints, int *num_inliers_by_motion,
31 double *params_by_motion, int num_motions);
32int ransac_translation(int *matched_points, int npoints,
33 int *num_inliers_by_motion, double *params_by_motion,
34 int num_motions);
Sarah Parkerf9a961c2016-09-06 11:25:04 -070035#endif // AV1_ENCODER_RANSAC_H_