Get your camera's calibration¶
Every Trinet camera keeps its calibration on board, so you can get it back at any time as a
calibration.json. That file works with every toolkit command that takes
--calibration, and with the steps in Use a calibration.
There are three ways to read it. Pick the one that matches what you have:
| You have | Method | Works on |
|---|---|---|
| A recording from the camera | From an MP4 | Windows, macOS, Linux |
| The camera, in USB webcam mode | Over USB (UVC) | Linux |
| The camera, in iPhone mode | Over USB networking (NCM) | Windows, macOS, Linux |
All three give the same calibration. The camera embeds exactly what it has stored into every recording it makes.
Trinet Mono
Trinet Stereo and Stereo GS are calibrated individually at the factory. A Trinet Mono has a stored calibration only if it came with the per-unit calibration service. If yours didn't, the tool reports no calibration stored. Use the reference calibration for your hardware version instead.
Set up¶
Install the Python toolkit once, then run the commands below from its folder.
From a recording (MP4)¶
Point the tool at any recording the camera made, either from the memory card or from the app. For a stereo take, use either eye's file.
python3 scripts/get_calibration.py --mp4 take0004_L.mp4
# stereo calibration (300 bytes) from take0004_L.mp4 -> calibration.json
This is the simplest method and needs no camera. It needs the original file. A video that has been re-encoded or edited, or a rendered visualization, no longer carries the calibration.
Over USB, webcam mode (UVC)¶
- Put the camera in USB webcam mode: power it on without a memory card. The light turns white. See Recording modes.
- Connect it to a Linux computer with a USB-C cable, then run:
The tool finds the Trinet camera by itself. It can read the calibration while another app is
streaming from the camera. If you get permission denied, add yourself to the video group
(sudo usermod -aG video $USER, then log out and back in).
On Windows or macOS, use the MP4 method, or the Trinet app on Android.
Over USB networking, iPhone mode (NCM)¶
For a camera in iPhone mode: Trinet Mono, or Stereo and Stereo GS with firmware 0.5.13 or newer. The light turns cyan. To switch the camera to this mode, see Recording modes.
- Connect the camera to the computer with a USB-C cable. The computer sees a new wired network
connection and gets an address of the form
172.32.X.71from the camera. - Run:
The tool finds the camera's address by itself; the camera is always at 172.32.X.70, on the same
X as the computer. If you'd rather not use the toolkit, the camera serves the raw calibration
over HTTP:
curl -o calibration.bin http://172.32.X.70:8081/api/calibration # 404 = none stored
python3 -m trinet_tools.calib_blob unpack calibration.bin > calibration.json
Options¶
| Option | What it does |
|---|---|
-o PATH |
Where to write the JSON (default calibration.json) |
--bin PATH |
Also save the calibration exactly as stored on the camera: 200 bytes for a single camera, 300 for stereo |
The command finishes with one of three exit codes, so scripts can check the result: 0 means the
calibration was written, 1 means none is stored, and 2 means an error, such as no camera found.
The binary format is described in the toolkit's
file-format reference.
From the app or your own software¶
- Trinet app (Android): Camera settings → Advanced → Calibration → Read shows the stored calibration. See Camera settings.
- Android SDK:
getCalibrationAny()returns the stored calibration, mono or stereo. - iOS SDK:
getCalibrationAny()does the same over USB networking. - Python:
trinet_tools.device_calibrationoffersfrom_mp4(),read_uvc()andread_ncm(), plusto_calibration_json().
Next: Use a calibration · Check your calibration in the field