Files
Microscope-Display/config.json
Microscope Camera 34cd247dca Microscope camera kiosk
Touchscreen kiosk for the Raspberry Pi HQ camera (IMX477) used as a
microscope: live preview from boot, raw frame recording, full-resolution
stills, and automatic capture-SSD mounting.

- app.py: GTK3 fullscreen UI over cage — preview, REC/STOP, PHOTO,
  90-degree rotate button, tap-to-open exposure/gain/settings sliders,
  and an "SSD NOT MOUNTED" badge
- camera.py: picamera2 wrapper with separate video (ISP preview + packed
  12-bit raw) and still (4056x3040) configurations
- recorder.py: writer thread turning the raw stream into one Bayer frame
  per file plus index.jsonl/session.json, with dropped/missed accounting
- photos.py: still capture to DNG + JPEG, and a background worker that
  renders a viewable 16-bit sRGB TIFF from the 12-bit Bayer frame
- storage.py: SSD mount state and the date/time/format session layout
- tools/unpack_raw.py: desktop-side unpacker/demosaicer
- system/ + install.sh: systemd units, udev rule, mount helper, sudoers

Note: raw frames are written byte-for-byte as the sensor produced them, so
they stay decodeable regardless of how the stills pipeline evolves.
2026-10-31 00:44:46 -04:00

48 lines
1004 B
JSON

{
"archive_min_free_mb": 500,
"device_label": "MICROSCOPE",
"fs_uuid": "caf4320b-0fa3-4674-bfa9-f17f6165f681",
"mount_point": "/mnt/microscope",
"photo": {
"black_level": 256,
"buffer_count": 2,
"height": 3040,
"jpeg_quality": 95,
"settle_frames": 3,
"tiff_apply_colour_matrix": true,
"tiff_apply_gamma": true,
"tiff_apply_white_balance": true,
"white_level": 4095,
"width": 4056,
"write_dng": true,
"write_jpeg": true,
"write_tiff": true
},
"preview": {
"format": "XRGB8888",
"height": 600,
"width": 1024
},
"record": {
"buffer_count": 12,
"index_stride": 1,
"limit_frame_duration": true,
"target_fps": 30,
"write_queue": 8
},
"sensor": {
"bit_depth": 12,
"height": 1520,
"sensor_fps": 40,
"width": 2028
},
"ui": {
"fullscreen": true,
"hide_cursor": true,
"preview_refresh_ms": 33,
"rotation": 0,
"status_refresh_ms": 250,
"storage_poll_ms": 1000
}
}