Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about "ImageFileProcessor.cpp" #20

Open
zengletian1491 opened this issue Jun 3, 2020 · 2 comments
Open

Question about "ImageFileProcessor.cpp" #20

zengletian1491 opened this issue Jun 3, 2020 · 2 comments

Comments

@zengletian1491
Copy link

zengletian1491 commented Jun 3, 2020

In the file “3DUNDERWORLD-SLS-GPU_CPU/src/lib/core/ImageFileProcessor.cpp”, line 90-94: I think the expression of camTransMat_ has something wrong!

Refer to https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html

In my opinion, camTransMat_ = - R.transpose() * t, where R denotes the rotation matrix and t is the translation vector.

However, after the twice transpose operations of R in line 92 and line 93, the camTransMat_ in line 94 is “- R * t”, not “R.transpose() * t”.

Could you share your ideas about the aforementioned? Thanks!

@v3c70r
Copy link
Member

v3c70r commented Jun 4, 2020

Hi, I think it's because of the GLM library I used at that time. The matrices in in GLM are column major where the OpenCV's matrices are row major. The first loop is used to convert the row major matrix to column major matrix.
But you are absolutely right about the idea that I have implicitly transposed the matrix twice, which is unnecessary. There's no need to have another transpose(inverse) there in line 93 IF line 92 is assigned in the transposed order. I'll probably make a change on that.

@zengletian1491
Copy link
Author

OK, thank you.
Line 111 and line 145 in fileReader.cpp should also be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants