Ask Your Question

Revision history [back]

Dynamic Structure from Motion with SFM Module in opencv_contrib

Hello everyone,

I stumbled upon this tutorial and have ran through the tutorial with some success: https://docs.opencv.org/3.1.0/d4/d18/tutorial_sfm_scene_reconstruction.html

It doesn't always work on some of my downloaded image sets, but I figured I could use the reconstruct() function to dynamically build up a point cloud using a camera stream.

I am having a hard time prototyping it by feeding it two images at a time in a loop and displaying the resultant point cloud.

Can anyone provide any information or pointers on how to help out? or what I should try?

My next step was to try and pass the images to a function, then find matching points and pass that to the reconstruct() function for it to do the bundle adjustments.

That may work better than passing the images directly since it will not have to worry about finding them. Not sure.

Any insight would be helpful. Thanks!

Dynamic Structure from Motion with SFM Module in opencv_contrib

Hello everyone,

I stumbled upon this tutorial and have ran through the tutorial with some success: https://docs.opencv.org/3.1.0/d4/d18/tutorial_sfm_scene_reconstruction.html

It doesn't always work on some of my downloaded image sets, but I figured I could use the reconstruct() function to dynamically build up a point cloud using a camera stream.

I am having a hard time prototyping it by feeding it two images at a time in a loop and displaying the resultant point cloud.

Can anyone provide any information or pointers on how to help out? or what I should try?

My next step was to try and pass the images to a function, then find matching points and pass that to the reconstruct() function for it to do the bundle adjustments.

That may work better than passing the images directly since it will not have to worry about finding them. Not sure.

Any insight would be helpful. Thanks!

:

   vector<Mat> Rs_est, ts_est, points3d_estimated;

    cout <<"Opening Images..."<<endl;

    for(int i = 0; i<images_paths.size(); i++)
    {
        images.push_back(imread(images_paths[i], IMREAD_GRAYSCALE));
        imshow("Loaded Image", images[i]);
        waitKey(0);
    }

    cout <<"Opened Images..."<<endl;

    cout<<"reconstructing..."<<endl;
    reconstruct(images, Rs_est, ts_est, K, points3d_estimated, is_projective);