mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
CLAMS: cleanup eigen_extensions.h, models can be saved/loaded in binary (*.bin) or ascii (*.txt) formats
This commit is contained in:
@@ -152,7 +152,7 @@ void DepthCalibrationDialog::saveModel()
|
||||
{
|
||||
if(_model && _model->getTrainingSamples())
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(this, tr("Save distortion model to ..."), _workingDirectory+QDir::separator()+"distortion_model.bin", tr("Distortion model (*.bin)"));
|
||||
QString path = QFileDialog::getSaveFileName(this, tr("Save distortion model to ..."), _workingDirectory+QDir::separator()+"distortion_model.bin", tr("Distortion model (*.bin *.txt)"));
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
//
|
||||
@@ -163,7 +163,7 @@ void DepthCalibrationDialog::saveModel()
|
||||
|
||||
if(!results.empty())
|
||||
{
|
||||
QString name = QString(path).replace(".bin", ".png", Qt::CaseInsensitive);
|
||||
QString name = QString(path).replace(".bin", ".png", Qt::CaseInsensitive).replace(".txt", ".png", Qt::CaseInsensitive);
|
||||
cv::imwrite(name.toStdString(), results);
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(name));
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ void ExportCloudsDialog::selectDistortionModel()
|
||||
{
|
||||
dir = _workingDirectory;
|
||||
}
|
||||
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), dir, tr("Distortion model (*.bin)"));
|
||||
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), dir, tr("Distortion model (*.bin *.txt)"));
|
||||
if(path.size())
|
||||
{
|
||||
_ui->lineEdit_distortionModel->setText(path);
|
||||
|
||||
@@ -3028,7 +3028,7 @@ void PreferencesDialog::selectSourceDistortionModel()
|
||||
{
|
||||
dir = getWorkingDirectory();
|
||||
}
|
||||
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->lineEdit_source_distortionModel->text(), tr("Distortion model (*.bin)"));
|
||||
QString path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->lineEdit_source_distortionModel->text(), tr("Distortion model (*.bin *.txt)"));
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
_ui->lineEdit_source_distortionModel->setText(path);
|
||||
|
||||
Reference in New Issue
Block a user