Skip to content

Commit

Permalink
Fix broken pyhton binding for sfm importReconstruction
Browse files Browse the repository at this point in the history
Change signature of the importReconstruction function to allow for
correct python bindings to be exported.
  • Loading branch information
PaulDebus committed Jul 26, 2019
1 parent 0915b7e commit a392764
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/sfm/include/opencv2/sfm/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ CV_EXPORTS_W
void
importReconstruction(const cv::String &file, OutputArrayOfArrays Rs,
OutputArrayOfArrays Ts, OutputArrayOfArrays Ks,
OutputArray points3d, int file_format = SFM_IO_BUNDLER);
OutputArrayOfArrays points3d, int file_format = SFM_IO_BUNDLER);

//! @} sfm

Expand Down
6 changes: 4 additions & 2 deletions modules/sfm/src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace sfm
void
importReconstruction(const cv::String &file, OutputArrayOfArrays _Rs,
OutputArrayOfArrays _Ts, OutputArrayOfArrays _Ks,
OutputArray _points3d, int file_format) {
OutputArrayOfArrays _points3d, int file_format) {

std::vector<Matx33d> Rs, Ks;
std::vector<Vec3d> Ts, points3d;
Expand All @@ -69,6 +69,8 @@ importReconstruction(const cv::String &file, OutputArrayOfArrays _Rs,
CV_Error(Error::StsBadArg, "The file format one of SFM_IO_BUNDLER, SFM_IO_VISUALSFM, SFM_IO_OPENSFM, SFM_IO_OPENMVG or SFM_IO_THEIASFM");
}



const size_t num_cameras = Rs.size();
const size_t num_points = points3d.size();

Expand All @@ -89,4 +91,4 @@ importReconstruction(const cv::String &file, OutputArrayOfArrays _Rs,


} /* namespace sfm */
} /* namespace cv */
} /* namespace cv */

0 comments on commit a392764

Please sign in to comment.