mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
using copied version of solvePnPRansac for OpencV 3.3.1 too (along OpenCV2) to have stable transformation estimation (e.g., outdoor stereo demo is getting lost very often with the version of 3.3.1)
This commit is contained in:
@@ -96,9 +96,12 @@ IF(OpenCV_VERSION_MAJOR EQUAL 2)
|
||||
SET(SRC_FILES
|
||||
${SRC_FILES}
|
||||
opencv/Orb.cpp
|
||||
opencv/solvepnp.cpp
|
||||
)
|
||||
ENDIF(OpenCV_VERSION_MAJOR EQUAL 2)
|
||||
SET(SRC_FILES
|
||||
${SRC_FILES}
|
||||
opencv/solvepnp.cpp
|
||||
)
|
||||
|
||||
# to get includes in visual studio
|
||||
IF(MSVC)
|
||||
|
||||
@@ -37,9 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <pcl/common/common.h>
|
||||
|
||||
#if CV_MAJOR_VERSION < 3
|
||||
#include "opencv/solvepnp.h"
|
||||
#endif
|
||||
|
||||
namespace rtabmap
|
||||
{
|
||||
@@ -344,11 +342,10 @@ void solvePnPRansac(
|
||||
{
|
||||
minInliersCount = 4;
|
||||
}
|
||||
#if CV_MAJOR_VERSION < 3
|
||||
cv3::solvePnPRansac( //use OpenCV3 version of solvePnPRansac in OpenCV2
|
||||
#else
|
||||
cv::solvePnPRansac( // use directly version from OpenCV 3
|
||||
#endif
|
||||
|
||||
// Use OpenCV3 version of solvePnPRansac in OpenCV2.
|
||||
// FIXME: we should use this version of solvePnPRansac in newer 3.3.1 too, which seems a lot less stable!?!? Why!?
|
||||
cv3::solvePnPRansac(
|
||||
objectPoints,
|
||||
imagePoints,
|
||||
cameraMatrix,
|
||||
|
||||
Reference in New Issue
Block a user