public void setTensor ( TrifocalTensor tensor ) { this . tensor = tensor ; if ( ! svd . decompose ( tensor . T1 ) ) throw new RuntimeException ( "SVD failed?!" ) ; SingularOps_DDRM . nullVector ( svd , true , v1 ) ; SingularOps_DDRM . nullVector ( svd , false , u1 ) ; // DMatrixRMaj zero = new DMatrixRMaj(3,1); // CommonOps_DDRM.mult(tensor.T1,v1,zero);zero.print(); // CommonOps_DDRM.multTransA(u1,tensor.T1,zero);zero.print(); if ( ! svd . decompose ( tensor . T2 ) ) throw new RuntimeException ( "SVD failed?!" ) ; SingularOps_DDRM . nullVector ( svd , true , v2 ) ; SingularOps_DDRM . nullVector ( svd , false , u2 ) ; // CommonOps_DDRM.mult(tensor.T2,v2,zero);zero.print(); // CommonOps_DDRM.multTransA(u2,tensor.T2,zero);zero.print(); if ( ! svd . decompose ( tensor . T3 ) ) throw new RuntimeException ( "SVD failed?!" ) ; SingularOps_DDRM . nullVector ( svd , true , v3 ) ; SingularOps_DDRM . nullVector ( svd , false , u3 ) ; // CommonOps_DDRM.mult(tensor.T3,v3,zero);zero.print(); // CommonOps_DDRM.multTransA(u3,tensor.T3,zero);zero.print(); for ( int i = 0 ; i < 3 ; i ++ ) { U . set ( i , 0 , u1 . get ( i ) ) ; U . set ( i , 1 , u2 . get ( i ) ) ; U . set ( i , 2 , u3 . get ( i ) ) ; V . set ( i , 0 , v1 . get ( i ) ) ; V . set ( i , 1 , v2 . get ( i ) ) ; V . set ( i , 2 , v3 . get ( i ) ) ; } svd . decompose ( U ) ; SingularOps_DDRM . nullVector ( svd , false , tempE ) ; e2 . set ( tempE . get ( 0 ) , tempE . get ( 1 ) , tempE . get ( 2 ) ) ; svd . decompose ( V ) ; SingularOps_DDRM . nullVector ( svd , false , tempE ) ; e3 . set ( tempE . get ( 0 ) , tempE . get ( 1 ) , tempE . get ( 2 ) ) ; }
Specifies the input tensor . The epipoles are immediately extracted since they are needed to extract all other data structures