2016-08-10 03:40:53 +03:00
|
|
|
/*
|
2016-11-29 02:26:06 +03:00
|
|
|
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
|
2016-08-10 03:40:53 +03:00
|
|
|
*
|
2016-11-29 02:26:06 +03:00
|
|
|
* This source code is subject to the terms of the BSD 2 Clause License and
|
|
|
|
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
|
|
|
* was not distributed with this source code in the LICENSE file, you can
|
|
|
|
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
|
|
|
* Media Patent License 1.0 was not distributed with this source code in the
|
|
|
|
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
2016-08-10 03:40:53 +03:00
|
|
|
*/
|
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
#ifndef AV1_ENCODER_RANSAC_H_
|
|
|
|
#define AV1_ENCODER_RANSAC_H_
|
2016-08-10 03:40:53 +03:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <memory.h>
|
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
#include "av1/common/warped_motion.h"
|
2016-08-10 03:40:53 +03:00
|
|
|
|
2017-02-13 18:30:59 +03:00
|
|
|
typedef int (*RansacFunc)(int *matched_points, int npoints,
|
2017-03-02 00:29:14 +03:00
|
|
|
int *num_inliers_by_motion, double *params_by_motion,
|
|
|
|
int num_motions);
|
2016-08-10 03:40:53 +03:00
|
|
|
|
|
|
|
/* Each of these functions fits a motion model from a set of
|
2017-02-10 16:00:08 +03:00
|
|
|
corresponding points in 2 frames using RANSAC. */
|
2017-03-02 00:29:14 +03:00
|
|
|
int ransac_homography(int *matched_points, int npoints,
|
|
|
|
int *num_inliers_by_motion, double *params_by_motion,
|
|
|
|
int num_motions);
|
|
|
|
int ransac_affine(int *matched_points, int npoints, int *num_inliers_by_motion,
|
|
|
|
double *params_by_motion, int num_motions);
|
2017-02-10 16:00:08 +03:00
|
|
|
int ransac_hortrapezoid(int *matched_points, int npoints,
|
2017-03-02 00:29:14 +03:00
|
|
|
int *num_inliers_by_motion, double *params_by_motion,
|
|
|
|
int num_motions);
|
2017-02-10 16:00:08 +03:00
|
|
|
int ransac_vertrapezoid(int *matched_points, int npoints,
|
2017-03-02 00:29:14 +03:00
|
|
|
int *num_inliers_by_motion, double *params_by_motion,
|
|
|
|
int num_motions);
|
|
|
|
int ransac_rotzoom(int *matched_points, int npoints, int *num_inliers_by_motion,
|
|
|
|
double *params_by_motion, int num_motions);
|
|
|
|
int ransac_translation(int *matched_points, int npoints,
|
|
|
|
int *num_inliers_by_motion, double *params_by_motion,
|
|
|
|
int num_motions);
|
2016-09-06 21:25:04 +03:00
|
|
|
#endif // AV1_ENCODER_RANSAC_H_
|