three.MF.V3.Settings.Scan

  1from MF.V3.Settings.Camera import Camera as MF_V3_Settings_Camera_Camera
  2from MF.V3.Settings.Capture import Capture as MF_V3_Settings_Capture_Capture
  3from MF.V3.Settings.Projector import Projector as MF_V3_Settings_Projector_Projector
  4from MF.V3.Settings.Turntable import Turntable as MF_V3_Settings_Turntable_Turntable
  5from enum import Enum
  6from typing import List
  7
  8
  9class Scan:
 10
 11    """
 12     Scan settings.
 13    """
 14    class Processing:
 15
 16        """
 17         Scan processing settings.
 18        """
 19        class PhaseEdgeDetection:
 20            """
 21            Phase edge detection settings.
 22
 23            Phase edge detection produces a binary mask indicating the edges of a horizontal/vertical pair of phase images.  Since flat geometries give a constant phase image gradient, we use the second derivative (Laplacian) of the phase image to detect edges rather than the gradient.
 24
 25            The edge mask generated by phase edge detection is an input to both phase filtering and adaptive sampling.  If neither of these are enabled, the phase edge detection settings have no effect on the output point cloud.
 26            """
 27            def __init__(self, threshold: float, laplacianKernelRadius: int, gaussianBlurRadius: int, gaussianBlurStdDev: float, maximumWidthForProcessing: int):
 28                # The edge detection threshold.
 29                self.threshold = threshold
 30                # The Laplacian kernel radius.  This must be in the range [1..5].
 31                self.laplacianKernelRadius = laplacianKernelRadius
 32                """
 33                Gaussian blur kernel radius. (Optional)  To disable, set to 0.
 34                The phase images can optionally blurred before taking the Laplacian to reduce noise.
 35                However as a result, the detected edges are wider.
 36                """
 37                self.gaussianBlurRadius = gaussianBlurRadius
 38                """
 39                Gaussian blur kernel standard deviation.
 40                This parameter is ignored if `gaussianBlurSize` is zero.
 41                """
 42                self.gaussianBlurStdDev = gaussianBlurStdDev
 43                """
 44                The maximum image width for processing. (Optional) To disable, set to 0.
 45                If this value is greater than zero, the phase images are resized to the maximum width prior
 46                to computing the Laplacian and the the detected edges are then upsampled to the original size.
 47                This would be done to speed up processing or to detect edges on a larger scale.
 48                """
 49                self.maximumWidthForProcessing = maximumWidthForProcessing
 50
 51        class PhaseFilter:
 52
 53            """
 54             Phase filter settings.
 55            """
 56            def __init__(self, kernelRadius: int, spatialWeightStdDev: float):
 57                """
 58                The filter kernel radius.
 59                A neighboring value must be within this radius to be included in the filter.
 60                If the kernel radius is set to zero, the phase filtering is disabled.
 61                """
 62                self.kernelRadius = kernelRadius
 63                """
 64                The standard deviation of the spatial weights.
 65                The weight of a neighboring value is $\exp(-(r/s)^2)$ where $r$ is the distance
 66                to the central value and $s$ is the spatial weight standard deviation.
 67                If the spatial weight standard deviation is set to zero, all the spatial
 68                weights are uniformly set to 1.
 69                """
 70                self.spatialWeightStdDev = spatialWeightStdDev
 71
 72        class AdaptiveSampling:
 73            """
 74            Adaptive sampling settings
 75
 76            Adaptive sampling will downsample points in regions of low detail
 77            and keep points in regions of high detail.
 78            """
 79            class Type(Enum):
 80                NONE = "NONE"  # Do not use adaptive sampling.
 81                REGULAR = "REGULAR"  # Use a regular sampling mask in regions of low detail.
 82                RANDOM = "RANDOM"  # Use a random sampling mask in regions of low detail.
 83
 84            def __init__(self, type: 'Type', rate: float):
 85                # Sampling type.
 86                self.type = type
 87                # The sample rate [0..1] for the regions of low detail.
 88                self.rate = rate
 89
 90        class PointClipping:
 91
 92            """
 93             Point clipping settings.
 94            """
 95            class Type(Enum):
 96
 97                """
 98                 Point clipping type.
 99                """
