mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-21 10:37:18 +02:00
[ui] Viewer: new option to display tracks
This commit is contained in:
parent
48d4fcacd9
commit
47f1743edc
4 changed files with 43 additions and 12 deletions
|
@ -18,7 +18,6 @@ FloatingPane {
|
||||||
property var featureExtractionNode: null
|
property var featureExtractionNode: null
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
RowLayout {
|
RowLayout {
|
||||||
// FeatureExtraction node name
|
// FeatureExtraction node name
|
||||||
|
@ -77,12 +76,12 @@ FloatingPane {
|
||||||
|
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
// Features visibility toogle (features)
|
// Features visibility toogle
|
||||||
MaterialToolButton {
|
MaterialToolButton {
|
||||||
id: featuresVisibilityButton
|
id: featuresVisibilityButton
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: true
|
checked: true
|
||||||
text: featuresVisibilityButton.checked ? MaterialIcons.visibility : MaterialIcons.visibility_off
|
text: MaterialIcons.center_focus_strong
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.warn("featuresVisibilityButton.checked: " + featuresVisibilityButton.checked)
|
console.warn("featuresVisibilityButton.checked: " + featuresVisibilityButton.checked)
|
||||||
featureType.viewer.displayfeatures = featuresVisibilityButton.checked;
|
featureType.viewer.displayfeatures = featuresVisibilityButton.checked;
|
||||||
|
@ -91,20 +90,30 @@ FloatingPane {
|
||||||
opacity: featureType.viewer.visible ? 1.0 : 0.6
|
opacity: featureType.viewer.visible ? 1.0 : 0.6
|
||||||
}
|
}
|
||||||
|
|
||||||
// Landmarks visibility toogle (sfmData)
|
// Tracks visibility toogle
|
||||||
|
MaterialToolButton {
|
||||||
|
id: tracksVisibilityButton
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
text: MaterialIcons.timeline
|
||||||
|
onClicked: {
|
||||||
|
console.warn("tracksVisibilityButton.checked: " + tracksVisibilityButton.checked)
|
||||||
|
featureType.viewer.displayTracks = tracksVisibilityButton.checked;
|
||||||
|
}
|
||||||
|
font.pointSize: 10
|
||||||
|
}
|
||||||
|
|
||||||
|
// Landmarks visibility toogle
|
||||||
MaterialToolButton {
|
MaterialToolButton {
|
||||||
id: landmarksVisibilityButton
|
id: landmarksVisibilityButton
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: true
|
checked: true
|
||||||
text: checked ? MaterialIcons.location_on : MaterialIcons.location_off
|
text: MaterialIcons.fiber_manual_record
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.warn("landmarksVisibilityButton.checked: " + landmarksVisibilityButton.checked)
|
console.warn("landmarksVisibilityButton.checked: " + landmarksVisibilityButton.checked)
|
||||||
featureType.viewer.displayLandmarks = landmarksVisibilityButton.checked;
|
featureType.viewer.displayLandmarks = landmarksVisibilityButton.checked;
|
||||||
}
|
}
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
// checkable: enabled
|
|
||||||
// enabled: landmarks !== false
|
|
||||||
// opacity: featureType.viewer.visible ? 1.0 : 0.6
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ColorChart picker
|
// ColorChart picker
|
||||||
|
@ -118,7 +127,7 @@ FloatingPane {
|
||||||
}
|
}
|
||||||
// Feature type name
|
// Feature type name
|
||||||
Label {
|
Label {
|
||||||
text: featureType.viewer.describerType + (featureType.viewer.loadingFeatures ? "" : ": " + featureType.viewer.features.length)
|
text: featureType.viewer.describerType + (featureType.viewer.loadingFeatures ? "" : ": " + featureType.viewer.features.length + " / " + featureType.viewer.nbTracks + " / " + featureType.viewer.nbLandmarks )
|
||||||
}
|
}
|
||||||
// Feature loading status
|
// Feature loading status
|
||||||
Loader {
|
Loader {
|
||||||
|
|
|
@ -15,7 +15,9 @@ Repeater {
|
||||||
/// SfMData to display the data of SfM
|
/// SfMData to display the data of SfM
|
||||||
property var sfmData
|
property var sfmData
|
||||||
/// Folder containing the features files
|
/// Folder containing the features files
|
||||||
property string folder
|
property string featureFolder
|
||||||
|
/// Folder containing the matches files
|
||||||
|
property var tracks
|
||||||
/// The list of describer types to load
|
/// The list of describer types to load
|
||||||
property alias describerTypes: root.model
|
property alias describerTypes: root.model
|
||||||
/// List of available display modes
|
/// List of available display modes
|
||||||
|
@ -32,7 +34,8 @@ Repeater {
|
||||||
readonly property int colorIndex: (index + colorOffset) % root.colors.length
|
readonly property int colorIndex: (index + colorOffset) % root.colors.length
|
||||||
property int colorOffset: 0
|
property int colorOffset: 0
|
||||||
describerType: modelData
|
describerType: modelData
|
||||||
folder: root.folder
|
featureFolder: root.featureFolder
|
||||||
|
mtracks: root.tracks
|
||||||
viewId: root.viewId
|
viewId: root.viewId
|
||||||
color: root.colors[colorIndex]
|
color: root.colors[colorIndex]
|
||||||
landmarkColor: Colors.red
|
landmarkColor: Colors.red
|
||||||
|
|
6
meshroom/ui/qml/Viewer/MTracks.qml
Normal file
6
meshroom/ui/qml/Viewer/MTracks.qml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import QtQuick 2.11
|
||||||
|
import AliceVision 1.0 as AliceVision
|
||||||
|
|
||||||
|
AliceVision.MTracks {
|
||||||
|
id: root
|
||||||
|
}
|
|
@ -231,7 +231,8 @@ FocusScope {
|
||||||
setSource("FeaturesViewer.qml", {
|
setSource("FeaturesViewer.qml", {
|
||||||
'viewId': Qt.binding(function() { return _reconstruction.selectedViewId; }),
|
'viewId': Qt.binding(function() { return _reconstruction.selectedViewId; }),
|
||||||
'model': Qt.binding(function() { return _reconstruction.featureExtraction.attribute("describerTypes").value; }),
|
'model': Qt.binding(function() { return _reconstruction.featureExtraction.attribute("describerTypes").value; }),
|
||||||
'folder': Qt.binding(function() { return Filepath.stringToUrl(_reconstruction.featureExtraction.attribute("output").value); }),
|
'featureFolder': Qt.binding(function() { return Filepath.stringToUrl(_reconstruction.featureExtraction.attribute("output").value); }),
|
||||||
|
'tracks': Qt.binding(function() { return mtracksLoader.status === Loader.Ready ? mtracksLoader.item : null; }),
|
||||||
'sfmData': Qt.binding(function() { return msfmDataLoader.status === Loader.Ready ? msfmDataLoader.item : null; }),
|
'sfmData': Qt.binding(function() { return msfmDataLoader.status === Loader.Ready ? msfmDataLoader.item : null; }),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -314,6 +315,18 @@ FocusScope {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loader {
|
||||||
|
id: mtracksLoader
|
||||||
|
active: displayFeatures.checked // || displaySfmStatsView.checked || displaySfmDataGlobalStats.checked
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
// instantiate and initialize a SfmStatsView component dynamically using Loader.setSource
|
||||||
|
// so it can fail safely if the c++ plugin is not available
|
||||||
|
setSource("MTracks.qml", {
|
||||||
|
'matchingFolder': Qt.binding(function() { return Filepath.stringToUrl(_reconstruction.featureMatching.attribute("output").value); }),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
Loader {
|
Loader {
|
||||||
id: sfmStatsView
|
id: sfmStatsView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue