Exemplo n.º 1
0
		/**	对输入点进行平移操作
		 */
		void Translate(const Mat3X&input_points, const Vec3 &vec_translation,
			Mat3X *output_points) {
			output_points->resize(input_points.rows(), input_points.cols());
			for (size_t i = 0; i < input_points.cols(); ++i)  {
				output_points->col(i) = input_points.col(i) + vec_translation;
			}
		}
Exemplo n.º 2
0
void Project(const Mat34 &P, const Mat3X &X, Mat2X *x) {
  x->resize(2, X.cols());
  for (size_t c = 0; c < static_cast<size_t>(X.cols()); ++c) {
    x->col(c) = Project(P, Vec3(X.col(c)));
  }
}