mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 02:08:08 +02:00
Merge pull request #1061 from alicevision/dev/largePanorama
[ui] Avoid crash in 3D with large panoramas
This commit is contained in:
commit
047297014c
6 changed files with 55 additions and 29 deletions
|
@ -288,6 +288,19 @@ Convert or apply filtering to the input images.
|
|||
exclusive=True,
|
||||
uid=[0],
|
||||
),
|
||||
desc.ChoiceParam(
|
||||
name='storageDataType',
|
||||
label='Storage Data Type for EXR output',
|
||||
description='Storage image data type:\n'
|
||||
' * float: Use full floating point (32 bits per channel)\n'
|
||||
' * half: Use half float (16 bits per channel)\n'
|
||||
' * halfFinite: Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * auto: Use half float if all values can fit, else use full float\n',
|
||||
value='float',
|
||||
values=['float', 'half', 'halfFinite', 'auto'],
|
||||
exclusive=True,
|
||||
uid=[0],
|
||||
),
|
||||
desc.ChoiceParam(
|
||||
name='verboseLevel',
|
||||
label='Verbose Level',
|
||||
|
|
|
@ -123,18 +123,18 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
|||
description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n'
|
||||
'\n'
|
||||
'Some Outdoor Reference Light Levels:\n'
|
||||
' * 120,000 lux : Brightest sunlight\n'
|
||||
' * 110,000 lux : Bright sunlight\n'
|
||||
' * 20,000 lux : Shade illuminated by entire clear blue sky, midday\n'
|
||||
' * 1,000 lux : Typical overcast day, midday\n'
|
||||
' * 400 lux : Sunrise or sunset on a clear day\n'
|
||||
' * 40 lux : Fully overcast, sunset/sunrise\n'
|
||||
' * 120,000 lux: Brightest sunlight\n'
|
||||
' * 110,000 lux: Bright sunlight\n'
|
||||
' * 20,000 lux: Shade illuminated by entire clear blue sky, midday\n'
|
||||
' * 1,000 lux: Typical overcast day, midday\n'
|
||||
' * 400 lux: Sunrise or sunset on a clear day\n'
|
||||
' * 40 lux: Fully overcast, sunset/sunrise\n'
|
||||
'\n'
|
||||
'Some Indoor Reference Light Levels:\n'
|
||||
' * 20000 lux : Max Usually Used Indoor\n'
|
||||
' * 750 lux : Supermarkets\n'
|
||||
' * 500 lux : Office Work\n'
|
||||
' * 150 lux : Home\n',
|
||||
' * 20000 lux: Max Usually Used Indoor\n'
|
||||
' * 750 lux: Supermarkets\n'
|
||||
' * 500 lux: Office Work\n'
|
||||
' * 150 lux: Home\n',
|
||||
value=120000.0,
|
||||
range=(1000.0, 150000.0, 1.0),
|
||||
uid=[0],
|
||||
|
@ -144,12 +144,12 @@ class LdrToHdrMerge(desc.CommandLineNode):
|
|||
name='storageDataType',
|
||||
label='Storage Data Type',
|
||||
description='Storage image data type:\n'
|
||||
' * Float : Use full floating point (32 bits per channel)\n'
|
||||
' * Half : Use half float (16 bits per channel)\n'
|
||||
' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * Auto : Use half float if all values can fit, else use full float\n',
|
||||
value='Float',
|
||||
values=['Float', 'Half', 'HalfFinite', 'Auto'],
|
||||
' * float: Use full floating point (32 bits per channel)\n'
|
||||
' * half: Use half float (16 bits per channel)\n'
|
||||
' * halfFinite: Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * auto: Use half float if all values can fit, else use full float\n',
|
||||
value='float',
|
||||
values=['float', 'half', 'halfFinite', 'auto'],
|
||||
exclusive=True,
|
||||
uid=[0],
|
||||
),
|
||||
|
|
|
@ -68,12 +68,12 @@ Multiple cameras are contributing to the low frequencies and only the best one c
|
|||
name='storageDataType',
|
||||
label='Storage Data Type',
|
||||
description='Storage image data type:\n'
|
||||
' * Float : Use full floating point (32 bits per channel)\n'
|
||||
' * Half : Use half float (16 bits per channel)\n'
|
||||
' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * Auto : Use half float if all values can fit, else use full float\n',
|
||||
value='Float',
|
||||
values=['Float', 'Half', 'HalfFinite', 'Auto'],
|
||||
' * float: Use full floating point (32 bits per channel)\n'
|
||||
' * half: Use half float (16 bits per channel)\n'
|
||||
' * halfFinite: Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * auto: Use half float if all values can fit, else use full float\n',
|
||||
value='float',
|
||||
values=['float', 'half', 'halfFinite', 'auto'],
|
||||
exclusive=True,
|
||||
uid=[0],
|
||||
),
|
||||
|
|
|
@ -60,12 +60,12 @@ Compute the image warping for each input image in the panorama coordinate system
|
|||
name='storageDataType',
|
||||
label='Storage Data Type',
|
||||
description='Storage image data type:\n'
|
||||
' * Float : Use full floating point (32 bits per channel)\n'
|
||||
' * Half : Use half float (16 bits per channel)\n'
|
||||
' * HalfFinite : Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * Auto : Use half float if all values can fit, else use full float\n',
|
||||
value='Float',
|
||||
values=['Float', 'Half', 'HalfFinite', 'Auto'],
|
||||
' * float: Use full floating point (32 bits per channel)\n'
|
||||
' * half: Use half float (16 bits per channel)\n'
|
||||
' * halfFinite: Use half float, but clamp values to avoid non-finite values\n'
|
||||
' * auto: Use half float if all values can fit, else use full float\n',
|
||||
value='float',
|
||||
values=['float', 'half', 'halfFinite', 'auto'],
|
||||
exclusive=True,
|
||||
uid=[0],
|
||||
),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# coding:utf-8
|
||||
from meshroom.core import pyCompatibility
|
||||
|
||||
from PySide2.QtCore import QUrl
|
||||
from PySide2.QtCore import QUrl, QFileInfo
|
||||
from PySide2.QtCore import QObject, Slot
|
||||
|
||||
import os
|
||||
|
@ -89,3 +89,8 @@ class FilepathHelper(QObject):
|
|||
if fileList:
|
||||
return fileList[0]
|
||||
return ""
|
||||
|
||||
@Slot(QUrl, result=int)
|
||||
def fileSizeMB(self, path):
|
||||
""" Returns the file size in MB. """
|
||||
return QFileInfo(self.asStr(path)).size() / (1024*1024)
|
||||
|
|
|
@ -110,6 +110,14 @@ import Utils 1.0
|
|||
MediaLoaderEntity {
|
||||
id: exrLoaderEntity
|
||||
Component.onCompleted: {
|
||||
var fSize = Filepath.fileSizeMB(source)
|
||||
if(fSize > 500)
|
||||
{
|
||||
// Do not load images that are larger than 500MB
|
||||
console.warn("Viewer3D: Do not load the EXR in 3D as the file size is too large: " + fSize + "MB")
|
||||
root.status = SceneLoader.Error;
|
||||
return;
|
||||
}
|
||||
// EXR loading strategy:
|
||||
// - [1] as a depth map
|
||||
var obj = Viewer3DSettings.depthMapLoaderComp.createObject(
|
||||
|
|
Loading…
Add table
Reference in a new issue