hl2ss icon indicating copy to clipboard operation
hl2ss copied to clipboard

Disable Auto Focus

Open nirajkark07 opened this issue 1 year ago • 1 comments

Hello,

Is there a way to disable the autofocus in the client_stream_pv.py demo? I am looking to calibrate the HL2 camera with an external camera. Therefore, I require constant intrinsic parameters.

Thank you!

nirajkark07 avatar Aug 11 '24 18:08 nirajkark07

Hello, After start_subsystem_pv, add

client_rc = hl2ss_lnm.ipc_rc(host, hl2ss.IPCPort.REMOTE_CONFIGURATION)
client_rc.open()
client_rc.wait_for_pv_subsystem(True)
client_rc.set_pv_focus(hl2ss.PV_FocusMode.Manual, hl2ss.PV_AutoFocusRange.Normal, hl2ss.PV_ManualFocusDistance.Infinity, focus_value, hl2ss.PV_DriverFallback.Disable)
client_rc.close()

focus_value must be in the range [170,10000], 2000 is usually good.

jdibenes avatar Aug 12 '24 21:08 jdibenes

Awesome! Closing this thread now. Thanks. :)

nirajkark07 avatar Aug 17 '24 18:08 nirajkark07