from harvesters.core import Harvester h = Harvester() h.add_cti_file('C:/Program Files/JAI/SDK/bin/JaiUSB3vTL.cti') h.update_device_info_list() print("NumberOfCamera = {0}".format(len(h.device_info_list))) print(h.device_info_list[0]) ia = h.create_image_acquirer(0) ia.device.node_map.PixelFormat.value = 'BayerRG8' ia.device.node_map.TestPattern = 'HorizontalColorBar' ia.start_image_acquisition() i=0 while i<1: with ia.fetch_buffer() as buffer: component = buffer.payload.components[0] print ("Data_format = {0}".format(component.data_format)) print ("Image_height = {0}".format(component.height)) print ("Image_width = {0}".format(component.width)) print ("Components_per_pixel = {0}".format(component.num_components_per_pixel)) print ("Class type = {0}".format(type(component.data))) print ("Image = {0}".format(component.data[0:4])) # Colorbar White print ("Image = {0}".format(component.data[484:488])) # ColorBar Cyan i = i + 1 ia.stop_image_acquisition() ia.destroy() h.reset()