rhiestan / Regard3D

A open source structure-from-motion program based on OpenMVG.
241 stars 43 forks source link

Compiling error related to DrawMatches #33

Open mconsidine opened 4 years ago

mconsidine commented 4 years ago

Hi, I am compiling the Regard3D v1.0.0 code under Linux (Linux Mint 19.3/Ubuntu 18.04) and have dealt with the issues related to OpenMVG and a few others mentioned in earlier threads. The error I'm getting now, though, I don't know how to approach.

Specifically, partway through the "make" process, I get this

[ 32%] Building CXX object CMakeFiles/Regard3D.dir/threads/PreviewGeneratorThread.cpp.o /home/matt/Downloads/Regard3D_src_1.0.0/src/threads/PreviewGeneratorThread.cpp: In member function ‘bool PreviewGeneratorThread::createPreview(wxImage&, PreviewInfo&)’: /home/matt/Downloads/Regard3D_src_1.0.0/src/threads/PreviewGeneratorThread.cpp:294:56: error: conversion from ‘cv::DrawMatchesFlags::’ to non-scalar type ‘cv::DrawMatchesFlags’ requested cv::DrawMatchesFlags flags = cv::DrawMatchesFlags::DEFAULT; ^~~ /home/matt/Downloads/Regard3D_src_1.0.0/src/threads/PreviewGeneratorThread.cpp:296:36: error: no match for ‘operator=’ (operand types are ‘cv::DrawMatchesFlags’ and ‘cv::DrawMatchesFlags::’) flags = cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS; ^~~~~~~ In file included from /usr/local/include/opencv2/features2d/features2d.hpp:48:0, from /home/matt/Downloads/Regard3D_src_1.0.0/src/Regard3DFeatures.h:36, from /home/matt/Downloads/Regard3D_src_1.0.0/src/threads/PreviewGeneratorThread.cpp:23: /usr/local/include/opencv2/features2d.hpp:1182:19: note: candidate: cv::DrawMatchesFlags& cv::DrawMatchesFlags::operator=(const cv::DrawMatchesFlags&) struct CV_EXPORTS DrawMatchesFlags ^~~~ /usr/local/include/opencv2/features2d.hpp:1182:19: note: no known conversion for argument 1 from ‘cv::DrawMatchesFlags::’ to ‘const cv::DrawMatchesFlags&’ /usr/local/include/opencv2/features2d.hpp:1182:19: note: candidate: cv::DrawMatchesFlags& cv::DrawMatchesFlags::operator=(cv::DrawMatchesFlags&&) /usr/local/include/opencv2/features2d.hpp:1182:19: note: no known conversion for argument 1 from ‘cv::DrawMatchesFlags::’ to ‘cv::DrawMatchesFlags&&’ " I've got version 3.4.9 of OpenCV installed and Google is failing me on this.

Can anyone suggest what I should be changing? TIA, Matt

rhiestan commented 4 years ago

Try replacing cv::DrawMatchesFlags flags = cv::DrawMatchesFlags::DEFAULT; with int flags = cv::DrawMatchesFlags::DEFAULT;