2019-10-19 09:27:38 -0600 | received badge | ● Popular Question (source) |
2013-08-26 13:43:50 -0600 | received badge | ● Editor (source) |
2013-08-26 13:42:41 -0600 | asked a question | Convert/Normalize 3x3 Homography Matrix to 4x4 3D Matrix Hello! I have been stuck on this problem from months and I hope someone can help me. My problems seems like something everyone has gone through already. If I am doing this wrong or is overly complicated, please let me know of a better solution! So I have a 3D environment written in Direct3D (please don't hate me for picking Direct3D over OpenGL, there were other factors involved) and would like to utilize the OpenCV library in my environment. Anyway, my problem is that findHomography returns a 3x3 2D matrix. I would like to convert/normalize this matrix into a 4x4 3D matrix with the Z coordinates essentially set to 0. I figure there's two major steps required in this process.
Normalize the 3x3 matrix elementsTo normalize the matrix elements, I'm assuming we need to divide each matrix element with the maximum value of each matrix element. However, what are the maximum value for each matrix element? Convert the 3x3 matrix to a 4x4 matrix.I know OpenCV and Direct3D coordinate systems are different. Here is what I am assuming.
Here is how I am mapping my matrix conversion. OpenCV Homography Matrix Direct3D Homography Matrix So this has been my approach to convert OpenCV 3x3 matrix to Direct3D 4x4 matrix. What should be my values for normalization in step 1? Am I mapping the matrix correctly in Step 2? Thanks in advance! You have no idea how much I've been struggling with this issue. |