mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-03 11:21:52 +02:00
[Lens Distortion] Display points only in distortion viewer
This commit is contained in:
parent
cf4211a5c7
commit
73c6e68d02
2 changed files with 7 additions and 8 deletions
|
@ -33,8 +33,7 @@ AliceVision.FloatImageViewer {
|
||||||
|
|
||||||
property string channelModeString : "rgba"
|
property string channelModeString : "rgba"
|
||||||
|
|
||||||
// rename into distortionView
|
property bool isDistoViewer: false;
|
||||||
property bool distortion: false;
|
|
||||||
|
|
||||||
property bool isGridDisplayed : false;
|
property bool isGridDisplayed : false;
|
||||||
property int gridOpacity : 100;
|
property int gridOpacity : 100;
|
||||||
|
@ -44,8 +43,7 @@ AliceVision.FloatImageViewer {
|
||||||
property int subdivisions: 5;
|
property int subdivisions: 5;
|
||||||
property int pointsNumber: (subdivisions + 1) * (subdivisions + 1);
|
property int pointsNumber: (subdivisions + 1) * (subdivisions + 1);
|
||||||
|
|
||||||
onDistortionChanged: {
|
onIsDistoViewerChanged: {
|
||||||
console.warn("distortion");
|
|
||||||
root.hasDistortion(distortion);
|
root.hasDistortion(distortion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +136,7 @@ AliceVision.FloatImageViewer {
|
||||||
x: root.getVertex(model.index).x - (width / 2)
|
x: root.getVertex(model.index).x - (width / 2)
|
||||||
y: root.getVertex(model.index).y - (height / 2)
|
y: root.getVertex(model.index).y - (height / 2)
|
||||||
color: Colors.yellow
|
color: Colors.yellow
|
||||||
visible: true
|
visible: isDistoViewer
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseAreaCP
|
id: mouseAreaCP
|
||||||
anchors.fill : parent;
|
anchors.fill : parent;
|
||||||
|
@ -157,6 +155,7 @@ AliceVision.FloatImageViewer {
|
||||||
Repeater {
|
Repeater {
|
||||||
id: repeater
|
id: repeater
|
||||||
model: pointsNumber
|
model: pointsNumber
|
||||||
|
visible: false
|
||||||
delegate: rectGrid
|
delegate: rectGrid
|
||||||
function displayControlPoints() {
|
function displayControlPoints() {
|
||||||
for (let i = 0; i < model; i++) {
|
for (let i = 0; i < model; i++) {
|
||||||
|
|
|
@ -227,8 +227,8 @@ FocusScope {
|
||||||
'isGridDisplayed' : Qt.binding(function(){ return lensDistortionImageToolbar.displayGrid;}),
|
'isGridDisplayed' : Qt.binding(function(){ return lensDistortionImageToolbar.displayGrid;}),
|
||||||
'gridOpacity' : Qt.binding(function(){ return lensDistortionImageToolbar.opacityValue;}),
|
'gridOpacity' : Qt.binding(function(){ return lensDistortionImageToolbar.opacityValue;}),
|
||||||
'gridColor' : Qt.binding(function(){ return lensDistortionImageToolbar.color;}),
|
'gridColor' : Qt.binding(function(){ return lensDistortionImageToolbar.color;}),
|
||||||
'distortion' : Qt.binding(function(){ return displayLensDistortionViewer.checked;}),
|
|
||||||
'subdivisions' : Qt.binding(function(){ return lensDistortionImageToolbar.subdivisionsValue;}),
|
'subdivisions' : Qt.binding(function(){ return lensDistortionImageToolbar.subdivisionsValue;}),
|
||||||
|
'isDistoViewer' : Qt.binding(function(){ return displayLensDistortionViewer.checked;}),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14
|
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14
|
||||||
|
@ -732,7 +732,7 @@ FocusScope {
|
||||||
id: resolutionLabel
|
id: resolutionLabel
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: (imgContainer.image && imgContainer.image.sourceSize.width > 0) ? (imgContainer.image.sourceSize.width + "x" + imgContainer.image.sourceSize.height) : ""
|
text: (imgContainer.image && imgContainer.image.sourceSize.width > 0) ? (imgContainer.image.sourceSize.width + "x" + imgContainer.image.sourceSize.height) : ""
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
@ -745,7 +745,7 @@ FocusScope {
|
||||||
Layout.minimumWidth: 0
|
Layout.minimumWidth: 0
|
||||||
Layout.preferredWidth: 6.0 * Qt.application.font.pixelSize
|
Layout.preferredWidth: 6.0 * Qt.application.font.pixelSize
|
||||||
flat: true
|
flat: true
|
||||||
|
|
||||||
property var types: ["image", "depth", "sim"]
|
property var types: ["image", "depth", "sim"]
|
||||||
property string type: enabled ? types[currentIndex] : types[0]
|
property string type: enabled ? types[currentIndex] : types[0]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue