APM:Libraries
Functions | Variables
Flow_PX4.cpp File Reference
#include <AP_HAL/AP_HAL.h>
#include "Flow_PX4.h"
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for Flow_PX4.cpp:

Go to the source code of this file.

Functions

static uint32_t compute_diff (uint8_t *image, uint16_t offx, uint16_t offy, uint16_t row_size, uint8_t window_size)
 Compute the average pixel gradient of all horizontal and vertical steps. More...
 
static uint32_t compute_sad (uint8_t *image1, uint8_t *image2, uint16_t off1x, uint16_t off1y, uint16_t off2x, uint16_t off2y, uint16_t row_size, uint16_t window_size)
 Compute SAD of two pixel windows. More...
 
static uint32_t compute_subpixel (uint8_t *image1, uint8_t *image2, uint16_t off1x, uint16_t off1y, uint16_t off2x, uint16_t off2y, uint32_t *acc, uint16_t row_size, uint16_t window_size)
 Compute SAD distances of subpixel shift of two pixel patterns. More...
 

Variables

const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 

Function Documentation

◆ compute_diff()

static uint32_t compute_diff ( uint8_t *  image,
uint16_t  offx,
uint16_t  offy,
uint16_t  row_size,
uint8_t  window_size 
)
inlinestatic

Compute the average pixel gradient of all horizontal and vertical steps.

Parameters
image...
offXx coordinate of upper left corner of 8x8 pattern in image
offYy coordinate of upper left corner of 8x8 pattern in image

Definition at line 87 of file Flow_PX4.cpp.

Referenced by Linux::Flow_PX4::compute_flow().

Here is the caller graph for this function:

◆ compute_sad()

static uint32_t compute_sad ( uint8_t *  image1,
uint8_t *  image2,
uint16_t  off1x,
uint16_t  off1y,
uint16_t  off2x,
uint16_t  off2y,
uint16_t  row_size,
uint16_t  window_size 
)
inlinestatic

Compute SAD of two pixel windows.

Parameters
image1...
image2...
off1Xx coordinate of upper left corner of pattern in image1
off1Yy coordinate of upper left corner of pattern in image1
off2Xx coordinate of upper left corner of pattern in image2
off2Yy coordinate of upper left corner of pattern in image2

Definition at line 128 of file Flow_PX4.cpp.

Referenced by Linux::Flow_PX4::compute_flow().

Here is the caller graph for this function:

◆ compute_subpixel()

static uint32_t compute_subpixel ( uint8_t *  image1,
uint8_t *  image2,
uint16_t  off1x,
uint16_t  off1y,
uint16_t  off2x,
uint16_t  off2y,
uint32_t *  acc,
uint16_t  row_size,
uint16_t  window_size 
)
inlinestatic

Compute SAD distances of subpixel shift of two pixel patterns.

Parameters
image1...
image2...
off1Xx coordinate of upper left corner of pattern in image1
off1Yy coordinate of upper left corner of pattern in image1
off2Xx coordinate of upper left corner of pattern in image2
off2Yy coordinate of upper left corner of pattern in image2
accarray to store SAD distances for shift in every direction

Definition at line 161 of file Flow_PX4.cpp.

Referenced by Linux::Flow_PX4::compute_flow().

Here is the caller graph for this function:

Variable Documentation

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

Definition at line 14 of file AC_PID_test.cpp.