A apresentação está carregando. Por favor, espere

A apresentação está carregando. Por favor, espere

Visão estéreo - correspondência e reconstrução -

Apresentações semelhantes


Apresentação em tema: "Visão estéreo - correspondência e reconstrução -"— Transcrição da apresentação:

1 Visão estéreo - correspondência e reconstrução -

2 Reconstrução da forma

3 Captura de movimento

4 Basic principle to recover position from stereo images: Triangulation
Requires correspondence and camera calibration

5 Disparidade x Profundidade
Mapa de profundiade Disparidade x Profundidade

6 Profundidade versus disparidade
Z xl xr cl cr f ol or x x z z T

7 Uso do mapa de profundidade
Cesar Palomo Larry Zitnick

8 Time slice, bullet-time or frozen time effects

9 Correpondência por semelhança
Sum of Square Differences – SSD ou Correlação

10 Correspondência por vizinhança correlacionada

11 Semelhança de duas regiões WW (SSD – Sum of Squared Difference)
x0+u y0+v y0 x0

12 Semelhança de duas regiões WW (correlação)
constante constante

13 Semelhança de duas regiões WW (Normalização)
Normalizando:

14 Correspondence between points
With characteristics -

15 Correspondence problems: Oclusion
-

16 Correspondence problem: lack of characterists
- Ostridge egg on a Chinese checker board 

17

18 Correspondência com luz estruturada
Estéreo Ativo

19 Taxonomy of active range acquisition methods
Transmissive Sonar Non-contact Non-optical Microwave radar Reflective Shape from focus Shape from shading Active shape acquisition Passive Shape from silhouettes Slices Destructive Optical Radar Contact Active Triangulation Non destructive Active depth from defocus Active stereo CMM Asla Sá et al, Coded Structure Light for 3D-Photograpy: an Overview, Revista de Informática Teórica e Aplicada, Volume IX, Número 2, Porto Alegre, 2002 Brian Curless. New Methods for Surface Reconstruction from Range Images. PhD Dissertation. Stanford University. 1997

20 Active stereo solution
Use a light source to mark corresponding points uncalibrated light source calibrated light source One point at the time: long capture process. 

21 Active stereo: capturing many points
Use of a digital projector as a structured light source Pattern with several elements in a way where each element can be identified univocally point coding: prone to errors stripes: more robust

22 Methods for light coding: temporal codification
Project, in sequence, a series of slides that code in the image a binary number. n slides for 2n stripes. Two ilumination levels. Static scene. Code one axis. can be also 111 or 001! slide1 slide2 slide3 code problem: all transitions occur in the same place! Posdamer, J. L. Altschuler, M. D. Surface Measurement by Space-Encoded Projected Beam Systems. Comput. Graphics Image Process. 18, pp. 1-17, 1982.

23 Código de Gray  código binário
1 bit: 2 bits: 3 bits: Código de Gray 2 bits: 3 bits: ordem invertida

24 Código de Gray  código binário
Código binário Código de Gray

25 Robust temporal codification: Gray coding
transitions occur in different places Inokuchi, Seiji. Sato, Kosuki. Matsuda, Fumio. Range Imaging for 3D Object Recognition. Proc. Int. Conf. on Pattern Recognition, pp , 1984.

26 Example of Gray coding needs too many slides! 

27 A 10-bit horizontal Gray-code sequence.

28 Color Gray coding reduces the number of slides by 3 better yet…

29 (b,s)-BCSL Coding 20 Sá, Asla Medeiros. Medeiros, Esdras Soares. Carvalho, Paulo Cezar Pinto. Velho, Luiz. Coded Structured Light for 3D-Photography: an Overview. Revista de Informática Teórica e Aplicada, Vol. 9, No. 2, outubro 2002

30 A practical difficulty in the border detection
example with the monochrome Gray code

31 Edge detection Projecting positive and negative slides is a robust way to recover edges. 5 1 60 40 41 21 18 16

32 32rgb-BCSL coding (+) (-) slide 1 slide 2

33 Recovering colored codes
ambient light reflection factors projected light  negative slide  positive slide

34 Implementação do BCSL //A função getBcslStripeCode retorna o código de transição de faixa conforme a seqüência de cores fornecida. //Observe a ordem em que as cores devem ser passadas: // Primeiro as cores da imagem 1 e depois da imagem 2 // Primeiro a faixa da esquerda e depois a faixa da direita // //O código das cores e das bases é conforme a tabela abaixo. //Padrão 3_2 //base 3 //1 - vermelho //2 - verde //3 - azul //Padrão 4_2 //base 4 //4 - magenta //Padrão 6_2 //base 6 //4 - ciano //5 - magenta //6 - amarelo int getBcslStripeCode(int base, int colorLeft1, int colorRight1,int colorLeft2, int colorRight2);

