GUI/Source: color only option now also available for stereo cameras (meaning only left frame published). Db: fixed non-valid 3d words saved when no ones were in the signature (on loading, we don't set words3 if they are all null).

This commit is contained in:
matlabbe
2020-04-08 20:00:41 -04:00
parent 82a19a2ff1
commit c0313a6d09
3 changed files with 54 additions and 37 deletions
+9 -2
View File
@@ -189,9 +189,16 @@ void CameraThread::postUpdate(SensorData * dataPtr, CameraInfo * info) const
{
UASSERT(dataPtr!=0);
SensorData & data = *dataPtr;
if(_colorOnly && !data.depthRaw().empty())
if(_colorOnly)
{
data.setRGBDImage(data.imageRaw(), cv::Mat(), data.cameraModels());
if(!data.depthRaw().empty())
{
data.setRGBDImage(data.imageRaw(), cv::Mat(), data.cameraModels());
}
else if(!data.rightRaw().empty())
{
data.setRGBDImage(data.imageRaw(), cv::Mat(), data.stereoCameraModel().left());
}
}
if(_distortionModel && !data.depthRaw().empty())