Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Classes | Public Types | Public Member Functions | List of all members
CentroidDetection Class Reference

Classes

class  CalculateCentroids
 

Public Types

typedef float DATA_T
 

Public Member Functions

 CentroidDetection (unsigned int numReadings, unsigned int maxNumCentroids, float sizeScale)
 
 CentroidDetection (const std::vector< unsigned int > &order, unsigned int maxNumCentroids, float sizeScale)
 
int setup (unsigned int numReadings, unsigned int maxNumCentroids, float sizeScale)
 
int setup (const std::vector< unsigned int > &order, unsigned int maxNumCentroids, float sizeScale)
 
void process (const DATA_T *rawData)
 
void setSizeScale (float sizeScale)
 
void setMinimumTouchSize (DATA_T minSize)
 
void setNoiseThreshold (DATA_T threshold)
 
void setWrapAround (unsigned int n)
 
void setMultiplierBits (unsigned int n)
 
unsigned int getNumTouches () const
 
DATA_T touchLocation (unsigned int touch_num) const
 
DATA_T touchSize (unsigned int touch_num) const
 
DATA_T compoundTouchLocation () const
 
DATA_T compoundTouchSize () const
 

Detailed Description

Examples:
Trill/custom-slider/render.cpp, and Trill/flex-visual/render.cpp.

Member Function Documentation

void CentroidDetection::setWrapAround ( unsigned int  n)

Set how many of the values at the beginning of rawData can be joined in a single centroid with those at the end of rawData if a centroid is detected across them. Useful for ring-like devices.

void CentroidDetection::setMultiplierBits ( unsigned int  n)

How many extra bits to use during the fixed-point multiplication that computes the centroids position. Defaults to 7.


The documentation for this class was generated from the following files: