Paparazzi UAS  v5.17_devel-24-g2ae834f
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 */
unsigned short uint16_t
Definition: types.h:16
int n_samples
Definition: detect_gate.c:85
static float D
Definition: trilateration.c:35
void get_indices_without_replacement(int *indices_subset, int n_samples, int count)
Get indices without replacement.
Definition: RANSAC.c:160
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
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