DeveloperReference
Release notes
What changed in each release of opticmix-vision, as written in python/CHANGELOG.md on GitHub, and where to get the files of every release.
The entries below are the text of CHANGELOG.md at the v0.0.11 tag, unchanged.
All versions on PyPI (release history) CHANGELOG.md at v0.0.11
0.0.11
2026-12-02GitHub release v0.0.11
Changed
- Rust:
Recorder::create_with_queue(and the Rustrecord_videoexample) encodes the queued frames on several encoding threads (one less than the processors, 1 to 4), and one writing thread appends them to the files in the orderwritetook them — the files are thosecreatewrites from the same frames (the crate's tests, without a camera). Before, one writing thread encoded and wrote. The Rust recording figures measured with the camera on Windows were measured with the single encoding thread before this change; not re-measured with the camera yet. The PythonRecorderis unchanged.
- Camera control writes are now spaced at least 50 ms apart by default (was 12 ms):
VENDOR_MIN_COMMAND_GAP_S,GROUP_MIN_INTERVAL_S["exposure"]andGLOBAL_MIN_GAP_Sare0.050in Python, and the Rustspec::VENDOR_MIN_COMMAND_GAP_Sis0.050. The camera vendor's stated minimum between exposure commands is 12 ms; 50 ms leaves margin and is used for every control. Names are unchanged. Not run with the camera.
Added
- Viewer:
--read-only(python -m opticmix_vision.viewer;ViewerState(read_only=True)) writes no camera control. Onlyq/Esc,s,v,n,p,c,hand the playback keys act; every other key —l/L,e/E,g/G,a,P, and any key added later — is refused in one check before a control is touched, withread-only: <key> not writtenon screen and in the console.--presetis refused (exit code 2, before the camera is opened). The top line showsREAD-ONLY. On Linux the viewer is always read-only (writing camera controls is not supported there); Windows is unchanged unless--read-onlyis given. Run without a camera only (simulated controls); not run with the camera yet.
- Rust:
Controls::load_preset(path, force, include_mono, timeout)applies a preset — Python'sControls.load_preset: the whole preset is checked first (the errors ofplan_preset, nothing written), then oneset_manyof what differs and up totimeoutseconds for the results. It returnspresets::PresetLoad(resultswith read-back andkept(),unchanged,left_out,skipped_mono,ok()). On a preset file either SDK saved and the same simulated controls it writes the same controls in the same order with the same values as the Python package (an internal test of the crate runs both); Rust writes in the camera's control order, Python in the file's. The Rust examplepresetsgains-- --load FILE. Loading writes several controls at once — write once at startup. Run without a camera only (simulated controls); writing presets with the Rust crate has not been run with the camera.
- Example
lerobot_record.py: both eyes into a LeRobot dataset (format v3.0; checked with lerobot 0.7.0), one episode, through the officiallerobotpackage (needslerobot). Not run with the camera yet: checked only by converting recordings (generated recordings in the tests, with lerobot 0.7.0). Whether it keeps up with the camera's 90 fps has not been checked; to keep every frame, record withrecord_video.pyfirst and convert the recording with--recording.
- Linux: the README section "Linux permissions" (opening the camera without
sudo) and the udev rule filelinux/99-opticmix-weevia.rules, which gives the Weevia S1 only (the USB IDs1d6b:0200together with a V4L2 name containingWN Dual Camera) the groupvideoand mode 0660. The rule was checked without the camera:udevadm test(systemd 259, Ubuntu 26.04.1) on a made-up sysfs tree laid out like the camera's applied its group and mode, and did not apply them when the V4L2 name or the USB product ID differed.
- ROS 2 package (still experimental,
ros2/in the repository):docker/Dockerfile.jazzyanddocker/Dockerfile.humble, and the README sections "Linux permissions" and "Docker". The nodes pass image data as anarray.array(on Humble, replaying generated frames reached about 8 messages/s before this change). Without the camera both images built and passedcolcon test; not run with the camera: these two images.
0.0.10
2026-12-01GitHub release v0.0.10
Changed
- Rust, Windows:
Device::read()no longer waits without a limit. It waits at mostDEFAULT_READ_TIMEOUT(2 s) and then gives the newSdkError::Timeout; the device stays open, and the sample it asked for, if it comes late, is the next read's (itshost_nsis the time that read took it out, not the time it arrived).read_raw()waits as long. Code that caught onlySdkError::Deviceon a read must handleSdkError::Timeouttoo (read again, or close and reopen if it goes on). Linux (V4L2) is unchanged: no frame for 2 s is stillSdkError::Device, and the device must be reopened. Thehandle_stallexample reopens onSdkError::Timeoutas onSdkError::Device. With the camera on Windows (one Weevia S1 unit, Windows 11, one PC, two-level USB hub, two USB re-insert cycles, 2026-11-26 and 2026-11-29, from this release's source before release):read_timeout(1 ms)gaveSdkError::Timeoutin 4 of 4 tries and the next open read normally. In the same series of runs, two reads with the default limit ended withSdkError::Timeoutafter frames had been arriving (once after 231 frames on the first open after a re-insert, once after the controls were opened while streaming); each run completed when repeated after a USB re-insert. A count only: cause not established. Reading again after a timeout: not run with the camera. Not run with the camera on Linux.
- Rust, Windows: each camera is opened and read on a thread the crate starts (Media Foundation and COM there); the COM state of your threads is not changed, so a UI (single-threaded, STA) thread may open a camera. With the camera on Windows (one Weevia S1 unit, Windows 11, one PC, two-level USB hub, four USB re-insert cycles, 2026-11-26 and 2026-11-29, from this release's source before release): 16 opens each gave the first frame within 309.4 ms of the open returning (no read limit). Opening from a UI thread: not run with the camera.
- Rust, Linux:
DeviceSelector::Index(n)with no/dev/videoNgivesSdkError::NoMatch(as on Windows), notSdkError::Device. Not run with the camera.
- Linux x86_64 is no longer labelled experimental. Supported on Linux: capture (1600x800 MJPG, 90 fps negotiated), and reading the 10 numeric controls' ranges and defaults (Python and Rust). Not supported: writing camera controls and the illuminator (not verified). "Supported" means verified, on one setup only: one Weevia S1 unit, Ubuntu 26.04.1 (kernel 7.0.0-44), x86_64, USB connected directly, the published 0.0.9 wheel and crate, two USB re-insert cycles (2026-11-28); the control values matched what the camera sent, before and while streaming. Finding the camera by name (
DeviceConfig.weevia_s1()withoutdevice=) ran in the same two cycles with one camera connected; refusing two cameras of the same name has not been run. Not verified: a second unit, other distributions or kernels, a USB hub, ARM (e.g. Jetson). The README section "Linux (experimental)" is now "Linux", and the Rust crate's Linux controls note (Controls::backend_note()) reads "Linux V4L2 controls (reads: ranges and defaults; writes not supported)" (was "Linux V4L2 controls (experimental)"). The ROS 2 package is still experimental.
Added
- Rust
Device::read_timeout(d)(waits at mostd; Windows applies it, Linux keeps its fixed 2 s),DEFAULT_READ_TIMEOUT,SdkError::Timeout(Python sees it asDeviceError), andCapture::read_sample_timeoutfor your own capture backends (the default callsread_samplewith no limit).read_timeoutwith the camera on Windows: as said under Changed;Capture::read_sample_timeoutin a backend of your own: run without a camera only.
Fixed
- The documentation said
estimated_missed_framesincludesdropped_frames(do not add them). That did not hold with the camera: one Weevia S1 unit, Windows 11, one PC, two-level USB hub, 2026-11-26, Rustrecord_videogave dropped 8 and 25, estimated missed 6 and 21.dropped_framesis an exact count;estimated_missed_framesis estimated from the frame times and can be lower. Read them separately (Python and Rust documentation).
- The line of
examples/record_video.pyand the Rustrecord_videoexample that gives the counts now readsestimated missed N; dropped by the write queue M(wasestimated missed N (of which dropped by the write queue M), which read as a part of N).
- The frame statistics (
late_frames,estimated_missed_frames,actual_fps, Recorder's counts) now say what was run with the camera: in Python and Rust they equalled a recount of the same run in separate USB re-insert cycles (one Weevia S1 unit, Windows 11, one PC, two-level USB hub, 2026-11-26). Not verified: Linux, a second unit, a direct USB connection.
0.0.9
2026-11-26GitHub release v0.0.9
Added
- Rust
measure_fps -- --csv FILE(off by default) also writes one row per frameread()returned, the first one too (index,host_ns,left_same,right_same,left_max,right_max: each eye byte-identical to the frame before, 0 on the first row, and its largest pixel value), and prints the negotiated fps andactual_fpsin full. When no sample was skipped as undecodable (the example prints how many did not decode), theDevicestatistics can be counted again from the file: theDevicealso counts the times of skipped samples, which have no row. Run with the camera in two USB re-insert cycles (one PC, one camera, 2026-11-26), from this release's source before release.
Changed
- Documentation: what was run with the camera after 0.0.8 is said, with its scope. Verified with the published 0.0.7 wheel (Rust: the crates.io 0.0.7 source) on one Weevia S1 unit, Windows 11, one PC, two-level USB hub, two USB re-insertions, read-only: 2D export (left/right PNG pairs from
save_stereo_pairs.pyand the viewer'sskey, an.npzfromcapture_dataset_npz.py, PNG pairs from MJPG and FFV1 camera recordings withexport_recording.py, PGM pairs from an MJPG camera recording with the Rustexport_recording), and finding the camera by name (in the Rust core since 0.0.3) with one camera of that name connected. Run with the camera in two USB re-insert cycles (one Weevia S1 unit, Windows 11, one PC, two-level USB hub, 2026-11-25; the published 0.0.7 wheel, Rust: the crates.io 0.0.7 source):examples/list_devices.py --backend msmf, its--verboseand the doctor's Media Foundation list, the Rustlist_devices -- --backend msmf, reading the USB IDs and the link speed intoDeviceInfo(not opened), and the PythonDeviceframe statistics. The published 0.0.8 wheel, installed from PyPI into a new environment (its sha256 checked against PyPI's), has been run with the camera once (one Weevia S1 unit, Windows 11, one PC, two-level USB hub, 2026-11-26, after one USB re-insertion, read-only). The Rust examplesquickstart,brightness_stats,capture_datasetandpresets(saving, and--plan): run with the camera once (one PC, one camera, 2026-11-26, from the 0.0.8 source); a preset load that changes values: not run. Not verified: Linux, a second unit, a direct USB connection. The 0.0.9 wheel itself has not been run with the camera.
- Documentation: the left/right sentence of
export_recording(Python and Rust) says which way left and right are seen: "covering one lens at a time (left and right as seen from behind the camera, looking where it looks) removed the scene from the SDK eye of the same name" (0.0.8: "… from the eye of that name"). The Media Foundation listing anddoctor --jsonsentences no longer call the runs of 2026-11-24 and 2026-11-25 "one camera": one camera was connected in each run, not known to be the same unit in all of them. TheDevicestatistics sentence no longer says Python and Rust use "the same rule" without saying they count different inputs.
- Documentation: pages that said less than others about the same run now say the same — Rust recording and playback (
API.md, tutorial 04: "have been run with the camera once", as the README said), the doctor's paragraph inAPI.md(thedoctor --openscope of the README),export_recordingon a Windows camera recording (Python and Rust), the Media Foundation name lookup (resolve_by_name(backend="msmf")), the Rust examples' footnote, and the camera controls line ofexamples/README.md; the CHANGELOG's 0.0.8 entry gives the number of Rust examples as seventeen (it said sixteen).
- README, "One eye goes black or stops moving": a second short recording that ended without an error is described (2026-11-26, the published 0.0.8 wheel, the third open after a USB re-insertion: 11 frames about one a second, both eyes 0 in every pixel from the second frame); look at both eyes and the arrival rate of a recording before relying on it.
Fixed
THIRD_PARTY_NOTICES.txtcovers the Linux wheel's build as well as the Windows wheel's; a crate in one of the two builds only is marked "(Windows wheel only)". Up to 0.0.8 the file was generated for the Windows build only — its first paragraph named_core.pydandx86_64-pc-windows-msvc— and the Linux wheels of 0.0.4 to 0.0.8 carried it as it was: it listed Windows-only crates (windowsand the crates it is built from) that their extension does not contain. No crate those Linux extensions link was missing from it: they are built without the crate'scapturefeature, sov4landv4l2-sys-mitare not in them.
0.0.8
2026-11-25GitHub release v0.0.8
Added
- Rust examples
quickstart,brightness_statsandcapture_dataset(withpresetsbelow, seventeen Rust examples, from thirteen; this item said "sixteen" as published in 0.0.8 — corrected in 0.0.9).quickstartdoes the steps ofquickstart.pywithout its window (a window needs a GUI crate, which the crate does not depend on): it opens the camera by name, prints the negotiated mode, reads 100 frames and prints the rate they came at, saves the last frame's two eyes asleft_000099.pgmandright_000099.pgm, and closes the camera.brightness_statswrites the CSV columns ofbrightness_stats.pyand prints its summary.capture_datasetiscapture_dataset_npz.pywithout the.npz(writing one needs a zip crate): it keeps N frames in memory, then writes left/right 8-bit PGM pairs,pairs.csv(index,host_ns,left,right) andcapture_info.jsoninto a new or empty folder. Run without a camera only (generated frames); not run with the camera.
- Rust
capture_info(&mut device)andwrite_capture_info(path, &mut device, extra)(modulerecording, also at the crate root): the capture info the Python package'scapture_infoandwrite_capture_infogive — the same field names and meanings (a test of the crate compares them with the Python function's),createdin UTC, the calibration file listnull.Recorderwrites the same, with itswriterandrecordingfields, as before. The Rustsave_stereo_pairsexample now writescapture_info.jsonbeside its pairs, as the Python example does. Run without a camera only (generated frames); not run with the camera.
- Rust
host_now_ns(): now, on the clock ofStereoFrame::host_ns, to compare a frame's time with other events of the same process. Python'shost_nsistime.perf_counter_ns(), which gives now on its clock. Run without a camera only.
examples/list_devices.py --synthetic --backend v4l2and the Rustlist_devices -- --synthetic --backend v4l2: the same made-up devices as V4L2 lists them (made-up/dev/videoNnumbers and sysfs names). The Rustlist_devicestakes--backend v4l2(the default on Linux, as in Python). Run without a camera only (made-up device lists).
- Rust presets (module
presets):Controls::save_presetsaves every readable control to a preset file,presets::read_presetandlist_presetsread the files and the preset folder (store_dir(),preset_path()), andControls::plan_presetchecks a preset against the camera and gives what loading it would change, what it would leave out (a value whose mode the preset puts in auto, controls with no effect on the mono sensor) and what is already set — the Python package's file format, folder and messages (SdkError::Preset,SdkError::PresetModel; a test of the crate reads the files the Python package saves and has the Python package read the crate's).Controls::model(): the model presets record. The Rust examplepresets(seventeen Rust examples) saves,--plans and--lists. Applying a preset to the camera is not in the Rust crate yet (Python:presets load). Run without a camera only (simulated controls, preset files written by the Python package); not run with the camera.
- The explorer on Linux: the device list is V4L2's (
devices.list_devices(), the default there), the camera is opened withbackend="v4l2"at/dev/videoNby its number, and, as on Windows, a camera with a USB location (the USB device's sysfs name) is found again there at every open (not there: it is not opened) and two of one name are listed with their locations. The mode list is not read on Linux: it opens 1600×800 MJPG and says why. The USB line is read from sysfs as the doctor reads it. The Settings window is read only on Linux: every control shows its value, range and default but is disabled, and so are Reset to defaults… and Load preset… (Save preset… reads only); the window says why (camera controls on Linux are not verified and not supported). 0.0.7 listed no cameras there. Run without a camera only (made-up sysfs trees, fake widgets); not run with the camera on Linux, and not run with a display on Linux.
Changed
examples/list_devices.py --synthetic --backend v4l2lists made-up V4L2 devices; 0.0.7 stopped with exit code 2. The Rustlist_devicesrefused--backend v4l2as an unknown option (exit code 2); on Linux, its--backend dshownow says the DirectShow list is Windows' (0.0.7 listed the V4L2 nodes).
- The capture info JSON the Rust crate writes says
host_nsis "the capturing process's monotonic clock" (0.0.7: "the recording process's").
- The
--usb-locationhelp of the viewer, the explorer,doctor --open,presets saveandloadandcalib checkends "This option: run without a camera only (made-up device lists); not run with a camera, and not run with two cameras" (0.0.7: "Picking by USB location: run without a camera only (made-up device lists)", which read as if picking a camera by USB location had not been run with the camera).
- Documentation: corrected the 0.0.7 entries below and the pages the 0.0.7 claims audit named — the 0.0.7
### Changeditems on Linux ranges andpresets load defaultsnow end "Run without a camera only (a made-up driver, simulated controls); not run with the camera on Linux.", and its Windows documentation item says "with the 0.0.6 code, before the 0.0.7 changes to the device lists" (it said "with the code unchanged"); the crate README's Linuxreset_to_defaults()line says it has not been run with the camera on Linux; the Linux sample is named the same way inv4l2_ctrl.rs(one PC, one camera, 2026-11-25, crate 0.0.6) and infind_v4l2_node(the 0.0.6 wheel);list_devices.py(tutorial 01, the examples and tutorials READMEs), themeasure_fps.pyrow and the V4L2 driver-time line of the README now say what was run with the camera, as the rest of each page does. Rustdevices::list_devices()says it is Windows' list and points tolist_v4l2_devices()on Linux; tutorial 01's Rust section has the Linuxlist_devicesline.
- The explorer's
--usb-locationis no longer refused on Linux (0.0.7: exit code 2): it takes the USB device's sysfs name, e.g.1-4.2; no Weevia S1 there, or an empty one, is exit code 2 before the window opens, as on Windows.
- Documentation: what has been verified on the camera is said so, with its scope — verified on one Weevia S1 unit, Windows 11, one PC, two-level USB hub, two USB re-insertions, read-only, with the published 0.0.7 wheel (and, where named, the Rust crate 0.0.7):
python -m opticmix_vision.doctor --open; recording (Recorder,examples/record_video.py) and reading a recording back, seeking and looping (examples/play_recording.py); reading the camera controls, with the ranges and defaults the camera reports (examples/list_controls.py, and the Rustlist_controlsof crate 0.0.7); Media Foundation driver time stamps on every frame, through the Python package (backend="msmf") and the Rust crate 0.0.7, with their intervals and the first value printed (examples/measure_fps.py --backend msmf, the Rustmeasure_fps) — not the accuracy of the times. Where the README,API.md, the tutorials,examples/README.mdand the descriptions of the doctor andplay_recording.pysaiddoctor --open,Recorder,record_video.pyorplay_recording.py, or reading the controls, had been "run with the camera once" or "not yet verified against the camera", or, for seeking and looping, "generated frames only", they now give this scope. Not verified: writing the controls and the illuminator with the current implementation (measured with the earlier Python implementation), the--speedfactor of playback, pausing, the viewer's recording (v), Linux, a second unit, a direct USB connection, that both eyes show the scene in every recording (one eye was all zero in two short recordings, once; see the README). The 0.0.8 wheel itself has not been run with the camera.
- The explorer's note when it does not read the mode list ends at "opening 1600×800 MJPG" (0.0.7: "…, the mode verified on the Weevia S1").
Fixed
examples/list_devices.py --backend v4l2off Linux printed an empty V4L2 list and "Linux does not see it either"; it now says the V4L2 list is Linux's and which lists Windows has. The Rustlist_devicessays the same. Run without a camera only.
examples/play_recording.py: its last line,frames read 0..53: late …, estimated missed …, read as if the late and missed counts were over frames 0 to 53; they are over every frame read, which with--loopis not that range (150 frames in tutorial 04). It now saysover the 150 frames read (first frame 0, last frame 53): late …, estimated missed ….
0.0.7
2026-11-25GitHub release v0.0.7
Added
- New example
export_recording(Python and Rust): writes the frames of a recording as left/right image pairs into a new or empty folder (left_000123, 123 = the frame's number in the recording), withpairs.csv(index,host_ns,driver_ns,driver_clock,left,right, the times recorded in the recording's CSV) and a copy of the recording's JSON ascapture_info.json;--start,--everyand--countpick the frames, and the last line gives the frames exported and the frames in the recording. Python writes PNG (the names andpairs.csvofexamples/save_stereo_pairs.py) and with--npzalsoframes.npz(the format ofexamples/capture_dataset_npz.py); Rust writes 8-bit PGM, as itssave_stereo_pairsexample does, and plays MJPG.avirecordings only.--syntheticrecords generated frames first (Python: lossless FFV1; Rust:--features test-support). From an MJPG recording the images hold what it decodes to, not the camera's pixel values. Run with generated recordings; the Python example also with a camera recording once on Linux, from source before release. When 0.0.7 was published, not run with a camera recording on Windows, and the Rust example not with a camera recording. After that, on Windows with one camera (one PC, 2-level USB hub, 2026-11-25, 0.0.7): from camera recordings (Python MJPG and FFV1, Rust MJPG) they wrote 800x800 8-bit left/right images; covering one lens at a time (left and right as seen from behind the camera, looking where it looks) removed the scene from the SDK eye of the same name. Not run with a camera: Linux left/right; the Rust example on Linux; a second unit.
DeviceInfohas the USB IDs and link speed of a listed device:vid,pidandbcd_device(int; the USB vendor ID, product ID and device revision, from the USB device's hardware IDs in the Windows device tree) andlink_speed("Low","Full","High","Super"or"Super+", as the USB hub driver reports the port), read without opening the device;Nonewhen they cannot be read. Rust:DeviceInfo::vid,pid,bcd_device(Option<u16>) andlink_speed(Option<String>), the same names and meanings, filled bydevices::list_devices(),list_dshow_devices()andlist_mf_devices();DeviceInfo::new()leaves themNone. Finding a camera to open reads the USB location only, as before (Pythondevices.resolve_by_name(), whichDeviceConfig.weevia_s1()uses, returns themNone; RustDeviceopening the same). Linux: seelist_devices(backend="v4l2")below.python -m opticmix_vision.doctorprints these fields for a device the DirectShow list has, so the report anddevices.list_devices()give one value, and keeps its own reading where a field isNone; its output is unchanged. An extension built from an older source now says to rebuild it (ControlsUnavailable) instead of failing on the shape of its rows.examples/list_devices.py --verboseand the Rustlist_devices -- --verboseprint one line for each.bcd_deviceis the USB device revision, not a firmware version; the camera reports no USB serial number, no firmware version and no temperature, so there are no fields for them. Run without a camera only (made-up device lists); not run with the camera.
- Linux: the camera controls report each control's range and default. The OpenCV path that Linux uses now also asks the V4L2 driver with
VIDIOC_QUERYCTRL(on a second, read-only handle to the device node), soControls.describe()givesminimum,maximum,stepanddefaultfor the controls the driver reports, as on Windows. New read-onlyControls.driver_names(the controls the driver reported when asked: on Windows the same asnames(), on Linux those the query answered for,Nonewhen the backend does not ask) andControls.writes_defaults(Falseon Linux).names(),get(),set()and presets otherwise work as in 0.0.6, through OpenCV.reset_to_defaults()still writes nothing on Linux: the driver's defaults are shown, not written. When the driver cannot be asked there are no ranges or defaults, as before, andControls.backend_notesays why. Run without a camera (a made-up driver, and on Linux a real ioctl on a file that is not a camera), and run with the camera on Linux once (one PC, one camera, 2026-11-25, from source before release): the driver answered on the read-only handle, also while streaming. Camera controls on Linux remain not verified and not supported.
tutorials/: every page ends with a Rust section — for each step that has a Rust example, thecargo runcommand and its output with--synthetic(generated frames), and for each step that has none, a line saying so; with the Rust differences each example states (for example, Rust writes and plays MJPG.avionly, andsave_stereo_pairsandexport_recordingwrite PGM). Of the Rust example files,list_devicesandmeasure_fpshave been run with the camera once (one PC, one camera, 2026-11-24), andopen_by_usb_location,record_videoandplay_recordingonce (one PC, one camera, 2026-11-25); on Linux,measure_fps,record_video,play_recordingandlist_controlsonce (one PC, one camera, 2026-11-25, crate 0.0.6); the others not yet.
--usb-location LOCATIONinpython -m opticmix_vision.viewer,python -m opticmix_vision.explorer,python -m opticmix_vision.doctor --open,python -m opticmix_vision.presets saveandload, andpython -m opticmix_vision.calib check: opens the Weevia S1 at that USB location, to choose between two that share a name — each tool finds it withDeviceConfig.weevia_s1(usb_location=...), and the camera controls it reads and writes (the viewer's keys and--preset, the explorer's Settings window, the doctor's control readout, presets) are those of the same camera; the explorer's USB line (VID:PID, revision, link speed) is that camera's, and the doctor's report names the USB location and the device it opened. The explorer finds the camera again by that location each time it opens it (not there: it is not opened), and takes--usb-locationon Windows only (on Linux, where it lists no cameras: exit code 2). Windows: the locationexamples/list_devices.pyor the doctor prints; Linux: the USB device's sysfs name, e.g.1-4.2. No Weevia S1 at that location (the message lists each device's name and USB location) or an empty or blank location: exit code 2, before anything is opened (the explorer before its window opens; the doctor prints no report). With another way of choosing what to open (--device,--synthetic, the viewer's--recording,calib check --pairs-dir): exit code 2.doctorneeds--openfor it. A USB location is not a serial number: it names the port the camera is plugged into, and it changes when the camera is plugged into another port. Using two cameras at the same time is not supported. Run without a camera only (made-up device lists); not run with a camera, and not run with two cameras.
- Linux:
devices.list_devices(backend="v4l2")lists the cameras — oneDeviceInfoper video capture node in/sys/class/video4linux(chosen asfind_v4l2_nodechooses them, so a UVC camera's metadata node is left out), in/dev/videoNorder:indexis the N (whatDeviceConfig(device=N, backend="v4l2")opens),namethe node's name,usb_locationthe USB device's sysfs name (e.g.2-1), andvid,pid,bcd_deviceandlink_speeditsidVendor,idProduct,bcdDeviceandspeed(the same words as on Windows: 480 Mb/s"High", 5000"Super", more than 5000"Super+");Nonefor what cannot be read. Reads sysfs only, opens no device; an empty list off Linux. The doctor reads these values with the same function, so its Linux report and the list give one value; its output is unchanged.DeviceConfig.weevia_s1()on Linux still finds the camera withfind_v4l2_node, reading the USB location only.examples/list_devices.pyprints this list on Linux (--backend v4l2, the default there; with--verbosethe IDs and link speed). Rust:devices::list_v4l2_devices()(featurecapture) gives the same entries. The explorer still lists DirectShow's devices, the list of the backend it opens with, so on Linux it lists no cameras, as in 0.0.6. Run without a camera only (made-up sysfs trees); not run with the camera on Linux.
Changed
- Linux:
Controls.set()/set_many()raiseValueError, andload_preset()raisesPresetError, for a value outside a range the V4L2 driver reports, before anything is written; 0.0.6 passed such a value to OpenCV. Controls whose range the driver does not report are not checked, as before. Run without a camera only (a made-up driver, simulated controls); not run with the camera on Linux.
- Linux: the explorer's Reset to defaults,
python -m opticmix_vision.presets load defaultsand the viewer'sp/Pon the defaults say that the camera's defaults are shown, not written, instead of that everything is already at the defaults;presets load defaults(also with--dry-run) then exits with status 1 (0.0.6: 0). Run without a camera only (a made-up driver, simulated controls); not run with the camera on Linux.
- Rust on Linux:
Controls::reset_to_defaults()no longer writes the defaults andControls::plan_reset()is empty (0.0.6 wrote them through V4L2), as in the Python package;describe()still gives the driver's defaults. New read-onlyControls::writes_defaults()(falsefor the V4L2 controls on Linux), the same name and meaning as Python'sControls.writes_defaults. Windows unchanged. Run without a camera only; not run with the camera on Linux.
- The explorer with two cameras that share a name: the device list shows each one's USB location (
WN Dual Camera · <USB location>), and the one chosen in the list is the one opened and written to by the Settings window — found again by its USB location each time it is opened, since the list's order can change. 0.0.6 chose by name, so it always opened, and wrote to, the first of the two. Two of one name whose USB locations cannot be read are not opened (the window says to connect one at a time). With two of one name, or with--usb-location, the mode list is not asked of ffmpeg, which asks by name: the window opens 1600×800 MJPG and says why. Run without a camera only (made-up device lists); not run with a camera, and not run with two cameras.
- Linux:
devices.list_devices()with nobackendlists the V4L2 capture nodes (backend="v4l2"); 0.0.6 gave an empty list there (it read DirectShow's). On Windows the default is still"dshow", and an unknownbackendnow says'dshow', 'msmf' or 'v4l2'.
- Documentation: what 0.0.6 said had not been run with the camera and has since been run once on Windows (one PC, one camera, 2026-11-25), with the 0.0.6 code, before the 0.0.7 changes to the device lists — picking a camera by USB location (
DeviceConfig.weevia_s1(usb_location=...),DeviceSelector::UsbLocation, theopen_by_usb_locationexamples): with one camera connected, the list showed its USB location, and given that location it opened at 1600x800 MJPG and read one frame; a location no device has was refused (Python DirectShow, Rust Media Foundation); not run with two cameras. Rust recording and playback (Recorder,Device::open_recording, therecord_videoandplay_recordingexamples):record_video10 s, 881 frames, estimated missed 5, dropped by the write queue 0; Rust and Python played the same file back as 881 frames. The pages now say so.
- Documentation, Linux (experimental; once, one PC, one camera, 2026-11-25): the 0.0.6 manylinux wheel has been run with the camera — open, frames, recording and playback, read-only; finding the camera by name, and picking it by USB location (opened at its location; a location with no camera refused; not run with two cameras); the examples
measure_fps.py,record_video.py,play_recording.py,save_stereo_pairs.py,list_controls.pyandopen_by_usb_location.py. The Rust crate 0.0.6:measure_fps,record_video,play_recordingand reading the controls (list_controls); writing not run. Camera controls on Linux remain not verified and not supported.
Fixed
- Linux:
examples/open_by_usb_location.pywithout--usb-locationlists each Weevia S1 and its USB location from V4L2's list (devices.list_devices()), as it does from DirectShow's on Windows; 0.0.6 printed no device lines there (seen once with the camera on Linux, 2026-11-25). The new listing: run without a camera only (a made-up sysfs tree); not run with the camera.
- Rust on Linux: the
open_by_usb_locationexample without--usb-locationlists each Weevia S1 and its USB location from the V4L2 list (devices::list_v4l2_devices()), as the Python example does; 0.0.6 printed no device lines there. Its test uses an empty sysfs; not run with the camera on Linux.
- Rust on Linux: the
list_devicesexample lists the V4L2 capture nodes (devices::list_v4l2_devices(), with the defaultcapturefeature;--verboseadds the USB IDs and link speed) instead of saying the listing is for Windows;DeviceSelector::Index(n)opens the/dev/videoNit shows. Its tests use made-up sysfs trees; not run with the camera on Linux.
0.0.6
2026-11-25GitHub release v0.0.6
Added
- Picking one of two cameras that share a name by USB location.
DeviceInfo.usb_location(Python) /DeviceInfo::usb_location(Rust): on Windows the USB device's firstDEVPKEY_Device_LocationPathsentry, read from the device tree through cfgmgr32 without opening the device (the doctor'slocation); on Linux the USB device's sysfs name, e.g.1-4.2;Nonewhen it cannot be read. Python:DeviceConfig.weevia_s1(usb_location=),devices.resolve_by_name(..., usb_location=),devices.pick_by_usb_location()anddevices.find_v4l2_node(..., usb_location=). Rust:DeviceSelector::UsbLocation { name, usb_location }(the controls then find the camera at the same location),devices::pick_by_usb_location(),devices::list_mf_devices(),devices::list_dshow_devices()andDeviceInfo::new(). An empty or blank USB location is an error (PythonValueError, RustSdkError::InvalidValue), never a match for a device whose location could not be read. With two cameras of one name,MultipleMatchesnow lists their USB locations when they are known.examples/list_devices.pyand the Rustlist_devicesexample end each line with the device's USB location; new exampleopen_by_usb_location(Python and Rust) opens the camera at a location and reads one frame. A USB location is not a serial number: it names the port the camera is plugged into, and it changes when the camera is plugged into another port. Using two cameras at the same time is not supported. Picking a camera by USB location has been run without a camera only (made-up device lists); it has not been run with a camera, and not run with two cameras.
python -m opticmix_vision.calib show [SERIAL|FILE]andcalib.show(): what a calibration file holds — for each eye the model, size (and the mode it is for), fx fy cx cy and distortion k1..k4; between the eyes the baseline, t, the full rotation matrix R, its Rodrigues vector (rad and degrees), angle and axis; the file's sha256 (the value a recording's.jsonlists) andmeta; and whetherDevice.calibrationuses it. It saysinstalled file, not matched to this camera (no USB serial), and what to do when no file or several are installed.--jsonprints the same as JSON (on an error,{"error": ...});--syntheticshows a generated calibration. The doctor's Calibration section names the command. Reads the file only. Run without a camera only (made-up calibration files); not run with the camera.
- Rust: the
list_devicesexample takes--backend msmfand prints Media Foundation's list (devices::enumerate_mf_video_devices()), the list Rust capture opens from andDeviceSelector::Indexcounts in;--synthetic --backend msmfprints the same made-up devices in another order. The crate README's platform table says which list an index belongs to. The two lists can be in a different order — seen once on one PC, with Python'slist_devices(backend="msmf")— not with this example.--backend msmf: run without a camera only (a made-up list); not run with the camera.
- The bug report form asks, for a calibration problem, for the output of
python -m opticmix_vision.calib showas well as the doctor's.
- The capture-info JSON says where its control values came from and when they were read:
controls_source("camera","simulated","given"ornull) andcontrols_read_at(ISO 8601); a recording'scontrols_at_end_sourcesays the same ofcontrols_at_end. The viewer'ssandvgive the time it read every control when it opened (capture_info(..., controls_read_at=),Recorder(..., controls_read_at=)). Run on generated frames only; not run with the camera.
Device.repeated_frames: the framesread()returned sinceopen()whose two eyes were both byte-identical to the frame before, counted by the comparison thestall_framescheck already makes (Nonewithstall_frames=0). Through OpenCV's Media Foundation backend (backend="msmf"),read()warns once peropen()when more than 5 % of the last 300 frames repeated, naming DirectShow and the Rust crate — on one PC with one camera (2026-11-24) 276 of 900 frames per eye did through that path and 0 of 900 through DirectShow; cause not established. The viewer's top line showsrepeated N;python -m opticmix_vision.doctor --opencounts frames repeated in both eyes and takes--backend, and throughmsmfrepeated images are a finding. The warning and the count inexamples/measure_fps.pyhave been run with the camera once through each backend (one PC, one camera, 2026-11-25; the example's output does not record the OpenCV version): throughmsmfthe warning came once and 271 of 900 frames repeated in both eyes; through DirectShow 0 of 900, no warning. The doctor's--open --backend msmfonce (same PC and camera, OpenCV 4.13.0): its finding said 276 of 904. The viewer'srepeated N: run on generated frames only; not run with the camera.
- Rust:
Device::repeated_frames() -> Option<u64>, the name and meaning of the PythonDevice.repeated_frames: the framesread()decoded since open whose two eyes were both byte-identical to the frame before, counted by the stall check's comparison (Nonewithstall_frames0); samplesread()skipped as undecodable and thoseread_raw()returns are not compared. A count only, with no warning. Themeasure_fpsexample prints it. Run with the camera once (one PC, one camera, 2026-11-25, Media Foundation, 450 frames): 0, the same as themeasure_fpsexample's own per-eye counts (left 0, right 0). A count above 0: generated frames only.
examples/record_video.py --queue-frames N(default 0) encodes on a thread through a queue ofNframes, as the viewer'svdoes; its last line gives the frames the write queue dropped (among the estimated missed ones). Run on generated frames only; not run with the camera.
- Rust: reading the installed calibration file —
calib::resolve()andDevice::calibration(), withcalib::store_dir(),installed(),installed_file()andload(path)— by the rules of the Python package'scalib.resolve()andDevice.calibration: the same folder, the file used only when exactly one is installed, the same checks and messages, and the eye size against the opened mode. Values: per eye the model (KB4), K, D and the eye size; R, t and the baseline (mm); the file'sdeviceblock andmeta; the file's path. New errorsSdkError::CalibrationandSdkError::CalibLookup. Thecalibration_infoexample (--synthetic: a made-up calibration in a temporary folder). It reads files only (install withpython -m opticmix_vision.calib add); installed file, not matched to this camera (no USB serial). Run without a camera only (made-up calibration files); not run with the camera.
- Rust: points through a calibration's KB4 model —
Intrinsics::project(a point in the eye's camera coordinates to its pixel) andIntrinsics::unproject(a pixel to the unit ray), up to 92.5° from the optical axis (Nonebeyond, at the origin or for values not finite); thecalibration_infoexample prints the pixel of each eye's optical axis and one point projected into both eyes (R·p + t) and unprojected back. Compared with OpenCV'scv2.fisheye.projectPointsandcv2.fisheye.undistortPointson made-up values. For a point behind the eye (Z < 0) within 92.5° the two differ: OpenCV divides by Z and returns the pixel of -p,projectreturns the point's own pixel. Tutorial 08 shows the same calculation in Python with OpenCV. No rectification or depth. Run without a camera only (made-up calibration files); not run with the camera.
- Rust: recording and playback in the Python package's file format —
Recorder::create(path, &mut device),write(&frame)andclose()write the MJPG.avi(both eyes side by side, left eye first), the.csv(frame,host_ns,driver_ns,driver_clock) and the.json(mode, the camera's layout and left/right order, control values at the start and end, crate version, frame count, late / missed frame estimates);Device::open_recordingplays one through the sameread()as a camera, with each frame's recordedhost_nsand driver time and its number in the file asindex, andSdkError::EndOfRecordingafter the last frame;Device::playback()seeks (by frame or seconds), loops, paces at the recorded intervals divided by a speed, and gives the frame count and length. A recording the Rust crate wrote plays in Python (DeviceConfig.recording), and a Python MJPG recording plays in Rust. The frames are encoded to JPEG again, as in Python, so pixel values change a little. As in Python: a write queue (Recorder::create_with_queue(path, &mut device, n)encodes on a writing thread; a frame that finds the queue full is dropped and counted indropped_frames()and the JSON'sdropped_frames, the JSON'swrite_queueisn, a writing-thread error comes back from the nextwriteor fromclose,closewrites the frames still queued), pausing a recording (Recorder::pause/resume, the JSON'sbreaks), and pausing playback (Playback::set_paused,Playback::status→PlaybackStatus). Not in Rust: FFV1 (.mkv),note_control, the calibration file list in the JSON, replacing a recording of the same name (refused), an.aviover 2 GiB (writereturns an error; record on to a new file). A V4L2 time Rust checked to be onCLOCK_MONOTONICis namedv4l2_monotonicin the CSV, apart from Python'sv4l2. New errorsSdkError::RecordingandSdkError::EndOfRecording; new dependencyjpeg-encoderwithcapture(license(MIT OR Apache-2.0) AND IJG; withoutcapture, as the Python extension is built, it is not a dependency). Examplesrecord_video(encodes on a writing thread,--queue-frames, default 64) andplay_recording. Run without a camera only (generated frames, and files the Python package wrote from generated frames with opencv-python 4.14 on Windows); not run with the camera.
Changed
python -m opticmix_vision.calibprints UTF-8, as the doctor does, so a path or a file'smetawith non-ASCII characters no longer stops it on a console with another code page.
- The viewer's
vencodes on a thread while the window draws:recording.Recorder(..., queue_frames=N)hands each frame to a writing thread through a queue ofNframes (the viewer: 64). A frame that finds the queue full is not recorded and is counted —Recorder.dropped_frames, the JSON'sdropped_frames, the viewer's REC line (missed~N since start (dropped N)) and its message when recording stops;estimated_missed_framesincludesdropped_frames(do not add them), and the message says so. Frame numbers (the CSV,breaks,control_changes) stay those of the file. An error on the writing thread is raised by the nextwrite()or byclose();close()writes the frames still queued first. Withoutqueue_framesRecorderwrites as before. A queue does not make lossless keep up with 90 fps: the frames it cannot take are dropped and counted. The viewer'svmay still not keep up with 90 fps;examples/record_video.pyremains the first thing to try to record every frame, unless the write queue dropped most of the missed frames (then the message advises MJPG, a lower--fpsorexamples/capture_dataset_npz.py). Any error the encoder raises ends the recording with a message and the window still closes. Run on generated frames only; not run with the camera.
Device.open()starts thestall_framescheck afresh: afterclose()andopen()on the sameDevicethe first frame is no longer compared with the last frame beforeclose(), and the count of identical images in a row starts again from zero (before, it carried on). An eye that had already stopped beforeclose()is therefore reported up tostall_framesframes later than before. A newDevicebehaved this way already. Run on generated frames only; not run with the camera.
Recorder.write()afterclose()raisesValueError("recorder is closed")(before: with a queue the frames were taken without a word; without one,AttributeError).
- Rust: code that matches
SdkErrorexhaustively stops compiling: four variants were added (SdkError::Calibration,SdkError::CalibLookup,SdkError::Recording,SdkError::EndOfRecording) and the enum is now#[non_exhaustive]— add a wildcard arm.
- Rust: code that builds a
devices::DeviceInfowith a struct literal stops compiling: the fieldusb_locationwas added and the struct is now#[non_exhaustive]— build one withDeviceInfo::new(index, name, usb_location). Its fields are still public to read.
- Rust: code that matches
DeviceSelectorexhaustively stops compiling: the variantDeviceSelector::UsbLocationwas added and the enum is now#[non_exhaustive]— add a wildcard arm. Building aDeviceSelectoris unchanged.
- Python:
devices.resolve_by_name()takes a new keywordusb_location=, andDeviceConfig.weevia_s1()a new keyword-onlyusb_location=(withdevice=as well:ValueError); calls without it behave as before.devices.DeviceInfohas a third field,usb_location(defaultNone):DeviceInfo(index, name)still works, but an entry oflist_devices()whose USB location is known no longer equalsDeviceInfo(index, name).
- With two cameras of one name, the
MultipleMatchesmessage ends with their USB locations when they are known (Python and Rust; Rust's Media Foundation and V4L2 messages list each device's location,Nonewhere it could not be read) — code that matches the old text needs updating.
- The doctor's finding for two Weevia S1 and the explorer's tooltip on the USB details now say to open one by its USB location (
DeviceConfig.weevia_s1(usb_location=...); the port, not a serial number) as well as to connect one at a time, and that picking by USB location has been run without a camera only; not run with a camera or two cameras.
- Python: needs
opencv-python>=4.14(before:>=4.8), because FFV1 writing failed now and then with the 4.12 and 4.13 wheels (see Fixed).pip install -U opencv-pythonifpipreports a conflict. With the 4.14 wheel on Windows (one PC, one camera through a 2-level USB hub, 2026-11-25, two runs):examples/measure_fps.pyread 900 frames at 88.2 frames per second with no repeated image (first run). In a second run after a USB re-insert, with a different build of the native module: a 10 s MJPG recording (888 frames, 88.7 frames per second, estimated missed 29) and a 10 s--losslessrecording (443 frames, 44.3 frames per second in the read-and-record loop, estimated missed 450, no error) closed and played back with the same frame counts; and a separate 90-frame FFV1 file, read back by this package, gave the pixel valuesDevice.read()had delivered in 90 of 90 frames, both eyes. On Linux the camera has been run with the 5.1 wheel for capture only (package 0.0.3, 2026-11-23); recording has not been run on Linux.
Fixed
python -m opticmix_vision.doctor --open --backend msmfno longer reports that the negotiated pixel format is not MJPG and that the frame rate falls short of 90 fps: through OpenCV's Media Foundation backendCAP_PROP_FOURCCreads back OpenCV's output format code (RGB320x00000016, RGB240x00000014), not the camera's format, so the finding came from that code rather than the camera — seen on one PC with one camera (2026-11-25), in a report that also counted 904 frames in 10 s (90.27 fps). The negotiated mode line now shows such a code in hex and says what it is. DirectShow and V4L2 keep the finding. Run without a camera only (made-up captures). The 0.0.5 notes say OpenCV has Media Foundation convert 'the MJPG' to RGB; which format reaches that conversion has not been established (one PC, one camera, once, 2026-11-25).
- FFV1 (lossless) recording with OpenCV before 4.14: when the encoder fails on a frame,
Recorder.write()raisesRuntimeErrorsaying to upgrade OpenCV (pip install -U opencv-python) or record MJPG, instead of OpenCV's bareUnknown C++ exception from OpenCV code; the recording is closed with the frames written before it (read back after a failure with the 4.13 wheel and cv2 alone; with 4.12 not checked). On one Windows PC, with generated grayscale frames, FFV1 writing failed now and then with the opencv-python 4.12 and 4.13 wheels and not with 4.14 or 5.1. The failure happens with cv2 alone, without this package; whether it is in OpenCV or in the FFmpeg its wheel bundles has not been established. Other OpenCV versions and Linux: not run. This changes only the message. Not run with the camera.
0.0.5
2026-11-24GitHub release v0.0.5
Added
tutorials/: eight numbered tutorials built on the existing examples, and a page on the viewer and the explorer; a test runs every command they show for use without a camera and compares what it prints with the output on the page, and checks that every published example is in a tutorial.
- The viewer records and plays back:
vstarts and stops a recording in--out(MJPG.avi, both eyes side by side, and a CSV of frame times — the filesexamples/record_video.pywrites), and--recording <file>plays one back. Recording withvhas been run with the camera once (one PC, one camera, 2026-11-24): one recording started and stopped withv(392 frames, about 130 missed while recording), no stall error; its.jsoncarriescontrols_note. Playback with--recording: generated frames only; not run with the camera. A compressed recording does not have the camera's pixel values.
- Playback of a recording:
Device.playback(opticmix_vision.recording.Playback) seeks by frame or by seconds, reportsposition,frame_countandduration_s, plays at the recorded pace (real_time, from the CSV) at anyset_speed, loops, pauses, reportsstatus(playing, paused, ended; no callback), and withrecorded_timegives the recordedhost_ns. It also gives the late / missed estimates over the whole recording. A frame'sindexis now its number in the file.Device.modeandDevice.recording_infocome from the recording's new.json. A recording that was not closed: the FFV1.mkvplays what was written (with a warning), the MJPG.avicannot be opened and the error says why. The viewer plays with keys (space,,/.,[/],-/+), a seek bar and--loop, and stays on the last frame;examples/play_recording.pytakes--start,--start-seconds,--real-time,--speed,--loop,--framesand--recorded-time.play_recording.pyhas been run with the camera once (one PC, one camera, 2026-11-24): it read back the 443 frames of an MJPG recording of the camera. Seeking, speed, looping and the viewer's playback keys: generated frames only; not run with the camera.
- Lossless recording:
recording.Recorder(..., codec=LOSSLESS_CODEC)(FFV1),examples/record_video.py --lossless(and--fps) andviewer --lossless; the lossless file keeps the pixel values the SDK delivered (generated frames only; not run with the camera). It takes longer per frame than MJPG and may not keep up with 90 fps: the JSON, the viewer's REC line andrecord_video.pycount the frames missed while recording and say what to do. Recorder can pause and resume; a pause is listed as a break, not as missed frames. Run on generated frames only; not run with the camera.
- Capture info JSON (
recording.capture_info,write_capture_info): negotiated mode, the camera's layout and left/right order, device name, installed calibration files (sha256), every control value, SDK version and time, written next to recordings, the viewer's PNG pairs, and the files ofsave_stereo_pairs.pyandcapture_dataset_npz.py. A recording's JSON also lists the control changes made while recording and the values at the end. Run on generated frames only; not run with the camera.
- Recording and playback are Python only; the Rust crate has no recording API yet.
- Frame statistics:
Device.late_frames,Device.estimated_missed_framesandDevice.actual_fps, estimated from host times (not a device counter), shown on the viewer's top line. Run on generated frames only; not run with the camera.
- Rust:
Device::late_frames(),Device::estimated_missed_frames()andDevice::actual_fps(), the same statistics with the same rule as Python, fromhost_nson Windows and Linux; every sample counts, including undecodable ones (those areundecodable_frames(), not missed).measure_fpsandthreaded_captureprint them.measure_fps: run with the camera once (one PC, one camera, 2026-11-24);threaded_capture: run without a camera only.
- Driver time stamps and sequence numbers on each frame, beside
host_ns:StereoFrame.driver_ns,driver_clockanddriver_sequence(Python and Rust). The clock is named — Media Foundation sample time, V4L2 buffer time (Rust: only when the driver flags itCLOCK_MONOTONIC) — and is an operating-system driver time, not a camera clock; whether it marks the exposure or the arrival of the frame is not known. On one PC (Windows 11) with one camera (2026-11-24, once) the first Media Foundation time (Python and Rust) was about 364,400 s — not the start of streaming; on this PC it was within a few seconds of Python'stime.perf_counter_ns()(compared across two runs by file times, not within one process), but what the clock's zero is has not been established. Use differences between frames, not the absolute value. Python gets the time through OpenCV withbackend="msmf"on Windows or V4L2 on Linux (Nonewith DirectShow, the Windows default) and never the sequence number. Through OpenCV MSMF the time is that of the sample after OpenCV has Media Foundation convert the MJPG to RGB (Rust reads the MJPG samples without conversion); run with the camera once (one PC, one camera, 2026-11-24): through MSMF 276 of 900 frames per eye repeated the previous image while the driver-time intervals were 11.11 ms (mean, min and max) —driver_nsdoes not show whether a new image arrived; cause not established. DirectShow: 0 of 900 and 0 of 450; Rust (Media Foundation, no conversion): 0 of 450, driver-time intervals 0.01 to 16.90 ms (mean 11.23). SeeStereoFrameinAPI.md. Rust also givesdriver_time_sourceon Linux: start of exposure or end of frame, as the V4L2 driver reports it in the buffer flags (not checked on the camera). Rust:Device::driver_missed_frames()counts the gaps in the V4L2 sequence numbers (Noneon Windows);Device::undecodable_frames()is the new name ofdropped_frames()(kept), which counts MJPG samples that did not decode, not lost frames.measure_fps(both languages) prints the driver-time intervals and how far each frame trails the earliest. Windows: run once on one PC with one camera (2026-11-24); Linux: run without a camera only (made-up driver reports), not run with the camera.
- Driver time stamps in the recording CSV:
recording.Recorderwritesframe, host_ns, driver_ns, driver_clock(the frame'sStereoFrame.driver_nsanddriver_clock; both cells empty where the frame had none — DirectShow, the Windows default, and the synthetic source), and so do the viewer'svkey andexamples/record_video.py;examples/save_stereo_pairs.pyadds the same two columns topairs.csv. Both examples take--backend {dshow,msmf,v4l2}and--device: on Windows--backend msmffillsdriver_ns(the controls then go through OpenCV's fallback, no ranges or defaults). Through OpenCV's Media Foundation path the driver times came evenly 11.11 ms apart on one PC with one camera (once, 2026-11-24) while images repeated; these times do not show whether a new image arrived. Played back withPlayback.recorded_time, a frame'sdriver_nsanddriver_clockare the recorded ones, beside the recordedhost_ns; without it they stayNone.Playback.recorded_driver(index)gives them for any frame. A CSV of onlyframe, host_ns(earlier versions) plays back as before. Run without a camera only; not run with the camera.
- Seeing the Media Foundation device list (Windows):
examples/list_devices.py --backend msmf(DirectShow stays the default), andpython -m opticmix_vision.doctorprints it under the DirectShow list (video_devices.media_foundationin the JSON; listed, no device opened) with a line, not a finding, when the Weevia S1's index differs between the two. The two lists can be in a different order: on one PC with one camera (2026-11-24),devices.list_devices(backend="msmf")andlist_devices()returned the same three cameras in a different order, once.examples/list_devices.py --backend msmfand the doctor's Media Foundation list have been run without a camera only (made-up lists); they have not been run with the camera. The report'svideo_devices.sourcechanges from"ffmpeg"to"DirectShow, through ffmpeg"(a label to read, not to compare);REPORT_FORMATstays 1, since only keys were added.
- Media Foundation device list (Windows):
devices.list_devices(backend="msmf")anddevices.resolve_by_name(needle, backend="msmf")list Media Foundation's video sources in the order OpenCV'sCAP_MSMFcounts device indexes (Rust:devices::enumerate_mf_video_devices(); empty off Windows).DeviceConfig.weevia_s1(backend="msmf")now finds the Weevia S1 by name in that list instead of needingdevice=; withbackend="any"it does so only when the camera has the same index in the Media Foundation and DirectShow lists (OpenCV may open either), andDevice.open()refuses a device thatbackend="any"opened by index through another backend. Withbackend="msmf"the controls also read the camera's model from that list (Controls.model), so loading a preset saved from a Weevia S1 is no longer refused as coming from an unknown model. Run without a camera only (made-up device lists); not run with the camera.
- Control presets:
Controls.save_preset(path)writes every readable control (value, units, auto/manual modes), the camera model and the SDK version to a JSON file;Controls.plan_preset(path)lists what loading it would change;Controls.load_preset(path)writes what differs in oneset_many()call and returns each result withkept. A different model, an unknown control, other units or a value out of range raisePresetErrorwith nothing written; controls with no effect on the mono sensor are not written unlessinclude_mono=True.python -m opticmix_vision.presetssaves, loads, lists and shows presets in a folder beside the calibration folder; the explorer's Settings window has Save preset… and Load preset…;examples/presets.py. Run without a camera only; writing a preset to the camera writes several controls at once — see README, "Camera controls".
- Viewer presets and saturation:
nsaves the controls as a new preset (--preset-name),psteps through the presets of this camera's model and shows what loading one would change,Pwrites it in oneset_many()and shows each result;--preset NAMEloads one at start. A load made while recording goes into the recording's JSON. A new line shows each eye's share of saturated pixels (--saturation-level). Run on generated frames only; not run with the camera.
- Rust: eight examples in
rust/opticmix-vision/examples/—list_devices,measure_fps,save_stereo_pairs,list_controls,set_controls_once,threaded_capture,led_level,handle_stall, each the Rust version of the Python example of the same name.list_devicesandmeasure_fpshave been run with the camera once (one PC, one camera, 2026-11-24); the others without a camera only (--synthetic: generated frames and simulated controls). See the crate README, "Examples".
python -m opticmix_vision.doctorprints what to paste into an issue (--jsonfor JSON): OS, Python, SDK,_coreand OpenCV versions, the video devices and how many Weevia S1 are connected, each camera's USB details from the operating system (VID:PID, USB device revisionbcdDevice, status, location, link speed) and the installed calibration files, without opening the camera.--openadds the negotiated mode, frame timing and stalled eyes over 3 s, and every control's value and range, read only; the report shows the control-write count stays at 0. Findings at the top name the problems found (no camera, two cameras, a USB 2 link, a format other than MJPG, frames well below the negotiated rate, a stalled eye), and a Log part keeps the SDK's warnings from the run.--output FILEwrites the report in UTF-8. The serial number, firmware version and temperature are reported as not available from this camera. The explorer's top bar shows the camera's VID:PID, USB device revision and link speed where it showed "SN: —".--openhas been run with the camera once (one PC, one camera, 2026-11-24); without--open,--jsonand Linux: run without a camera only (generated frames, fake device lists for Windows and Linux).
python -m opticmix_vision.calib checkandcalib.check()/calib.check_pairs(): show in numbers whether a calibration file fits the connected camera — the epipolar distance of features matched between the eyes (median, 95th percentile, share within 1 px and 2 px) and the share of points with positive disparity (left/right swapped). Numbers only, no pass/fail threshold; with too few matches it says so (exit code 2). With more than one file installed,--all, or several--file, it compares the files on the same frames (calib.compare_pairs());--pairs-dirchecks saved PNG pairs (calib.load_pairs()) instead of the camera. New exampleexamples/calibration_check.py;synthetic.SyntheticPlaneSourcerenders a textured plane through a given calibration. Run without a camera only (generated frames and generated PNG pairs); not run with the camera. See the README, "Calibration".
- Viewer:
cshows the installed calibration file (Device.calibration, one file; not matched to the camera, which reports no USB serial) — serial, file, each eye's model, size, fx fy cx cy and distortion, and the baseline, t and rotation angle between the eyes — read from the file only (no control read); with no file it sayspython -m opticmix_vision.calib add <file.json>.pnow steps todefaultsafter the saved presets: what the camera's own defaults would change (Controls.plan_reset, as the explorer's Reset to defaults), andPwrites them (reset_to_defaults()); the values written show on the control line without reading the camera again. Run on generated frames only; not run with the camera.
Fixed
- The viewer's LED / exp / gain line ends with
(as opened + viewer's writes), and the key help (h, now wrapped to fit the window) says the same: the values are those read when the viewer opened plus its own writes, not a live reading. A once-per-press key repeated within 0.6 s now says once per press that it was ignored, instead of nothing. When frames were missed while recording withv, which runs alongside the preview, the viewer's message first suggestsexamples/record_video.py(no preview window). The calibration lines, messages and help wrap to the window's width. Checked with simulated key presses and generated frames; not run with the camera.
- The viewer's
--backendwas ignored without--device; it now goes toDeviceConfig.weevia_s1(backend=...)(default still DirectShow; V4L2 on Linux). Withmsmfthe controls go through the OpenCV fallback. Run without a camera only.
recording.Recorderopens its video,.csvand.jsonwhen it is created (at the eye size of the source's negotiated mode), no longer on the firstwrite(): the time to open them sat between the first two frames and was counted as missed frames, so even a generated MJPG recording reported missed frames and the advice to record MJPG. A source without a mode, or a first frame of another size, still opens them on the firstwrite(); frames really missed are counted as before, the first interval included. An unopenable codec now raisesOSErrorfromRecorder(...). The viewer'svrecords from the frame after the key. Run on generated frames only; not run with the camera. A recorder closed before any frame was written removes its files (the viewer'svpressed twice in a row leaves nothing); a recording that fails on its first frame stops the recording, not the viewer. Recording again to the same path keeps the earlier recording as<file>.replaceduntil the new one closes with a frame, and puts it back if no frame came or a file could not be moved (e.g. the.csvopen in another program). After a process that stopped mid-recording, the.replacedfiles hold the earlier recording and the files without.replacedthe unfinished one; the error says how to keep either (delete the unfinished files before taking.replacedoff the names).
- A recording no longer overwrites another one's
.csvand.json:RecorderraisesFileExistsErrorwhen a video (or acapture_dataset_npz.py.npz) with the same name and another extension is in the folder (recording again to the same path still replaces it), andexamples/record_video.py --losslessnow writesrecording_lossless.mkvby default instead ofrecording.mkv, whose.csvand.jsonwere the MJPGrecording.avi's.
- The missed-frames advice of
record_video.pyand the viewer suggests MJPG only for a lossless recording; both print the newRecorder.missed_advice.
- The viewer's LED / exposure / gain keys and
a: a key pressed while the previous change (a key,aor a preset loaded withP) was still queued started from the camera's old value, so two presses made one step,atwice stayed manual and an exposure key right afterawas refused (Controls.getreads the camera and does not see queued writes). They now go on from the value the viewer asked for until that write has finished.
- Holding
vdown in the viewer window started and stopped a recording with each key repeat (several files from one press, seen with the camera), and holdings,n,p,Porasaved, read or wrote the controls again and again.s,v,n,p,P,a,hand space now act once per press: the same key within 0.6 s of the last time it came is ignored. Keys given withkey_feedare separate presses. Checked with simulated key presses and generated frames; not run with the camera.
- The viewer read the LED, exposure and gain from the camera on every frame to draw them. On the one camera tested (once, through a USB hub), reading these three values on every frame was followed by the stall check reporting the left eye (the right eye was not checked) in 2 of 2 test-script runs, while 300 frames read without them in the same session streamed normally. Whether the reads cause it is not established. The viewer now reads every control once when it opens: the line shows those values with its own writes (the value read back after each write, so a value the camera did not keep shows), a refused write reads that control once again, and a change made by another program shows when the viewer is opened again; exposure shows
autowhile the viewer has turned auto exposure on. The LED / exposure / gain keys andago on from the same values instead of reading the camera on each press. The explorer's Settings window and redraw read no control while streaming (checked; unchanged). Run with the camera (one camera, one session, through a USB hub, 2026-11-24): the viewer with this change showed 2700 frames on each of three opens and 1686 frames on a fourth, with no stall error. The earlier version was not run in that session, so whether this change is what prevents the stall is not established.
- The viewer's
sandvread every control from the camera for their.jsonwhile streaming: at each save, and at the start and end of each recording. They now write the values the viewer knows (read when it opened, then its own writes; thecontrols_notefield says so).capture_infoandwrite_capture_infotakecontrols=, andRecordertakescontrols=, a function called when it is created and when it closes; without it they read the camera as before. Run with the camera once (one PC, one camera, 2026-11-24): one recording started and stopped with v (392 frames, about 130 missed while recording), no stall error; the .json carries the controls_note. Theskey's.json: generated frames only; not run with the camera.
0.0.4
2026-11-23GitHub release v0.0.4
Added
- Per-unit calibration files (preview):
python -m opticmix_vision.calib add <file>installs the file for your camera andDevice.calibrationreturns it (opticmix_vision.calibration, schema v1, is now part of the package). Run on Windows with two cameras, once each; installing by label (download) is not available yet. See the README, "Calibration".
- A Linux x86_64 wheel on PyPI (
cp310-abi3-manylinux2014_x86_64, glibc 2.17 or newer), sopip install opticmix-visioninstalls on Linux x86_64 without a Rust toolchain. Experimental — not a supported platform. The 0.0.4 manylinux wheel installed and passed the package tests in clean Python 3.10, 3.12 and 3.14 containers (no camera); no manylinux wheel has been run with the camera. On a minimal system OpenCV also needslibGL.so.1(Debian/Ubuntu:sudo apt install libgl1 libglib2.0-0) — see the README, "Linux (experimental)".
DeviceConfig.weevia_s1()finds the camera by name on Linux too: the/dev/videoNcapture node whose name containsWN Dual Camerain/sys/class/video4linux(the one whoseindexis 0). It refuses when two match, as on Windows. On Linuxbackendnow defaults to"v4l2"(it was"dshow", which Linux does not have). The lookup itself isopticmix_vision.devices.find_v4l2_node(). Linux name lookup: implemented, not yet run on the camera.
- Fifteen examples in
examples/besidequickstart.py. Nine were on the repository after 0.0.3.post1 — live preview, saving PNG pairs, recording video, listing controls, writing controls once, the illuminator level, measuring fps, collecting an.npzdataset and a PyTorch data loader. Six are new: listing video devices, capturing on a thread, brightness statistics, reopening after a read error, printing the installed calibration, and playing a recording back — these six have been run without a camera only. Seeexamples/README.mdfor what each one writes to the camera.
- A recording made by
examples/record_video.pycan be read back throughDevice:DeviceConfig.recording(path);read()raisesEndOfRecordingafter the last frame. Run on generated recordings only, not on a recording of the camera.
- Rust crate
opticmix-vision0.0.4 on crates.io (preview): frame capture, stereo split and camera controls from Rust. Run on Windows 11 on one camera; not run on Linux — seerust/opticmix-vision/README.md.
API.md: a reference for every public name of the package; a test keeps its signatures equal to the code.
- README: answers to common problems, by the message you see (the compiled extension is missing, the camera does not open, a read fails, exposure while auto exposure is on, calibration messages,
libGL.so.1, two cameras connected, which USB port, pip finds no version or tries to build), GitHub Discussions under "Getting help", and the release cadence — we aim to release about once a month.
Changed
- Error messages, printed output and command-line help are in English.
- Docstrings of the public modules (
device,devices,controls,led,synthetic, the package itself, the viewer and the explorer) are in English.
Fixed
- The test suite skips the explorer tests when Python has
tkinterbut the Tk library is missing (a slim Linux container); with pytest 9.2 it stopped with a collection error.
0.0.3.post1
2026-11-23GitHub release v0.0.3.post1
First release on PyPI: pip install opticmix-vision. The code is the same as 0.0.3; only the package description changed — install from PyPI, where to get help, and how to open the camera on Linux. PyPI has the Windows x64 wheel and the source; Linux installs from source.
0.0.3
2026-11-22GitHub release v0.0.3
Camera controls and device listing now run in a compiled extension (opticmix_vision._core, written in Rust; its source is in rust/). The extension ships inside the wheel, so the release file is a Windows x64 wheel (cp310-abi3, Python 3.10 and newer) rather than a pure-Python one — with an experimental Linux x86_64 wheel beside it — and installing from the repository instead of the wheel needs a Rust toolchain. Everything exported by 0.0.2 is still there with the same names and arguments.
Upgrading from 0.0.2
Install the 0.0.3 wheel over 0.0.2 — pip install --upgrade opticmix_vision-0.0.3-cp310-abi3-win_amd64.whl — with no uninstall first. Every name 0.0.2 exported from the package is still there with the same arguments; 0.0.3 only adds optional ones. set_prop() and get_prop() behave differently in the cases listed under Changed below, and the viewer dropped options that did nothing in the package (Removed). Installing from the repository instead of the wheel: the package is now in python/, so add #subdirectory=python to the URL, and the build needs a Rust toolchain, 1.88 or newer (the package has been built and tested with 1.88 and 1.99), and on Windows the Microsoft C++ Build Tools, which Rust's default MSVC toolchain links with. New in the distribution: THIRD_PARTY_NOTICES.txt, the licenses of the Rust crates compiled into the extension.
Added
DeviceConfig.weevia_s1()finds the camera by name and applies the settings measured on it (side by side, first half is the right eye, 1600×800 MJPG at 90 fps). An index is no longer needed for the Weevia S1. Measured with the earlier Python implementation; the Rust implementation in 0.0.3 has not yet been verified against the camera.
opticmix_vision.deviceslists the cameras Windows reports and, when ffmpeg is on PATH, the modes the camera reports (without it the list is empty), and selects a camera by name. Measured with the earlier Python implementation; the Rust implementation in 0.0.3 has not yet been verified against the camera.
cam.controls(opticmix_vision.controls) covers every control the camera advertises: current value, range and default read from the device, and writes that go through one guard (equal values skipped, writes spaced at least 12 ms apart) and are read back afterwards (WriteResult.kept). Measured with the earlier Python implementation; the Rust implementation in 0.0.3 has not yet been verified against the camera.
python -m opticmix_vision.exploreropens the camera in a window with a mode list and a settings panel;--syntheticruns it with no camera. Measured with the earlier Python implementation; the Rust implementation in 0.0.3 has not yet been verified against the camera.
THIRD_PARTY_NOTICES.txt: name, version, license and license text of each Rust crate linked into the extension. It is in the wheel (.dist-info/licenses/), the source archive andpython/.
- An experimental Linux x86_64 wheel (
cp310-abi3-linux_x86_64), not a supported platform. Run on one Ubuntu 26.04 machine with one camera (capture only,backend="v4l2"and a device index); camera controls on Linux have not been verified and are not supported. See the README, "Linux (experimental)".
read()raisesDeviceErrornaming the eye when one eye has sent the byte-identical image 90 frames in a row (DeviceConfig.stall_frames, 0 turns the check off).
Changed
- The repository holds the Python package in
python/and the Rust core inrust/. On 0.0.2 the package sat at the top of the repository.
Device.set_prop(),get_prop()andextra_propsgo through the same write guard ascam.controls.
set_prop()raisesDeviceErrorfor a property that is not a camera control (focus, zoom, frame size and so on). On 0.0.2 such a write was handed to the driver. Resolution, frame rate and pixel format are set throughDeviceConfig.
- Integer controls take whole numbers:
set_prop("CAP_PROP_GAIN", 28.5)raises ValueError; 0.0.2 handed it to the driver.
get_prop("CAP_PROP_AUTO_EXPOSURE")reports the auto-exposure mode when the native Windows control path is in use (0.75 auto, 0.25 manual). 0.0.2 returned -1, which is what OpenCV reports. Measured with the earlier Python implementation; the Rust implementation in 0.0.3 has not yet been verified against the camera.
python -m opticmix_vision.viewerwith no camera arguments opens the Weevia S1 by name. Its keys write once you stop pressing, not on every key repeat. Measured with the earlier Python implementation; the Rust implementation in 0.0.3 has not yet been verified against the camera.
- With
backend="v4l2", or"any"when OpenCV opens the camera through V4L2, the pixel format is set before the frame rate. Other backends keep the pixel format last.
- The README states the left/right order measured on the camera (
first_is_right) and the control behaviour measured on it.
Fixed
examples/quickstart.pystopped at its imports on 0.0.2, because it asked for calibration functions that are not in the package. It now opens the camera, or prints the frame rate with--no-window.
Removed
- The
handsoptional dependency. It installed an inference runtime for a feature that is not in the package.
- The viewer's
--calib,--num-disparitiesand--block-sizeoptions, thecalibanddepth_paramsarguments ofrun_viewer(), therectify,depthandhas_calibfields ofViewerState, and thedepth_valid_fractionentry of whatrun_viewer()returns. They did nothing in the package: the modules they need are not in it.
- The
v4l2andavfoundationchoices of--backendin the viewer and inexamples/quickstart.py. The viewer and the example have not been run on Linux or macOS.
0.0.2
2026-09-13GitHub release v0.0.2
- The package contains only the modules that have been run against the camera:
device,led,synthetic,viewer. Calibration, rectification, depth, ROScamera_infoand hand tracking are left out until they have been validated.
