Chapter 7Data Acquisition
As discussed in Chapter 5, data acquisition is a fundamental stage of the control loop of HiTL processes, and this is why we will dedicate the whole of the current chapter to it. With this objective in mind, we will start by presenting and describing the class that will handle most of the emotion-related tasks in our sample HappyWalk Android app, in Section 7.1. Next, in Section 7.2, we will explore the processing of sensory data.
More often than not, the burden of data acquisition and processing is too much for the application's user interface thread. Concurrently performing heavy computational tasks generally results in an application with usability issues. For example, in the HappyWalk's case, the usage of map-related functionality could suffer from stuttering if the user interface thread were not freed from heavy tasks such as data acquisition. This is, thus, the main reason why in HappyWalk we have opted for performing data acquisition in a background thread, leaving the main thread purely to user interface operation. This also has advantages from a modularity point of view, allowing to perform data acquisition as a background task through the HappyWalk Service, which is decoupled from the main application.
7.1 Creating the EmotionTasker
In this section, we will introduce the EmotionTasker. This class represents the core of our emotional inference mechanism; it will be responsible for things such as controlling when to perform emotion recognition, ...
Get A Practical Introduction to Human-in-the-Loop Cyber-Physical Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.