I would like to display on the computer screen the infra-red camera using an XBox Kinect 360. This code below will open a new frame but the display is just a back frame and not the IR video feed. How can I get the frame to display the IR image?
#!/usr/bin/python
import freenect
import cv2
def get_video():
array,_ = freenect.sync_get_video(0,freenect.VIDEO_IR_10BIT)
return array
if __name__ == "__main__":
while 1:
#get a frame from RGB camera
frame = get_video()
#display IR image
cv2.imshow('IR image',frame)
# quit program when 'esc' key is pressed
k = cv2.waitKey(5) & 0xFF
if k == 27:
break
cv2.destroyAllWindows()
Thanks for the clues Robert Prevost! This code returns a frame showing the IR image.