I am using python bindings of openkinect for getting the depth and RGB image. For some reasons , I need the disparity image.
Could someone please help me that how to get that image?
Thanks a lot.
I am using python bindings of openkinect for getting the depth and RGB image. For some reasons , I need the disparity image.
Could someone please help me that how to get that image?
Thanks a lot.
AFAIK you can retrieve different types of image both from the RGB camera (e.g. the IR image) and the depth camera. Don't known exactly which one can be useful for your purposes. These are the constants for the video camera:
('VIDEO_BAYER',
'VIDEO_IR_10BIT',
'VIDEO_IR_10BIT_PACKED',
'VIDEO_IR_8BIT',
'VIDEO_RGB',
'VIDEO_YUV_RAW',
'VIDEO_YUV_RGB')
and these for the depth camera:
('DEPTH_10BIT',
'DEPTH_10BIT_PACKED',
'DEPTH_11BIT',
'DEPTH_11BIT_PACKED')
For example, to retrieve IR image you can do:
freenect.sync_get_video(0, freenect.VIDEO_IR_10BIT)
working with the non-sync api is analogous. Maybe you could give a try to some of the above video types, sorry I can't be more precise but I lack of some theory behind the kinect.