"""DAVIS346 test example. Author: Yuhuang Hu Email : [email protected] """ from __future__ import print_function import cv2 import numpy as np from pyaer import libcaer from pyaer.davis import DAVIS device = DAVIS(noise_filter=True) print("Device ID:", device.device_id) if device.device_is_master: print("Device is master.") else: print("Device is slave.") print("Device Serial Number:", device.device_serial_number) print("Device String:", device.device_string) print("Device USB bus Number:", device.device_usb_bus_number) print("Device USB device address:", device.device_usb_device_address) print("Device size X:", device.dvs_size_X) print("Device size Y:", device.dvs_size_Y) print("Logic Version:", device.logic_version) print("Background Activity Filter:", device.dvs_has_background_activity_filter) print("Color Filter", device.aps_color_filter, type(device.aps_color_filter)) print(device.aps_color_filter == 1)
from pyaer.davis import DAVIS Positive_events = [] Positive_centres_of_masses = [] Negative_events = [] Negative_centres_of_masses = [] amount_of_events = 0 Collection_Period_1 = False Positive_n_events = 0 Negative_n_events = 0 x_total = 0 y_total = 0 device = DAVIS(noise_filter=True) device.start_data_stream() # set new bias after data streaming device.set_bias_from_json("/home/maik/Documents/Python_3/configs/davis240c_config.json") # num_packet_before_disable = 1000 with open('Position_and_Speed_31_01_2020.csv', 'w', newline='') as csvfile: writer = csv.writer(csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL) #Open Event Data Real Time Discarded CSV file with open('Events_31_01_2020.csv', 'w', newline='') as csvfile: writerevents = csv.writer(csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL) #Open Event Data Real Time Discarded CSV file with open('Noise_Events_31_01_2020.csv', 'w', newline='') as csvfile: writernoise = csv.writer(csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL)
"""DAVIS240 test example. Author: Yuhuang Hu Email : [email protected] """ from __future__ import print_function import numpy as np import cv2 from pyaer import libcaer from pyaer.davis import DAVIS device = DAVIS(noise_filter=True) print("Device ID:", device.device_id) if device.device_is_master: print("Device is master.") else: print("Device is slave.") print("Device Serial Number:", device.device_serial_number) print("Device String:", device.device_string) print("Device USB bus Number:", device.device_usb_bus_number) print("Device USB device address:", device.device_usb_device_address) print("Device size X:", device.dvs_size_X) print("Device size Y:", device.dvs_size_Y) print("Logic Version:", device.logic_version) print("Background Activity Filter:", device.dvs_has_background_activity_filter) device.start_data_stream() # set new bias after data streaming device.set_bias_from_json("davis240c_config.json")
) parser.add_argument("--skipevents", default=0, type=int) parser.add_argument("--suboffset", default=0, type=int) parser.add_argument( "--compute_voxel_grid_on_cpu", dest="compute_voxel_grid_on_cpu", action="store_true", ) parser.set_defaults(compute_voxel_grid_on_cpu=False) set_inference_options(parser) args = parser.parse_args() # Setting up DAVIS dvs_device = DAVIS(noise_filter=True) print("Device ID:", dvs_device.device_id) if dvs_device.device_is_master: print("Device is master.") else: print("Device is slave.") print("Device Serial Number:", dvs_device.device_serial_number) print("Device String:", dvs_device.device_string) print("Device USB bus Number:", dvs_device.device_usb_bus_number) print("Device USB device address:", dvs_device.device_usb_device_address) print("Device size X:", dvs_device.dvs_size_X) print("Device size Y:", dvs_device.dvs_size_Y) print("Logic Version:", dvs_device.logic_version) print("Background Activity Filter:", dvs_device.dvs_has_background_activity_filter)
"""DAVIS240 test example. Author: Yuhuang Hu Email : [email protected] """ from __future__ import print_function import numpy as np import cv2 from pyaer import libcaer from pyaer.davis import DAVIS device = DAVIS(noise_filter=True) print ("Device ID:", device.device_id) if device.device_is_master: print ("Device is master.") else: print ("Device is slave.") print ("Device Serial Number:", device.device_serial_number) print ("Device String:", device.device_string) print ("Device USB bus Number:", device.device_usb_bus_number) print ("Device USB device address:", device.device_usb_device_address) print ("Device size X:", device.dvs_size_X) print ("Device size Y:", device.dvs_size_Y) print ("Logic Version:", device.logic_version) print ("Background Activity Filter:", device.dvs_has_background_activity_filter)