This forum has been archived. All content is frozen. Please use KDE Discuss instead.

C# Wrapper

Tags: None
(comma "," separated)
khaledsobhy
Registered Member
Posts
1
Karma
0

C# Wrapper

Wed Jul 26, 2017 10:17 pm
Hi,

I am trying to perform some multi-view triangulation using Eigen C++ library but from C#. I have very basic knowledge on C++ and need if there is a way to do something like this in C# or anyone can guide me how to use Eigen from C#?

This is what I need to do in C#
Eigen::Vector3d TriangulateMultiViewPoint(
const std::vector<Eigen::Matrix3x4d>& proj_matrices,
const std::vector<Eigen::Vector2d>& points)
{
CHECK_EQ(proj_matrices.size(), points.size());

Eigen::Matrix4d A = Eigen::Matrix4d::Zero();

for (size_t i = 0; i < points.size(); i++) {
const Eigen::Vector3d point = points[i].homogeneous().normalized();
const Eigen::Matrix3x4d term =
proj_matrices[i] - point * point.transpose() * proj_matrices[i];
A += term.transpose() * term;
}

Eigen::SelfAdjointEigenSolver<Eigen::Matrix4d> eigen_solver(A);

return eigen_solver.eigenvectors().col(0).hnormalized();
}
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: C# Wrapper

Thu Jul 27, 2017 10:16 am
I don't know about C# and I don't think you'll get an answer here, but a quick search reveal old attempts like: https://github.com/tbmorgan/EigenNet


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]