diff --git a/BaslerChangeParameter.py b/BaslerChangeParameter.py index b42cb7753b5f1f4eae6abb6ac4411d97b13f5a88..dd27b74904340324144975ceccd9235b1321e979 100644 --- a/BaslerChangeParameter.py +++ b/BaslerChangeParameter.py @@ -25,7 +25,7 @@ if len(devices) == 0: # Create an array of instant cameras for the found devices and avoid exceeding a maximum number of devices. -> Output-> Pylon::CInstantCameraArray CAMERAS_ARRAY = pylon.InstantCameraArray(min(len(devices), MAX_CAMERAS_TO_USE)) -print(f'cameras: {CAMERAS_ARRAY}') +# print(f'cameras: {CAMERAS_ARRAY}') # for debug l = CAMERAS_ARRAY.GetSize() @@ -47,17 +47,13 @@ def listcams(): for i, camera_instantz in enumerate(CAMERAS_ARRAY): # cam is an instance Swig object of type Pylon::CInstantCamera on cluster on HD camera_instantz.Attach(tlFactory.CreateDevice(devices[i])) - print(f'camInstatnt: {type(camera_instantz)}') - - # - # list all the connected cameras at the system: - # + print(f'camera_instantz: {type(camera_instantz)}') # Print the serial number of the model of the camera. - by replacing .GetSerialNumber() with .GetModelName() outputs the Modelname cam_ids = camera_instantz.GetDeviceInfo().GetSerialNumber() print("Using device ", cam_ids) - return cam_ids + return cam_ids, camera_instantz # Open cameras: @@ -243,6 +239,8 @@ def freeruncam(): # ---> ongoing, not yet in usage. +CAM_ID, CAM_INSTANT = listcams() + if __name__ == '__main__': CAM_ID, CAM_INSTANT = listcams() - readcams() + # readcams()