mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Tango refactoring (#534)
* Created general CameraMobile interface. Tango is now optional. Camera is disabled on visualizaion (battery saving). * Working android app on non-tango android phones (tested on x86_64 android emulator). * fixed typo * android: updated tango not available msg * android: fixed build with latest android sdk/ndk * Added ARCore limited support for pose and rgb streams. * Added AREngine support. Don't assert if depth size is not a modulo of rgb size. * Added ARCore shared camera support * android: fixed read/write runtime permissions for >=api23. arcore ndk: added feature point cloud. Fixed file sharing persmissions (>=api24 issue) * ARCore NDK: mapping with feature point cloud * android: Added post build strip command to reduce native library size * android: fixed some compilation issues * android: put back gtsam as default optimizer, manifest min api is dynamic based on cmake parameters * AREngine: min api 24 * android: Fixed build without AREngine * android: fixed not available libraries for API<24 * android: fixed build with old cmake versions * android: set arcore min api to 23 * android: fixed arengine error on start when not built with native arengine support * android: fixed tango camera permission for api>=23 * Added bionic android docker files * Fixed wrong 3D words projection when depth size is not an exact multiple of rgb size. DbViewer: fixed images size not correctly shown in label of the calibration. ImageView: fixed depth scale when depth size is not a multiple of rgb size * CameraMobile: added exact display rotation for local transform * DbViewer: fixed gravity link shown in constraint view, show full local transform matrix in camera calibration label * Android: fixed localization mode in visualization, fixed some tansitions between some UI states * Android: Hide stop button when HUD is hidden. Updated About years.
This commit is contained in:
@@ -4257,7 +4257,7 @@ void DatabaseViewer::update(int value,
|
||||
std::stringstream calibrationDetails;
|
||||
if(data.cameraModels().size())
|
||||
{
|
||||
if(!data.depthRaw().empty() && data.depthRaw().cols!=data.imageRaw().cols && data.imageRaw().cols)
|
||||
if(!data.depthRaw().empty() && data.depthRaw().cols!=data.imageRaw().cols && data.imageRaw().cols)
|
||||
{
|
||||
labelCalib->setText(tr("%1 %2x%3 [%8x%9] fx=%4 fy=%5 cx=%6 cy=%7 T=%10 [%11 %12 %13 %14; %15 %16 %17 %18; %19 %20 %21 %22]")
|
||||
.arg(data.cameraModels().size())
|
||||
@@ -4267,11 +4267,14 @@ void DatabaseViewer::update(int value,
|
||||
.arg(data.cameraModels()[0].fy())
|
||||
.arg(data.cameraModels()[0].cx())
|
||||
.arg(data.cameraModels()[0].cy())
|
||||
.arg(data.depthRaw().cols/data.cameraModels().size())
|
||||
.arg(data.depthRaw().cols/data.cameraModels().size())
|
||||
.arg(data.depthRaw().rows)
|
||||
.arg(data.cameraModels()[0].localTransform().prettyPrint().c_str())
|
||||
.arg(data.cameraModels()[0].localTransform().r11()).arg(data.cameraModels()[0].localTransform().r12()).arg(data.cameraModels()[0].localTransform().r13()).arg(data.cameraModels()[0].localTransform().o14())
|
||||
.arg(data.cameraModels()[0].localTransform().r21()).arg(data.cameraModels()[0].localTransform().r22()).arg(data.cameraModels()[0].localTransform().r23()).arg(data.cameraModels()[0].localTransform().o24())
|
||||
.arg(data.cameraModels()[0].localTransform().r31()).arg(data.cameraModels()[0].localTransform().r32()).arg(data.cameraModels()[0].localTransform().r33()).arg(data.cameraModels()[0].localTransform().o34()));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
labelCalib->setText(tr("%1 %2x%3 fx=%4 fy=%5 cx=%6 cy=%7 T=%8 [%9 %10 %11 %12; %13 %14 %15 %16; %17 %18 %19 %20]")
|
||||
.arg(data.cameraModels().size())
|
||||
@@ -4279,13 +4282,16 @@ void DatabaseViewer::update(int value,
|
||||
.arg(data.cameraModels()[0].imageHeight()>0?data.cameraModels()[0].imageHeight():data.imageRaw().rows)
|
||||
.arg(data.cameraModels()[0].fx())
|
||||
.arg(data.cameraModels()[0].fy())
|
||||
.arg(data.cameraModels()[0].cx())
|
||||
.arg(data.cameraModels()[0].cx())
|
||||
.arg(data.cameraModels()[0].cy())
|
||||
.arg(data.cameraModels()[0].localTransform().prettyPrint().c_str())
|
||||
.arg(data.cameraModels()[0].localTransform().r11()).arg(data.cameraModels()[0].localTransform().r12()).arg(data.cameraModels()[0].localTransform().r13()).arg(data.cameraModels()[0].localTransform().o14())
|
||||
.arg(data.cameraModels()[0].localTransform().r21()).arg(data.cameraModels()[0].localTransform().r22()).arg(data.cameraModels()[0].localTransform().r23()).arg(data.cameraModels()[0].localTransform().o24())
|
||||
.arg(data.cameraModels()[0].localTransform().r31()).arg(data.cameraModels()[0].localTransform().r32()).arg(data.cameraModels()[0].localTransform().r33()).arg(data.cameraModels()[0].localTransform().o34()));
|
||||
}
|
||||
|
||||
for(unsigned int i=0; i<data.cameraModels().size();++i)
|
||||
{
|
||||
{
|
||||
if(i!=0) calibrationDetails << std::endl;
|
||||
calibrationDetails << "Id: " << i << " Size=" << data.cameraModels()[i].imageWidth() << "x" << data.cameraModels()[i].imageHeight() << std::endl;
|
||||
if( data.cameraModels()[i].K_raw().total()) calibrationDetails << "K=" << data.cameraModels()[i].K_raw() << std::endl;
|
||||
@@ -4296,7 +4302,7 @@ void DatabaseViewer::update(int value,
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
//stereo
|
||||
labelCalib->setText(tr("%1x%2 fx=%3 fy=%4 cx=%5 cy=%6 baseline=%7m T=%8 [%9 %10 %11 %12; %13 %14 %15 %16; %17 %18 %19 %20]")
|
||||
.arg(data.stereoCameraModel().left().imageWidth()>0?data.stereoCameraModel().left().imageWidth():data.imageRaw().cols)
|
||||
@@ -4304,15 +4310,18 @@ void DatabaseViewer::update(int value,
|
||||
.arg(data.stereoCameraModel().left().fx())
|
||||
.arg(data.stereoCameraModel().left().fy())
|
||||
.arg(data.stereoCameraModel().left().cx())
|
||||
.arg(data.stereoCameraModel().left().cy())
|
||||
.arg(data.stereoCameraModel().left().cy())
|
||||
.arg(data.stereoCameraModel().baseline())
|
||||
.arg(data.stereoCameraModel().localTransform().prettyPrint().c_str())
|
||||
.arg(data.stereoCameraModel().localTransform().r11()).arg(data.stereoCameraModel().localTransform().r12()).arg(data.stereoCameraModel().localTransform().r13()).arg(data.stereoCameraModel().localTransform().o14())
|
||||
.arg(data.stereoCameraModel().localTransform().r21()).arg(data.stereoCameraModel().localTransform().r22()).arg(data.stereoCameraModel().localTransform().r23()).arg(data.stereoCameraModel().localTransform().o24())
|
||||
.arg(data.stereoCameraModel().localTransform().prettyPrint().c_str()));
|
||||
.arg(data.stereoCameraModel().localTransform().r31()).arg(data.stereoCameraModel().localTransform().r32()).arg(data.stereoCameraModel().localTransform().r33()).arg(data.stereoCameraModel().localTransform().o34()));
|
||||
|
||||
calibrationDetails << "Left:" << " Size=" << data.stereoCameraModel().left().imageWidth() << "x" << data.stereoCameraModel().left().imageHeight() << std::endl;
|
||||
if( data.stereoCameraModel().left().K_raw().total()) calibrationDetails << "K=" << data.stereoCameraModel().left().K_raw() << std::endl;
|
||||
if( data.stereoCameraModel().left().D_raw().total()) calibrationDetails << "D=" << data.stereoCameraModel().left().D_raw() << std::endl;
|
||||
if( data.stereoCameraModel().left().R().total()) calibrationDetails << "R=" << data.stereoCameraModel().left().R() << std::endl;
|
||||
if( data.stereoCameraModel().left().P().total()) calibrationDetails << "P=" << data.stereoCameraModel().left().P() << std::endl;
|
||||
if( data.stereoCameraModel().left().P().total()) calibrationDetails << "P=" << data.stereoCameraModel().left().P() << std::endl;
|
||||
calibrationDetails << std::endl;
|
||||
calibrationDetails << "Right:" << " Size=" << data.stereoCameraModel().right().imageWidth() << "x" << data.stereoCameraModel().right().imageHeight() << std::endl;
|
||||
if( data.stereoCameraModel().right().K_raw().total()) calibrationDetails << "K=" << data.stereoCameraModel().right().K_raw() << std::endl;
|
||||
@@ -4854,7 +4863,7 @@ void DatabaseViewer::update(int value,
|
||||
ui_->horizontalSlider_neighbors->blockSignals(false);
|
||||
|
||||
constraintsViewer_->removeAllClouds();
|
||||
|
||||
|
||||
Link link = this->findActiveLink(from, to);
|
||||
if(link.isValid() && link.type() != Link::kGravity)
|
||||
{
|
||||
|
||||
@@ -1026,9 +1026,7 @@ void ImageView::setImageDepth(const QImage & imageDepth)
|
||||
|
||||
if( _image.width() > 0 &&
|
||||
_image.width() > _imageDepth.width() &&
|
||||
_image.height() > _imageDepth.height() &&
|
||||
_image.width() % _imageDepth.width() == 0 &&
|
||||
_image.height() % _imageDepth.height() == 0)
|
||||
_image.height() > _imageDepth.height())
|
||||
{
|
||||
// scale depth to rgb
|
||||
_imageDepth = _imageDepth.scaled(_image.size());
|
||||
|
||||
Reference in New Issue
Block a user