[nodes] A-C: Harmonize and improve labels and descriptions

Use CamelCase for all labels, always end descriptions with periods, and
replace the mixed use of single and double quotes with double quotes
only.
This commit is contained in:
Candice Bentéjac 2023-06-15 13:06:03 +02:00
parent 6ac9948b04
commit 241bead35c
10 changed files with 757 additions and 668 deletions

View file

@ -13,27 +13,36 @@ Overwrite intrinsics with a calibrated intrinsic.
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input SfMData', label="SfMData",
description='SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='calibration', name="calibration",
label='Calibration', label="Calibration",
description='Calibration SfMData file.', description="Calibration SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='SfMData File', label="SMData",
description='Path to the output SfMData file.', description="Path to the output SfMData file.",
value=desc.Node.internalFolder + 'sfmData.sfm', value=desc.Node.internalFolder + "sfmData.sfm",
uid=[], uid=[],
), ),
] ]

View file

@ -7,123 +7,139 @@ class CameraCalibration(desc.AVCommandLineNode):
commandLine = 'aliceVision_cameraCalibration {allParams}' commandLine = 'aliceVision_cameraCalibration {allParams}'
category = 'Utils' category = 'Utils'
documentation = '''
'''
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="Input",
description='''Input images in one of the following form: description="Input images in one of the following form:\n"
- folder containing images " - folder containing images.\n"
- image sequence like "/path/to/seq.@.jpg" " - image sequence like \"/path/to/seq.@.jpg\".\n"
- video file''', " - video file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='pattern', name="pattern",
label='Pattern', label="Pattern",
description='''Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).''', description="Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).",
value='CHESSBOARD', value="CHESSBOARD",
values=['CHESSBOARD', 'CIRCLES', 'ASYMMETRIC_CIRCLES', 'ASYMMETRIC_CCTAG'], values=["CHESSBOARD", "CIRCLES", "ASYMMETRIC_CIRCLES", "ASYMMETRIC_CCTAG"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.GroupAttribute(name="size", label="Size", description="Number of inner corners per one of board dimension like W H.", groupDesc=[ desc.GroupAttribute(
name="size",
label="Size",
description="Number of inner corners per one of board dimension like W H.",
groupDesc=[
desc.IntParam( desc.IntParam(
name='width', name="width",
label='Width', label="Width",
description='', description="",
value=7, value=7,
range=(0, 10000, 1), range=(0, 10000, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='height', name="height",
label='Height', label="Height",
description='', description="",
value=5, value=5,
range=(0, 10000, 1), range=(0, 10000, 1),
uid=[0], uid=[0],
), ),
]), ]
),
desc.FloatParam( desc.FloatParam(
name='squareSize', name="squareSize",
label='Square Size', label="Square Size",
description='''Size of the grid's square cells (mm).''', description="Size of the grid's square cells (mm).",
value=1.0, value=1.0,
range=(0.0, 100.0, 1.0), range=(0.0, 100.0, 1.0),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nbDistortionCoef', name="nbDistortionCoef",
label='Nb Distortion Coef', label="Nb Distortion Coef",
description='''Number of distortion coefficient.''', description="Number of distortion coefficients.",
value=3, value=3,
range=(0, 5, 1), range=(0, 5, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxFrames', name="maxFrames",
label='Max Frames', label="Max Frames",
description='''Maximal number of frames to extract from the video file.''', description="Maximum number of frames to extract from the video file.",
value=0, value=0,
range=(0, 5, 1), range=(0, 5, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxCalibFrames', name="maxCalibFrames",
label='Max Calib Frames', label="Max Calib Frames",
description='''Maximal number of frames to use to calibrate from the selected frames.''', description="Maximum number of frames to use to calibrate from the selected frames.",
value=100, value=100,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='calibGridSize', name="calibGridSize",
label='Calib Grid Size', label="Calib Grid Size",
description='''Define the number of cells per edge.''', description="Define the number of cells per edge.",
value=10, value=10,
range=(0, 50, 1), range=(0, 50, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='minInputFrames', name="minInputFrames",
label='Min Input Frames', label="Min Input Frames",
description='''Minimal number of frames to limit the refinement loop.''', description="Minimum number of frames to limit the refinement loop.",
value=10, value=10,
range=(0, 100, 1), range=(0, 100, 1),
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='maxTotalAvgErr', name="maxTotalAvgErr",
label='Max Total Avg Err', label="Max Total Avg Err",
description='''Max Total Average Error.''', description="Maximum total average error.",
value=0.10000000000000001, value=0.10000000000000001,
range=(0.0, 1.0, 0.01), range=(0.0, 1.0, 0.01),
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='debugRejectedImgFolder', name="debugRejectedImgFolder",
label='Debug Rejected Img Folder', label="Debug Rejected Img Folder",
description='''Folder to export delete images during the refinement loop.''', description="Folder to export images that were deleted during the refinement loop.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='debugSelectedImgFolder', name="debugSelectedImgFolder",
label='Debug Selected Img Folder', label="Debug Selected Img Folder",
description='''Folder to export debug images.''', description="Folder to export debug images.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Output', label="Output",
description='''Output filename for intrinsic [and extrinsic] parameters.''', description="Output filename for intrinsic [and extrinsic] parameters.",
value=desc.Node.internalFolder + '/cameraCalibration.cal', value=desc.Node.internalFolder + "/cameraCalibration.cal",
uid=[], uid=[],
), ),
] ]

View file

@ -11,62 +11,64 @@ from meshroom.core import desc, Version
from meshroom.multiview import FilesByType, findFilesByTypeInFolder from meshroom.multiview import FilesByType, findFilesByTypeInFolder
Viewpoint = [ Viewpoint = [
desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=None), desc.IntParam(name="viewId", label="ID", description="Image UID.", value=-1, uid=[0], range=None),
desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=None), desc.IntParam(name="poseId", label="Pose ID", description="Pose ID.", value=-1, uid=[0], range=None),
desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0]), desc.File(name="path", label="Image Path", description="Image filepath.", value="", uid=[0]),
desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=None), desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal camera parameters.", value=-1, uid=[0], range=None),
desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=None), desc.IntParam(name="rigId", label="Rig", description="Rig parameters.", value=-1, uid=[0], range=None),
desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=None), desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig sub-pose parameters.", value=-1, uid=[0], range=None),
desc.StringParam(name="metadata", label="Image Metadata", desc.StringParam(name="metadata", label="Image Metadata",
description="The configuration of the Viewpoints is based on the images metadata.\n" description="The configuration of the Viewpoints is based on the images' metadata.\n"
"The important ones are:\n" "The important ones are:\n"
" * Focal Length: the focal length in mm.\n" " - Focal Length: the focal length in mm.\n"
" * Make and Model: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database.\n" " - Make and Model: this information allows to convert the focal in mm into a focal length in pixels using "
" * Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately.", "an embedded sensor database.\n"
" - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be "
"differentiated and their internal parameters are optimized separately.",
value="", uid=[], advanced=True), value="", uid=[], advanced=True),
] ]
Intrinsic = [ Intrinsic = [
desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), desc.IntParam(name="intrinsicId", label="ID", description="Intrinsic UID.", value=-1, uid=[0], range=None),
desc.FloatParam(name="initialFocalLength", label="Initial Focal Length", desc.FloatParam(name="initialFocalLength", label="Initial Focal Length",
description="Initial Guess on the Focal Length (in pixels). \n" description="Initial guess on the focal length (in pixels).\n"
"When we have an initial value from EXIF, this value is not accurate but cannot be wrong. \n" "When we have an initial value from EXIF, this value is not accurate but it cannot be wrong.\n"
"So this value is used to limit the range of possible values in the optimization. \n" "So this value is used to limit the range of possible values in the optimization.\n"
"If you put -1, this value will not be used and the focal length will not be bounded.", "If this value is set to -1, it will not be used and the focal length will not be bounded.",
value=-1.0, uid=[0], range=None), value=-1.0, uid=[0], range=None),
desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="focalLength", label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)),
desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), desc.FloatParam(name="pixelRatio", label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)),
desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', desc.BoolParam(name='pixelRatioLocked', label='Pixel Ratio Locked',
description='the pixelRatio value is locked for estimation', description='The pixel ratio value is locked for estimation.',
value=True, uid=[0]), value=True, uid=[0]),
desc.ChoiceParam(name="type", label="Camera Type", desc.ChoiceParam(name="type", label="Camera Type",
description="Mathematical Model used to represent a camera:\n" description="Mathematical model used to represent a camera:\n"
" * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n"
" * radial1: Pinhole camera with one radial distortion parameter\n" " - radial1: Pinhole camera with one radial distortion parameter.\n"
" * radial3: Pinhole camera with 3 radial distortion parameters\n" " - radial3: Pinhole camera with 3 radial distortion parameters.\n"
" * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" " - brown: Pinhole camera with 3 radial and 2 tangential distortion parameters.\n"
" * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" " - fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV).\n"
" * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n" " - equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV).\n"
" * 3deanamorphic4: Pinhole camera with a 4 anamorphic distortion coefficients.\n" " - 3deanamorphic4: Pinhole camera with 4 anamorphic distortion coefficients.\n"
" * 3declassicld: Pinhole camera with a 10 anamorphic distortion coefficients\n" " - 3declassicld: Pinhole camera with 10 anamorphic distortion coefficients.\n"
" * 3deradial4: Pinhole camera with 3DE radial4 model\n", " - 3deradial4: Pinhole camera with 3DE radial4 model.\n",
value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), value="", values=["", "pinhole", "radial1", "radial3", "brown", "fisheye4", "equidistant_r3", "3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, uid=[0]),
desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), desc.IntParam(name="width", label="Width", description="Image width.", value=0, uid=[0], range=(0, 10000, 1)),
desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image height.", value=0, uid=[0], range=(0, 10000, 1)),
desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor width (in mm).", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)),
desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor height (in mm).", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)),
desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), desc.StringParam(name="serialNumber", label="Serial Number", description="Device serial number (Camera UID and Lens UID combined).", value="", uid=[0]),
desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the optical center in the image (i.e. the sensor surface).", groupDesc=[
desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)),
desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)),
]), ]),
desc.ChoiceParam(name="initializationMode", label="Initialization Mode", desc.ChoiceParam(name="initializationMode", label="Initialization Mode",
description="Defines how this Intrinsic was initialized:\n" description="Defines how this intrinsic was initialized:\n"
" * calibrated: calibrated externally.\n" " - calibrated: calibrated externally.\n"
" * estimated: estimated from metadata and/or sensor width \n" " - estimated: estimated from metadata and/or sensor width.\n"
" * unknown: unknown camera parameters (can still have default value guess)\n" " - unknown: unknown camera parameters (can still have default value guess).\n"
" * none: not set", " - none: not set.",
values=("calibrated", "estimated", "unknown", "none"), values=("calibrated", "estimated", "unknown", "none"),
value="none", value="none",
exclusive=True, exclusive=True,
@ -74,11 +76,11 @@ Intrinsic = [
), ),
desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode", desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode",
description="Defines how the distortion model and parameters was initialized:\n" description="Defines how the distortion model and parameters were initialized:\n"
" * calibrated: calibrated externally.\n" " - calibrated: calibrated externally.\n"
" * estimated: estimated from a database of generic calibration \n" " - estimated: estimated from a database of generic calibration.\n"
" * unknown: unknown camera parameters (can still have default value guess)\n" " - unknown: unknown camera parameters (can still have default value guess).\n"
" * none: not set", " - none: not set.",
values=("calibrated", "estimated", "unknown", "none"), values=("calibrated", "estimated", "unknown", "none"),
value="none", value="none",
exclusive=True, exclusive=True,
@ -106,9 +108,10 @@ Intrinsic = [
label="Undistortion Params", label="Undistortion Params",
description="Undistortion parameters." description="Undistortion parameters."
), ),
desc.BoolParam(name='locked', label='Locked', desc.BoolParam(name="locked", label="Locked",
description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.",
value=False, uid=[0]), value=False, uid=[0]
),
] ]
def readSfMData(sfmFile): def readSfMData(sfmFile):
@ -163,151 +166,153 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode):
category = 'Sparse Reconstruction' category = 'Sparse Reconstruction'
documentation = ''' documentation = '''
This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length
and which images are sharing the same internal camera parameters, as well as potential cameras rigs. and which images are sharing the same internal camera parameters, as well as potential camera rigs.
When you import new images into Meshroom, this node is automatically configured from the analysis of the image metadata. When you import new images into Meshroom, this node is automatically configured from the analysis of the images' metadata.
The software can support images without any metadata but it is recommended to have them for robustness. The software can support images without any metadata but it is recommended to have them for robustness.
### Metadata ### Metadata
Metadata allows images to be grouped together and provides an initialization of the focal length (in pixel unit). Metadata allow images to be grouped together and provide an initialization of the focal length (in pixel unit).
The metadata needed are: The needed metadata are:
* **Focal Length**: the focal length in mm. * **Focal Length**: the focal length in mm.
* **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database. * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixels using an embedded sensor database.
* **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately (in the photogrammetry case). * **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately (in the photogrammetry case).
''' '''
inputs = [ inputs = [
desc.ListAttribute( desc.ListAttribute(
name="viewpoints", name="viewpoints",
elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="", groupDesc=Viewpoint), elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="Viewpoint.", groupDesc=Viewpoint),
label="Viewpoints", label="Viewpoints",
description="Input viewpoints", description="Input viewpoints.",
group="", group="",
), ),
desc.ListAttribute( desc.ListAttribute(
name="intrinsics", name="intrinsics",
elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="", groupDesc=Intrinsic), elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="Intrinsic.", groupDesc=Intrinsic),
label="Intrinsics", label="Intrinsics",
description="Camera Intrinsics", description="Camera intrinsics.",
group="", group="",
), ),
desc.File( desc.File(
name='sensorDatabase', name="sensorDatabase",
label='Sensor Database', label="Sensor Database",
description='''Camera sensor width database path.''', description="Camera sensor with database path.",
value='${ALICEVISION_SENSOR_DB}', value="${ALICEVISION_SENSOR_DB}",
uid=[], uid=[],
), ),
desc.File( desc.File(
name='lensCorrectionProfileInfo', name="lensCorrectionProfileInfo",
label='Lens Correction Profile Info', label="LCP Info",
description='''Lens Correction Profile filepath or database directory.''', description="Lens Correction Profile filepath or database directory.",
value='${ALICEVISION_LENS_PROFILE_INFO}', value="${ALICEVISION_LENS_PROFILE_INFO}",
uid=[], uid=[],
), ),
desc.BoolParam( desc.BoolParam(
name='lensCorrectionProfileSearchIgnoreCameraModel', name="lensCorrectionProfileSearchIgnoreCameraModel",
label='LCP Generic Search', label="LCP Generic Search",
description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.",
value=True, value=True,
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
desc.FloatParam( desc.FloatParam(
name='defaultFieldOfView', name="defaultFieldOfView",
label='Default Field Of View', label="Default Field Of View",
description='Default value for the field of view (in degree) used as an initialization when there is no focal or field of view in the image metadata.', description="Default value for the field of view (in degrees) used as an initialization value when there is no focal or field of view in the image metadata.",
value=45.0, value=45.0,
range=(0.0, 180.0, 1.0), range=(0.0, 180.0, 1.0),
uid=[], uid=[],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='groupCameraFallback', name="groupCameraFallback",
label='Group Camera Fallback', label="Group Camera Fallback",
description="If there is no serial number in image metadata, devices cannot be accurately identified.\n" description="If there is no serial number in the images' metadata, devices cannot be accurately identified.\n"
"Therefore, internal camera parameters cannot be shared among images reliably.\n" "Therefore, internal camera parameters cannot be shared among images reliably.\n"
"A fallback grouping strategy must be chosen:\n" "A fallback grouping strategy must be chosen:\n"
" * global: group images from comparable devices (same make/model/focal) globally.\n" " - global: group images from comparable devices (same make/model/focal) globally.\n"
" * folder: group images from comparable devices only within the same folder.\n" " - folder: group images from comparable devices only within the same folder.\n"
" * image: never group images from comparable devices", " - image: never group images from comparable devices.",
values=['global', 'folder', 'image'], values=["global", "folder", "image"],
value='folder', value="folder",
exclusive=True, exclusive=True,
uid=[], uid=[],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='allowedCameraModels', name="allowedCameraModels",
label='Allowed Camera Models', label="Allowed Camera Models",
description='the Camera Models that can be attributed.', description='List of the camera models that can be attributed.',
value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"],
values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], values=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"],
exclusive=False, exclusive=False,
uid=[], uid=[],
joinChar=',', joinChar=",",
advanced=True, advanced=True,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='rawColorInterpretation', name="rawColorInterpretation",
label='RAW Color Interpretation', label="RAW Color Interpretation",
description='Allows you to choose how raw data are color processed:\n' description="Allows to choose how RAW data are color processed:\n"
'None: Debayering without any color processing.\n' " - None: Debayering without any color processing.\n"
'LibRawNoWhiteBalancing: Simple neutralization.\n' " - LibRawNoWhiteBalancing: Simple neutralization.\n"
'LibRawWhiteBalancing: Use internal white balancing from libraw.\n' " - LibRawWhiteBalancing: Use internal white balancing from libraw.\n"
'DCPLinearProcessing: Use DCP color profile.\n' " - DCPLinearProcessing: Use DCP color profile.\n"
'DCPMetadata: Same as None with DCP info added in metadata.', " - DCPMetadata: Same as None with DCP info added in metadata.",
value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing",
values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='colorProfileDatabase', name="colorProfileDatabase",
label='Color Profile Database', label="Color Profile Database",
description='''Color Profile database directory path.''', description="Color Profile database directory path.",
value='${ALICEVISION_COLOR_PROFILE_DB}', value="${ALICEVISION_COLOR_PROFILE_DB}",
enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"),
uid=[], uid=[],
), ),
desc.BoolParam( desc.BoolParam(
name='errorOnMissingColorProfile', name="errorOnMissingColorProfile",
label='Error On Missing DCP Color Profile', label="Error On Missing DCP Color Profile",
description='When enabled, if no color profile is found for at least one image, then an error is thrown.\n' description="When enabled, if no color profile is found for at least one image, then an error is thrown.\n"
'When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.', "When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.",
value=True, value=True,
enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"),
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='viewIdMethod', name="viewIdMethod",
label='ViewId Method', label="ViewId Method",
description="Allows to choose the way the viewID is generated:\n" description="Allows to choose the way the viewID is generated:\n"
" * metadata : Generate viewId from image metadata.\n" " - metadata : Generate viewId from image metadata.\n"
" * filename : Generate viewId from file names using regex.", " - filename : Generate viewId from filename using regex.",
value='metadata', value="metadata",
values=['metadata', 'filename'], values=["metadata", "filename"],
exclusive=True, exclusive=True,
uid=[], uid=[],
advanced=True, advanced=True,
), ),
desc.StringParam( desc.StringParam(
name='viewIdRegex', name="viewIdRegex",
label='ViewId Regex', label="ViewId Regex",
description='Regex used to catch number used as viewId in filename.' description="Regex used to catch number used as viewId in filename."
'You should capture specific parts of the filename with parenthesis to define matching elements. (only number will works)\n' "You should capture specific parts of the filename with parentheses to define matching elements. (only numbers will work)\n"
'Some examples of patterns:\n' "Some examples of patterns:\n"
r' - Match the longest number at the end of filename (default value): ".*?(\d+)"' + '\n' + " - Match the longest number at the end of the filename (default value): "
r' - Match the first number found in filename : "(\d+).*"', r'".*?(\d+)"' + "\n" +
value=r'.*?(\d+)', " - Match the first number found in filename: "
r'"(\d+).*"',
value=r".*?(\d+)",
uid=[], uid=[],
advanced=True, advanced=True,
enabled=lambda node: node.viewIdMethod.value == 'filename', enabled=lambda node: node.viewIdMethod.value == "filename",
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
), ),

View file

@ -8,217 +8,228 @@ class CameraLocalization(desc.AVCommandLineNode):
commandLine = 'aliceVision_cameraLocalization {allParams}' commandLine = 'aliceVision_cameraLocalization {allParams}'
category = 'Utils' category = 'Utils'
documentation = '''
'''
inputs = [ inputs = [
desc.File( desc.File(
name='sfmdata', name="sfmdata",
label='SfM Data', label="SfMData",
description='''The sfm_data.json kind of file generated by AliceVision.''', description="The SfMData file generated by AliceVision.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='mediafile', name="mediafile",
label='Media File', label="Media File",
description='''The folder path or the filename for the media to track''', description="The folder path or the filename for the media to track.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='visualDebug', name="visualDebug",
label='Visual Debug Folder', label="Visual Debug Folder",
description='''If a folder is provided it enables visual debug and saves all the debugging info in that folder''', description="If a folder is provided, this enables visual debug and all the debugging information will be saved in that folder.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='descriptorPath', name="descriptorPath",
label='Descriptor Path', label="Descriptor Path",
description='''Folder containing the descriptors for all the images (ie the *.desc.)''', description="Folder containing the descriptors for all the images (ie. the *.desc.).",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchDescTypes', name="matchDescTypes",
label='Match Desc Types', label="Match Desc Types",
description='''Describer types to use for the matching.''', description="Describer types to use for the matching.",
value=['dspsift'], value=["dspsift"],
values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=",",
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='preset', name="preset",
label='Preset', label="Preset",
description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).",
value='normal', value="normal",
values=['low', 'medium', 'normal', 'high', 'ultra'], values=["low", "medium", "normal", "high", "ultra"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='resectionEstimator', name="resectionEstimator",
label='Resection Estimator', label="Resection Estimator",
description='''The type of *sac framework to use for resection (acransac, loransac)''', description="The type of *sac framework to use for resection (acransac, loransac).",
value='acransac', value="acransac",
values=['acransac', 'loransac'], values=["acransac", "loransac"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchingEstimator', name="matchingEstimator",
label='Matching Estimator', label="Matching Estimator",
description='''The type of *sac framework to use for matching (acransac, loransac)''', description="The type of *sac framework to use for matching (acransac, loransac).",
value='acransac', value="acransac",
values=['acransac', 'loransac'], values=["acransac", "loransac"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='calibration', name="calibration",
label='Calibration', label="Calibration",
description='''Calibration file''', description="Calibration file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='refineIntrinsics', name="refineIntrinsics",
label='Refine Intrinsics', label="Refine Intrinsics",
description='''Enable/Disable camera intrinsics refinement for each localized image''', description="Enable/Disable camera intrinsics refinement for each localized image.",
value=False, value=False,
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='reprojectionError', name="reprojectionError",
label='Reprojection Error', label="Reprojection Error",
description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', description="Maximum reprojection error (in pixels) allowed for resectioning. If set to 0, it lets the ACRansac select an optimal value.",
value=4.0, value=4.0,
range=(0.1, 50.0, 0.1), range=(0.1, 50.0, 0.1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nbImageMatch', name="nbImageMatch",
label='Nb Image Match', label="Nb Image Match",
description='''[voctree] Number of images to retrieve in database''', description="[voctree] Number of images to retrieve in database.",
value=4, value=4,
range=(1, 1000, 1), range=(1, 1000, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxResults', name="maxResults",
label='Max Results', label="Max Results",
description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.",
value=10, value=10,
range=(1, 100, 1), range=(1, 100, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='commonviews', name="commonviews",
label='Commonviews', label="Common Views",
description='''[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking''', description="[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking.",
value=3, value=3,
range=(2, 50, 1), range=(2, 50, 1),
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='voctree', name="voctree",
label='Voctree', label="Voctree",
description='''[voctree] Filename for the vocabulary tree''', description="[voctree] Filename for the vocabulary tree.",
value='${ALICEVISION_VOCTREE}', value="${ALICEVISION_VOCTREE}",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='voctreeWeights', name="voctreeWeights",
label='Voctree Weights', label="Voctree Weights",
description='''[voctree] Filename for the vocabulary tree weights''', description="[voctree] Filename for the vocabulary tree weights.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='algorithm', name="algorithm",
label='Algorithm', label="Algorithm",
description='''[voctree] Algorithm type: FirstBest, AllResults''', description="[voctree] Algorithm type: FirstBest, AllResults.",
value='AllResults', value="AllResults",
values=['FirstBest', 'AllResults'], values=["FirstBest", "AllResults"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='matchingError', name="matchingError",
label='Matching Error', label="Matching Error",
description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0, it lets the ACRansac select an optimal value.",
value=4.0, value=4.0,
range=(0.0, 50.0, 1.0), range=(0.0, 50.0, 1.0),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nbFrameBufferMatching', name="nbFrameBufferMatching",
label='Nb Frame Buffer Matching', label="Nb Frame Buffer Matching",
description='''[voctree] Number of previous frame of the sequence to use for matching (0 = Disable)''', description="[voctree] Number of previous frames of the sequence to use for matching (0 = Disable).",
value=10, value=10,
range=(0, 100, 1), range=(0, 100, 1),
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='robustMatching', name="robustMatching",
label='Robust Matching', label="Robust Matching",
description='''[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.''', description="[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.",
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nNearestKeyFrames', name="nNearestKeyFrames",
label='N Nearest Key Frames', label="N Nearest Key Frames",
description='''[cctag] Number of images to retrieve in the database Parameters specific for final (optional) bundle adjustment optimization of the sequence:''', description="[cctag] Number of images to retrieve in the database. Parameters specific for final (optional) bundle adjustment optimization of the sequence.",
value=5, value=5,
range=(1, 100, 1), range=(1, 100, 1),
uid=[0], uid=[0],
), ),
desc.StringParam( desc.StringParam(
name='globalBundle', name="globalBundle",
label='Global Bundle', label="Global Bundle",
description='''[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.''', description="[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='noDistortion', name="noDistortion",
label='No Distortion', label="No Distortion",
description='''[bundle adjustment] It does not take into account distortion during the BA, it consider the distortion coefficients all equal to 0''', description="[bundle adjustment] It does not take into account distortion during the BA, it considers the distortion coefficients to all be equal to 0.",
value=False, value=False,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='noBArefineIntrinsics', name="noBArefineIntrinsics",
label='No BA Refine Intrinsics', label="No BA Refine Intrinsics",
description='''[bundle adjustment] It does not refine intrinsics during BA''', description="[bundle adjustment] If set to true, does not refine intrinsics during BA.",
value=False, value=False,
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='minPointVisibility', name="minPointVisibility",
label='Min Point Visibility', label="Min Point Visibility",
description='''[bundle adjustment] Minimum number of observation that a point must have in order to be considered for bundle adjustment''', description="[bundle adjustment] Minimum number of observations that a point must have in order to be considered for bundle adjustment.",
value=2, value=2,
range=(2, 50, 1), range=(2, 50, 1),
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='outputAlembic', name="outputAlembic",
label='Alembic', label="Alembic",
description='''Filename for the SfMData export file (where camera poses will be stored)''', description="Filename for the SfMData export file (where camera poses will be stored).",
value=desc.Node.internalFolder + 'trackedCameras.abc', value=desc.Node.internalFolder + "trackedCameras.abc",
uid=[], uid=[],
), ),
desc.File( desc.File(
name='outputJSON', name="outputJSON",
label='JSON', label="JSON File",
description='''Filename for the localization results as .json''', description="Filename for the localization results as .json.",
value=desc.Node.internalFolder + 'trackedCameras.json', value=desc.Node.internalFolder + "trackedCameras.json",
uid=[], uid=[],
), ),
] ]

View file

@ -8,166 +8,180 @@ class CameraRigCalibration(desc.AVCommandLineNode):
commandLine = 'aliceVision_rigCalibration {allParams}' commandLine = 'aliceVision_rigCalibration {allParams}'
category = 'Utils' category = 'Utils'
documentation = '''
'''
inputs = [ inputs = [
desc.File( desc.File(
name='sfmdata', name="sfmdata",
label='SfM Data', label='SfMData',
description='''The sfmData file.''', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='mediapath', name="mediapath",
label='Media Path', label="Media Path",
description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', description="The path to the video file, the folder of the image sequence or a text file\n"
value='', "(one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).",
value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='cameraIntrinsics', name="cameraIntrinsics",
label='Camera Intrinsics', label="Camera Intrinsics",
description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='export', name="export",
label='Export', label="Export File",
description='''Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.''', description="Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.",
value='trackedcameras.abc', value="trackedcameras.abc",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='descriptorPath', name="descriptorPath",
label='Descriptor Path', label="Descriptor Path",
description='''Folder containing the .desc.''', description="Folder containing the .desc.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchDescTypes', name="matchDescTypes",
label='Match Describer Types', label="Match Describer Types",
description='''The describer types to use for the matching''', description="The describer types to use for the matching.",
value=['dspsift'], value=["dspsift"],
values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=",",
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='preset', name="preset",
label='Preset', label="Preset",
description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).",
value='normal', value="normal",
values=['low', 'medium', 'normal', 'high', 'ultra'], values=["low", "medium", "normal", "high", "ultra"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='resectionEstimator', name="resectionEstimator",
label='Resection Estimator', label="Resection Estimator",
description='''The type of *sac framework to use for resection (acransac,loransac)''', description="The type of *sac framework to use for resection (acransac, loransac).",
value='acransac', value="acransac",
values=['acransac', 'loransac'], values=["acransac", "loransac"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchingEstimator', name="matchingEstimator",
label='Matching Estimator', label="Matching Estimator",
description='''The type of *sac framework to use for matching (acransac,loransac)''', description="The type of *sac framework to use for matching (acransac, loransac).",
value='acransac', value="acransac",
values=['acransac', 'loransac'], values=["acransac", "loransac"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.StringParam( desc.StringParam(
name='refineIntrinsics', name="refineIntrinsics",
label='Refine Intrinsics', label="Refine Intrinsics",
description='''Enable/Disable camera intrinsics refinement for each localized image''', description="Enable/Disable camera intrinsics refinement for each localized image.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='reprojectionError', name="reprojectionError",
label='Reprojection Error', label="Reprojection Error",
description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', description="Maximum reprojection error (in pixels) allowed for resectioning.\n"
"If set to 0, it lets the ACRansac select an optimal value.",
value=4.0, value=4.0,
range=(0.0, 10.0, 0.1), range=(0.0, 10.0, 0.1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxInputFrames', name="maxInputFrames",
label='Max Input Frames', label="Max Input Frames",
description='''Maximum number of frames to read in input. 0 means no limit.''', description="Maximum number of frames to read in input. 0 means no limit.",
value=0, value=0,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='voctree', name="voctree",
label='Voctree', label="Voctree",
description='''[voctree] Filename for the vocabulary tree''', description="[voctree] Filename for the vocabulary tree.",
value='${ALICEVISION_VOCTREE}', value="${ALICEVISION_VOCTREE}",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='voctreeWeights', name="voctreeWeights",
label='Voctree Weights', label="Voctree Weights",
description='''[voctree] Filename for the vocabulary tree weights''', description="[voctree] Filename for the vocabulary tree weights.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='algorithm', name="algorithm",
label='Algorithm', label="Algorithm",
description='''[voctree] Algorithm type: {FirstBest,AllResults}''', description="[voctree] Algorithm type: {FirstBest, AllResults}.",
value='AllResults', value="AllResults",
values=['FirstBest', 'AllResults'], values=["FirstBest", "AllResults"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nbImageMatch', name="nbImageMatch",
label='Nb Image Match', label="Nb Image Match",
description='''[voctree] Number of images to retrieve in the database''', description="[voctree] Number of images to retrieve in the database.",
value=4, value=4,
range=(0, 50, 1), range=(0, 50, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxResults', name="maxResults",
label='Max Results', label="Max Results",
description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If set to 0, it is ignored.",
value=10, value=10,
range=(0, 100, 1), range=(0, 100, 1),
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='matchingError', name="matchingError",
label='Matching Error', label="Matching Error",
description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification.\n"
"If set to 0, it lets the ACRansac select an optimal value.",
value=4.0, value=4.0,
range=(0.0, 10.0, 0.1), range=(0.0, 10.0, 0.1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nNearestKeyFrames', name="nNearestKeyFrames",
label='N Nearest Key Frames', label="N Nearest Key Frames",
description='''[cctag] Number of images to retrieve in database''', description="[cctag] Number of images to retrieve in database.",
value=5, value=5,
range=(0, 50, 1), range=(0, 50, 1),
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='outfile', name="outfile",
label='File', label="Output File",
description='''The name of the file where to store the calibration data''', description="The name of the file to store the calibration data in.",
value=desc.Node.internalFolder + 'cameraRigCalibration.rigCal', value=desc.Node.internalFolder + "cameraRigCalibration.rigCal",
uid=[], uid=[],
), ),
] ]

View file

@ -8,173 +8,187 @@ class CameraRigLocalization(desc.AVCommandLineNode):
commandLine = 'aliceVision_rigLocalization {allParams}' commandLine = 'aliceVision_rigLocalization {allParams}'
category = 'Utils' category = 'Utils'
documentation = '''
'''
inputs = [ inputs = [
desc.File( desc.File(
name='sfmdata', name="sfmdata",
label='Sfm Data', label="SfMData",
description='''The sfmData file.''', description="The input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='mediapath', name="mediapath",
label='Media Path', label="Media Path",
description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', description="The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='calibration', name="calibration",
label='Rig Calibration File', label="Rig Calibration File",
description='''The file containing the calibration data for the rig (subposes)''', description="The file containing the calibration data for the rig (subposes).",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='cameraIntrinsics', name="cameraIntrinsics",
label='Camera Intrinsics', label="Camera Intrinsics",
description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='descriptorPath', name="descriptorPath",
label='Descriptor Path', label="Descriptor Path",
description='''Folder containing the .desc.''', description="Folder containing the .desc.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchDescTypes', name="matchDescTypes",
label='Match Describer Types', label="Match Describer Types",
description='''The describer types to use for the matching''', description="The describer types to use for the matching.",
value=['dspsift'], value=["dspsift"],
values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=",",
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='preset', name="preset",
label='Preset', label="Preset",
description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).",
value='normal', value="normal",
values=['low', 'medium', 'normal', 'high', 'ultra'], values=["low", "medium", "normal", "high", "ultra"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='resectionEstimator', name="resectionEstimator",
label='Resection Estimator', label="Resection Estimator",
description='''The type of *sac framework to use for resection (acransac, loransac)''', description="The type of *sac framework to use for resection (acransac, loransac).",
value='acransac', value="acransac",
values=['acransac', 'loransac'], values=["acransac", "loransac"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchingEstimator', name="matchingEstimator",
label='Matching Estimator', label="Matching Estimator",
description='''The type of *sac framework to use for matching (acransac, loransac)''', description="The type of *sac framework to use for matching (acransac, loransac).",
value='acransac', value="acransac",
values=['acransac', 'loransac'], values=["acransac", "loransac"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.StringParam( desc.StringParam(
name='refineIntrinsics', name="refineIntrinsics",
label='Refine Intrinsics', label="Refine Intrinsics",
description='''Enable/Disable camera intrinsics refinement for each localized image''', description="Enable/Disable camera intrinsics refinement for each localized image.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='reprojectionError', name="reprojectionError",
label='Reprojection Error', label="Reprojection Error",
description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', description="Maximum reprojection error (in pixels) allowed for resectioning.\n"
"If set to 0, it lets the ACRansac select an optimal value.",
value=4.0, value=4.0,
range=(0.0, 10.0, 0.1), range=(0.0, 10.0, 0.1),
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='useLocalizeRigNaive', name="useLocalizeRigNaive",
label='Use Localize Rig Naive', label="Use Localize Rig Naive",
description='''Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.''', description="Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.",
value=False, value=False,
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='angularThreshold', name="angularThreshold",
label='Angular Threshold', label="Angular Threshold",
description='''The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.''', description="The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.",
value=0.1, value=0.1,
range=(0.0, 10.0, 0.01), range=(0.0, 10.0, 0.01),
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='voctree', name="voctree",
label='Voctree', label="Voctree",
description='''[voctree] Filename for the vocabulary tree''', description="[voctree] Filename for the vocabulary tree.""",
value='${ALICEVISION_VOCTREE}', value="${ALICEVISION_VOCTREE}",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='voctreeWeights', name="voctreeWeights",
label='Voctree Weights', label="Voctree Weights",
description='''[voctree] Filename for the vocabulary tree weights''', description="[voctree] Filename for the vocabulary tree weights.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='algorithm', name="algorithm",
label='Algorithm', label="Algorithm",
description='''[voctree] Algorithm type: {FirstBest,AllResults}''', description="[voctree] Algorithm type: {FirstBest, AllResults}.",
value='AllResults', value="AllResults",
values=['FirstBest', 'AllResults'], values=["FirstBest", "AllResults"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nbImageMatch', name="nbImageMatch",
label='Nb Image Match', label="Nb Image Match",
description='''[voctree] Number of images to retrieve in the database''', description="[voctree] Number of images to retrieve in the database.",
value=4, value=4,
range=(0, 100, 1), range=(0, 100, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxResults', name="maxResults",
label='Max Results', label="Max Results",
description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached.\n"
"If set to 0, it is ignored.",
value=10, value=10,
range=(0, 100, 1), range=(0, 100, 1),
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='matchingError', name="matchingError",
label='Matching Error', label="Matching Error",
description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification.\n"
"If set to 0, it lets the ACRansac select an optimal value.",
value=4.0, value=4.0,
range=(0.0, 10.0, 0.1), range=(0.0, 10.0, 0.1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='nNearestKeyFrames', name="nNearestKeyFrames",
label='N Nearest Key Frames', label="N Nearest Key Frames",
description='''[cctag] Number of images to retrieve in database''', description="[cctag] Number of images to retrieve in database.",
value=5, value=5,
range=(0, 50, 1), range=(0, 50, 1),
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='outputAlembic', name="outputAlembic",
label='Alembic', label="Alembic",
description='''Filename for the SfMData export file (where camera poses will be stored).''', description="Filename for the SfMData export file (where camera poses will be stored).",
value=desc.Node.internalFolder + 'trackedcameras.abc', value=desc.Node.internalFolder + "trackedcameras.abc",
uid=[], uid=[],
), ),
] ]

View file

@ -23,56 +23,66 @@ If multiple color charts are submitted, only the first one will be taken in acco
inputs = [ inputs = [
desc.File( desc.File(
name='inputData', name="inputData",
label='Color checker data', label="Color Checker Data",
description='Position and colorimetric data of the color checker', description="Position and colorimetric data of the color checker.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='input', name="input",
label='Input', label="Input",
description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', description="Input SfMData file, image filenames or regex(es) on the image file path.\n"
value='', "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.",
value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='extension', name="extension",
label='Output File Extension', label="Output File Extension",
description='Output Image File Extension.', description="Output image file extension.",
value='exr', value="exr",
values=['exr', ''], values=["exr", ""],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='storageDataType', name="storageDataType",
label='Storage Data Type for EXR output', label="EXR Storage Data Type",
description='Storage image data type:\n' description="Storage data type for EXR output:\n"
' * float: Use full floating point (32 bits per channel)\n' " - float: Use full floating point (32 bits per channel).\n"
' * half: Use half float (16 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' " - 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', " - auto: Use half float if all values can fit, else use full float.",
value='float', value="float",
values=['float', 'half', 'halfFinite', 'auto'], values=["float", "half", "halfFinite", "auto"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='outSfMData', name="outSfMData",
label='SfmData', label="SfMData",
description='Output sfmData.', description="Output SfMData.",
value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "",
uid=[], uid=[],
group='', # do not export on the command line group="", # do not export on the command line
), ),
desc.File( desc.File(
name='output', name="output",
label='Folder', label="Folder",
description='Output Images Folder.', description="Output images folder.",
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[],
), ),

View file

@ -28,36 +28,46 @@ Dev notes:
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="Input",
description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', description="SfMData file input, image filenames or regex(es) on the image file path.\n"
value='', "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.",
value="",
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='maxCount', name="maxCount",
label='Max count by image', label="Max Count By Image",
description='Max color charts count to detect in a single image', description="Maximum color charts count to detect in a single image.",
value=1, value=1,
range=(1, 3, 1), range=(1, 3, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
desc.BoolParam( desc.BoolParam(
name='debug', name="debug",
label='Debug', label="Debug",
description='If checked, debug data will be generated', description="If checked, debug data will be generated.",
value=False, value=False,
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='outputData', name="outputData",
label='Color checker data', label="Color Checker Data",
description='Output position and colorimetric data extracted from detected color checkers in the images', description="Output position and colorimetric data extracted from detected color checkers in the images.",
value=desc.Node.internalFolder + '/ccheckers.json', value=desc.Node.internalFolder + "/ccheckers.json",
uid=[], uid=[],
), ),
] ]

View file

@ -11,28 +11,28 @@ class ConvertMesh(desc.AVCommandLineNode):
inputs = [ inputs = [
desc.File( desc.File(
name='inputMesh', name="inputMesh",
label='Input Mesh', label="Input Mesh",
description='Input Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', description="Input mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='outputMeshFileType', name="outputMeshFileType",
label='File Type', label="File Type",
description='''Output Mesh Format (*.obj, *.gltf, *.fbx, *.stl).''', description="Output mesh format (*.obj, *.gltf, *.fbx, *.stl).",
value='obj', value="obj",
values=('gltf', 'obj', 'fbx', 'stl'), values=("gltf", "obj", "fbx", "stl"),
exclusive=True, exclusive=True,
uid=[0], uid=[0],
group='', group="",
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
), ),
@ -40,10 +40,10 @@ class ConvertMesh(desc.AVCommandLineNode):
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Mesh', label="Mesh",
description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).",
value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFileTypeValue}', value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}",
uid=[], uid=[],
), ),
] ]

View file

@ -15,96 +15,96 @@ It can also be used to remove specific parts of from an SfM scene (like filter a
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="Input",
description='SfMData file.', description="SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='fileExt', name="fileExt",
label='SfM File Format', label="SfM File Format",
description='SfM File Format', description="Output SfM file format.",
value='abc', value="abc",
values=['abc', 'sfm', 'json', 'ply', 'baf'], values=["abc", "sfm", "json", "ply", "baf"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
group='', # exclude from command line group="", # exclude from command line
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='describerTypes', name="describerTypes",
label='Describer Types', label="Describer Types",
description='Describer types to keep.', description="Describer types to keep.",
value=['dspsift'], value=["dspsift"],
values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=",",
), ),
desc.ListAttribute( desc.ListAttribute(
elementDesc=desc.File( elementDesc=desc.File(
name="imageId", name="imageId",
label="Image id", label="Image ID",
description="", description="UID or path of an image to add to the whitelist.",
value="", value="",
uid=[0], uid=[0],
), ),
name="imageWhiteList", name="imageWhiteList",
label="Image White List", label="Image White List",
description='image white list (uids or image paths).', description="Image white list (UIDs or image paths).",
), ),
desc.BoolParam( desc.BoolParam(
name='views', name="views",
label='Views', label="Views",
description='Export views.', description="Export views.",
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='intrinsics', name="intrinsics",
label='Intrinsics', label="Intrinsics",
description='Export intrinsics.', description="Export intrinsics.",
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='extrinsics', name="extrinsics",
label='Extrinsics', label="Extrinsics",
description='Export extrinsics.', description="Export extrinsics.",
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='structure', name="structure",
label='Structure', label="Structure",
description='Export structure.', description="Export structure.",
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='observations', name="observations",
label='Observations', label="Observations",
description='Export observations.', description="Export observations.",
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[0], uid=[],
), ),
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Output', label="Output",
description='Path to the output SfM Data file.', description="Path to the output SfMData file.",
value=desc.Node.internalFolder + 'sfm.{fileExtValue}', value=desc.Node.internalFolder + "sfm.{fileExtValue}",
uid=[], uid=[],
), ),
] ]