Skip to content

Commit fe71b09

Browse files
committed
sfm module calls imread function, which is in imgcodecs module
This built correctly before because tests were run with the highgui module enabled. The sfm module links against the features2d module, which brings in the highgui module as an optional target if enabled. Through this path, imread was working correctly despite the file including the wrong header and not declaring its linking dependency.
1 parent 412fd44 commit fe71b09

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/sfm/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ ocv_add_module(sfm
8181
opencv_calib3d
8282
opencv_features2d
8383
opencv_xfeatures2d
84+
opencv_imgcodecs
8485
WRAP python
8586
)
8687

modules/sfm/src/libmv_light/libmv/correspondence/nRobustViewMatching.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1919
// IN THE SOFTWARE.
2020

21-
#include <opencv2/highgui.hpp>
21+
#include <opencv2/imgcodecs.hpp>
2222

2323
#include "libmv/base/vector_utils.h"
2424
#include "libmv/correspondence/feature.h"

0 commit comments

Comments
 (0)