35 teoria pode ser complicada mas a implementação é muito simples!
int matrix3_2[4*9]={ 0, 3, 6, 9, 14, 17, 19, 11, 28, 34, 22, 24, 26, 29, 18, 21, 1, 31, 33, 35, 15, 4, , 13, 16, , , 12, 27, 5, , 25, 2, , 20, 30 }; …. int getBcslStripeCode(int base, int colorLeft1, int colorRight1,int colorLeft2, int colorRight2) { int aux1, aux2,linha,coluna; colorLeft2--; colorRight2--; colorLeft1--; colorRight1--; linha = (colorLeft1 * base) + colorLeft2; aux1 = (colorRight2 - colorLeft2); aux2 = (colorRight1 - colorLeft1); aux1 = (aux1>0)?(aux1-1):((base-1)+aux1); aux2 = (aux2>0)?(aux2-1):((base-1)+aux2); coluna = ((aux2) * (base-1)) + (aux1); switch(base){ case 3: return matrix3_2[linha *4+coluna]; break; case 4: return matrix4_2[linha *9 +coluna]; case 6: return matrix6_2[linha *25 +coluna]; default: printf("Error: invalid BCSL base\n"); return -1; } teoria pode ser complicada mas a implementação é muito simples!

36 Correspondência pela Geometria das Câmeras
Geometria Epipolar Correspondência pela Geometria das Câmeras

37 Epipolar Geometry ctd. Guido Gerig

38 Geometria Epipolar: notação
Pl pl Linha epipolar pr Pr ycl xcr ycr zcr xcl el er Or Ol zcl

39 Example: converging cameras

40 Example: motion parallel with image plane

41 Example: forward motion

42 Geometria Epipolar: relações básicas
xcl ycl zcl xcr ycr zcr

43 Produto Vetorial forma de lembrar
Computação Gráfica Interativa - Gattass 10/5/2017 Produto Vetorial forma de lembrar MGattass Transformações Geométricas

44 Matriz do produto vetorial
Computação Gráfica Interativa - Gattass 10/5/2017 Matriz do produto vetorial MGattass Transformações Geométricas

45 Produto misto (revistado)
h

46 Matriz Essencial Pl Pr P Matriz essencial ycr xcr zcr ycl xcl er el
eye l P eye r Pl pl xcl ycl zcl xcr ycr zcr pr Pr el er Matriz essencial

47 Rotação de a para b (left to right)

48 Vetor do eye de b em a ycl xcl eye l Z w zcl ycr Y w xcr eye r zcr X w

49 Matriz essencial (código C)
Matrix epiEssencialMatrix( Matrix Ra, Vector eye_a, Matrix Rb, Vector eye_b) { Matrix Rba = algMult(Rb,algTransp(Ra)); Vector eye = algMult(Ra,algSub(eye_b,eye_a); Matrix S = algVectorProductMatrix(eye); Matrix E = algMult(Rba,S); return E; }

50 Matriz Essencial P Pl Pr pl pr xcl ycl zcl xcr ycr zcr el er Ol T Or

51 Câmera para imagem

52 Geometria Epipolar: Matriz Fundamental

53 Matriz fundamental Pode ser estimada diretamente se conhecermos pelo menos oito pares de pontos correspondentes

54 Matriz Fundamental (código C)
Matrix epiFundamentalMatrix( Matrix Ma, Matrix Ra, Vector eye_a, Matrix Mb, Matrix Rb, Vector eye_b) { Matrix E = epiEssencialMatrix(Ra,eye_a,Rb,eye_b); Matrix invMa = algInv(Ma); Matrix invMbTransp = algTransp(algInv(Mb)); Matrix tmp = algMult(invMbTransp,E); Matrix F = algMult(tmp,invMa); return F; }

55 Estimativa direta da Matriz Fundamental
O algoritmo de 8 pontos

56 Estimating Fundamental Matrix
The 8-point algorithm Each point correspondence can be expressed as a linear equation

57 Estimating Fundamental Matrix
The 8-point algorithm F é a coluna de V correspondente ao menor valor singular

58 Estimating Fundamental Matrix
The 8-point algorithm deveria ter posto 2! Seja D' = D com o menor valor singular = 0

59 The Normalized 8-point Algorithm
Richard Hartley

60 The Normalized 8-point Algorithm
Richard Hartley centro escale para a distância média ficar em

61 Retificação de Imagens

62 Retificação UNC-CH

63 Rectification ctd. before after Guido Gerig

64 Retificação de imagens
Trucco e Verri y' yc z' zc O O' x' xc ponto principal

65 Retificação de imagens
Trucco e Verri P ycl pl xcr ycr zcr pr xcl el T er Or Ol zcl

66 Retificação de imagens
Trucco e Verri 1. Construa: Pr= R(Pl - T) 2. Defina: 3. Aplique: 3. Aplique:

67 Reconstrução

68 Reconstrução por triangulação

69 Reconstrução por triangulação

70 Outro processo de reconstrução
Miguel Ribo, Axel Pinz, Anton L. Fuhrmann “A new Optical Tracking System for Virtual and Augmented Reality Applications”,

71 Reconstruction up to a Scale Factor
Assume that intrinsic parameters of both cameras are known Essential Matrix is known up to a scale factor (for example, estimated from the 8 point algorithm). Steve Seitz, University of Washington

72 Reconstruction up to a Scale Factor
Steve Seitz, University of Washington

73 Reconstruction up to a Scale Factor
Let It can be proved that Steve Seitz, University of Washington

74 Reconstruction up to a Scale Factor
We have two choices of t, (t+ and t-) because of sign ambiguity and two choices of E, (E+ and E-). This gives us four pairs of translation vectors and rotation matrices. Steve Seitz, University of Washington

75 Reconstruction up to a Scale Factor
Given and Construct the vectors w, and compute R Reconstruct the Z and Z’ for each point If the signs of Z and Z’ of the reconstructed points are both negative for some point, change the sign of and go to step 2. different for some point, change the sign of each entry of and go to step 1. both positive for all points, exit. Steve Seitz, University of Washington

76 Proposed system: equipament
2 cameras and 1 projector (fast) 1 moving camera and 1 projector (slow)

77 Proposed system: 32rgb-BCSL coding
positive slide positive slide negative slide left right

78 Where is a point in the other image?
u u

79 One solution: (u,v) coordinates
double the number of photos!

80 Epipolar geometry P Pl Epipolar Pr Line pl ycr ycl pr xcr xcl er el
zcr xcl el er eyer eyel zcl

81 Epipolar correspondence

82 Reconstruction by triangulation: ideia

83 Reconstruction by triangulation: algebra

84 Captured data

85 Alinhamento de nuvens de pontos

86 Problema de alinhamento
Dadas duas nuvens de pontos P e Q, encontrar o movimento rígido (R, t) que minimiza o erro de ajuste onde q(pi) é o ponto em Q correspondente ao ponto pi de P. Dificuldade: não se sabe, a priori, qual é o ponto em Q que corresponde a pi

87 Algoritmo ICP (Iterative Closest Point)
inicia com estimativa grosseira para R e t a cada iteração, q(pi) é escolhido como o ponto em Q mais próximo de Rpi + t R e t são recalculados de modo a minimizar o erro de ajuste P. J. Besl and N. D. McKay, A Method for Registration of 3-D Shapes, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 14, No. 12, February 1992

88 Algoritmo ICP (Iterative Closest Point)

89 Algoritmo ICP (Iterative Closest Point)
Também se aplica a ajuste de nuvens de pontos a modelos (por exemplo, cilindros)

90 Subproblema fundamental: alinhamento de pontos correspondentes
Dados os pares de pontos correspondentes pi, qi (i = 1, ..., n), determinar R e t que minimizam Resolvido por Horn[88, 89]

91 Alinhamento de pontos correspondentes
Obter os centróides p0 e q0 Definir pi’= pi – p0 , qi’= qi – q0 Definir onde

92 Alinhamento de pontos correspondentes
Rotação: R = M(MT M) –1/2 Translação: t = q0– Rp0 Observação: se a transformação é escrita na forma R(p + t), R não muda e t é simplesmente q0– p0

93 Alinhamento de pontos correspondentes
Pode ser incluído um fator de escala: Rotação: R = M(MT M) –1/2 Escala: Translação: t = q0– sRp0

94 Exemplo (2D)

95 Exemplo (2D) (q = 18o)

96 Exemplo (2D)

97 Variantes do ICP ICP funciona melhor quando todo ponto em P corresponde a algum ponto em Q (não é o caso no alinhamento de malhas obtidas por fotografia 3D) Diversas estratégias para melhorar o desempenho para alinhamento de malhas com superposição parcial

98 Variantes do ICP Tomar pontos em ambas as malhas
Usar outros critérios para casamento (textura, normal) Atribuir pesos às correspondências Rejeitar outliers Alterar a medida de distância (ponto-superfície no lugar de ponto-ponto)

99 Cylinder model covariance matrix: centroid: axis of the points pi:

100 Initial cylinder adjustment
tangent plane perpendicular to ê3: first guess for cc: first guess for zc:

101 Results of the initial cylinder adjustment

102 Projection of a point on a cylinder
Given : Plane : Compute : Axis :

103 Results

104 Direct measure

105


Carregar ppt "Visão estéreo - correspondência e reconstrução -"

Apresentações semelhantes


Anúncios Google