The ARIS (Adaptive Resolution Imaging Sonar) Explorer 3000 records data in a proprietaryDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dfki-ric/uxo-dataset2024/llms.txt
Use this file to discover all available pages before exploring further.
.aris file format. These scripts extract individual frames, transform them to human-readable polar images, and calculate optical flow for motion detection.
Pipeline Stages
ARIS processing consists of three automated scripts plus one GUI tool:- prep_1_aris_extract.py - Extract frames and metadata
- prep_2_aris_to_polar.py - Transform to polar coordinates
- prep_3_aris_calc_optical_flow.py - Calculate optical flow
- prep_4_aris_find_offsets.py - Mark motion boundaries (GUI)
Step 1: Frame Extraction (prep_1_aris_extract.py)
Purpose
Extracts individual sonar frames and metadata from.aris binary files. Uses the ARIS Integration SDK definitions ported to Python.
What It Does
- Reads proprietary
.arisfile format - Validates file and frame headers (version 0x05464444)
- Extracts each frame as a
.pgm(Portable Gray Map) image - Exports frame metadata to CSV
- Saves file-level metadata to YAML
Configuration
config.yaml
Usage
Output Structure
Frame Metadata Fields
The*_frames.csv file contains critical metadata for each frame:
FrameIndex- Sequential frame numberFrameTime- Microsecond timestampPingMode- Beam count (64 or 128 beams)SamplesPerBeam- Number of range bins per beamSampleStartDelay- Start of acoustic window (microseconds)SamplePeriod- Time between samples (microseconds)SoundSpeed- Speed of sound in water (m/s)SonarPan,SonarTilt,SonarRoll- Orientation angles
Step 2: Polar Transformation (prep_2_aris_to_polar.py)
Purpose
Converts raw sonar frames into polar-coordinate images that represent what the sonar was actually “seeing”. Raw ARIS data is organized as beams × samples; polar transformation creates intuitive images.ARIS Frame Structure
An ARIS frame consists of:- Beams: Horizontal dimension (64 or 128 beams)
- Samples: Vertical dimension (range bins)
- Values: Acoustic energy in 0-80 dB range (stored as 0-255)
Transformation Methods
- polar2 (Recommended)
- polar1 (Legacy)
- CSV Export
Creates images based on specified resolution (pixels per meter).Algorithm:
- Calculates polygon vertices for each sample based on beam angles and range
- Uses
cv2.fillPoly()to paint sectors with measured intensity - Accounts for sound velocity and sample timing
- Produces high-quality, geometrically accurate images
Combining Methods
You can export multiple formats simultaneously:Configuration Options
config.yaml
Usage
aris_to_polar_skip_existing: True to resume interrupted runs.
Output
Step 3: Optical Flow Calculation (prep_3_aris_calc_optical_flow.py)
Purpose
Calculates optical flow magnitudes for each ARIS recording. This helps:- Identify motion onset in recordings
- Match GoPro footage to ARIS data
- Trim recordings to relevant portions
Optical Flow Methods
Configuration
config.yaml
Usage
Input Data
The script prefers polar-transformed frames if available, falling back to raw frames:- Looks for
polar/directory first - Uses raw
.pgmframes if polar not found
Output
Step 4: Motion Onset Marking (prep_4_aris_find_offsets.py)
Purpose
Graphical interface for manually marking the start and end of actual motion in each ARIS recording. This is necessary because recordings typically start before the gantry begins moving.Usage
This is an interactive GUI tool. Use the optical flow visualization to identify where motion begins and ends, then mark these boundaries manually.
Why Manual Marking?
While optical flow is calculated automatically, human judgment is needed to:- Account for water turbulence and noise
- Identify the exact frame where target motion begins
- Mark the clean end of the trajectory
- Handle edge cases and anomalies
Beam Pattern Calibrations
The ARIS Explorer 3000 lens introduces non-linear beam spacing. Calibration data is provided by the ARIS Integration SDK:- 64-beam mode:
BeamWidthsAris3000_64 - 128-beam mode:
BeamWidthsAris3000_128
[center, left_edge, right_edge] in degrees.
Technical Details
Sound Velocity Calculation
Range calculations account for:SampleStartDelay: When acoustic window beginsSamplePeriod: Time between consecutive samplesSoundSpeed: Speed of sound in water (varies with temperature/salinity)
Coordinate System
Polar-transformed images:- Origin: Bottom center of image (sonar position)
- Y-axis: Points upward (increasing range)
- X-axis: Left and right spread from center
- Angles: Measured from vertical (0° = straight ahead)
ARIS frames have beams ordered right-to-left. The polar2 method applies
cv2.flip() to correct orientation.Troubleshooting
Corrupt file error: 0x...
Corrupt file error: 0x...
The ARIS file version header is invalid. Ensure you’re using files from an ARIS Explorer 3000. Expected version:
0x05464444.Optical flow calculation very slow
Optical flow calculation very slow
Processing polar images is slower than raw frames. If speed is critical:
- Use raw frames (script auto-detects)
- Reduce
maxLevelormaxCornersin the script - Use
farnerbackinstead oflk
Polar images look incorrect
Polar images look incorrect
Check your configuration:
- Verify
aris_to_polar_polar2_resolutionis reasonable (500-2000) - Ensure
aris_to_polar_image_formatispngorpgm - Try
polar2method instead ofpolar1
Next Steps
Gantry Extraction
Extract trajectory data from ROS bags
GoPro Processing
Process camera footage for synchronization