100                OutsideCube = "OutsideCube"  # Clip points outside a unit cube.
101                OutsideCylinder = "OutsideCylinder"  # Clip points outside a unit cylinder.
102                OutsideSphere = "OutsideSphere"  # Clip points outside a unit sphere.
103                InsideCube = "InsideCube"  # Clip points inside a unit cube.
104                InsideCylinder = "InsideCylinder"  # Clip points inside a unit cylinder.
105                InsideSphere = "InsideSphere"  # Clip points inside a unit sphere.
106
107            def __init__(self, type: 'Type', transform: List[float] = None):
108                # Point clipping type.
109                self.type = type
110                # 4x4 transform mapping 3D points to the canonical point clipping coordinates.
111                self.transform = transform
112
113        class NormalEstimation:
114
115            """
116             Normal estimation settings.
117            """
118            class Method(Enum):
119                NORMAL_LLS = "NORMAL_LLS"  # Linear least squares method
120                NORMAL_OPEN3D = "NORMAL_OPEN3D"  # Open3D method using KD tree search for nearest neighbors
121
122            def __init__(self, method: 'Method', maximumNeighbourCount: int, maximumNeighbourRadius: float, useMaximumNeighbourCount: bool, useMaximumNeighbourRadius: bool):
123                # Normal estimation method.
124                self.method = method
125                """
126                Maximum number of nearest neighbors used to compute the normal.
127                This value is only used with the NORMAL_OPEN3D method.
128                """
129                self.maximumNeighbourCount = maximumNeighbourCount
130                # Maximum radius for a point to be considered a neighbour.
131                self.maximumNeighbourRadius = maximumNeighbourRadius
132                # Use the maximum neighbour count.
133                self.useMaximumNeighbourCount = useMaximumNeighbourCount
134                # Use the maximum neighbour radius.
135                self.useMaximumNeighbourRadius = useMaximumNeighbourRadius
136
137        class OutlierRemoval:
138
139            """
140             Outlier removal settings.
141            """
142            def __init__(self, neighbourCount: int, neighbourRadius: float):
143                # The minimum number of points within the radius for a point to be retained.
144                self.neighbourCount = neighbourCount
145                # The neighbour search radius.
146                self.neighbourRadius = neighbourRadius
147
148        def __init__(self, projectorSampleRate: float = None, imageSampleRate: float = None, edgeDetection: 'PhaseEdgeDetection' = None, phaseFilter: 'PhaseFilter' = None, adaptiveSampling: 'AdaptiveSampling' = None, pointClipping: List['PointClipping'] = None, normalEstimation: 'NormalEstimation' = None, outlierRemoval: 'OutlierRemoval' = None):
149            # Projector sample rate.
150            self.projectorSampleRate = projectorSampleRate
151            # Image sample rate.
152            self.imageSampleRate = imageSampleRate
153            # Phase edge detection settings.
154            self.edgeDetection = edgeDetection
155            # Phase filter settings.
156            self.phaseFilter = phaseFilter
157            # Adaptive sampling settings.
158            self.adaptiveSampling = adaptiveSampling
159            # Point clipping settings.
160            self.pointClipping = pointClipping
161            # Normal estimation settings.
162            self.normalEstimation = normalEstimation
163            # Outlier removal settings.
164            self.outlierRemoval = outlierRemoval
165
166    def __init__(self, camera: MF_V3_Settings_Camera_Camera = None, projector: MF_V3_Settings_Projector_Projector = None, turntable: MF_V3_Settings_Turntable_Turntable = None, capture: MF_V3_Settings_Capture_Capture = None, processing: 'Processing' = None, alignWithScanner: bool = None, centerAtOrigin: bool = None):
167        # Camera settings.
168        self.camera = camera
169        # Projector settings.
170        self.projector = projector
171        # Turntable settings.
172        self.turntable = turntable
173        # Capture settings.
174        self.capture = capture
175        # Processing settings.
176        self.processing = processing
177        # Align the scan with the scanner.
178        self.alignWithScanner = alignWithScanner
179        # Center the scan at the origin.
180        self.centerAtOrigin = centerAtOrigin
class Scan:
 10class Scan:
 11
 12    """
 13     Scan settings.
 14    """
 15    class Processing:
 16
 17        """
 18         Scan processing settings.
 19        """
 20        class PhaseEdgeDetection:
 21            """
 22            Phase edge detection settings.
 23
 24            Phase edge detection produces a binary mask indicating the edges of a horizontal/vertical pair of phase images.  Since flat geometries give a constant phase image gradient, we use the second derivative (Laplacian) of the phase image to detect edges rather than the gradient.
 25
 26            The edge mask generated by phase edge detection is an input to both phase filtering and adaptive sampling.  If neither of these are enabled, the phase edge detection settings have no effect on the output point cloud.
 27            """
 28            def __init__(self, threshold: float, laplacianKernelRadius: int, gaussianBlurRadius: int, gaussianBlurStdDev: float, maximumWidthForProcessing: int):
 29                # The edge detection threshold.
 30                self.threshold = threshold
 31                # The Laplacian kernel radius.  This must be in the range [1..5].
 32                self.laplacianKernelRadius = laplacianKernelRadius
 33                """
 34                Gaussian blur kernel radius. (Optional)  To disable, set to 0.
 35                The phase images can optionally blurred before taking the Laplacian to reduce noise.
 36                However as a result, the detected edges are wider.
 37                """
 38                self.gaussianBlurRadius = gaussianBlurRadius
 39                """
 40                Gaussian blur kernel standard deviation.
 41                This parameter is ignored if `gaussianBlurSize` is zero.
 42                """
 43                self.gaussianBlurStdDev = gaussianBlurStdDev
 44                """
 45                The maximum image width for processing. (Optional) To disable, set to 0.
 46                If this value is greater than zero, the phase images are resized to the maximum width prior
 47                to computing the Laplacian and the the detected edges are then upsampled to the original size.
 48                This would be done to speed up processing or to detect edges on a larger scale.
 49                """
 50                self.maximumWidthForProcessing = maximumWidthForProcessing
 51
 52        class PhaseFilter:
 53
 54            """
 55             Phase filter settings.
 56            """
 57            def __init__(self, kernelRadius: int, spatialWeightStdDev: float):
 58                """
 59                The filter kernel radius.
 60                A neighboring value must be within this radius to be included in the filter.
 61                If the kernel radius is set to zero, the phase filtering is disabled.
 62                """
 63                self.kernelRadius = kernelRadius
 64                """
 65                The standard deviation of the spatial weights.
 66                The weight of a neighboring value is $\exp(-(r/s)^2)$ where $r$ is the distance
 67                to the central value and $s$ is the spatial weight standard deviation.
 68                If the spatial weight standard deviation is set to zero, all the spatial
 69                weights are uniformly set to 1.
 70                """
 71                self.spatialWeightStdDev = spatialWeightStdDev
 72
 73        class AdaptiveSampling:
 74            """
 75            Adaptive sampling settings
 76
 77            Adaptive sampling will downsample points in regions of low detail
 78            and keep points in regions of high detail.
 79            """
 80            class Type(Enum):
 81                NONE = "NONE"  # Do not use adaptive sampling.
 82                REGULAR = "REGULAR"  # Use a regular sampling mask in regions of low detail.
 83                RANDOM = "RANDOM"  # Use a random sampling mask in regions of low detail.
 84
 85            def __init__(self, type: 'Type', rate: float):
 86                # Sampling type.
 87                self.type = type
 88                # The sample rate [0..1] for the regions of low detail.
 89                self.rate = rate
 90
 91        class PointClipping:
 92
 93            """
 94             Point clipping settings.
 95            """
 96            class Type(Enum):
 97
 98                """
 99                 Point clipping type.
100                """
101                OutsideCube = "OutsideCube"  # Clip points outside a unit cube.
102                OutsideCylinder = "OutsideCylinder"  # Clip points outside a unit cylinder.
103                OutsideSphere = "OutsideSphere"  # Clip points outside a unit sphere.
104                InsideCube = "InsideCube"  # Clip points inside a unit cube.
105                InsideCylinder = "InsideCylinder"  # Clip points inside a unit cylinder.
106                InsideSphere = "InsideSphere"  # Clip points inside a unit sphere.
107
108            def __init__(self, type: 'Type', transform: List[float] = None):
109                # Point clipping type.
110                self.type = type
111                # 4x4 transform mapping 3D points to the canonical point clipping coordinates.
112                self.transform = transform
113
114        class NormalEstimation:
115
116            """
117             Normal estimation settings.
118            """
119            class Method(Enum):
120                NORMAL_LLS = "NORMAL_LLS"  # Linear least squares method
121                NORMAL_OPEN3D = "NORMAL_OPEN3D"  # Open3D method using KD tree search for nearest neighbors
122
123            def __init__(self, method: 'Method', maximumNeighbourCount: int, maximumNeighbourRadius: float, useMaximumNeighbourCount: bool, useMaximumNeighbourRadius: bool):
124                # Normal estimation method.
125                self.method = method
126                """
127                Maximum number of nearest neighbors used to compute the normal.
128                This value is only used with the NORMAL_OPEN3D method.
129                """
130                self.maximumNeighbourCount = maximumNeighbourCount
131                # Maximum radius for a point to be considered a neighbour.
132                self.maximumNeighbourRadius = maximumNeighbourRadius
133                # Use the maximum neighbour count.
134                self.useMaximumNeighbourCount = useMaximumNeighbourCount
135                # Use the maximum neighbour radius.
136                self.useMaximumNeighbourRadius = useMaximumNeighbourRadius
137
138        class OutlierRemoval:
139
140            """
141             Outlier removal settings.
142            """
143            def __init__(self, neighbourCount: int, neighbourRadius: float):
144                # The minimum number of points within the radius for a point to be retained.
145                self.neighbourCount = neighbourCount
146                # The neighbour search radius.
147                self.neighbourRadius = neighbourRadius
148
149        def __init__(self, projectorSampleRate: float = None, imageSampleRate: float = None, edgeDetection: 'PhaseEdgeDetection' = None, phaseFilter: 'PhaseFilter' = None, adaptiveSampling: 'AdaptiveSampling' = None, pointClipping: List['PointClipping'] = None, normalEstimation: 'NormalEstimation' = None, outlierRemoval: 'OutlierRemoval' = None):
150            # Projector sample rate.
151            self.projectorSampleRate = projectorSampleRate
152            # Image sample rate.
153            self.imageSampleRate = imageSampleRate
154            # Phase edge detection settings.
155            self.edgeDetection = edgeDetection
156            # Phase filter settings.
157            self.phaseFilter = phaseFilter
158            # Adaptive sampling settings.
159            self.adaptiveSampling = adaptiveSampling
160            # Point clipping settings.
161            self.pointClipping = pointClipping
162            # Normal estimation settings.
163            self.normalEstimation = normalEstimation
164            # Outlier removal settings.
165            self.outlierRemoval = outlierRemoval
166
167    def __init__(self, camera: MF_V3_Settings_Camera_Camera = None, projector: MF_V3_Settings_Projector_Projector = None, turntable: MF_V3_Settings_Turntable_Turntable = None, capture: MF_V3_Settings_Capture_Capture = None, processing: 'Processing' = None, alignWithScanner: bool = None, centerAtOrigin: bool = None):
168        # Camera settings.
169        self.camera = camera
170        # Projector settings.
171        self.projector = projector
172        # Turntable settings.
173        self.turntable = turntable
174        # Capture settings.
175        self.capture = capture
176        # Processing settings.
177        self.processing = processing
178        # Align the scan with the scanner.
179        self.alignWithScanner = alignWithScanner
180        # Center the scan at the origin.
181        self.centerAtOrigin = centerAtOrigin

