Paparazzi UAS  v7.0_unstable
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 
57 void RANSAC_linear_model(int n_samples, int n_iterations, float error_threshold, float *targets, int D,
58  float (*samples)[D], uint16_t count, bool use_bias, float *params, float *fit_error);
59 
66 void get_indices_without_replacement(int *indices_subset, int n_samples, int count);
67 
75 float predict_value(float *sample, float *weights, int D, bool use_bias);
76 
77 #ifdef __cplusplus
78 } /* extern "C" */
79 #endif
80 
81 #endif /* RANSAC_H */
float predict_value(float *sample, float *weights, int D, bool use_bias)
Predict the value of a sample with linear weights.
Definition: RANSAC.c:133
void get_indices_without_replacement(int *indices_subset, int n_samples, int count)
Get indices without replacement.
Definition: RANSAC.c:157
void RANSAC_linear_model(int n_samples, int n_iterations, float error_threshold, float *targets, int D, float(*samples)[D], uint16_t count, bool use_bias, float *params, float *fit_error)
Perform RANSAC to fit a linear model.
Definition: RANSAC.c:57
int n_samples
Definition: detect_gate.c:85
float * weights
static float D
Definition: trilateration.c:35
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88