sfm::reconstruct() flat output
Problem
I cannot get sfm::reconstruct()
to output anything with a significant z dimension (|z|>1). Everything appears very flat, even if I run the demo recon2v
on the demo data. When I run the opencv_test_sfm
it passes.
Question
Is this a common issue? Is it possible I built something wrong? I also noticed that the
Details
I built the latest OpenCV yesterday. I am using the sfm
sample (opencv_contrib/modules/sfm/samples/recon2v.cpp) and with its intended sample data (opencv_contrib/modules/sfm/samples/data/recon2v_checkerboards.txt). If I scale the z values by a factor of 100, I can see that the two planes of the checkerboard data are both very planar, but are actually on different planes. However, it doesn't make sense that you would have to scale the z values to see the depth (does it?)
I have additional suspicions that something is not built quite right: I have to compile the application with -DCERES_FOUND (which seems like it should only be done within cmake when building the library). I also get all zeros for my estimated camera intrinsics, both with the demo set and with my own pictures. There's also quite a few opencv tests which fail, though sfm isn't one of them. However, the Ceres solver passes all build tests.