Sensor Data Collection
Collect sensor data from your device
With MATLAB® Mobile™ or MATLAB Online™, you can collect sensor and camera data from your Android™ device and log the data in MATLAB. Use MATLAB to process this data in various ways, including creating plots, or, for camera data, process the images.
You can collect data from these sensors:
Acceleration
Angular velocity
Magnetic field
Orientation
Position
You can also access the camera and acquire images on your Android mobile device from MATLAB Mobile or MATLAB Online. You can set camera properties including resolution, autofocus, and flash.
Functions
mobiledev | Create mobiledev object to acquire data from
Android sensors |
mobiledevlist | List of mobile devices with accessible sensor data |
disp | Display properties of mobiledev object |
accellog | Return logged acceleration data from Android sensor |
angvellog | Return logged angular velocity data from Android sensor |
magfieldlog | Return logged magnetic field data from Android sensor |
orientlog | Return logged orientation data from Android sensor |
poslog | Return logged position data from Android sensor |
discardlogs | Discard all logged data from Android sensors |
camera | Connection to camera on Android device |
snapshot | Acquire single image frame from Android device camera |
Topics
Get Started with Sensors
- Sensor Data Collection with MATLAB Mobile or MATLAB Online
Stream sensor data to MATLAB running in the MathWorks® Cloud or log data locally. - Sensor Data Streaming Demo
A simple walk-through that demonstrates controlling sensors and acquiring data. - Use Logged Sensor Data Example
This example shows how to plot orientation data using logged sensor data.
Log Sensor Data Locally
- Log Sensor Data Locally
Capture sensor data locally to a file on your device.
Stream Sensor Data to MATLAB on the Cloud
- Stream Sensor Data with Sensor Controls
Send sensor data to MATLAB running on MathWorks Cloud using MATLAB Mobile sensor controls. - Stream Sensor Data with mobiledev.logging Property
Stream sensor data to MATLAB running on the MathWorks Cloud using themobiledev.logging
property.
Android Camera Image Acquisition
- Acquire Images from Android Camera
This example shows how to connect to your Android mobile device camera and acquire images from it. - Classify Images from Android Camera Using Pretrained Network
This example shows how to use deep learning to classify images acquired by your Android mobile device camera.