Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
RANSAC.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Guido de Croon
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
35 #ifndef RANSAC_H
36 #define RANSAC_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #include "std.h"
43 
56 void RANSAC_linear_model(int n_samples, int n_iterations, float error_threshold, float *targets, int D,
57  float (*samples)[D], uint16_t count, float *params, float *fit_error);
58 
65 void get_indices_without_replacement(int *indices_subset, int n_samples, int count);
66 
74 float predict_value(float *sample, float *weights, int D, bool use_bias);
75 
76 #ifdef __cplusplus
77 } /* extern "C" */
78 #endif
79 
80 #endif /* RANSAC_H */
uint16_t
unsigned short uint16_t
Definition: types.h:16
RANSAC_linear_model
void RANSAC_linear_model(int n_samples, int n_iterations, float error_threshold, float *targets, int D, float(*samples)[D], uint16_t count, float *params, float *fit_error)
Perform RANSAC to fit a linear model.
Definition: RANSAC.c:57
std.h
get_indices_without_replacement
void get_indices_without_replacement(int *indices_subset, int n_samples, int count)
Get indices without replacement.
Definition: RANSAC.c:160
n_samples
int n_samples
Definition: detect_gate.c:85
D
static float D
Definition: trilateration.c:35
predict_value
float predict_value(float *sample, float *weights, int D, bool use_bias)
Predict the value of a sample with linear weights.
Definition: RANSAC.c:136