mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-13 23:10:20 +08:00
Updated Source menu, sorted RGB-D choices by sensor type
Fixed openni from opencv available() method git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1365 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -390,8 +390,7 @@ void CameraVideo::captureImage(cv::Mat & rgb, cv::Mat & depth, float & depthCons
|
|||||||
/////////////////////////
|
/////////////////////////
|
||||||
bool CameraRGBD::available()
|
bool CameraRGBD::available()
|
||||||
{
|
{
|
||||||
printf("\nOpencV build: \n", cv::getBuildInformation().c_str());
|
return cv::getBuildInformation().find("OpenNI: YES") != std::string::npos;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraRGBD::CameraRGBD(float imageRate, bool asus) :
|
CameraRGBD::CameraRGBD(float imageRate, bool asus) :
|
||||||
@@ -428,7 +427,6 @@ bool CameraRGBD::init()
|
|||||||
UINFO("BASELINE %f mm", _capture.get( CV_CAP_PROP_OPENNI_BASELINE ));
|
UINFO("BASELINE %f mm", _capture.get( CV_CAP_PROP_OPENNI_BASELINE ));
|
||||||
UINFO("FPS %f", _capture.get( CV_CAP_PROP_FPS ));
|
UINFO("FPS %f", _capture.get( CV_CAP_PROP_FPS ));
|
||||||
UINFO("Focal %f", _capture.get( CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH ));
|
UINFO("Focal %f", _capture.get( CV_CAP_OPENNI_DEPTH_GENERATOR_FOCAL_LENGTH ));
|
||||||
UINFO("Focal2 %f", _capture.get( CV_CAP_PROP_OPENNI_FOCAL_LENGTH ));
|
|
||||||
UINFO("REGISTRATION %f", _capture.get( CV_CAP_PROP_OPENNI_REGISTRATION ));
|
UINFO("REGISTRATION %f", _capture.get( CV_CAP_PROP_OPENNI_REGISTRATION ));
|
||||||
if(_capture.get( CV_CAP_PROP_OPENNI_REGISTRATION ) == 0.0)
|
if(_capture.get( CV_CAP_PROP_OPENNI_REGISTRATION ) == 0.0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -278,15 +278,6 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Settings menu
|
//Settings menu
|
||||||
QActionGroup * selectSourceImageGrp = new QActionGroup(this);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionUsbCamera);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionImageFiles);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionVideo);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionOpenNI);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionFreenect);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionOpenNI_CV);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionOpenNI_CV_ASUS);
|
|
||||||
selectSourceImageGrp->addAction(_ui->actionOpenNI2);
|
|
||||||
this->updateSelectSourceImageMenu(_preferencesDialog->getSourceImageType());
|
this->updateSelectSourceImageMenu(_preferencesDialog->getSourceImageType());
|
||||||
connect(_ui->actionImageFiles, SIGNAL(triggered()), this, SLOT(selectImages()));
|
connect(_ui->actionImageFiles, SIGNAL(triggered()), this, SLOT(selectImages()));
|
||||||
connect(_ui->actionVideo, SIGNAL(triggered()), this, SLOT(selectVideo()));
|
connect(_ui->actionVideo, SIGNAL(triggered()), this, SLOT(selectVideo()));
|
||||||
@@ -294,7 +285,8 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
|
|||||||
this->updateSelectSourceDatabase(_preferencesDialog->isSourceDatabaseUsed());
|
this->updateSelectSourceDatabase(_preferencesDialog->isSourceDatabaseUsed());
|
||||||
connect(_ui->actionDatabase, SIGNAL(triggered()), this, SLOT(selectDatabase()));
|
connect(_ui->actionDatabase, SIGNAL(triggered()), this, SLOT(selectDatabase()));
|
||||||
this->updateSelectSourceRGBDMenu(_preferencesDialog->isSourceOpenniUsed(), _preferencesDialog->getSourceRGBD());
|
this->updateSelectSourceRGBDMenu(_preferencesDialog->isSourceOpenniUsed(), _preferencesDialog->getSourceRGBD());
|
||||||
connect(_ui->actionOpenNI, SIGNAL(triggered()), this, SLOT(selectOpenni()));
|
connect(_ui->actionOpenNI_PCL, SIGNAL(triggered()), this, SLOT(selectOpenni()));
|
||||||
|
connect(_ui->actionOpenNI_PCL_ASUS, SIGNAL(triggered()), this, SLOT(selectOpenni()));
|
||||||
connect(_ui->actionFreenect, SIGNAL(triggered()), this, SLOT(selectFreenect()));
|
connect(_ui->actionFreenect, SIGNAL(triggered()), this, SLOT(selectFreenect()));
|
||||||
_ui->actionFreenect->setEnabled(CameraFreenect::available());
|
_ui->actionFreenect->setEnabled(CameraFreenect::available());
|
||||||
connect(_ui->actionOpenNI_CV, SIGNAL(triggered()), this, SLOT(selectOpenniCv()));
|
connect(_ui->actionOpenNI_CV, SIGNAL(triggered()), this, SLOT(selectOpenniCv()));
|
||||||
@@ -1842,7 +1834,8 @@ void MainWindow::updateSelectSourceDatabase(bool used)
|
|||||||
|
|
||||||
void MainWindow::updateSelectSourceRGBDMenu(bool used, PreferencesDialog::Src src)
|
void MainWindow::updateSelectSourceRGBDMenu(bool used, PreferencesDialog::Src src)
|
||||||
{
|
{
|
||||||
_ui->actionOpenNI->setChecked(used && src == PreferencesDialog::kSrcOpenNI_PCL);
|
_ui->actionOpenNI_PCL->setChecked(used && src == PreferencesDialog::kSrcOpenNI_PCL);
|
||||||
|
_ui->actionOpenNI_PCL_ASUS->setChecked(used && src == PreferencesDialog::kSrcOpenNI_PCL);
|
||||||
_ui->actionFreenect->setChecked(used && src == PreferencesDialog::kSrcFreenect);
|
_ui->actionFreenect->setChecked(used && src == PreferencesDialog::kSrcFreenect);
|
||||||
_ui->actionOpenNI_CV->setChecked(used && src == PreferencesDialog::kSrcOpenNI_CV);
|
_ui->actionOpenNI_CV->setChecked(used && src == PreferencesDialog::kSrcOpenNI_CV);
|
||||||
_ui->actionOpenNI_CV_ASUS->setChecked(used && src == PreferencesDialog::kSrcOpenNI_CV_ASUS);
|
_ui->actionOpenNI_CV_ASUS->setChecked(used && src == PreferencesDialog::kSrcOpenNI_CV_ASUS);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuImage">
|
<widget class="QMenu" name="menuImage">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Image</string>
|
<string>Image-only</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionUsbCamera"/>
|
<addaction name="actionUsbCamera"/>
|
||||||
<addaction name="actionImageFiles"/>
|
<addaction name="actionImageFiles"/>
|
||||||
@@ -90,15 +90,28 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>RGB-D camera</string>
|
<string>RGB-D camera</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionOpenNI"/>
|
<widget class="QMenu" name="menuKinect_for_Xbox_360">
|
||||||
<addaction name="actionFreenect"/>
|
<property name="title">
|
||||||
<addaction name="actionOpenNI_CV"/>
|
<string>Kinect for Xbox 360</string>
|
||||||
<addaction name="actionOpenNI_CV_ASUS"/>
|
</property>
|
||||||
<addaction name="actionOpenNI2"/>
|
<addaction name="actionOpenNI_PCL"/>
|
||||||
|
<addaction name="actionFreenect"/>
|
||||||
|
<addaction name="actionOpenNI_CV"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuXtion_PRO_LIVE">
|
||||||
|
<property name="title">
|
||||||
|
<string>Xtion PRO LIVE</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionOpenNI_PCL_ASUS"/>
|
||||||
|
<addaction name="actionOpenNI2"/>
|
||||||
|
<addaction name="actionOpenNI_CV_ASUS"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="menuKinect_for_Xbox_360"/>
|
||||||
|
<addaction name="menuXtion_PRO_LIVE"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<addaction name="menuRGB_D_camera"/>
|
||||||
<addaction name="menuImage"/>
|
<addaction name="menuImage"/>
|
||||||
<addaction name="actionDatabase"/>
|
<addaction name="actionDatabase"/>
|
||||||
<addaction name="menuRGB_D_camera"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuSelect_source"/>
|
<addaction name="menuSelect_source"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@@ -981,7 +994,7 @@
|
|||||||
<string>Take a screenshot</string>
|
<string>Take a screenshot</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionOpenNI">
|
<action name="actionOpenNI_PCL">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@@ -1014,10 +1027,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionOpenNI2">
|
<action name="actionOpenNI2">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OpenNI2</string>
|
<string>OpenNI2</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionOpenNI_PCL_ASUS">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>OpenNI-PCL</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|||||||
Reference in New Issue
Block a user