Scan settings.

Scan( camera: MF.V3.Settings.Camera.Camera = None, projector: MF.V3.Settings.Projector.Projector = None, turntable: MF.V3.Settings.Turntable.Turntable = None, capture: MF.V3.Settings.Capture.Capture = None, processing: Scan.Processing = None, alignWithScanner: bool = None, centerAtOrigin: bool = None)
167    def __init__(self, camera: MF_V3_Settings_Camera_Camera = None, projector: MF_V3_Settings_Projector_Projector = None, turntable: MF_V3_Settings_Turntable_Turntable = None, capture: MF_V3_Settings_Capture_Capture = None, processing: 'Processing' = None, alignWithScanner: bool = None, centerAtOrigin: bool = None):
168        # Camera settings.
169        self.camera = camera
170        # Projector settings.
171        self.projector = projector
172        # Turntable settings.
173        self.turntable = turntable
174        # Capture settings.
175        self.capture = capture
176        # Processing settings.
177        self.processing = processing
178        # Align the scan with the scanner.
179        self.alignWithScanner = alignWithScanner
180        # Center the scan at the origin.
181        self.centerAtOrigin = centerAtOrigin
camera
projector
turntable
capture
processing
alignWithScanner
centerAtOrigin
class Scan.Processing:
 15    class Processing:
 16
 17        """
 18         Scan processing settings.
 19        """
 20        class PhaseEdgeDetection:
 21            """
 22            Phase edge detection settings.
 23
 24            Phase edge detection produces a binary mask indicating the edges of a horizontal/vertical pair of phase images.  Since flat geometries give a constant phase image gradient, we use the second derivative (Laplacian) of the phase image to detect edges rather than the gradient.
 25
 26            The edge mask generated by phase edge detection is an input to both phase filtering and adaptive sampling.  If neither of these are enabled, the phase edge detection settings have no effect on the output point cloud.
 27            """
 28            def __init__(self, threshold: float, laplacianKernelRadius: int, gaussianBlurRadius: int, gaussianBlurStdDev: float, maximumWidthForProcessing: int):
 29                # The edge detection threshold.
 30                self.threshold = threshold
 31                # The Laplacian kernel radius.  This must be in the range [1..5].
 32                self.laplacianKernelRadius = laplacianKernelRadius
 33                """
 34                Gaussian blur kernel radius. (Optional)  To disable, set to 0.
 35                The phase images can optionally blurred before taking the Laplacian to reduce noise.
 36                However as a result, the detected edges are wider.
 37                """
 38                self.gaussianBlurRadius = gaussianBlurRadius
 39                """
 40                Gaussian blur kernel standard deviation.
 41                This parameter is ignored if `gaussianBlurSize` is zero.
 42                """
 43                self.gaussianBlurStdDev = gaussianBlurStdDev
 44                """
 45                The maximum image width for processing. (Optional) To disable, set to 0.
 46                If this value is greater than zero, the phase images are resized to the maximum width prior
 47                to computing the Laplacian and the the detected edges are then upsampled to the original size.
 48                This would be done to speed up processing or to detect edges on a larger scale.
 49                """
 50                self.maximumWidthForProcessing = maximumWidthForProcessing
 51
 52        class PhaseFilter:
 53
 54            """
 55             Phase filter settings.
 56            """
 57            def __init__(self, kernelRadius: int, spatialWeightStdDev: float):
 58                """
 59                The filter kernel radius.
 60                A neighboring value must be within this radius to be included in the filter.
 61                If the kernel radius is set to zero, the phase filtering is disabled.
 62                """
 63                self.kernelRadius = kernelRadius
 64                """
 65                The standard deviation of the spatial weights.
 66                The weight of a neighboring value is $\exp(-(r/s)^2)$ where $r$ is the distance
 67                to the central value and $s$ is the spatial weight standard deviation.
 68                If the spatial weight standard deviation is set to zero, all the spatial
 69                weights are uniformly set to 1.
 70                """
 71                self.spatialWeightStdDev = spatialWeightStdDev
 72
 73        class AdaptiveSampling:
 74            """
 75            Adaptive sampling settings
 76
 77            Adaptive sampling will downsample points in regions of low detail
 78            and keep points in regions of high detail.
 79            """
 80            class Type(Enum):
 81                NONE = "NONE"  # Do not use adaptive sampling.
 82                REGULAR = "REGULAR"  # Use a regular sampling mask in regions of low detail.
 83                RANDOM = "RANDOM"  # Use a random sampling mask in regions of low detail.
 84
 85            def __init__(self, type: 'Type', rate: float):
 86                # Sampling type.
 87                self.type = type
 88                # The sample rate [0..1] for the regions of low detail.
 89                self.rate = rate
 90
 91        class PointClipping:
 92
 93            """
 94             Point clipping settings.
 95            """
 96            class Type(Enum):
 97
 98                """
 99                 Point clipping type.
100                """
101                OutsideCube = "OutsideCube"  # Clip points outside a unit cube.
102                OutsideCylinder = "OutsideCylinder"  # Clip points outside a unit cylinder.
103                OutsideSphere = "OutsideSphere"  # Clip points outside a unit sphere.
104                InsideCube = "InsideCube"  # Clip points inside a unit cube.
105                InsideCylinder = "InsideCylinder"  # Clip points inside a unit cylinder.
106                InsideSphere = "InsideSphere"  # Clip points inside a unit sphere.
107
108            def __init__(self, type: 'Type', transform: List[float] = None):
109                # Point clipping type.
110                self.type = type
111                # 4x4 transform mapping 3D points to the canonical point clipping coordinates.
112                self.transform = transform
113
114        class NormalEstimation:
115
116            """
117             Normal estimation settings.
118            """
119            class Method(Enum):
120                NORMAL_LLS = "NORMAL_LLS"  # Linear least squares method
121                NORMAL_OPEN3D = "NORMAL_OPEN3D"  # Open3D method using KD tree search for nearest neighbors
122
123            def __init__(self, method: 'Method', maximumNeighbourCount: int, maximumNeighbourRadius: float, useMaximumNeighbourCount: bool, useMaximumNeighbourRadius: bool):
124                # Normal estimation method.
125                self.method = method
126                """
127                Maximum number of nearest neighbors used to compute the normal.
128                This value is only used with the NORMAL_OPEN3D method.
129                """
130                self.maximumNeighbourCount = maximumNeighbourCount
131                # Maximum radius for a point to be considered a neighbour.
132                self.maximumNeighbourRadius = maximumNeighbourRadius
133                # Use the maximum neighbour count.
134                self.useMaximumNeighbourCount = useMaximumNeighbourCount
135                # Use the maximum neighbour radius.
136                self.useMaximumNeighbourRadius = useMaximumNeighbourRadius
137
138        class OutlierRemoval:
139
140            """
141             Outlier removal settings.
142            """
143            def __init__(self, neighbourCount: int, neighbourRadius: float):
144                # The minimum number of points within the radius for a point to be retained.
145                self.neighbourCount = neighbourCount
146                # The neighbour search radius.
147                self.neighbourRadius = neighbourRadius
148
149        def __init__(self, projectorSampleRate: float = None, imageSampleRate: float = None, edgeDetection: 'PhaseEdgeDetection' = None, phaseFilter: 'PhaseFilter' = None, adaptiveSampling: 'AdaptiveSampling' = None, pointClipping: List['PointClipping'] = None, normalEstimation: 'NormalEstimation' = None, outlierRemoval: 'OutlierRemoval' = None):
150            # Projector sample rate.
151            self.projectorSampleRate = projectorSampleRate
152            # Image sample rate.
153            self.imageSampleRate = imageSampleRate
154            # Phase edge detection settings.
155            self.edgeDetection = edgeDetection
156            # Phase filter settings.
157            self.phaseFilter = phaseFilter
158            # Adaptive sampling settings.
159            self.adaptiveSampling = adaptiveSampling
160            # Point clipping settings.
161            self.pointClipping = pointClipping
162            # Normal estimation settings.
163            self.normalEstimation = normalEstimation
164            # Outlier removal settings.
165            self.outlierRemoval = outlierRemoval

