kwanho.dev
CV Reduced motion

A setting is not a readback

Sending a value to a device is only part of changing it.

On this page

A user enters a value in a camera settings panel and presses Apply. The call returns without an error. What should the panel show?

Keeping the number the user typed is tempting. But the device may have rounded it, clamped it to a limit or rejected it in its current mode. A successful call and an unchanged input field do not, by themselves, tell the user which value is now in use.

The example here is generic. The numbers are illustrative and do not describe a particular camera or equipment configuration.

Keep the request and the readback separate

Suppose a user requests a gain of 1.237. A device with coarser steps might report 1.24 after the write.

That difference is useful information. The interface can show the accepted value and explain the adjustment. If it continues to display 1.237, a later comparison with the camera can look like a fault even when the device behaved as specified.

The software should keep the requested value long enough to compare it with the readback. Updating a cached field before the device responds makes that comparison harder.

Check the device's mode

Some settings depend on other settings. A manual value may be unavailable while automatic adjustment is enabled. A parameter may only be writable when acquisition has stopped.

The relevant question is which operations the device allows in its current state. The interface should explain a known restriction before the user tries to apply an impossible change. The device response still needs checking: state can change between reading a capability and sending a command.

Treat a failed read as a separate outcome

Writing can succeed while the following read fails. Calling the entire operation a success hides the uncertainty. Calling it a failed write can be misleading too: the device may already have changed.

A useful message is specific: “The setting was sent, but its current value could not be read.” Keep the last confirmed value distinct from a newly requested one. If the application offers a retry, make clear whether it repeats the read or the write.

This distinction matters beyond cameras. Motor controllers, network devices and laboratory instruments can all have a gap between a command being sent and a state being confirmed.

Know what the readback proves

A matching readback confirms something about the device's reported configuration. It does not establish that an image is correct, that a value will survive a restart, or that every supported device behaves identically.

Those questions need their own checks. Inspect an acquired frame for image behaviour. Restart and read again for persistence. Exercise another supported backend for compatibility. A simulator can help test how the application handles a response; it does not replace a check on the device.

Public reference

The GenICam standard provides background on camera feature access and control. A particular device's documentation remains the source for its supported ranges, access modes and acquisition restrictions.