pmoulon / CMVS-PMVS

This software (CMVS) takes the output of a structure-from-motion (SfM) software as input, then decomposes the input images into a set of image clusters of managable size. An MVS software can be used to process each cluster independently and in parallel, where the union of reconstructions from all the clusters should not miss any details that can be otherwise obtained from the whole image set. CMVS should be used in conjunction with an SfM software Bundler and an MVS software PMVS2 (PMVS version 2).
http://opensourcephotogrammetry.blogspot.com/
939 stars 464 forks source link

Set F matrix #45

Closed kafeiyin00 closed 4 years ago

kafeiyin00 commented 4 years ago

Hi, Pmoulon! I have a problem with deriving the F matrix from two projection matrices. This setF function is quite different from some tutorials. e.g.

F=[P^{'}C] _{\times}P^{'}P^{+}

Would you please give me a reference for the following function?


template<class T>
void setF(const Image::Ccamera& lhs, const Image::Ccamera& rhs,
      TMat3<T>& F, const int level = 0) {
  const TVec4<T>& p00 = lhs.m_projection[level][0];
  const TVec4<T>& p01 = lhs.m_projection[level][1];
  const TVec4<T>& p02 = lhs.m_projection[level][2];

  const TVec4<T>& p10 = rhs.m_projection[level][0];
  const TVec4<T>& p11 = rhs.m_projection[level][1];
  const TVec4<T>& p12 = rhs.m_projection[level][2];

  F[0][0] = det(TMat4<T>(p01, p02, p11, p12));
  F[0][1] = det(TMat4<T>(p01, p02, p12, p10));
  F[0][2] = det(TMat4<T>(p01, p02, p10, p11));

  F[1][0] = det(TMat4<T>(p02, p00, p11, p12));
  F[1][1] = det(TMat4<T>(p02, p00, p12, p10));
  F[1][2] = det(TMat4<T>(p02, p00, p10, p11));

  F[2][0] = det(TMat4<T>(p00, p01, p11, p12));
  F[2][1] = det(TMat4<T>(p00, p01, p12, p10));
  F[2][2] = det(TMat4<T>(p00, p01, p10, p11));
 };
pmoulon commented 4 years ago

I would assume you would find the theory linked to this in "Multiple view geometry in computer vision Book" by Richard Hartley

kafeiyin00 commented 4 years ago

Thanks