MCPcopy Create free account
hub / github.com/colmap/colmap / ShowImage

Method ShowImage

src/colmap/ui/database_management_widget.cc:549–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void ImageTab::ShowImage() {
550 QItemSelectionModel* select = table_widget_->selectionModel();
551
552 if (!select->hasSelection()) {
553 QMessageBox::critical(this, "", tr("No image selected."));
554 return;
555 }
556
557 if (select->selectedRows().size() > 1) {
558 QMessageBox::critical(this, "", tr("Only one image may be selected."));
559 return;
560 }
561
562 const auto& image = images_[select->selectedRows().begin()->row()];
563
564 const auto keypoints = database_->ReadKeypoints(image.ImageId());
565 const std::vector<char> tri_mask(keypoints.size(), false);
566
567 image_viewer_widget_->ReadAndShowWithKeypoints(
568 *options_->image_path / image.Name(), keypoints, tri_mask);
569 image_viewer_widget_->setWindowTitle(
570 QString::fromStdString("Image " + std::to_string(image.ImageId())));
571}
572
573void ImageTab::ShowMatches() {
574 QItemSelectionModel* select = table_widget_->selectionModel();

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.80
ImageIdMethod · 0.80
beginMethod · 0.45
ReadKeypointsMethod · 0.45

Tested by

no test coverage detected