TOFcam Modules Examples
You can use the TOFcam modules to run your own scripts. Here are some examples for how you could start.
TOFcam660
1import matplotlib.pyplot as plt
2from epc.tofCam660 import TOFcam660
3
4# setup the camera
5cam = TOFcam660()
6cam.initialize()
7
8# print chip information
9chipId, waferId = cam.device.get_chip_infos()
10print(f'Chip ID: {chipId}')
11print(f'Wafer ID: {waferId}')
12
13# change some settings
14cam.settings.set_modulation(frequency_mhz=12)
15
16# get distance image
17distance = cam.get_distance_image()
18
19# add your own code here to process the distance image
20...
21
22plt.imshow(distance, cmap='turbo', vmin=0, vmax=30000)
23plt.colorbar()
24plt.show()
TOFcam635
1import matplotlib.pyplot as plt
2from epc.tofCam635 import TOFcam635
3
4# setup the camera
5cam = TOFcam635()
6cam.initialize()
7
8# print chip information
9chipID, waferID = cam.device.get_chip_infos()
10print(f'Chip ID: {chipID}')
11print(f'Wafer ID: {waferID}')
12
13# change some settings
14cam.settings.set_integration_time(125)
15
16# get distance image
17distance = cam.get_distance_image()
18
19# add your own code here to process the distance image
20...
21
22# plot the distance image
23plt.imshow(distance, cmap='turbo', vmin=0, vmax=5000)
24plt.axis('off')
25plt.title('TOFcam635 - Distance Image')
26plt.colorbar()
27plt.show()
TOFcam611
1import matplotlib.pyplot as plt
2from epc.tofCam611 import TOFcam611
3import time
4
5# setup the camera
6cam = TOFcam611()
7cam.initialize()
8
9# change some settings
10cam.settings.set_integration_time(50)
11
12# get distance image
13distance = cam.get_distance_image()
14
15# add your own code here to process the distance image
16...
17
18# plot the distance image
19plt.imshow(distance, cmap='turbo', vmin=0, vmax=5000)
20plt.axis('off')
21plt.title('TOFcam611 - Distance Image')
22plt.colorbar()
23plt.show()
Hawkeye
1import matplotlib.pyplot as plt
2from epc.hawkeyeBt.hawkeyeBt import HawkeyeBt
3import numpy as np
4
5# adapt this address to your devices MAC address
6MAC_ADDRESS = "10:51:DB:28:28:9C"
7
8# setup the camera
9with HawkeyeBt(mac_address=MAC_ADDRESS) as hawkeye:
10 hawkeye.bt_cam.connect()
11 hawkeye.initialize()
12
13 # print chip information
14 chipId, waferId = hawkeye.device.get_chip_infos()
15 print(f'Chip ID: {chipId}')
16 print(f'Wafer ID: {waferId}')
17
18 # change some settings
19 hawkeye.settings.set_integration_time(int_time_us=200)
20 hawkeye.settings.set_modulation(frequency_mhz=10)
21
22 # get distance image
23 image = hawkeye.get_distance_image()
24
25 # add your own code here to process the distance image
26 ...
27
28 plt.imshow(image, cmap='turbo')
29 plt.colorbar()
30 plt.show()