US20130190086A1
2013-07-25
13/815,454
2013-03-04
A method identifies and extracts images of one or more users. The method obtains an array of pixel values that constitutes a scene image and a corresponding array of depth values that constitutes a depth map. The depth map and the image are registered. The method obtains an array containing the 3D positions of the pixel value points in real-world coordinates by coordinate transformation of the depth map and image. The method then clusters the points into groups according to their relative positions so each group contains points in the same region of space and corresponds to a user location. The method defines individual volumes of interest around each user location. The method selects points from the array of 3D positions located in the volumes of interest to obtain segmentation masks for each user. The segmentation masks are then applied to the image to extract images of the users.
Get notified when new applications in this technology area are published.
G06F3/0304 » CPC main
Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements; Input arrangements or combined input and output arrangements for interaction between user and computer; Arrangements for converting the position or the displacement of a member into a coded form Detection arrangements using opto-electronic means
G06F3/03 IPC
Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements; Input arrangements or combined input and output arrangements for interaction between user and computer Arrangements for converting the position or the displacement of a member into a coded form
The invention relates to the field of interactive multimedia applications. More particularly, it relates to a method and a device for identifying, tracking, and extracting images of multiple users, as well as for recognizing the arms, hands and whole-body gestures of multiple users, in order to interact with a computer system.
Nowadays, multimedia and virtual reality applications permit several and different interactions between a computer system and a user, and, as a consequence, require input devices with additional features. Traditionally, common desktop input devices, such as keyboards and mice, or specialized devices like trackballs, touch pads, joysticks and game pads, are firmly established as the classical means of interaction between a person and a computer system. Ideally, in particular applications, computer user interfaces should have on the one hand an intuitive interaction format, and on the other hand a large range of interaction capabilities. All the traditional devices fail to combine the above features. For example, a common computer keyboard has large range of interaction capabilities, but has not an intuitive interaction format. Vice versa, a common computer mouse has an intuitive interaction format, but has not a large range of interaction capabilities. Moreover, all these devices are frequently realized for contexts of single users and contexts wherein the human-computer interaction is reduced.
In some domains, as virtual reality, the traditional input devices suffer from unacceptable drawbacks, for example:
Some existing techniques use video cameras for recording the image of the users in order to provide input to the computer system, and sometimes include the image of the users in a graphical output generated by the computer system. Included among these techniques there are for example: U.S. Pat. No. 4,843,568 (Krueger et al.) which discloses a technique for allowing a real time perception and response to the actions of a single participant/user; U.S. Pat. No. 5,534,917 (MacDougall) which discloses a Video Image Based Control System. However, all these methods require the user to be in a precise location in front of the camera, with no other moving object, and in particular no spectator, in the field of view of said camera. Moreover, in order to distinguish the image of the user, a specially designed background must be additionally placed behind the users for image segmentation.
Segmentation based only on the color image information is a common technique in computer vision for separating foreground from the background. The most naive approach consists in storing an image of the background as a reference image, while a foreground object is segmented by a simple subtraction of this background reference from the current image. This simple technique is often used for post-production incrustation when the background is constant (commonly a uniform green or blue color) in perfectly controlled lighting conditions. Nevertheless, this approach suffers from problems, especially in natural lighting or when the objects to be segmented produce shadows on the floor or the background.
Other systems make use of devices that must be worn by the user (for example, the data glove: Joseph Laviola, āFlex and Pinch: A Case Study Of Whole Hand Input Design For Virtual Environment Interactionā, Proc IASTED, pp. 221-225, 1999), or special markers (like light-emitting diodes) attached to the body of the subject for limb tracking and gesture recognition, or pressure sensitive switches in the floor, to detect position of users. However, the pure scope of these techniques is limited to highly specialized applications and to dedicated users, and is too intrusive and cumbersome for the general public and generic applications. No solution exists so far that allows multiple unencumbered users to move freely, and together interact with a computer system in real-time.
The document U.S. Pat. No. 5,534,917 describes a video image based control system that allows a participant to interact with a computer based environment. This document provides a technique for creating areas of interest in the two-dimensional image wherein a participant interacts. Nevertheless, this apparatus does not permit a multiple user interaction, cannot recognize the gestures of a participant and cannot detect or track any part of the body of said participant. Moreover, it does not separate the image of a participant from the background image or from the image of the audience.
The document U.S. Pat. No. 6,661,918 discloses a method and a system for distinguishing between background and foreground objects in a sequence of video images, as well as for identifying these objects. This document provides a technique in which one creates a depth map and an intensity map (e.g. luminance, gray scale, UV chrominance value, etc. . . . ) by using a pair of digital video cameras. Depth and intensity values of a pixel in successive images are represented in a histogram and clustered for determining a background model. However, this apparatus does not recognize the body pose and users gestures, and does not track parts of the body. Moreover, it does not locate users in a two-dimension nor three-dimension space, and does not distinguish between several users, and between a participant and the audience.
The document U.S. Pat. No. 6,950,123 discloses a method and a system for tracking simultaneously multiple objects in a sequence of video frames by means of multiple cameras. This document provides a technique for extracting a region of interest (ROI) corresponding to a portion of a playing field. This region represents the foreground image which is separated from the background image. By means of different filters and a Monte Carlo technique, the apparatus tracks and segments all the objects and resolves all conflicts to estimate the objects positions. Nevertheless, it cannot recognize the body poses of users or the gestures of the users; and cannot track or detect any part of the body. Although the apparatus comprises several cameras, they have different fields of view, and it does not compute a depth map. As a consequence, the method assumes that the users move on a flat surface relatively far and below the camera in order to infer the three-dimensional position of the users. Lacking dense depth information, the system is not able to separate the images of different users, or distinguish between the participants and the audience, when they are on the same line of sight from the camera.
The document U.S. Pat. No. 6,181,343 describes a system and method for permitting three-dimensional navigation through a virtual reality by using camera-based gesture inputs of a single user. It processes the apparent distances in two-dimensional images to infer three-dimensional position to the user. Nevertheless, this approach has several drawbacks and limitations as follows: the apparatus relies on a fixed background and hence it cannot be used if there are moving objects or variable lighting behind the user; it cannot be used for several users if they are in the same line of sight from the camera(s). Furthermore, the system relies on biometric data and determination of the silhouettes in order to infer positions from apparent lengths of the limbs measured in the image. That can be very inaccurate as biometric data are only averages, and individual data can vary greatly; it may also not work if users wear loose clothing or carry items. The technique assumes that users' feet are on the floor to determine the three-dimensional location of the users. That will not work if users jump, for example when playing a game; if users' feet are not detected accurately in the image, for example because of shadows on the floor; or for more complex floors, for example not flat, with stairs or several levels, etc. . . . .
The document U.S. Pat. No. 7,003,134 discloses a method for estimating the three-dimensional position and orientation of an object. The apparatus provides a technique for estimating pose of an object by using depth data at real-time rates. However, the document does not disclose any apparatus for identifying, tracking and extracting the image of multiple users, or for separating the participants from the audience, or for recognizing gestures of users.
The document U.S. Pat. No. 7,003,136 discloses a method for estimating the three-dimensional position and orientation of an object. A three-dimensional point cloud is obtained from a time series of video frames and representing selected image pixels in a three-dimensional coordinate system spanned by a ground plane and a vertical axis. The three-dimensional point cloud is portioned into a set of vertically-oriented bins for producing āplan-view imagesā. The objects are tracked based upon said plan-view images. Nevertheless, this document does not disclose any apparatus for identifying, tracking and extracting the image of multiple users, or for separating the participants from the audience. Moreover, no means for recognizing gestures of users are provided.
U.S. Pat. Application No 2002/0041327A1 discloses a method for interfacing a computer system by using stereo vision. The apparatus captures and processes a stereo image for determining position information of an object held by a user. Each time a user moves an object into (or reaches with his hands) a fixed region of interest, the apparatus establishes the object's position by computing a depth map. Nevertheless, the technique, herein described, fails to identify, track and extract the image of multiple users when they do not stay at a pre-determined location. Moreover, it does not tolerate any other moving objects in the region of interest.
The document WO06022685A1 describes a system and method for providing a functional virtual environment with real time extracted and transplanted images. The document mentions a method for extracting a foreground image from a background environment by using non-monochromatic, fixed background against which the users' images can be extracted. Nevertheless, the apparatus does not provide any technique for extracting the user image if there are moving objects or persons behind the user, and in general if there is not a fixed background. Moreover, the apparatus herein described does not recognize gestures, body pose of users and does not detect and track any body part of the participants.
It is an object of the present invention to provide a method and a device for identifying, tracking and extracting images of multiple users as well as recognizing the gestures and the objects of multi users in the scene of a groupware interactive environment, which aims to overcome the above discussed disadvantages of the prior art.
According to a first aspect of the invention, a method is provided for identifying and extracting images of one or more users in an interactive environment. The method comprises the steps of:
In a preferred embodiment of the method, the individual volumes of interest may be obtained by determining individual volumes of interest bounds separating said groups. These volumes of interest may vary according to user movements, and thereby be adaptative.
One may use said segmentation masks of said users for modifying existing elements or inserting virtual elements in said scene, and projecting an image showing these elements, and providing thereby a āmagic mirrorā.
The method may comprise a registration process comprising the steps of:
The method may also comprise a depth map refinement process. This process is desired when the depth map comprises gaps, where no depth value is available. This process may comprise the steps of:
The method may additionally comprise a mask filling process comprising one or more of the following steps:
The method may comprise an optional background segmentation process for separating foreground objects from background objects. The background segmentation process may comprise the steps of:
(xāμ)2<β*var
When using background segmentation the method of the invention may detect and treat the shadows on the background of an image. This process may comprise the steps of:
(xāμā²)2<β*var
The method may also comprise a multiple step erosion process for improving a filled mask. This process may comprise the steps of:
Said multiple step erosion may comprises the step of performing the logical operation:
mask(t)=maskāe(t)OR((NOT maskāe(t))AND mask(tā1)AND edge).
Alternatively, said multiple step erosion may comprises the steps of:
Eb=maskāe(t)OR((NOT maskāe(t))AND mask(tā1))
Nb=maskāe(t)OR((NOT maskāe(t))AND mask(tā1)AND edge);
The method preferably comprises a process for recognizing a gesture of one of said users. Said process may comprise the following steps:
In the process of gesture recognition, the computation of a curvilinear distance D(v) may be performed by using a modified Dijkstra's algorithm wherein the computation of a best weight W(n) for a node n is performed by adding the weight w(n,nā1) of the edge linking nodes n and nā1, raised to a power p, to the weight W(nā1) of a preceding node nā1, p being an integer larger than 1.
According to a second aspect of the invention, a device is provided for identifying and extracting images of multiple users in an interactive environment scene comprising:
In a preferred embodiment, the device comprises means for obtaining adaptive volumes of interest for each user. By āadaptativeā one must understand that said volumes of interest are determined dynamically, and follow the movements of the users.
The device preferably comprises:
All these means are components of a software residing in said computer.
According to a third aspect, the invention covers the use of a method according to the invention and/or a device according to the invention for providing an interactive virtual reality game wherein images of a plurality of users are separated from each other and from a background.
Preferably, gestures and/or body poses of individual users are recognized and used for controlling said game.
Images or partial images of the users may be shown in a virtual-game world
One can determine the location of a user and use said location for directing one or more light beams.
Users may be directed to catch or to escape one of said light beams.
Users may also be directed to point at each other or to give each other virtual objects or to point at each other to establish links between them in the game.
An avatar in a virtual reality may replicate a gesture or a visual characteristic of a user such as clothes colors, hair color, skin color.
Real-world elements may react to user locations and gestures by floor shifts, animatronics figures move and talk, etc.
The device and method of the invention may be used for performing or for buying/selling items in a virtual marketplace . . . .
According to a last aspect of the invention, one or more computer-readable media having stored thereon a computer program for performing the method and/or for using the device of the invention.
FIG. 1 is a pictorial representation of a device according to the invention.
FIG. 1a is a general flowchart diagram of a method according to the invention.
FIGS. 2, 3, 4, 5, 5b, 6a, 7, 8 and 9 are detailed flowchart diagrams of parts of a method according to the invention.
FIG. 5a is a pictorial representation of individual volume of interest bounds, separating multiple users.
FIG. 6 is a schematic representation illustrating the processing and flow of different data and masks.
FIG. 9a is a schematic data representation used in body pose recognition.
FIGS. 10 and 11 are pictorial representations of two embodiments of devices according to the invention.
According to a preferred embodiment, FIG. 1 shows a pictorial representation of a device according to the invention. The apparatus 1 comprises a computer system 2; a depth perception device 3 connected to the computer system 2; a video camera 4 (or stereoscopic or tri-focal cameras that serve both purposes) also connected to said computer system 2; a computer-controlled display 5 such as projection, flat screen or other; a variety of computer-connected output devices 5ā², such as light projection systems, loudspeakers, displays etc. . . . , for providing rich audio-visual feedback in order to react to the location and the movements and gestures of all the users 6, 6ā² in a scene. The depth perception device 3 may be, for example, a stereoscopic camera (see e.g. D. Scharstein and R. Szeliski.: āA Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithmsā IJCV 47(1/2/3):7-42, April-June 2002., for a survey of stereo vision technology); or a laser or infrared range sensor (see http://www.swissranger.ch/: for an example of a commercial product, and the paper: J W Weingarten, G Gruener, R Siegwart, A state-of-the-art 3D sensor for robot navigation, Proceedings Intelligent Robots and Systems, 2004); or other. Optionally, the video camera 4 may be a stereoscopic camera or a tri-focal camera, and in this case it can replace the depth perception device 3 and function as both. A global region of interest can be defined for automatically distinguishing the participants 6 from the spectators 6ā² and from other objects 6ā³, even if they are all in the field of view of the cameras 4, without using any physical opaque separator. The present invention can also comprise loudspeakers and other computer-controlled devices and sensors (spotlights and gobos, smoke screens, buttons, joysticks, game controllers, wheels, musical instruments, etc.).
It should be noted that not all types of devices may be part of each given setup. For example, in a variant of this preferred embodiment the physical setup may comprise a stereoscopic camera and a display, or, alternatively, in another variant of the said embodiment it may comprise a depth perception sensor and a computer-controlled gobo. The physical setups, according to the invention, can also be located indoors or outdoors. Alternatively, the area covered by the cameras and sensors (the scene) can be empty (except for the active users of the system), or occupied by furniture, props, natural elements or other unrelated objects.
The depth perception device 3 and the video camera 4 provide the computer system 2 with raw data about the content of the scene. In particular, the depth perception device 3 provides a map of distances (depth map) in the form of a depth array 7; and the video camera 4 provides a color pixel array 8. All these data are processed and used to choose and/or drive the output of the computer-controlled devices 5ā².
It should be noted that the depth information is used for several, independent, non-exclusive, purposes as follows:
FIG. 1a shows a flowchart of a preferred embodiment according to the invention. The depth perception device 3 and the video camera 4, which are previously synchronized, provide the computer system 2 with a raw depth array 3ā² and with a raw color pixel array 4ā², respectively. Typically, those arrays are not corresponding in size and array elements depending on the relative position of devices and so on. Therefore, with a registration process, which uses some devices parameters, the system transforms said two acquired raw arrays 3ā² and 4ā² into a registered depth array 7 and color-pixel array 8 i.e. arrays having same sizes (number or rows and columns), and where corresponding pixels relate to a given scene element. Due to depth perception device technical limitations, it frequently happens that missing parts or errors appear in the depth map. These missing parts or errors are repaired by using a depth array refinement process. Afterwards, by applying a coordinate transform to the two arrays, the system computes a 3D positions and color points array 15 (a array wherein corresponding elements contain the 3D coordinates X, Y, Z associated with a color or other pixel value). Once said 3D position and color points array 15 is established, it is used for performing a user separation process which provides users positions 19 and individual volume of interest 20 for each participant 6. By using an individual mask computation process and a mask filling process, the system establishes, from the individual volumes of interest 20 and from the 3D position and color points array 15, a filled mask 21 for each user. The latter, due to the filling process, may be wider than the actual image of the user. In order to adjust the dimensions of this filled mask 21, an erosion process, in combination with a background-based segmentation process 32, is then performed. Finally, by means of the logical operator AND, the system provides a final individual mask 35 for each user 6 in the scene. The final individual mask 35, the individual volume of interest 20 and the 3D position and color points array 15 are taken as input for the body pose and body parts recognition and tracking process, as well as for the gesture recognition process.
We refer now to FIG. 2. The depth perception devices 3 provide a raw depth values array 3ā² corresponding to different lines of sight originating at said depth perception device 3; and the video camera 4 provides an image acquisition in the form of a raw color pixel array 4ā². If, optionally, the depth perception device 3 is a stereoscopic or a tri-ocular video camera, then the depth map corresponds to the pixels of the image provided by one of the image sensors. Therefore, in that case, the apparatus knows the depth values of each object corresponding to each pixel of the image. A synchronization process is performed by controlling the different devices with a common external trigger in such a way that all data are captured by all devices at the same moment. As above introduced, registration establishes a correspondence between the raw color pixel array 4ā² provided by the camera 4, and the raw depth array 3ā² provided by the depth perception device 3. More precisely registration establishes a correspondence between the elements of each array. The registration action can be executed by a two-step process as follows:
It is a well known problem in the prior art that the depth map provided by depth perception devices may contain errors or missing parts. In fact, by using a stereoscopic camera, it frequently happens that no depth data are computed for low-detail areas of the image. Referring now to FIG. 3, the above-discussed problem of gaps in the depth map is addressed as follows. Once the color pixel array 8 and the depth array 7 are provided, said depth array 7 is scanned row by row and afterwards column by column by executing a row interpolation 9 and a column interpolation 10, and optionally a second row interpolation 11. On each row, all the gaps contained in the depth array 7 are identified. If a gap is shorter than a preset threshold, and if the depth difference between the two sides of the gap is smaller than a preset threshold, the color of the corresponding pixels in the color array 8 is examined. More particularly, in this case the process examines the color of the two pixels on each side of the gap and the color of the pixels inside this gap. If those are almost constant (within some preset tolerance) then the gap in the depth array 7 is filled with depth values. This depth value may be: the (almost) constant one on each side of the gap; their average; or values which are linearly interpolated from the values on both side of the gap. After the process has been completed on all rows, it is done on the columns of the depth array 7; hence values that were initially missing and have been filled in during the horizontal scan, can in turn frame gaps in the vertical direction. The procedure can be carried out in the other order: columns first, then rows; or a third step in the same direction as the initial pass can also be added. At this point it should be noted that, in all cases wherein the depth map refinement process is required and performed, for the clarity of the description we will refer, hereinafter, to the depth array 7 as the interpolated depth array 12 provided at the end of this process.
We refer now to FIG. 4. The calibration parameters 13, obtained by the calibration step, are used to compute the coordinate transformations which have to be applied to any new pixel color array 8 and new depth array 7, that are captured by the video camera 4 and the depth perception device 3. This transformation is required to obtain coordinates (X, Y, Z) in a more convenient three-dimensional real-world coordinate system 14, wherein, typically, the Y-axis is the vertical axis and the X- or Z-axis is parallel to a display or a wall of the room. Such a coordinate transformation (R, T) is applied as follows:
Zā²=z
Xā²=(xācx)/fx
Yā²=(yācy)/fy
where x, y denote the coordinates of the pixel in the color array 8 and the depth array 7; z is the depth value at coordinates x, y; cx and cy are the coordinates of the optical center of the color array 8; fx and fy are the focal lengths of the color array 8 (fx=fy for square pixels); and
[X Y Z]=R[Xā² ā²Yā² Zā²]+T;
where R is the rotation matrix between the video camera 4 and the world coordinate systems and T is the translation between both origins. This coordinate transformation (R, T) is determined by using a calibration object such a planar or non-planar target facing a check board to the camera; or by using the depth perception of the camera in order to compute the mathematical representation of a plan of the scene (usually the floor but it could be a wall of the room) relatively with the camera position and orientation. Finally, the three-dimensional world coordinate system 14 provides a 3D positions and color points array 15. As a consequence, any reference to a pixel (real world coordinate) in the remainder of this document should be understood as the association of an image element of the color pixel array 8 with its position expressed in world coordinates.
FIG. 5 and FIG. 5a show in detail the users separation method according to a preferred embodiment of the present invention. Once the 3D position and color points array 15 is computed, the process for separating users 6 in the scene is performed as follows: active volume bounds 16 are predetermined at the time of the setup. They are virtual 3D frontiers with arbitrary shape that are defined either in order to bound some global regions of interest, outside of which no interaction is possible; or in order to reject some parts of the detected objects, such as walls or furniture. They define the space where users are expected to be interacting with the systems. In the embodiment of FIG. 1 the active volume bounds may conveniently be defined as the cuboid delimited by the vertical and horizontal posts delimiting the scene. Therefore, people outside that space are treated as non-participating spectators and are not detected by the system. Once the active volume bounds are enforced, by means of a Global ROI Filtering 17, a clustering process 18 is performed for establishing each user location 19 in the scene. This is done as follows: the basic principle of this process is the grouping, in a three-dimensional space, of the points contained in the 3D position and color points array 15. The points are grouped (clustered) according to their relative positions, so that each group contains points that are in the same region of space. There are several well-known iterative algorithms capable of achieving this task. For example, the k-means algorithm (J A Hartigan, M A Wong: āA K-Means Clustering AlgorithmāāApplied Statistics, 1979); or the Expectation-Maximization algorithm (A Dempster, N Laird and D Rubin: āMaximum likelihood from incomplete data via the EM algorithmāāJournal of the Royal Statistical Society, Series B, 39(1):1-38, 197); and many other clustering techniques (AK Jain, RC Dubes: āAlgorithms for clustering dataāā1988āPrentice-Hall, Inc. Upper Saddle River, N.J., USA). Each group (cluster) is usually identified by its center 19 and represents the location of one object or person in the scene. The clustering process 18 further establishes individual volumes of interest 20 corresponding to each user location 19. This can be done as follows: once each group of points has been identified by its center 19, the process establishes median planes with respect to segments linking said centers. These median planes divide up the entire global ROI volume, determining individual volumes of interest 20, separated by individual volumes of interest bounds 16ā². By performing this clustering process for successive frames in the acquired data, one can tracks each individual volume of interest 20 as it evolves over time. This can be used for analyzing gestures and behaviors of the corresponding users. An important alternative is when the clustering process 18 uses predefined individual volumes of interest 20 wherein users are supposed to remain. In that case, the number and the shape of the individual volumes of interest 20 are predetermined when the setup is installed.
We refer now to FIG. 5b. Given the boundaries of the individual volume of interest 20 and the three-dimensional real-world 3D positions and color points array 15 (computed previously in section [29]), wherein each user has been identified, the individual mask 21 is computed as follows: into the 3D positions and color points array 15, wherein the X, Y, Z 3D coordinates of each pixel in the 3D space are contained, all points that fall inside each individual volume of interest 20 are selected. In the Individual Mask Computation process, one performs a reverse transformation from X, Y, Z point contained in an individual volume of interest 20 in 3D space to x,y pixel elements in the depth array 7 and color pixel array 8. Therefore, the process provides an individual mask 21 which is an array of the same size as the depth array 7 and the color-pixel array 8. More precisely, it is a binary array with 1's at the location of the pixels whose 3D coordinates are contained in the individual volume of interest 20, and 0's elsewhere. The following equation 100 is an example of equation that may be used for determining an individual mask 21 for each user (assuming for example that the volume of interest is a cuboid):
mask=((X>=Xmin)AND(X<=Xmax)(Y>=Ymin)AND
(Y<=Ymax)(Z>=Zmin)AND(Z<=Zmax)).āā100
We now refer to FIG. 6. When the depth perception device 3 or the registration process provide an image with missing depth values, corresponding to the 3D positions and color points array 15, then the individual mask 21 is an individual mask with missing depth values 22. In that case, the values X, Y and Z of the points corresponding to the missing depth values, are set to a very large conventional value so that the corresponding points are guaranteed to be outside the individual volume of interest 20. The individual mask with missing parts 22 is then processed for obtaining a filled individual mask 23. Consequently, this mask filling process provides a filled individual mask 23 which has some parts with larger than the original image. If the volume of interest is not a cuboid, another appropriate test must be carried out to determine whether each pixel is comprised within the volume of interest or not.
Referring now to FIG. 6a, the accuracy and general quality of the above-discussed mask filling process is additionally improved by the following steps:
Once the mask filling process is ended, as already mentioned, the filled mask 23 has some parts with larger dimension in contrast with the previous individual mask 21. Evidently, said filled mask 23 must be treated for having the same size as the individual mask 21. The mathematical morphology erosion tool is a well-known technique for reducing the size of a binary image mask while preserving its shape, by removing a constant number of pixels along the edge of the mask. However, that technique is not applicable in this case because the border that should be removed does not have a constant thickness: in some parts of the image, for example, the edge of the mask follows closely the actual object boundary, while in other parts it is significantly outside the actual object boundary. A standard erosion technique would either leave too wide a mask in some areas, or cut inside the object in other areas. The present invention uses a multi-step erosion technique that stops at the edge of the object to be segmented. This multi-step technique requires, in particular, the background-based segmentation process, not yet described. In order to facilitate the comprehension of the description, we discuss at first, in the following section, the background-based segmentation and continue, later in section [064], the multi-step erosion technique description.
FIG. 7 shows the background-based segmentation process of an image that can be used in the invention. This process is used for separating foreground objects from background objects by analyzing color pixel arrays 8 captured by the video camera 4. This process aims to build and maintain an adaptive background model 24 by updating regularly its color mean array 25 and its color variance array 26 by means of a motion mask 27. Said motion mask 27 gives, in fact, the portion of the image where the background model 24 can be updated for each frame of the images captured by the video camera 4. The background-based segmentation process is realized as follows:
The motion of objects in the scene is detected by subtracting two successive images followed by a thresholding. Pixels in movement are accumulated in a binary buffer over a pre-determined period of time. During the same period of time, the successive images of the video flow are also accumulated in order to compute the average image and the variance image over this interval. The accumulated binary image establishes whether each pixel has moved during the period of time or not. Used as a mask, the background model 24 can be partially updated by means of the color mean array 25 and the color variance array 26 computed over the same period of time;
In order to detect shadows on the background, an algorithm computes a block-based linear monotone regression for providing a sort of block-based foreground detector 28. This algorithm assumes that a shadowed portion of the background keeps its physical structure while the ranking of intensity of pixels between shadowed block x and a non-shadowed block xā² is preserved (if pixel P is darker than pixel Q in shadowed block x, then pixel P is darker than pixel Q in non-shadowed block xā²). For example, the monotone regression can be a linear regression that follows a linear (xā²=ax+b) law. Other parametric laws that express xā² as a monotone function of x can be used. The statistical information computed by block classifies each block as a foreground or a background one. In the special case where an edge of the foreground is crossing a block, the fraction of background pixels inside the block is removed using the shadow model of background block in its neighborhood;
Given the background model 24 and the color pixel array 8, the segmentation decision is taken using a pixel-based Gaussian thresholding of a pixel x as following:
(xāμ)2<β*var;
where: μ and var are, respectively, the model mean and the model variance, both adapted with the linear regression of the shadow model; and β is the variable threshold. A pixel which fulfils the above condition is considered as belonging to the background, otherwise it belongs to the foreground and consequently, it is segmented from the raw image, providing pixel-based foreground segmentation 29. At the end of the above described steps, a background-based segmentation mask 30 is obtained. It should be noted that in order to improve said process, some well-know morphological operations (dilation, erosion, closing, opening, . . . ), as well as hole filling and noise removing techniques are used as described previously in section [058].
We refer now to FIG. 6 and FIG. 8 wherein the multi-step erosion process is illustrated. Said process is performed as follows:
EB:=backseg AND(NOT erosion(backseg));
maskāe(t)=OnePixelErosion(mask(tā1))
mask(t)=maskāe(t)OR((NOT maskāe(t))AND mask(tā1)AND edge)
final mask=mask AND backseg;
which means that the final mask 35 consists of those pixels that are segmented as foreground objects by both the background-based segmentation mask 30 and the final eroded mask 34.
The following adaptive variation could also be applied during step 3 of the erosion process above-described:
Eb=maskāe(t)OR((NOT maskāe(t))AND mask(tā1))
Nb=maskāe(t)OR((NOT maskāe(t))AND mask(tā1)AND edge)
wherein: Eb is a binary map that shows all the mask pixels that would be set to zero by regular erosion; Nb is a binary map that shows all the mask pixels that would be set to zero by regular erosion, but are located on an image edge, and therefore, will remain at one; and t is the number of the iteration. The maps Eb and Nb are divided in non-overlapping blocks of a preset size. Within each block, and at each iteration, the number of values of Eb and Nb found equal to ā1ā are counted (that can be done efficiently by summing all mask values within the block) to yield the numbers Ī£Ebi (t) and Ī£Nbi (t), respectively. For each block i, those two values and their ratio are compared to the values computed at the previous iterations Ī£Ebi (1) through Ī£Ebi (tā1) and Ī£Nbi (1) through Ī£Nbi (tā1). The Ī£Nbi values usually increase and become closer to the Ī£Ebi values. By monitoring the evolution over the sequences Ī£Nbi (t) and Ī£Ebi (t) within block i, one can detect when the adaptive erosion has reached the edge of the object in the region of the image covered by block i. When that happens, the iteration is stopped for that block. That can be done simply by carrying out steps 2-3 on the entire image as above-discussed in section [061], then by copying the previous values of the mask to the new mask within every block for which iterations have stopped. The value of A (section [062]), D, M, H, E and O (section [058]), are chosen together to obtain a segmentation mask that closely follows the borders of the objects being segmented.
FIG. 9 and FIG. 9a show the process for body pose recognition as well as arms and legs detection and tracking. The limbs position detection process comprises the following steps:
W(v)>W(u)+w(u,v)p?;
W(v)=W(u)+w(u,v)p;
H(v)=H(u)+1;
D(v)=D(u)+w(u,v);
B(v)=u;
A particular embodiment according to the invention is shown in FIG. 10 wherein the image captured by the video camera 4 is displayed on a screen 102 by a projector 5ā². The projector 5ā² may be located near the camera 4, hence creating a mirror-like effect. The location of users or objects in 3D space is used to modify the scene in a highly realistic way, by modifying existing elements or inserting virtual elements in the scene. Some users, for example, may be replaced by imaginary characters, or may wear different clothes than in reality, or may have their appearance transformed. Additional characters or objects are inserted in the scene and move or behave according to the users' movements and gestures. Because the positions of the elements of the scene are known in three-dimensions, special effects can be realized with the correct perspective effect and occlusions. This application is called the āmagic mirrorā.
Another particular embodiment according to the invention is shown in FIG. 11, wherein the locations of all participants 6 in 3D space are used to direct one or more tracking lights 5ā³. One objective in a game can be to follow a light or alternatively to escape a light beam. The participants 6 point towards each other either in order to establish links (e.g. teams in a game) or to pass a virtual object to another or to send the tracking light towards the participant 6 pointed at. As the participants 6 move around the room and they are tracked by the system, an avatar 101 moves accordingly in the virtual world that is projected on one or more displays 102. The avatars 101 may replicate the body pose and gestures made by the users 6, or transform them in some way (e.g. exaggerated). The avatars 101 may be pure synthetic figures, or they may be composed from the image, or part of the image (e.g. just the head), of the participants 6 captured by the video camera 4. Their image may be used unaltered, or may be transformed in several ways depending on the theme of the setup, or on the way the game unfolds. If the avatars 101 are synthetic figures, they could be given with the skin color, or hair color, or clothes color of the participant 6. Depending on the location and the gestures made by participants 6, real world elements react: the floor shifts, and physical objects 6ā³ in the room move or activate in some way, animatronics figures move and talk, etc.
Using this invention, a voting system may be set up. Several participants can point at various items on a display showing selectable objects such as pictures of several persons, or other choices. The users can also be directed to execute specific gestures (hands up or other) in response to an item displayed by the system. The items can be sorted and displayed by increasing/decreasing popularity according to the users that have voted so far. Optionally, the pictures of the users that have voted for/against a given item can be displayed next to it. Instead of voting, the pointing gestures can be used to buy/sell items in a virtual market place or exchange.
In another variant of this embodiment, several users control a game through their body poses. For example, they can lean left/right to control objects such as a skate-board, or a bike, or a free fall/parachute. Therefore, the users' images are inserted in the game display 102 and the latter simulates the image taken by the video camera that follows the players through the streets or in their parachute fall.
1. A method for identifying and extracting images of one or more users in an interactive environment comprising the steps of:
obtaining a depth map (7) of a scene in the form of an array of depth values, and an image (8) of said scene in the form of a corresponding array of pixel values, said depth map (7) and said image (8) being registered;
applying a coordinate transformation to said depth map (7) and said image (8) for obtaining a corresponding array (15) containing the 3D positions in a real-world coordinates system and pixel values points;
grouping said points according to their relative positions, by using a clustering process (18) so that each group contains points that are in the same region of space and correspond to a user location (19);
defining individual volumes of interest (20) each corresponding to one of said user locations (19);
selecting, from said array (15) containing the 3D positions and pixel values, the points located in said volumes of interest for obtaining segmentation masks (35) for each user;
applying said segmentation masks (35) to said image (8) for extracting images of said users.
2. The method of claim 1 comprising the step of determining said individual volumes of interest (20) by determining individual volumes of interest bounds (16ā²) separating said groups.
3. A method according to claim 2 for identifying and segmenting one or more users in an interactive environment for providing an interactive virtual reality game wherein a plurality of users are separated from each other and from a background.
4. A method according to claim 3 wherein gestures and/or body poses of individual users are recognized and used for controlling said game.
5. A method according to claim 1 for identifying and segmenting one or more users in an interactive environment for providing an interactive virtual reality game wherein a plurality of users are separated from each other and from a background.
6. A method according to claim 5 wherein gestures and/or body poses of individual users are recognized and used for controlling said game.
7. A device for identifying and extracting images of multiple users in an interactive environment scene comprising:
a video camera for capturing an image from the scene;
a depth perception device for providing depth information about said scene;
at least one computer processor for processing said depth information and said image information;
wherein said device comprises means for using individual volumes of interest from said scene for each user.
8. The device according to claim 7, wherein the device comprises means for obtaining adaptive volumes of interest for each user.
9. A device, according to claim 7, for identifying and segmenting one or more users in an interactive environment for providing an interactive virtual reality game wherein a plurality of users are separated from each other and from a background.
10. A device according to claim 9 wherein gestures and/or body poses of individual users are recognized and used for controlling said game.
11. A device, according to claim 8, for identifying and segmenting one or more users in an interactive environment for providing an interactive virtual reality game wherein a plurality of users are separated from each other and from a background.
12. A device according to claim 11 wherein gestures and/or body poses of individual users are recognized and used for controlling said game.