16 setWindowFlags(Qt::Window);
17 resize(parent->width() - 20, parent->height() - 20);
18 setWindowTitle(
"Reconstruction statistics");
20 stats_table_ =
new QTableWidget(
this);
21 stats_table_->setColumnCount(2);
22 stats_table_->horizontalHeader()->setVisible(
false);
23 stats_table_->verticalHeader()->setVisible(
false);
24 stats_table_->horizontalHeader()->setSectionResizeMode(
25 QHeaderView::Stretch);
27 QGridLayout* grid =
new QGridLayout(
this);
28 grid->addWidget(stats_table_);
35 stats_table_->clearContents();
36 stats_table_->setRowCount(0);
38 AddStatistic(
"Cameras", QString::number(reconstruction.
NumCameras()));
39 AddStatistic(
"Images", QString::number(reconstruction.
NumImages()));
40 AddStatistic(
"Registered images",
42 AddStatistic(
"Points", QString::number(reconstruction.
NumPoints3D()));
43 AddStatistic(
"Observations",
45 AddStatistic(
"Mean track length",
47 AddStatistic(
"Mean observations per image",
51 "Mean reprojection error",
55 void ReconstructionStatsWidget::AddStatistic(
const QString& header,
56 const QString& content) {
57 const int row = stats_table_->rowCount();
58 stats_table_->insertRow(row);
59 stats_table_->setItem(row, 0,
new QTableWidgetItem(header));
60 stats_table_->setItem(row, 1,
new QTableWidgetItem(content));
double ComputeMeanTrackLength() const
size_t NumRegImages() const
size_t ComputeNumObservations() const
size_t NumPoints3D() const
double ComputeMeanReprojectionError() const
double ComputeMeanObservationsPerRegImage() const
size_t NumCameras() const
Generic file read and write utility for python interface.