OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

FrameFocus

pub struct FrameFocus

Where the lens was when a frame was taken, as the frame itself says.

Read with Frame::focus. It is the frame's own reading, not one the SDK sampled beside the stream: a program that scores frames while the lens moves (an autofocus search) can place each frame on the travel exactly, however late the frame reached it.

Only some cameras put it in their frames. An Xi 640 ETH on USB does, from firmware revision 4200 on. Over Ethernet it does not, and the SDK does not stand a sampled position in for it, because on that camera every focus read can pause the stream. Every other model reports none. A replayed frame carries the position it was recorded with, and a repeated frame where the lens was when the repeat was delivered.

FrameFocus — fields

fraction: f32

Where the lens was, as a fraction of its travel: 0.0 at the near end of focus_range(), 1.0 at the far end. What focus() on the camera would have answered for this frame.

position: u16

The same position in the motor's own step units, the scale of focus_position(), so it can be sent back to the lens unchanged.