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
|
|
|
|
2016-09-06 21:25:04 +03:00
|
|
|
typedef int (*RansacFunc)(double *matched_points, int npoints,
|
2016-08-10 03:40:53 +03:00
|
|
|
int *number_of_inliers, int *best_inlier_mask,
|
2016-09-06 21:25:04 +03:00
|
|
|
double *best_params);
|
2016-08-10 03:40:53 +03:00
|
|
|
|
|
|
|
/* Each of these functions fits a motion model from a set of
|
|
|
|
corresponding points in 2 frames using RANSAC.*/
|
2016-09-06 21:25:04 +03:00
|
|
|
int ransac_homography(double *matched_points, int npoints,
|
2016-08-10 03:40:53 +03:00
|
|
|
int *number_of_inliers, int *best_inlier_indices,
|
2016-09-06 21:25:04 +03:00
|
|
|
double *best_params);
|
|
|
|
int ransac_affine(double *matched_points, int npoints, int *number_of_inliers,
|
|
|
|
int *best_inlier_indices, double *best_params);
|
|
|
|
int ransac_rotzoom(double *matched_points, int npoints, int *number_of_inliers,
|
|
|
|
int *best_inlier_indices, double *best_params);
|
|
|
|
int ransac_translation(double *matched_points, int npoints,
|
|
|
|
int *number_of_inliers, int *best_inlier_indices,
|
|
|
|
double *best_params);
|
|
|
|
#endif // AV1_ENCODER_RANSAC_H_
|