摘要 |
A method for interacting with virtual objects in a three-dimensional space by gestures, the method comprising: generating virtual objects in a processing unit (110) provided with a processor (111) and a memory (112); displaying the virtual objects on a display unit (120) connected to the processing unit, processing the image of the virtual objects in response to user's hand gestures and a user's head position received by a camera (130) for measuring depth and comprising an accelerometer (131) and connected to the processing unit (110) and directed to a scene in a real world, the scene comprising the head and hands of the user sitting at a desktop. The following steps are performed in the processing unit (110): receiving, from the camera (130), a signal representing a series of depth maps in a form of bitmaps for an empty area, calculating an averaged depth map (ADM) and storing the averaged depth map (ADM) in the memory (112); determining a location of an edge of the desktop (195) in the averaged depth map (ADM); transforming the depth coordinates from a camera view to a coordinate system having a center in the previously determined average point of the edge of the desktop (195); receiving a signal representing a current depth map (CDM) in a form of a bitmap; calculating a differential depth map (DDM) representing differences between the current depth map (CDM) and the averaged depth map (ADM); determining, in the differential depth map (DDM), a position of the user's head (191); determining, in the differential depth map (DDM) a position of at least one user's hand (192); and displaying on the display unit (120) a virtual object in a position determined by the current location of the user's head (191) and manipulating the virtual object in response to the gestures made by the user's hand (192). |