MoCap CINECA 04 II SistemiMarkerPassivi -...

30
1 Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/ 1/46 Motion Capture Passive markers and video-based techniques N. Alberto Borghese Laboratory of Applied Intelligent Systems (AIS-Lab) Department of Computer Science University of Milano Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/ 2/46 Outline Passive Markers Technology. Low and high level processing. From acquisition to reconstruction. Results. Video Based Motion Capture.

Transcript of MoCap CINECA 04 II SistemiMarkerPassivi -...

Page 1: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

1

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/1/46

Motion CapturePassive markers and video-based techniques

N. Alberto BorgheseLaboratory of Applied Intelligent Systems

(AIS-Lab)Department of Computer Science

University of Milano

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/2/46

Outline

Passive Markers Technology.

Low and high level processing.

From acquisition to reconstruction.

Results.

Video Based Motion Capture.

Page 2: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

2

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/3/46

Motion Capture with passive markers

Goal: reconstruction of the 3D motion of a set of markers

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/4/46

Why passive markers?No encoumbrance on the subject: markers do not require any

powering and are hardly sensed by the subjects.

No constraint on the dimension of the working volume is prescribed.

Page 3: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

3

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/5/46

How passive markers work?

Video-cameras are equipped with a co-axial flash.

Markers appear much brighter than the background making theirdetection, on the video images, easier.

Passive markers are constituted of a small plastic support covered withretro-reflecting material (3MTM). It marks a certain repere point.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/6/46

Constituents of a Motion Capture system with passive markers

•Markers•Cameras•Flash (synchronous with frame signal)•Connections (Fast Ethernet for Motion Analysis)•Hub•PC host for processing and display.

Where is marker detection?

PC (SmartTM)Before the Hub (ViconTM, EagleTM, EliteTM).

Page 4: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

4

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/7/46

Sequential processing

1. Surveying the image of the moving subject on multiple cameras (frequency & set-up).

2. Markers extraction from the background scene (accuracy & reliability).

3. Computation of the “real” 2D position of the markers(accuracy <- distortion).

4. Matching on multiple cameras.5. 3D Reconstruction (accuracy).

An implicit step is CALIBRATION.

Low-levelVision

High-levelVision

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/8/46

Outline

Passive Markers Technology.

Low and high level processing.

From acquisition to reconstruction.

Results.

Video Based Motion Capture.

Page 5: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

5

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/9/46

Two-levels architecture

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/10/46

Low-level processing (low-vision)

q1 q3q2 q5q4

u1 u2

q1 q3q2

u1

Page 6: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

6

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/11/46

Markers extraction through filtering

Correlation implemented by convolution (template matchingor feature extraction)

Implementablewith a DSP

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/12/46

Markers extraction through thresholding(without flash)

Threshold detection may be not sufficient (high contrast thanks to flashes).Cluster dimension.Shape.Software protection of bright target regions.

Page 7: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

7

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/13/46

High-level processing

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/14/46

Disadvantages of motion capture systemsbased on passive markers

The multiple set of 2D data have to be correctly labaled and associated to their corresponding 3D markers.

When a marker is hidden to the cameras by another body part (e.g. the arm which swings over the hip during gait), the motion capture loosestrack of it.

Page 8: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

8

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/15/46

The difficulties in data processing1. Twists and rotations make the movement of the human body fully

three-dimensional. 2. Each body part continuously moves in and out occlusion from the

view of the cameras, such that each of them can see only a chunk of the whole trajectory.

3. Some body parts can be hidden to the view by other parts. Whenever it happens, the system should be able to correctly recognize thehidden markers as soon as they reappear without any intervention by the operator.

4. Chunks from the different cameras have to be correctly matched and integrated to obtain a complete motion description.

5. Each trajectory has to be associated with the corresponding body marker (labeling).

6. Reflexes, which do appear in natural environment and are erroneously detected as markers, have to be automatically identified and discarded.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/16/46

From 2D to 3D

Each camera measures a geometrical transformation (projection)Triangulation (ray intersection)

Geometrical parameters known.Main difficulty is correct matching between multiple markers and multiple cameras.

