mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 00:08:29 +02:00
Merge pull request #2569 from alicevision/dev/pyavImports
[nodes] LdrToHdr: Move import of `pyalicevision` within functions
This commit is contained in:
commit
bf6244e831
3 changed files with 12 additions and 18 deletions
|
@ -1,12 +1,6 @@
|
|||
__version__ = "3.1"
|
||||
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
from collections import Counter
|
||||
|
||||
from pyalicevision import sfmData as avsfmdata
|
||||
from pyalicevision import hdr as avhdr
|
||||
|
||||
from meshroom.core import desc
|
||||
from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL
|
||||
|
@ -174,6 +168,8 @@ Calibrate LDR to HDR response curve from samples.
|
|||
|
||||
@classmethod
|
||||
def update(cls, node):
|
||||
from pyalicevision import hdr as avhdr
|
||||
|
||||
if not isinstance(node.nodeDesc, cls):
|
||||
raise ValueError("Node {} is not an instance of type {}".format(node, cls))
|
||||
# TODO: use Node version for this test
|
||||
|
@ -251,6 +247,8 @@ Calibrate LDR to HDR response curve from samples.
|
|||
|
||||
@staticmethod
|
||||
def getExposure(exp, refIso = 100.0, refFnumber = 1.0):
|
||||
from pyalicevision import sfmData as avsfmdata
|
||||
|
||||
fnumber, shutterSpeed, iso = exp
|
||||
obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso)
|
||||
return obj.getExposure()
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
__version__ = "4.1"
|
||||
|
||||
import json
|
||||
import os
|
||||
import math
|
||||
from collections import Counter
|
||||
|
||||
from pyalicevision import sfmData as avsfmdata
|
||||
from pyalicevision import hdr as avhdr
|
||||
|
||||
from meshroom.core import desc
|
||||
from meshroom.core.utils import COLORSPACES, EXR_STORAGE_DATA_TYPE, VERBOSE_LEVEL
|
||||
|
@ -247,6 +241,8 @@ Merge LDR images into HDR images.
|
|||
|
||||
@classmethod
|
||||
def update(cls, node):
|
||||
from pyalicevision import hdr as avhdr
|
||||
|
||||
if not isinstance(node.nodeDesc, cls):
|
||||
raise ValueError("Node {} is not an instance of type {}".format(node, cls))
|
||||
# TODO: use Node version for this test
|
||||
|
@ -324,6 +320,8 @@ Merge LDR images into HDR images.
|
|||
|
||||
@staticmethod
|
||||
def getExposure(exp, refIso = 100.0, refFnumber = 1.0):
|
||||
from pyalicevision import sfmData as avsfmdata
|
||||
|
||||
fnumber, shutterSpeed, iso = exp
|
||||
obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso)
|
||||
return obj.getExposure()
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
__version__ = "4.0"
|
||||
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
from collections import Counter
|
||||
|
||||
from pyalicevision import sfmData as avsfmdata
|
||||
from pyalicevision import hdr as avhdr
|
||||
|
||||
from meshroom.core import desc
|
||||
from meshroom.core.utils import COLORSPACES, VERBOSE_LEVEL
|
||||
|
@ -199,6 +193,8 @@ Sample pixels from Low range images for HDR creation.
|
|||
|
||||
@classmethod
|
||||
def update(cls, node):
|
||||
from pyalicevision import hdr as avhdr
|
||||
|
||||
if not isinstance(node.nodeDesc, cls):
|
||||
raise ValueError("Node {} is not an instance of type {}".format(node, cls))
|
||||
# TODO: use Node version for this test
|
||||
|
@ -281,6 +277,8 @@ Sample pixels from Low range images for HDR creation.
|
|||
|
||||
@staticmethod
|
||||
def getExposure(exp, refIso = 100.0, refFnumber = 1.0):
|
||||
from pyalicevision import sfmData as avsfmdata
|
||||
|
||||
fnumber, shutterSpeed, iso = exp
|
||||
obj = avsfmdata.ExposureSetting(shutterSpeed, fnumber, iso)
|
||||
return obj.getExposure()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue