diff --git a/meshroom/nodes/aliceVision/ExportImages.py b/meshroom/nodes/aliceVision/ExportImages.py new file mode 100644 index 0000000000..0febb74b5e --- /dev/null +++ b/meshroom/nodes/aliceVision/ExportImages.py @@ -0,0 +1,83 @@ +__version__ = "3.1" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + + +class ExportImages(desc.AVCommandLineNode): + commandLine = 'aliceVision_exportImages {allParams}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=40) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + category = 'Utils' + documentation = ''' + Export images referenced in the input sfmData by transforming + them to adapt to the required target intrinsics. For example, the target + intrinsics may be the same without the distortion. + ''' + + inputs = [ + desc.File( + name="input", + label="SfMData", + description="Input SfMData file. Contains the original intrinsics of the images.", + value="", + ), + desc.File( + name="target", + label="Target", + description="This sfmData file contains the required intrinsics for the output images.", + value="", + ), + desc.ChoiceParam( + name="outputFileType", + label="Output File Type", + description="Output file type for the exported images.", + value="exr", + values=["jpg", "png", "tif", "exr"], + advanced=True, + ), + desc.BoolParam( + name="evCorrection", + label="Correct Images Exposure", + description="Apply a correction on images' exposure value.", + value=False, + advanced=True, + ), + desc.ChoiceParam( + name="namingMode", + label="Naming mode", + description="image naming mode :\n" + " - viewId: viewid.ext.\n" + " - frameId: Frameid.ext.\n" + " - keep: Keep original name.\n", + value="viewId", + values=["viewid", "frameid", "keep"], + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Images Folder", + description="Output folder.", + value=desc.Node.internalFolder, + ), + desc.File( + name="undistorted", + label="Undistorted Images", + description="List of undistorted images.", + semantic="image", + value=desc.Node.internalFolder + ".{outputFileTypeValue}", + group="", + advanced=True, + ), + ] diff --git a/meshroom/nodes/aliceVision/IntrinsicsTransforming.py b/meshroom/nodes/aliceVision/IntrinsicsTransforming.py new file mode 100644 index 0000000000..18b898d3b5 --- /dev/null +++ b/meshroom/nodes/aliceVision/IntrinsicsTransforming.py @@ -0,0 +1,67 @@ +__version__ = "1.0" + +from meshroom.core import desc +from meshroom.core.utils import VERBOSE_LEVEL + +class IntrinsicsTransforming(desc.AVCommandLineNode): + commandLine = 'aliceVision_intrinsicsTransforming {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Utils' + documentation = ''' + Transforms all intrinsics in the sfmData to a new type. + ''' + + inputs = [ + desc.File( + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", + ), + desc.File( + name="inputTracks", + label="Input Tracks", + description="Input Tracks file.", + value="", + ), + desc.ChoiceParam( + name="type", + label="Camera Type", + description="Mathematical model used to represent a camera:\n" + " - pinhole: Simplest projective camera model without optical distortion " + "(focal and optical center).\n" + " - equirectangular: Projection model used in panoramas.\n", + value="pinhole", + values=["pinhole", "equidistant", "equirectangular"], + ), + desc.FloatParam( + name="fakeFov", + label="Virtual FOV", + description="If the input intrinsic is not a pinhole but the output is, what is the virtual FOV requested.", + value=90.0, + range=(1.0, 179.0, 0.1), + ), + desc.ChoiceParam( + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (fatal, error, warning, info, debug, trace).", + values=VERBOSE_LEVEL, + value="info", + ), + ] + + outputs = [ + desc.File( + name="output", + label="Output SfMData", + description="Output SfMData file.", + value=desc.Node.internalFolder + "sfmData.abc", + ), + desc.File( + name="outputTracks", + label="Output Tracks", + description="Output Tracks file.", + value=desc.Node.internalFolder + "tracksFile.json", + ), + ]