Page 9: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

9

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/17/46

Tracking difficulties

It is a complexproblem because:

• Dense set of markers. These maycome very close one to the other in certaininstants.

• Motion can be easily complex, as it involves rotation and twists of the different body parts (thing at a gymnastic movement).

•Multi-camera information and temporal information is required toachieve a robust tracking.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/18/46

Outline

Passive Markers Technology.

Low and high level processing.

From acquisition to reconstruction.

Results.

Video Based Motion Capture.

Page 10: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

10

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/19/46

Tracking processing steps

ACQUISITION OF 2D POINTS

TRACKING:1) From 2D points to 2D strings.2) Pairing 2D strings with the epipolar constraint to create 3D strings.3) Condensation of 3D strings.4) Joining 3D strings.

RECTIFY:5) Classification of 3D strings according to the markersarrangement.6) Estimate of the 3D model of the subject from the strings data.7) Estensione automatica della classificazione alle altre stringhe.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/20/46

2D tracking

Page 11: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

11

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/21/46

1) Creation of 2D stringsCam 1 Cam 2 Cam 3

Cam 4 Cam 5 Cam 6

Cam 7 Cam 8 Cam 9

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/22/46

2) Matching 2D strings

Epipolarity constraint

3D strings

Page 12: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

12

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/23/46

3) Condensation of 3D strings

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/24/46

4) Joining 3D strings

Page 13: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

13

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/25/46

3D strings

3D strings already contain motion 3D information

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/26/46

3D strings

Page 14: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

14

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/27/46

Markers Classification

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/28/46

5) Initial classification

Page 15: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

15

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/29/46

Model fitting

12

43

5 10

615 20

11

7 12

1621

17 22

1823

1924

139

148

Internal model Reference model

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/30/46

What a model represents?

Markered subject Modello 3D Modello a stick Modello hidden

Page 16: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

16

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/31/46

6) Classification extension

3D strings are automatically extended in this phase.

Frame 100 Frame 101 Frame 102 - before Frame 102 - after

Two strings are joined on the base of:- Smooth motion.- Model checking (a dynamic prioirty is coded in the number of links).

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/32/46

Calibration is a pre-requisiteCamera calibration

Excellent for special effects, not so good for measurements…. Cameras are not metric.

Set-up calibration

Page 17: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

17

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/33/46

Outline

Passive Markers Technology.

Low and high level processing.

From acquisition to reconstruction.

Results.

Video Based Motion Capture.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/34/46

Risultati: run

Page 18: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

18

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/35/46

Risultati: escape

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/36/46

Risultati: head_turn

Page 19: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

19

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/37/46

Risultati: fall_run

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/38/46

Risultati: walk

Page 20: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

20

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/39/46

Risultati: roll

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/40/46

Outline

Passive Markers Technology.

Low and high level processing.

From acquisition to reconstruction.

Results.

Video Based Motion Capture.

Page 21: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

21

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/41/46

Face motion from footage

Reconstructing talking faces from footage (range points -> 3D model -> deformation) + Estimate of the camera geometry.

3D model construction through image processing techniques:- Cross-correlation matching.- Area matching.to identify features or virtual markers.

Initialization through a semantic model or several manual identified points.

3D reconstruction through:- Bundle Adjustment.- Reinforcement of the matching through multi-view geometry.

Robust and Rapid Generation of Animated Faces From VideoImages: A Model-Based Modeling ApproachZhengyou Zhang, Zicheng Liu, Dennis Adler, Michael F. Cohen, Erik Hanson, YingShanTechnical Report: MSR-TR-2001-101

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/42/46

Body motion from footage

2 approcci:- Probabilistico. Stima di un modello parametrizzato e dei parametri di movimento.- Deterministico. Definisco un modello a-priori e stimo i parametri della camera e del movimento.

Page 22: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

22

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/43/46

A photogrammetric approach

+ ->

Anthropometry is defined as stick diagrams. Points play the role of markers.Identification of key positions of the model (eventually by image processing)Calibration and refined interpolation to obtain continuos motion.Extension of the Bundle-adjustment method to incorporate motion parameters.

