mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-06 04:41:58 +02:00
[Panorama Viewer] Change the method to get the fisheye circle parameters
This commit is contained in:
parent
3fad2faa87
commit
f25b5fe755
2 changed files with 6 additions and 17 deletions
|
@ -40,9 +40,7 @@ AliceVision.PanoramaViewer {
|
|||
|
||||
property int mouseMultiplier: 1
|
||||
|
||||
property bool isFisheyePano: false
|
||||
|
||||
property vector3d fisheyeCircleParametersPano
|
||||
property bool cropFisheyePano: false
|
||||
|
||||
property var idSelected : -1
|
||||
|
||||
|
@ -250,8 +248,7 @@ AliceVision.PanoramaViewer {
|
|||
'surface.viewerType': AliceVision.Surface.EViewerType.PANORAMA,
|
||||
'viewerTypeString': 'panorama',
|
||||
'surface.subdivisions': Qt.binding(function() { return subdivisionsPano; }),
|
||||
'surface.isFisheye' : Qt.binding(function(){ return isFisheyePano; }),
|
||||
'fisheyeCircleParameters': Qt.binding(function(){ return fisheyeCircleParametersPano; }),
|
||||
'cropFisheye' : Qt.binding(function(){ return cropFisheyePano; }),
|
||||
'surface.pitch': Qt.binding(function() { return root.pitch; }),
|
||||
'surface.yaw': Qt.binding(function() { return root.yaw; }),
|
||||
'surface.roll': Qt.binding(function() { return root.roll; }),
|
||||
|
|
|
@ -20,15 +20,7 @@ FocusScope {
|
|||
property alias usePanoramaViewer: displayPanoramaViewer.checked
|
||||
|
||||
property var activeNodeFisheye: _reconstruction.activeNodes.get("PanoramaInit").node
|
||||
property bool isFisheye : activeNodeFisheye ? activeNodeFisheye.attribute("useFisheye").value : false
|
||||
property bool useAutoFisheye: activeNodeFisheye ? activeNodeFisheye.attribute("estimateFisheyeCircle").value : true
|
||||
property real userFisheyeRadius: activeNodeFisheye ? activeNodeFisheye.attribute("fisheyeRadius").value : 0
|
||||
property variant fisheyeAutoParams: activeNodeFisheye ? _reconstruction.getAutoFisheyeCircle(activeNodeFisheye) : null
|
||||
|
||||
property real fisheyeCircleX: useAutoFisheye ? (fisheyeAutoParams ? (fisheyeAutoParams.x) : 0) : activeNodeFisheye.attribute("fisheyeCenterOffset.fisheyeCenterOffset_x").value
|
||||
property real fisheyeCircleY: useAutoFisheye ? (fisheyeAutoParams ? (fisheyeAutoParams.y) : 0) : activeNodeFisheye.attribute("fisheyeCenterOffset.fisheyeCenterOffset_y").value
|
||||
|
||||
property vector3d fisheyeCircleParametersVec: Qt.vector3d(fisheyeCircleX, fisheyeCircleY, userFisheyeRadius)
|
||||
property bool cropFisheye : activeNodeFisheye ? activeNodeFisheye.attribute("useFisheye").value : false
|
||||
|
||||
QtObject {
|
||||
id: m
|
||||
|
@ -297,7 +289,8 @@ FocusScope {
|
|||
'sfmRequired': Qt.binding(function(){ return displayLensDistortionViewer.checked ? true : false;}),
|
||||
'surface.msfmData': Qt.binding(function() { return (msfmDataLoader.status === Loader.Ready && msfmDataLoader.item.status === 2) ? msfmDataLoader.item : null; }),
|
||||
'canBeHovered': false,
|
||||
'idView': Qt.binding(function() { return _reconstruction.selectedViewId; })
|
||||
'idView': Qt.binding(function() { return _reconstruction.selectedViewId; }),
|
||||
'cropFisheye': false
|
||||
})
|
||||
} else {
|
||||
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14
|
||||
|
@ -318,8 +311,7 @@ FocusScope {
|
|||
if(active) {
|
||||
setSource("PanoramaViewer.qml", {
|
||||
'subdivisionsPano': Qt.binding(function(){ return panoramaViewerToolbar.subdivisionsValue;}),
|
||||
'isFisheyePano': Qt.binding(function(){ return root.isFisheye;}),
|
||||
'fisheyeCircleParametersPano' : Qt.binding(function(){ return root.fisheyeCircleParametersVec;}),
|
||||
'cropFisheyePano': Qt.binding(function(){ return root.cropFisheye;}),
|
||||
'downscale': Qt.binding(function(){ return panoramaViewerToolbar.downscaleValue;}),
|
||||
'isEditable': Qt.binding(function(){ return panoramaViewerToolbar.enableEdit;}),
|
||||
'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue