mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Fixed opencv setSize assert error (RegistrationVis):
[DEBUG] (2016-08-29 10:26:03.821) RegistrationVis.cpp:460::computeTransformationImpl() kptsFrom=0 [DEBUG] (2016-08-29 10:26:03.821) RegistrationVis.cpp:461::computeTransformationImpl() kptsTo=0 OpenCV Error: Assertion failed (s >= 0) in setSize, file /home/mathieu/workspace/opencv-2.4.11/modules/core/src/matrix.cpp, line 116 terminate called after throwing an instance of 'cv::Exception' what(): /home/mathieu/workspace/opencv-2.4.11/modules/core/src/matrix.cpp:116: error: (-215) s >= 0 in function setSize
This commit is contained in:
@@ -460,8 +460,9 @@ Transform RegistrationVis::computeTransformationImpl(
|
||||
UDEBUG("kptsFrom=%d", (int)kptsFrom.size());
|
||||
UDEBUG("kptsTo=%d", (int)kptsTo.size());
|
||||
cv::Mat descriptorsFrom;
|
||||
if((kptsFrom.empty() && fromSignature.getWordsDescriptors().size()) ||
|
||||
fromSignature.getWordsDescriptors().size() == kptsFrom.size())
|
||||
if(fromSignature.getWordsDescriptors().size() &&
|
||||
((kptsFrom.empty() && fromSignature.getWordsDescriptors().size()) ||
|
||||
fromSignature.getWordsDescriptors().size() == kptsFrom.size()))
|
||||
{
|
||||
descriptorsFrom = cv::Mat(fromSignature.getWordsDescriptors().size(),
|
||||
fromSignature.getWordsDescriptors().begin()->second.cols,
|
||||
|
||||
Reference in New Issue
Block a user