Meshroom/meshroom/ui/qml/Viewer/FeaturesViewer.qml
2021-06-17 12:00:05 +02:00

58 lines
2.2 KiB
QML

import QtQuick 2.11
import AliceVision 1.0 as AliceVision
import Utils 1.0
/**
* FeaturesViewer displays the extracted feature points of a View.
* Requires QtAliceVision plugin.
*/
Repeater {
id: root
/// Features to display
property var features
/// The list of describer types to load
property alias describerTypes: root.model
/// List of available feature display modes
readonly property var featureDisplayModes: ['Points', 'Squares', 'Oriented Squares']
/// Current feature display mode index
property int featureDisplayMode: 2
/// List of available track display modes
readonly property var trackDisplayModes: ['Lines Only', 'Current Matches', 'All Matches']
/// Current track display mode index
property int trackDisplayMode: 1
/// Display 3d tracks
property bool display3dTracks: false
/// Display only contiguous tracks
property bool trackContiguousFilter: true
/// Display only tracks with at least one inlier
property bool trackInliersFilter: false
// Minimum track feature scale score to display
property real trackMinFeatureScaleFilter: 0
// Maximum track feature scale score to display
property real trackMaxFeatureScaleFilter: 1
/// The list of colors used for displaying several describers
property var colors: [Colors.blue, Colors.green, Colors.yellow, Colors.cyan, Colors.pink, Colors.lime] //, Colors.orange, Colors.red
model: root.describerTypes
// instantiate one FeaturesViewer by describer type
delegate: AliceVision.FeaturesViewer {
readonly property int colorIndex: (index + colorOffset) % root.colors.length
property int colorOffset: 0
featureDisplayMode: root.featureDisplayMode
trackDisplayMode: root.trackDisplayMode
display3dTracks: root.display3dTracks
trackContiguousFilter: root.trackContiguousFilter
trackInliersFilter: root.trackInliersFilter
trackMinFeatureScaleFilter: root.trackMinFeatureScaleFilter
trackMaxFeatureScaleFilter: root.trackMaxFeatureScaleFilter
featureColor: root.colors[colorIndex]
matchColor: Colors.orange
landmarkColor: Colors.red
describerType: modelData
mfeatures: root.features
}
}