Scan processing settings.

Scan.Processing( projectorSampleRate: float = None, imageSampleRate: float = None, edgeDetection: Scan.Processing.PhaseEdgeDetection = None, phaseFilter: Scan.Processing.PhaseFilter = None, adaptiveSampling: Scan.Processing.AdaptiveSampling = None, pointClipping: List[Scan.Processing.PointClipping] = None, normalEstimation: Scan.Processing.NormalEstimation = None, outlierRemoval: Scan.Processing.OutlierRemoval = None)
149        def __init__(self, projectorSampleRate: float = None, imageSampleRate: float = None, edgeDetection: 'PhaseEdgeDetection' = None, phaseFilter: 'PhaseFilter' = None, adaptiveSampling: 'AdaptiveSampling' = None, pointClipping: List['PointClipping'] = None, normalEstimation: 'NormalEstimation' = None, outlierRemoval: 'OutlierRemoval' = None):
150            # Projector sample rate.
151            self.projectorSampleRate = projectorSampleRate
152            # Image sample rate.
153            self.imageSampleRate = imageSampleRate
154            # Phase edge detection settings.
155            self.edgeDetection = edgeDetection
156            # Phase filter settings.
157            self.phaseFilter = phaseFilter
158            # Adaptive sampling settings.
159            self.adaptiveSampling = adaptiveSampling
160            # Point clipping settings.
161            self.pointClipping = pointClipping
162            # Normal estimation settings.
163            self.normalEstimation = normalEstimation
164            # Outlier removal settings.
165            self.outlierRemoval = outlierRemoval
projectorSampleRate
imageSampleRate
edgeDetection
phaseFilter
adaptiveSampling
pointClipping
normalEstimation
outlierRemoval
class Scan.Processing.PhaseEdgeDetection:
20        class PhaseEdgeDetection:
21            """
22            Phase edge detection settings.
23
24            Phase edge detection produces a binary mask indicating the edges of a horizontal/vertical pair of phase images.  Since flat geometries give a constant phase image gradient, we use the second derivative (Laplacian) of the phase image to detect edges rather than the gradient.
25
26            The edge mask generated by phase edge detection is an input to both phase filtering and adaptive sampling.  If neither of these are enabled, the phase edge detection settings have no effect on the output point cloud.
27            """
28            def __init__(self, threshold: float, laplacianKernelRadius: int, gaussianBlurRadius: int, gaussianBlurStdDev: float, maximumWidthForProcessing: int):
29                # The edge detection threshold.
30                self.threshold = threshold
31                # The Laplacian kernel radius.  This must be in the range [1..5].
32                self.laplacianKernelRadius = laplacianKernelRadius
33                """
34                Gaussian blur kernel radius. (Optional)  To disable, set to 0.
35                The phase images can optionally blurred before taking the Laplacian to reduce noise.
36                However as a result, the detected edges are wider.
37                """
38                self.gaussianBlurRadius = gaussianBlurRadius
39                """
40                Gaussian blur kernel standard deviation.
41                This parameter is ignored if `gaussianBlurSize` is zero.
42                """
43                self.gaussianBlurStdDev = gaussianBlurStdDev
44                """
45                The maximum image width for processing. (Optional) To disable, set to 0.
46                If this value is greater than zero, the phase images are resized to the maximum width prior
47                to computing the Laplacian and the the detected edges are then upsampled to the original size.
48                This would be done to speed up processing or to detect edges on a larger scale.
49                """
50                self.maximumWidthForProcessing = maximumWidthForProcessing

Phase edge detection settings.

Phase edge detection produces a binary mask indicating the edges of a horizontal/vertical pair of phase images. Since flat geometries give a constant phase image gradient, we use the second derivative (Laplacian) of the phase image to detect edges rather than the gradient.

The edge mask generated by phase edge detection is an input to both phase filtering and adaptive sampling. If neither of these are enabled, the phase edge detection settings have no effect on the output point cloud.

Scan.Processing.PhaseEdgeDetection( threshold: float, laplacianKernelRadius: int, gaussianBlurRadius: int, gaussianBlurStdDev: float, maximumWidthForProcessing: int)
28            def __init__(self, threshold: float, laplacianKernelRadius: int, gaussianBlurRadius: int, gaussianBlurStdDev: float, maximumWidthForProcessing: int):
29                # The edge detection threshold.
30                self.threshold = threshold
31                # The Laplacian kernel radius.  This must be in the range [1..5].
32                self.laplacianKernelRadius = laplacianKernelRadius
33                """
34                Gaussian blur kernel radius. (Optional)  To disable, set to 0.
35                The phase images can optionally blurred before taking the Laplacian to reduce noise.
36                However as a result, the detected edges are wider.
37                """
38                self.gaussianBlurRadius = gaussianBlurRadius
39                """
40                Gaussian blur kernel standard deviation.
41                This parameter is ignored if `gaussianBlurSize` is zero.
42                """
43                self.gaussianBlurStdDev = gaussianBlurStdDev
44                """
45                The maximum image width for processing. (Optional) To disable, set to 0.
46                If this value is greater than zero, the phase images are resized to the maximum width prior
47                to computing the Laplacian and the the detected edges are then upsampled to the original size.
48                This would be done to speed up processing or to detect edges on a larger scale.
49                """
50                self.maximumWidthForProcessing = maximumWidthForProcessing
threshold
laplacianKernelRadius