http://www.photogrammetry.ethz.ch

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/44/46

Computer vision techniquesSilhouette (-> Skeleton)

Set of difficult problems:

2D Image processing (silhouette identification, optical flow detectors…)

Multi-view invariants.

Smooth motion -> temporal filtering.

Skeleton fitting (different rigid motion fordifferent segments).

Pre-prototype research.

http://movement.stanford.edu/

Page 23: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

23

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/45/46

The volumetric approach: a possiblesolution

Mikic et al., Human Body Model Acquisition and Tracking Using Voxel Data, Int. J.Computer Vision, 53(3), 2003.

Cheung et al., A real time system for robust 3D voxel reconstruction of human motions. Proc. Ieee Conf. CVPR, 2000.

Jain et al., 3D video, Proc. VRAIS, 1994.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/46/46

I passi di elaborazione (Mikic et al.)

Page 24: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

24

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/47/46

Voxel reconstruction

• Extraction of silhouette from the background (median filtering, produces high qualitysilhouettes).

• Compute the 3D bounding boxesassociated to multiple silhouette.

• Voxel carving through Octree processing tocompute the voxelreconstruction.

• Multiple cameras allowincreasing resolution.

c) 50mm d) 25mm

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/48/46

Model adoptedEllissoidi incernierati per

gli arti, cilindro per il tronco e sfera per la testa. Movimenti relativi al tronco: catena cinematica.

Inizializzazione: corpo a gambe e braccia tese con le braccia rivolte verso l’esterno.

Page 25: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

25

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/49/46

Model acquisitionModel “anthropometric” parameters have to be adjusted. The different anatomical segments have to be identified.

Two steps-process: InitializationRefinement (given all the measured segment lengths, which would be the mostprobable length of each segment?).

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/50/46

Model initialization1) Head:

Spherical template with minimum and maximum radius. The center of the sphere is computed as the point, which maximizes the inner

voxels.The neck is computed as the average position of the head voxels, which have

an adjacent non-head voxel.

2) Torso:An average cylinder is attached to the neck and oriented as the centroid of the remaining voxels. It is then shrunk and grown again until it incorporates empty voxels.Every k-steps, its orientation is recalculated.

3) Limbs:

Page 26: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

26

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/51/46

Head initial identification

Spherical template with minimum and maximum radius.

The center of the sphere is computed as the point, which maximizes the inner voxels.

The neck is computed as the average position of the head voxels, which have an adjacentnon-head voxel.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/52/46

Identification of the trunk

An average cylinder is attached to the neck and oriented as the centroid of the remainingvoxels. The inner voxels are determined and the new centroid computed. Cylinder is reoriented.It is then shrunk and grown again until it incorporates empty voxels.

Page 27: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

27

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/53/46

Limb segments acquisitionAre identified as the four connected regions of remaining voxels.Hip and shoulder are the average of the position of the torso voxel adjacent to legs and arms.The limb segments (arm and forearm and thigh and calf) are identified with the same

shrinking and growing procedure used for the trunk.

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/54/46

TrackingKalman filter.

Silhouettes Voxel reconstruction.Model prediction through Kalman filter Voxel labeling.Measurement on labelled voxels of body positions (end-points and centroid of the segments).From the difference from the measurement and the prediction, the new position of the model is determined.

Page 28: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

28

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/55/46

Results: stepping (640 x 480, 10Hz)

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/56/46

Results: dancing

Page 29: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

29

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/57/46

Results: jumping

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/58/46

Results: cartwheel

Page 30: MoCap CINECA 04 II SistemiMarkerPassivi - unimi.itais-lab.di.unimi.it/Teaching/DigitalAnimation/Slides/L_08_MoCap_II... · Goal: reconstruction of the 3D motion of a set of markers

30

Laboratory of Applied Intelligent Systems http://homes.dsi.unimi.it/~borghese/59/46

Outline

Passive Markers Technology.

Low and high level processing.

From acquisition to reconstruction.

Results.

Video Based Motion Capture.