2 """Sweeps throught the depth image showing 100 range at a time""" 8 cv.NamedWindow(
'Depth')
12 depth, timestamp = freenect.sync_get_depth()
13 depth = 255 * np.logical_and(depth > lower, depth < upper)
14 depth = depth.astype(np.uint8)
15 image = cv.CreateImageHeader((depth.shape[1], depth.shape[0]),
18 cv.SetData(image, depth.tostring(),
19 depth.dtype.itemsize * depth.shape[1])
20 cv.ShowImage(
'Depth', image)
27 while upper < max_upper:
28 print(
'%d < depth < %d' % (lower, upper))
def disp_thresh(lower, upper)