@@ -2146,13 +2146,13 @@ Transform Memory::computeTransform(
21462146
21472147 // make sure we have all data needed
21482148 // load binary data from database if not in RAM (if image is already here, scan and userData should be or they are null)
2149- if (((_reextractLoopClosureFeatures || _registrationPipeline->isImageRequired ()) && fromS.sensorData ().imageCompressed ().empty ()) ||
2149+ if (((_reextractLoopClosureFeatures && _registrationPipeline->isImageRequired ()) && fromS.sensorData ().imageCompressed ().empty ()) ||
21502150 (_registrationPipeline->isScanRequired () && fromS.sensorData ().imageCompressed ().empty () && fromS.sensorData ().laserScanCompressed ().empty ()) ||
21512151 (_registrationPipeline->isUserDataRequired () && fromS.sensorData ().imageCompressed ().empty () && fromS.sensorData ().userDataCompressed ().empty ()))
21522152 {
21532153 fromS.sensorData () = getNodeData (fromS.id ());
21542154 }
2155- if (((_reextractLoopClosureFeatures || _registrationPipeline->isImageRequired ()) && toS.sensorData ().imageCompressed ().empty ()) ||
2155+ if (((_reextractLoopClosureFeatures && _registrationPipeline->isImageRequired ()) && toS.sensorData ().imageCompressed ().empty ()) ||
21562156 (_registrationPipeline->isScanRequired () && toS.sensorData ().imageCompressed ().empty () && toS.sensorData ().laserScanCompressed ().empty ()) ||
21572157 (_registrationPipeline->isUserDataRequired () && toS.sensorData ().imageCompressed ().empty () && toS.sensorData ().userDataCompressed ().empty ()))
21582158 {
@@ -2161,27 +2161,27 @@ Transform Memory::computeTransform(
21612161 // uncompress only what we need
21622162 cv::Mat imgBuf, depthBuf, laserBuf, userBuf;
21632163 fromS.sensorData ().uncompressData (
2164- (_reextractLoopClosureFeatures || _registrationPipeline->isImageRequired ())?&imgBuf:0 ,
2165- (_reextractLoopClosureFeatures || _registrationPipeline->isImageRequired ())?&depthBuf:0 ,
2164+ (_reextractLoopClosureFeatures && _registrationPipeline->isImageRequired ())?&imgBuf:0 ,
2165+ (_reextractLoopClosureFeatures && _registrationPipeline->isImageRequired ())?&depthBuf:0 ,
21662166 _registrationPipeline->isScanRequired ()?&laserBuf:0 ,
21672167 _registrationPipeline->isUserDataRequired ()?&userBuf:0 );
21682168 toS.sensorData ().uncompressData (
2169- (_reextractLoopClosureFeatures || _registrationPipeline->isImageRequired ())?&imgBuf:0 ,
2170- (_reextractLoopClosureFeatures || _registrationPipeline->isImageRequired ())?&depthBuf:0 ,
2169+ (_reextractLoopClosureFeatures && _registrationPipeline->isImageRequired ())?&imgBuf:0 ,
2170+ (_reextractLoopClosureFeatures && _registrationPipeline->isImageRequired ())?&depthBuf:0 ,
21712171 _registrationPipeline->isScanRequired ()?&laserBuf:0 ,
21722172 _registrationPipeline->isUserDataRequired ()?&userBuf:0 );
21732173
21742174
21752175 // compute transform fromId -> toId
21762176 std::vector<int > inliersV;
2177- if (_reextractLoopClosureFeatures ||
2177+ if (( _reextractLoopClosureFeatures && _registrationPipeline-> isImageRequired ()) ||
21782178 (fromS.getWords ().size () && toS.getWords ().size ()) ||
21792179 (!guess.isNull () && !_registrationPipeline->isImageRequired ()))
21802180 {
21812181 Signature tmpFrom = fromS;
21822182 Signature tmpTo = toS;
21832183
2184- if (_reextractLoopClosureFeatures)
2184+ if (_reextractLoopClosureFeatures && _registrationPipeline-> isImageRequired () )
21852185 {
21862186 UDEBUG (" " );
21872187 tmpFrom.setWords (std::multimap<int , cv::KeyPoint>());
0 commit comments