@@ -659,100 +659,6 @@ static inline void quatToDCM(double *q, double *R)
659
659
R[7 ] = 2.0 * (tmp1 - tmp2);
660
660
}
661
661
662
- /* *
663
- * @brief Analytical solution to find the eigenvector corresponding to the smallest
664
- * eigenvalue of a 3x3 matrix. As this implements the analytical solution, it's not
665
- * really the most robust way. Whenever possible, this implementation can be replaced
666
- * via a robust numerical scheme.
667
- * @param [in] C The matrix
668
- * @param [in] A The eigenvector corresponding to the lowest eigenvalue
669
- * @author Tolga Birdal
670
- */
671
- static inline void eigenLowest33 (const double C[3 ][3 ], double A[3 ])
672
- {
673
- const double a = C[0 ][0 ];
674
- const double b = C[0 ][1 ];
675
- const double c = C[0 ][2 ];
676
- const double d = C[1 ][1 ];
677
- const double e = C[1 ][2 ];
678
- const double f = C[2 ][2 ];
679
- const double t2 = c*c;
680
- const double t3 = e*e;
681
- const double t4 = b*t2;
682
- const double t5 = c*d*e;
683
- const double t34 = b*t3;
684
- const double t35 = a*c*e;
685
- const double t6 = t4+t5-t34-t35;
686
- const double t7 = 1.0 /t6;
687
- const double t8 = a+d+f;
688
- const double t9 = b*b;
689
- const double t23 = a*d;
690
- const double t24 = a*f;
691
- const double t25 = d*f;
692
- const double t10 = t2+t3+t9-t23-t24-t25;
693
- const double t11 = t8*t10*(1.0 /6.0 );
694
- const double t12 = t8*t8;
695
- const double t20 = t8*t12*(1.0 /2.7E1 );
696
- const double t21 = b*c*e;
697
- const double t22 = a*d*f*(1.0 /2.0 );
698
- const double t26 = a*t3*(1.0 /2.0 );
699
- const double t27 = d*t2*(1.0 /2.0 );
700
- const double t28 = f*t9*(1.0 /2.0 );
701
- const double t14 = t9*(1.0 /3.0 );
702
- const double t15 = t2*(1.0 /3.0 );
703
- const double t16 = t3*(1.0 /3.0 );
704
- const double t17 = t12*(1.0 /9.0 );
705
- const double t30 = a*d*(1.0 /3.0 );
706
- const double t31 = a*f*(1.0 /3.0 );
707
- const double t32 = d*f*(1.0 /3.0 );
708
- const double t18 = t14+t15+t16+t17-t30-t31-t32;
709
- const double t19 = t18*t18;
710
- const double t36 = a*(1.0 /3.0 );
711
- const double t37 = d*(1.0 /3.0 );
712
- const double t38 = f*(1.0 /3.0 );
713
- const double t39 = t8*(t2+t3+t9-t23-t24-t25)*(1.0 /6.0 );
714
- const double t41 = t18*t19;
715
- const double t43 = e*t2;
716
- const double t60 = b*c*f;
717
- const double t61 = d*e*f;
718
- const double t44 = t43-t60-t61+e*t3;
719
- const double t45 = t7*t44;
720
- const double t57 = sqrt (3.0 );
721
- const double t51 = b*c;
722
- const double t52 = d*e;
723
- const double t53 = e*f;
724
- const double t54 = t51+t52+t53;
725
- const double t62 = t11+t20+t21+t22-t26-t27-t28;
726
- const double t63 = t11+t20+t21+t22-t26-t27-t28;
727
- const double t64 = t11+t20+t21+t22-t26-t27-t28;
728
- const double t65 = t11+t20+t21+t22-t26-t27-t28;
729
- const double t66 = t36+t37+t38-t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t62*t62),1.0 /3.0 )*(1.0 /2.0 )+t57*(t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t64*t64),1.0 /3.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t65*t65),1.0 /3.0 ))*5.0E-1 *sqrt (-1.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t63*t63),1.0 /3.0 )*(1.0 /2.0 );
730
- const double t67 = t11+t20+t21+t22-t26-t27-t28;
731
- const double t68 = t11+t20+t21+t22-t26-t27-t28;
732
- const double t69 = t11+t20+t21+t22-t26-t27-t28;
733
- const double t70 = t11+t20+t21+t22-t26-t27-t28;
734
- const double t76 = c*t3;
735
- const double t91 = a*c*f;
736
- const double t92 = b*e*f;
737
- const double t77 = t76-t91-t92+c*t2;
738
- const double t83 = a*c;
739
- const double t84 = b*e;
740
- const double t85 = c*f;
741
- const double t86 = t83+t84+t85;
742
- const double t93 = t11+t20+t21+t22-t26-t27-t28;
743
- const double t94 = t11+t20+t21+t22-t26-t27-t28;
744
- const double t95 = t11+t20+t21+t22-t26-t27-t28;
745
- const double t96 = t11+t20+t21+t22-t26-t27-t28;
746
- const double t97 = t36+t37+t38-t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t93*t93),1.0 /3.0 )*(1.0 /2.0 )+t57*(t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t95*t95),1.0 /3.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t96*t96),1.0 /3.0 ))*5.0E-1 *sqrt (-1.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t94*t94),1.0 /3.0 )*(1.0 /2.0 );
747
- const double t98 = t11+t20+t21+t22-t26-t27-t28;
748
- const double t99 = t11+t20+t21+t22-t26-t27-t28;
749
- const double t100 = t11+t20+t21+t22-t26-t27-t28;
750
- const double t101 = t11+t20+t21+t22-t26-t27-t28;
751
- A[0 ] = t45-e*t7*(t66*t66)+t7*t54*(t36+t37+t38-t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t67*t67),1.0 /3.0 )*(1.0 /2.0 )+t57*(t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t69*t69),1.0 /3.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t70*t70),1.0 /3.0 ))*5.0E-1 *sqrt (-1.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t68*t68),1.0 /3.0 )*(1.0 /2.0 ));
752
- A[1 ] = -t7*t77+c*t7*(t97*t97)-t7*t86*(t36+t37+t38-t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t98*t98),1.0 /3.0 )*(1.0 /2.0 )+t57*(t18*1.0 /pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t100*t100),1.0 /3.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t101*t101),1.0 /3.0 ))*5.0E-1 *sqrt (-1.0 )-pow (t20+t21+t22-t26-t27-t28+t39+sqrt (-t41+t99*t99),1.0 /3.0 )*(1.0 /2.0 ));
753
- A[2 ] = 1.0 ;
754
- }
755
-
756
662
} // namespace ppf_match_3d
757
663
758
664
} // namespace cv
0 commit comments