APM:Libraries
Flow_PX4.h
Go to the documentation of this file.
1 /*
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License as published by
4  the Free Software Foundation, either version 3 of the License, or
5  (at your option) any later version.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program. If not, see <http://www.gnu.org/licenses/>.
14  */
15 #pragma once
16 
17 #include "AP_HAL_Linux.h"
18 
19 namespace Linux {
20 
21 class Flow_PX4 {
22 public:
23  Flow_PX4(uint32_t width, uint32_t bytesperline,
24  uint32_t max_flow_pixel,
25  float bottom_flow_feature_threshold,
26  float bottom_flow_value_threshold);
27  uint8_t compute_flow(uint8_t *image1, uint8_t *image2, uint32_t delta_time,
28  float *pixel_flow_x, float *pixel_flow_y);
29 private:
30  uint32_t _width;
31  uint32_t _search_size;
32  uint32_t _bytesperline;
35  uint16_t _pixlo;
36  uint16_t _pixhi;
37  uint16_t _pixstep;
38  uint8_t _num_blocks;
39 };
40 
41 }
uint32_t _bytesperline
Definition: Flow_PX4.h:32
float _bottom_flow_feature_threshold
Definition: Flow_PX4.h:33
Flow_PX4(uint32_t width, uint32_t bytesperline, uint32_t max_flow_pixel, float bottom_flow_feature_threshold, float bottom_flow_value_threshold)
Definition: Flow_PX4.cpp:52
uint32_t _search_size
Definition: Flow_PX4.h:31
uint16_t _pixhi
Definition: Flow_PX4.h:36
uint32_t _width
Definition: Flow_PX4.h:30
uint8_t _num_blocks
Definition: Flow_PX4.h:38
uint16_t _pixstep
Definition: Flow_PX4.h:37
uint16_t _pixlo
Definition: Flow_PX4.h:35
float _bottom_flow_value_threshold
Definition: Flow_PX4.h:34
uint8_t compute_flow(uint8_t *image1, uint8_t *image2, uint32_t delta_time, float *pixel_flow_x, float *pixel_flow_y)
Definition: Flow_PX4.cpp:234