Gaussian blur kernel radius. (Optional) To disable, set to 0. The phase images can optionally blurred before taking the Laplacian to reduce noise. However as a result, the detected edges are wider.

gaussianBlurRadius

Gaussian blur kernel standard deviation. This parameter is ignored if gaussianBlurSize is zero.

gaussianBlurStdDev

The maximum image width for processing. (Optional) To disable, set to 0. If this value is greater than zero, the phase images are resized to the maximum width prior to computing the Laplacian and the the detected edges are then upsampled to the original size. This would be done to speed up processing or to detect edges on a larger scale.

maximumWidthForProcessing
class Scan.Processing.PhaseFilter:
52        class PhaseFilter:
53
54            """
55             Phase filter settings.
56            """
57            def __init__(self, kernelRadius: int, spatialWeightStdDev: float):
58                """
59                The filter kernel radius.
60                A neighboring value must be within this radius to be included in the filter.
61                If the kernel radius is set to zero, the phase filtering is disabled.
62                """
63                self.kernelRadius = kernelRadius
64                """
65                The standard deviation of the spatial weights.
66                The weight of a neighboring value is $\exp(-(r/s)^2)$ where $r$ is the distance
67                to the central value and $s$ is the spatial weight standard deviation.
68                If the spatial weight standard deviation is set to zero, all the spatial
69                weights are uniformly set to 1.
70                """
71                self.spatialWeightStdDev = spatialWeightStdDev

Phase filter settings.

Scan.Processing.PhaseFilter(kernelRadius: int, spatialWeightStdDev: float)
57            def __init__(self, kernelRadius: int, spatialWeightStdDev: float):
58                """
59                The filter kernel radius.
60                A neighboring value must be within this radius to be included in the filter.
61                If the kernel radius is set to zero, the phase filtering is disabled.
62                """
63                self.kernelRadius = kernelRadius
64                """
65                The standard deviation of the spatial weights.
66                The weight of a neighboring value is $\exp(-(r/s)^2)$ where $r$ is the distance
67                to the central value and $s$ is the spatial weight standard deviation.
68                If the spatial weight standard deviation is set to zero, all the spatial
69                weights are uniformly set to 1.
70                """
71                self.spatialWeightStdDev = spatialWeightStdDev

The filter kernel radius. A neighboring value must be within this radius to be included in the filter. If the kernel radius is set to zero, the phase filtering is disabled.

kernelRadius

The standard deviation of the spatial weights. The weight of a neighboring value is $\exp(-(r/s)^2)$ where $r$ is the distance to the central value and $s$ is the spatial weight standard deviation. If the spatial weight standard deviation is set to zero, all the spatial weights are uniformly set to 1.

spatialWeightStdDev
class Scan.Processing.AdaptiveSampling:
73        class AdaptiveSampling:
74            """
75            Adaptive sampling settings
76
77            Adaptive sampling will downsample points in regions of low detail
78            and keep points in regions of high detail.
79            """
80            class Type(Enum):
81                NONE = "NONE"  # Do not use adaptive sampling.
82                REGULAR = "REGULAR"  # Use a regular sampling mask in regions of low detail.
83                RANDOM = "RANDOM"  # Use a random sampling mask in regions of low detail.
84
85            def __init__(self, type: 'Type', rate: float):
86                # Sampling type.
87                self.type = type
88                # The sample rate [0..1] for the regions of low detail.
89                self.rate = rate

Adaptive sampling settings

Adaptive sampling will downsample points in regions of low detail and keep points in regions of high detail.

Scan.Processing.AdaptiveSampling( type: Scan.Processing.AdaptiveSampling.Type, rate: float)
85            def __init__(self, type: 'Type', rate: float):
86                # Sampling type.
87                self.type = type
88                # The sample rate [0..1] for the regions of low detail.
89                self.rate = rate
type
rate
class Scan.Processing.AdaptiveSampling.Type(enum.Enum):
80            class Type(Enum):
81                NONE = "NONE"  # Do not use adaptive sampling.
82                REGULAR = "REGULAR"  # Use a regular sampling mask in regions of low detail.
83                RANDOM = "RANDOM"  # Use a random sampling mask in regions of low detail.
NONE = <Type.NONE: 'NONE'>
REGULAR = <Type.REGULAR: 'REGULAR'>
RANDOM = <Type.RANDOM: 'RANDOM'>
class Scan.Processing.PointClipping:
 91        class PointClipping:
 92
 93            """
 94             Point clipping settings.
 95            """
 96            class Type(Enum):
 97
 98                """
 99                 Point clipping type.
100                """
101                OutsideCube = "OutsideCube"  # Clip points outside a unit cube.
102                OutsideCylinder = "OutsideCylinder"  # Clip points outside a unit cylinder.
103                OutsideSphere = "OutsideSphere"  # Clip points outside a unit sphere.
104                InsideCube = "InsideCube"  # Clip points inside a unit cube.
105                InsideCylinder = "InsideCylinder"  # Clip points inside a unit cylinder.
106                InsideSphere = "InsideSphere"  # Clip points inside a unit sphere.
107
108            def __init__(self, type: 'Type', transform: List[float] = None):
109                # Point clipping type.
110                self.type = type
111                # 4x4 transform mapping 3D points to the canonical point clipping coordinates.
112                self.transform = transform

Point clipping settings.

Scan.Processing.PointClipping( type: Scan.Processing.PointClipping.Type, transform: List[float] = None)
108            def __init__(self, type: 'Type', transform: List[float] = None):
109                # Point clipping type.
110                self.type = type
111                # 4x4 transform mapping 3D points to the canonical point clipping coordinates.
112                self.transform = transform
type
transform
class Scan.Processing.PointClipping.Type(enum.Enum):
 96            class Type(Enum):
 97
 98                """
 99                 Point clipping type.
100                """
101                OutsideCube = "OutsideCube"  # Clip points outside a unit cube.
102                OutsideCylinder = "OutsideCylinder"  # Clip points outside a unit cylinder.
103                OutsideSphere = "OutsideSphere"  # Clip points outside a unit sphere.
104                InsideCube = "InsideCube"  # Clip points inside a unit cube.
105                InsideCylinder = "InsideCylinder"  # Clip points inside a unit cylinder.
106                InsideSphere = "InsideSphere"  # Clip points inside a unit sphere.

Point clipping type.

OutsideCube = <Type.OutsideCube: 'OutsideCube'>
OutsideCylinder = <Type.OutsideCylinder: 'OutsideCylinder'>
OutsideSphere = <Type.OutsideSphere: 'OutsideSphere'>
InsideCube = <Type.InsideCube: 'InsideCube'>
InsideCylinder = <Type.InsideCylinder: 'InsideCylinder'>
InsideSphere = <Type.InsideSphere: 'InsideSphere'>
class Scan.Processing.NormalEstimation:
114        class NormalEstimation:
115
116            """
117             Normal estimation settings.
118            """
119            class Method(Enum):
120                NORMAL_LLS = "NORMAL_LLS"  # Linear least squares method
121                NORMAL_OPEN3D = "NORMAL_OPEN3D"  # Open3D method using KD tree search for nearest neighbors
122
123            def __init__(self, method: 'Method', maximumNeighbourCount: int, maximumNeighbourRadius: float, useMaximumNeighbourCount: bool, useMaximumNeighbourRadius: bool):
124                # Normal estimation method.
125                self.method = method
126                """
127                Maximum number of nearest neighbors used to compute the normal.
128                This value is only used with the NORMAL_OPEN3D method.
129                """
130                self.maximumNeighbourCount = maximumNeighbourCount
131                # Maximum radius for a point to be considered a neighbour.
132                self.maximumNeighbourRadius = maximumNeighbourRadius
133                # Use the maximum neighbour count.
134                self.useMaximumNeighbourCount = useMaximumNeighbourCount
135                # Use the maximum neighbour radius.
136                self.useMaximumNeighbourRadius = useMaximumNeighbourRadius

Normal estimation settings.

Scan.Processing.NormalEstimation( method: Scan.Processing.NormalEstimation.Method, maximumNeighbourCount: int, maximumNeighbourRadius: float, useMaximumNeighbourCount: bool, useMaximumNeighbourRadius: bool)
123            def __init__(self, method: 'Method', maximumNeighbourCount: int, maximumNeighbourRadius: float, useMaximumNeighbourCount: bool, useMaximumNeighbourRadius: bool):
124                # Normal estimation method.
125                self.method = method
126                """
127                Maximum number of nearest neighbors used to compute the normal.
128                This value is only used with the NORMAL_OPEN3D method.
129                """
130                self.maximumNeighbourCount = maximumNeighbourCount
131                # Maximum radius for a point to be considered a neighbour.
132                self.maximumNeighbourRadius = maximumNeighbourRadius
133                # Use the maximum neighbour count.
134                self.useMaximumNeighbourCount = useMaximumNeighbourCount
135                # Use the maximum neighbour radius.
136                self.useMaximumNeighbourRadius = useMaximumNeighbourRadius
method

Maximum number of nearest neighbors used to compute the normal. This value is only used with the NORMAL_OPEN3D method.

maximumNeighbourCount
maximumNeighbourRadius
useMaximumNeighbourCount
useMaximumNeighbourRadius
class Scan.Processing.NormalEstimation.Method(enum.Enum):
119            class Method(Enum):
120                NORMAL_LLS = "NORMAL_LLS"  # Linear least squares method
121                NORMAL_OPEN3D = "NORMAL_OPEN3D"  # Open3D method using KD tree search for nearest neighbors
NORMAL_LLS = <Method.NORMAL_LLS: 'NORMAL_LLS'>
NORMAL_OPEN3D = <Method.NORMAL_OPEN3D: 'NORMAL_OPEN3D'>
class Scan.Processing.OutlierRemoval:
138        class OutlierRemoval:
139
140            """
141             Outlier removal settings.
142            """
143            def __init__(self, neighbourCount: int, neighbourRadius: float):
144                # The minimum number of points within the radius for a point to be retained.
145                self.neighbourCount = neighbourCount
146                # The neighbour search radius.
147                self.neighbourRadius = neighbourRadius

Outlier removal settings.

Scan.Processing.OutlierRemoval(neighbourCount: int, neighbourRadius: float)
143            def __init__(self, neighbourCount: int, neighbourRadius: float):
144                # The minimum number of points within the radius for a point to be retained.
145                self.neighbourCount = neighbourCount
146                # The neighbour search radius.
147                self.neighbourRadius = neighbourRadius
neighbourCount
neighbourRadius