コード例 #1
0
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)

device.start_data_stream()
# setting bias after data stream started
device.set_bias_from_json("./configs/davis346_config.json")

clip_value = 3
histrange = [(0, v) for v in (260, 346)]


def get_event(device):
    data = device.get_event()

    return data


num_packet_before_disable = 1000

while True:
    try:
コード例 #2
0
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")

clip_value = 3
histrange = [(0, v) for v in (180, 240)]

size = (240, 180)
#  num_packet_before_disable = 1000
img_array = []
img2 = np.zeros((180, 240, 3))


def get_event_hist(device):
    data = device.get_event("events_hist")

    return data
コード例 #3
0
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)
    
            while True:
                try:
コード例 #4
0
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("./scripts/configs/davis240c_config.json")

clip_value = 3
histrange = [(0, v) for v in (180, 240)]


def get_event(device):
    data = device.get_event("events_hist")

    return data


#  num_packet_before_disable = 1000

while True:
    try: