I'm working on detection of distance from two image streams (stereo vision) using Emgu. I took the disparity map and then I did the 3D reconstruction, but I can't see the results in real time (display for image reconstruction and not video). I pulled the Q matrix that contains the coordinates of the image away, but I can not shoot the Z-most proche. this is my code:

Computer3DPointsFromStereoPair(left.Convert(), right.Convert(), out disparityMap, out _points);

stereoSolver.FindStereoCorrespondence(left, right, disparityMap);

using (Matrix q = new Matrix(

new double[,] {

{1.0, 0.0, 0.0, -size.Width/2}, //shift the x origin to image center

{0.0, 1.0, 0.0, -size.Height/2}, //shift the y origin to image center

{0.0, 0.0, 1.0, 0.0}, //Multiply the z value by 1.0,

{0.0, 0.0, 0.0, 1.0}}))

points = PointCollection.ReprojectImageTo3D(disparityMap, q);

Similar questions and discussions