dattalab-6-cam / multicamera_acquisition

Synchronized machine vision acquisition across multiple cameras using an arduino (Supports FLIR and Basler)
MIT License
5 stars 5 forks source link

Need to reset default ROI if none passed #6

Closed jonahpearl closed 1 year ago

jonahpearl commented 1 year ago

Just putting this here as a to-do...

https://github.com/timsainb/multicamera_acquisition/blob/8978314dbe1728905c3827d0ca690878a64a8cb9/multicamera_acquisition/interfaces/__init__.py#L112

If roi is None, then the camera is stuck with whatever it was previously set to, which causes an unintuitive UE (ie movies are cropped even if you don't ask for it).

I think we should instead query the max ROI of the camera is, and have it default to that if roi is None.

jonahpearl commented 1 year ago

(Not sure if the camera saves the setting in its firmware or if its written into some config file somewhere)

timsainb commented 1 year ago

I believe at least for pylon cameras we reset the cameras to default when they are initialized

timsainb commented 1 year ago

See the init function for basler interface

jonahpearl commented 1 year ago

Ok I see that. For whatever reason it isn't working. Assuming it's not a silly python mutable bug or something...there is another version of the invocation:

cam.Open()
cam.UserSetSelector = cam.UserSetDefault.Value
cam.UserSetLoad.Execute()

I'll give that a try.

jonahpearl commented 1 year ago

Ah the issue was with this local branch, it was missing those lines. Do you guys have a stable copy that you're happy with that I can checkout here?