eVision Python API
Loading...
Searching...
No Matches
eVision.Easy3D.EPhotometricStereoImager Class Reference

Manages photometric stereo reconstruction. More...

Public Member Functions

None __init__ (self)
 Creates an eVision.Easy3D.EPhotometricStereoImager object.
None __init__ (self, eVision.Easy3D.EPhotometricStereoImager other)
 Creates an eVision.Easy3D.EPhotometricStereoImager object.
None Load (self, str path)
 Loads the eVision.Easy3D.EPhotometricStereoImager.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.Easy3D.EPhotometricStereoImager.
None Save (self, str path)
 Saves the eVision.Easy3D.EPhotometricStereoImager.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.Easy3D.EPhotometricStereoImager.
float CalibrateFromSphere (self, list[eVision._eVision.EROIBW8|None] sphereImages)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, list[eVision._eVision.EROIBW8|None] sphereImages, eVision.EROIBW8 darkImage)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, list[eVision._eVision.EROIBW8|None] sphereImages, eVision.ECircle circle)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, list[eVision._eVision.EROIBW8|None] sphereImages, eVision.EROIBW8 darkImage, eVision.ECircle circle)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4, eVision.EROIBW8 darkImage)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4, eVision.ECircle circle)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
float CalibrateFromSphere (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4, eVision.EROIBW8 darkImage, eVision.ECircle circle)
 Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.
bool IsCalibrated (self)
 Returns whether the eVision.Easy3D.EPhotometricStereoImager is calibrated or not.
None GetCalibrationAngles (self, list[float] azimuths, list[float] elevations)
 Gets the calibration angles.
None SetCalibrationAngles (self, list[float] azimuths, list[float] elevations)
 Sets the calibration angles.
None ConfigureNonUniformLightingCorrection (self, list[eVision._eVision.EROIBW8|None] flatImages)
 Configure the non uniform lighting correction of the scene by using flat images.
None ConfigureNonUniformLightingCorrection (self, list[eVision._eVision.EROIBW8|None] flatImages, eVision.EROIBW8 darkImage)
 Configure the non uniform lighting correction of the scene by using flat images.
None Compute (self, list[eVision._eVision.EROIBW8|None] objectImages)
 Compute the different photometric stereo images of an object.
None Compute (self, list[eVision._eVision.EROIBW8|None] objectImages, eVision.ERegion region)
 Compute the different photometric stereo images of an object.
None Compute (self, list[eVision._eVision.EROIBW8|None] objectImages, eVision.EROIBW8 darkImage)
 Compute the different photometric stereo images of an object.
None Compute (self, list[eVision._eVision.EROIBW8|None] objectImages, eVision.EROIBW8 darkImage, eVision.ERegion region)
 Compute the different photometric stereo images of an object.
None Compute (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4)
 Compute the different photometric stereo images of an object.
None Compute (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4, eVision.ERegion region)
 Compute the different photometric stereo images of an object.
None Compute (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4, eVision.EROIBW8 darkImage)
 Compute the different photometric stereo images of an object.
None Compute (self, eVision.EROIBW8 image1, eVision.EROIBW8 image2, eVision.EROIBW8 image3, eVision.EROIBW8 image4, eVision.EROIBW8 darkImage, eVision.ERegion region)
 Compute the different photometric stereo images of an object.
eVision.EImageBW8 GetAlbedos (self, eVision.Easy3D.EPhotometricStereoContrast contrast)
 Gets the albedos as an eVision.EImageBW8.
eVision.EImageBW8 GetAlbedos (self, eVision.Easy3D.EPhotometricStereoContrast contrast, float maxValue)
 Gets the albedos as an eVision.EImageBW8.
eVision.EImageBW8 ComputeGaussianCurvatures (self, eVision.Easy3D.EPhotometricStereoContrast contrast)
 Computes the gaussian curvatures as an eVision.EImageBW8.
eVision.EImageBW8 ComputeGaussianCurvatures (self, eVision.Easy3D.EPhotometricStereoContrast contrast, float maxAbsoluteValue)
 Computes the gaussian curvatures as an eVision.EImageBW8.
eVision.EImageBW8 ComputeMeanCurvatures (self, eVision.Easy3D.EPhotometricStereoContrast contrast)
 Computes the mean curvatures as an eVision.EImageBW8.
eVision.EImageBW8 ComputeMeanCurvatures (self, eVision.Easy3D.EPhotometricStereoContrast contrast, float maxAbsoluteValue)
 Computes the mean curvatures as an eVision.EImageBW8.
eVision.Easy3D.EZMap8 ComputeHeightMap (self)
 Computes the height at each pixel as an eVision.Easy3D.EZMap8 by integrating the surface gradients.
list[float] CalibrationAzimuthAngles (self)
 Gets the calibration azimuth angles.
list[float] CalibrationElevationAngles (self)
 Gets the calibration elevation angles.
bool EnableNonUniformLightingCorrection (self)
 Gets/Sets whether the correction of the non uniformity of the lighting is corrected or not (disabled by default, enabled by calling eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection).
 EnableNonUniformLightingCorrection (self, bool value)
 Gets/Sets whether the correction of the non uniformity of the lighting is corrected or not (disabled by default, enabled by calling eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection).
float GaussianBlurSigma (self)
 Gets/Sets the sigma parameter of the gaussian blurring applied before computing the curvatures.
 GaussianBlurSigma (self, float value)
 Gets/Sets the sigma parameter of the gaussian blurring applied before computing the curvatures.
eVision.EImageC24 Normals (self)
 Gets the normals as an eVision.EImageC24.
eVision.EImageBW8 GradientsX (self)
 Gets the gradients on the X axis as an eVision.EImageBW8.
eVision.EImageBW8 GradientsY (self)
 Gets the gradients on the Y axis as an eVision.EImageBW8.

Detailed Description

Manages photometric stereo reconstruction.

This class can build normals, albedos, gradients, mean curvatures and gaussian curvatures images from at least 3 input images by using photometric stereo The algorithm used assumes objects are Lambertian and light sources emit parallel rays

Remarks:

License(s): Easy3D

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.Easy3D.EPhotometricStereoImager.__init__ ( self)

◆ __init__() [2/2]

None eVision.Easy3D.EPhotometricStereoImager.__init__ ( self,
eVision.Easy3D.EPhotometricStereoImager other )

Member Function Documentation

◆ CalibrateFromSphere() [1/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4 )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
image1The first eVision.EROIBW8 of a sphere in a 4-image configuration.
image2The second eVision.EROIBW8 of a sphere in a 4-image configuration.
image3The third eVision.EROIBW8 of a sphere in a 4-image configuration.
image4The fourth eVision.EROIBW8 of a sphere in a 4-image configuration.

◆ CalibrateFromSphere() [2/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4,
eVision.ECircle circle )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
image1The first eVision.EROIBW8 of a sphere in a 4-image configuration.
image2The second eVision.EROIBW8 of a sphere in a 4-image configuration.
image3The third eVision.EROIBW8 of a sphere in a 4-image configuration.
image4The fourth eVision.EROIBW8 of a sphere in a 4-image configuration.
circleAn eVision.ECircle that represents the position of the sphere. Default: automatically computed.

◆ CalibrateFromSphere() [3/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4,
eVision.EROIBW8 darkImage )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
image1The first eVision.EROIBW8 of a sphere in a 4-image configuration.
image2The second eVision.EROIBW8 of a sphere in a 4-image configuration.
image3The third eVision.EROIBW8 of a sphere in a 4-image configuration.
image4The fourth eVision.EROIBW8 of a sphere in a 4-image configuration.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the calibration especially if the image is not dark when there is no illumination. Otherwise, it is not useful.

◆ CalibrateFromSphere() [4/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4,
eVision.EROIBW8 darkImage,
eVision.ECircle circle )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
image1The first eVision.EROIBW8 of a sphere in a 4-image configuration.
image2The second eVision.EROIBW8 of a sphere in a 4-image configuration.
image3The third eVision.EROIBW8 of a sphere in a 4-image configuration.
image4The fourth eVision.EROIBW8 of a sphere in a 4-image configuration.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the calibration especially if the image is not dark when there is no illumination. Otherwise, it is not useful.
circleAn eVision.ECircle that represents the position of the sphere. Default: automatically computed.

◆ CalibrateFromSphere() [5/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
list[eVision._eVision.EROIBW8 | None] sphereImages )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
sphereImagesA vector of eVision.EROIBW8 of a sphere.

◆ CalibrateFromSphere() [6/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
list[eVision._eVision.EROIBW8 | None] sphereImages,
eVision.ECircle circle )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
sphereImagesA vector of eVision.EROIBW8 of a sphere.
circleAn eVision.ECircle that represents the position of the sphere. Default: automatically computed.

◆ CalibrateFromSphere() [7/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
list[eVision._eVision.EROIBW8 | None] sphereImages,
eVision.EROIBW8 darkImage )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
sphereImagesA vector of eVision.EROIBW8 of a sphere.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the calibration especially if the image is not dark when there is no illumination. Otherwise, it is not useful.

◆ CalibrateFromSphere() [8/8]

float eVision.Easy3D.EPhotometricStereoImager.CalibrateFromSphere ( self,
list[eVision._eVision.EROIBW8 | None] sphereImages,
eVision.EROIBW8 darkImage,
eVision.ECircle circle )

Calibrates the light directions on several images (at least 3) of a sphere (or half sphere) and returns a score indicating the reliability of the calibration.

Parameters
sphereImagesA vector of eVision.EROIBW8 of a sphere.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the calibration especially if the image is not dark when there is no illumination. Otherwise, it is not useful.
circleAn eVision.ECircle that represents the position of the sphere. Default: automatically computed.

◆ CalibrationAzimuthAngles()

list[float] eVision.Easy3D.EPhotometricStereoImager.CalibrationAzimuthAngles ( self)

Gets the calibration azimuth angles.

Remarks:

When facing the image, the axis x points right, y points top and z points towards the camera. Azimuth angles are oriented trigonometrically around the z axis. A light source on the right of the image would have an azimuth of 0 degrees. One on top would have an azimuth of 90 degrees.

◆ CalibrationElevationAngles()

list[float] eVision.Easy3D.EPhotometricStereoImager.CalibrationElevationAngles ( self)

Gets the calibration elevation angles.

Remarks:

When facing the image, the axis x points right, y points top and z points towards the camera. Elevation is the angle formed by the base plane and the light source. A light source on the horizon would have an elevation of 0 degrees. One on the camera would have an elevation of 90 degrees.

◆ Compute() [1/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4 )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
image1The first eVision.EROIBW8 of the object in a 4-image configuration.
image2The second eVision.EROIBW8 of the object in a 4-image configuration.
image3The third eVision.EROIBW8 of the object in a 4-image configuration.
image4The fourth eVision.EROIBW8 of the object in a 4-image configuration.

◆ Compute() [2/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4,
eVision.ERegion region )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
image1The first eVision.EROIBW8 of the object in a 4-image configuration.
image2The second eVision.EROIBW8 of the object in a 4-image configuration.
image3The third eVision.EROIBW8 of the object in a 4-image configuration.
image4The fourth eVision.EROIBW8 of the object in a 4-image configuration.
regioneVision.ERegion within which the computation will be done.

◆ Compute() [3/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4,
eVision.EROIBW8 darkImage )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
image1The first eVision.EROIBW8 of the object in a 4-image configuration.
image2The second eVision.EROIBW8 of the object in a 4-image configuration.
image3The third eVision.EROIBW8 of the object in a 4-image configuration.
image4The fourth eVision.EROIBW8 of the object in a 4-image configuration.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the results especially if the image is not dark when there is no illumination. Otherwise, it is not useful.

◆ Compute() [4/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
eVision.EROIBW8 image1,
eVision.EROIBW8 image2,
eVision.EROIBW8 image3,
eVision.EROIBW8 image4,
eVision.EROIBW8 darkImage,
eVision.ERegion region )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
image1The first eVision.EROIBW8 of the object in a 4-image configuration.
image2The second eVision.EROIBW8 of the object in a 4-image configuration.
image3The third eVision.EROIBW8 of the object in a 4-image configuration.
image4The fourth eVision.EROIBW8 of the object in a 4-image configuration.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the results especially if the image is not dark when there is no illumination. Otherwise, it is not useful.
regioneVision.ERegion within which the computation will be done.

◆ Compute() [5/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
list[eVision._eVision.EROIBW8 | None] objectImages )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
objectImagesA vector of eVision.EROIBW8 of the object to reconstruct. The images must be in the same order as the calibration images/angles with respect to the light direction. If flat images are used, flat and object images must have the same size

◆ Compute() [6/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
list[eVision._eVision.EROIBW8 | None] objectImages,
eVision.ERegion region )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
objectImagesA vector of eVision.EROIBW8 of the object to reconstruct. The images must be in the same order as the calibration images/angles with respect to the light direction. If flat images are used, flat and object images must have the same size
regioneVision.ERegion within which the computation will be done.

◆ Compute() [7/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
list[eVision._eVision.EROIBW8 | None] objectImages,
eVision.EROIBW8 darkImage )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
objectImagesA vector of eVision.EROIBW8 of the object to reconstruct. The images must be in the same order as the calibration images/angles with respect to the light direction. If flat images are used, flat and object images must have the same size
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the results especially if the image is not dark when there is no illumination. Otherwise, it is not useful.

◆ Compute() [8/8]

None eVision.Easy3D.EPhotometricStereoImager.Compute ( self,
list[eVision._eVision.EROIBW8 | None] objectImages,
eVision.EROIBW8 darkImage,
eVision.ERegion region )

Compute the different photometric stereo images of an object.

To retrieve them, see eVision.Easy3D.EPhotometricStereoImager.Normals, eVision.Easy3D.EPhotometricStereoImager.GetAlbedos, eVision.Easy3D.EPhotometricStereoImager.GradientsX, eVision.Easy3D.EPhotometricStereoImager.GradientsY, eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures and eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures.

Parameters
objectImagesA vector of eVision.EROIBW8 of the object to reconstruct. The images must be in the same order as the calibration images/angles with respect to the light direction. If flat images are used, flat and object images must have the same size
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the results especially if the image is not dark when there is no illumination. Otherwise, it is not useful.
regioneVision.ERegion within which the computation will be done.

◆ ComputeGaussianCurvatures() [1/2]

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures ( self,
eVision.Easy3D.EPhotometricStereoContrast contrast )

Computes the gaussian curvatures as an eVision.EImageBW8.

Gaussian curvatures are inherently floating point images so a conversion must be specified. In all cases, a floating point value of 0 translates to an eVision.EBW8 value of 128. See eVision.Easy3D.EPhotometricStereoContrast for the different conversions.

Remarks:

Both gaussian and mean curvatures are computed in this method and are cached to avoid unnecessary computations.

Parameters
contrastan eVision.Easy3D.EPhotometricStereoContrast

◆ ComputeGaussianCurvatures() [2/2]

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.ComputeGaussianCurvatures ( self,
eVision.Easy3D.EPhotometricStereoContrast contrast,
float maxAbsoluteValue )

Computes the gaussian curvatures as an eVision.EImageBW8.

Gaussian curvatures are inherently floating point images so a conversion must be specified. In all cases, a floating point value of 0 translates to an eVision.EBW8 value of 128. See eVision.Easy3D.EPhotometricStereoContrast for the different conversions.

Remarks:

Both gaussian and mean curvatures are computed in this method and are cached to avoid unnecessary computations.

Parameters
contrastan eVision.Easy3D.EPhotometricStereoContrast
maxAbsoluteValuewhen contrast is EPhotometricStereoContrast_FixedRange, this parameter can be used to specify the maximal floating point value for the gaussian curvatures, otherwise it is ignored. All values outside of [-maxAbsoluteValue, +maxAbsoluteValue] are clipped. maxAbsoluteValue must be positive and defaults to 2.

◆ ComputeHeightMap()

eVision.Easy3D.EZMap8 eVision.Easy3D.EPhotometricStereoImager.ComputeHeightMap ( self)

Computes the height at each pixel as an eVision.Easy3D.EZMap8 by integrating the surface gradients.

◆ ComputeMeanCurvatures() [1/2]

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures ( self,
eVision.Easy3D.EPhotometricStereoContrast contrast )

Computes the mean curvatures as an eVision.EImageBW8.

Mean curvatures are inherently floating point images so a conversion must be specified. In all cases, a floating point value of 0 translates to an eVision.EBW8 value of 128. See eVision.Easy3D.EPhotometricStereoContrast for the different conversions.

Remarks:

Both mean and gaussian curvatures are computed in this method and are cached to avoid unnecessary computations.

Parameters
contrastan eVision.Easy3D.EPhotometricStereoContrast

◆ ComputeMeanCurvatures() [2/2]

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.ComputeMeanCurvatures ( self,
eVision.Easy3D.EPhotometricStereoContrast contrast,
float maxAbsoluteValue )

Computes the mean curvatures as an eVision.EImageBW8.

Mean curvatures are inherently floating point images so a conversion must be specified. In all cases, a floating point value of 0 translates to an eVision.EBW8 value of 128. See eVision.Easy3D.EPhotometricStereoContrast for the different conversions.

Remarks:

Both mean and gaussian curvatures are computed in this method and are cached to avoid unnecessary computations.

Parameters
contrastan eVision.Easy3D.EPhotometricStereoContrast
maxAbsoluteValuewhen contrast is EPhotometricStereoContrast_FixedRange, this parameter can be used to specify the maximal floating point value for the mean curvatures, otherwise it is ignored. All values outside of [-maxAbsoluteValue, +maxAbsoluteValue] are clipped. maxAbsoluteValue must be positive and defaults to 3.

◆ ConfigureNonUniformLightingCorrection() [1/2]

None eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection ( self,
list[eVision._eVision.EROIBW8 | None] flatImages )

Configure the non uniform lighting correction of the scene by using flat images.

Photometric stereo assumes the lights of each image to be of same direction and intensity. This is however rarely the case in practice, a way to attenuate the problem is to use flat images to correct non-uniform lighting before performing photometric stereo.

Parameters
flatImagesA vector of eVision.EROIBW8 of the flat images. The images must be in the same order as the calibration images/angles with respect to the light direction.

◆ ConfigureNonUniformLightingCorrection() [2/2]

None eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection ( self,
list[eVision._eVision.EROIBW8 | None] flatImages,
eVision.EROIBW8 darkImage )

Configure the non uniform lighting correction of the scene by using flat images.

Photometric stereo assumes the lights of each image to be of same direction and intensity. This is however rarely the case in practice, a way to attenuate the problem is to use flat images to correct non-uniform lighting before performing photometric stereo.

Parameters
flatImagesA vector of eVision.EROIBW8 of the flat images. The images must be in the same order as the calibration images/angles with respect to the light direction.
darkImageAn image of the object when there is no specific illumination. This argument can help to improve the results especially if the image is not dark when there is no illumination. Otherwise, it is not useful.

◆ EnableNonUniformLightingCorrection() [1/2]

bool eVision.Easy3D.EPhotometricStereoImager.EnableNonUniformLightingCorrection ( self)

Gets/Sets whether the correction of the non uniformity of the lighting is corrected or not (disabled by default, enabled by calling eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection).

Disabling it increases speed.

Remarks:

It must be configured (eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection) before being enabled.

◆ EnableNonUniformLightingCorrection() [2/2]

eVision.Easy3D.EPhotometricStereoImager.EnableNonUniformLightingCorrection ( self,
bool value )

Gets/Sets whether the correction of the non uniformity of the lighting is corrected or not (disabled by default, enabled by calling eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection).

Disabling it increases speed.

Remarks:

It must be configured (eVision.Easy3D.EPhotometricStereoImager.ConfigureNonUniformLightingCorrection) before being enabled.

◆ GaussianBlurSigma() [1/2]

float eVision.Easy3D.EPhotometricStereoImager.GaussianBlurSigma ( self)

Gets/Sets the sigma parameter of the gaussian blurring applied before computing the curvatures.

Default value is 1. Sigma must be > 0.

Remarks:

The bigger the sigma, the longer processing will take.

◆ GaussianBlurSigma() [2/2]

eVision.Easy3D.EPhotometricStereoImager.GaussianBlurSigma ( self,
float value )

Gets/Sets the sigma parameter of the gaussian blurring applied before computing the curvatures.

Default value is 1. Sigma must be > 0.

Remarks:

The bigger the sigma, the longer processing will take.

◆ GetAlbedos() [1/2]

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.GetAlbedos ( self,
eVision.Easy3D.EPhotometricStereoContrast contrast )

Gets the albedos as an eVision.EImageBW8.

Albedos are inherently floating point images so a conversion must be specified. In all cases, a floating point value of 0 translates to an eVision.EBW8 value of 0.

Remarks:

Albedos are computed in eVision.Easy3D.EPhotometricStereoImager.Compute.

Parameters
contrastan eVision.Easy3D.EPhotometricStereoContrast

◆ GetAlbedos() [2/2]

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.GetAlbedos ( self,
eVision.Easy3D.EPhotometricStereoContrast contrast,
float maxValue )

Gets the albedos as an eVision.EImageBW8.

Albedos are inherently floating point images so a conversion must be specified. In all cases, a floating point value of 0 translates to an eVision.EBW8 value of 0.

Remarks:

Albedos are computed in eVision.Easy3D.EPhotometricStereoImager.Compute.

Parameters
contrastan eVision.Easy3D.EPhotometricStereoContrast
maxValuewhen contrast is EPhotometricStereoContrast_FixedRange, this parameter can be used to specify the maximal floating point value for the albedos, otherwise it is ignored. All values bigger than the parameter are clipped. maxValue must be positive and defaults to 200.

◆ GetCalibrationAngles()

None eVision.Easy3D.EPhotometricStereoImager.GetCalibrationAngles ( self,
list[float] azimuths,
list[float] elevations )

Gets the calibration angles.

Remarks:

When facing the image, the axis x points right, y points top and z points towards the camera. Azimuth angles are oriented trigonometrically around the z axis. A light source on the right of the image would have an azimuth of 0 degrees. One on top would have an azimuth of 90 degrees. Elevation is the angle formed by the base plane and the light source. A light source on the horizon would have an elevation of 0 degrees. One on the camera would have an elevation of 90 degrees.

Parameters
azimuthsThe vector of azimuth angles to retrieve
elevationsThe vector of elevation angles to retrieve

◆ GradientsX()

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.GradientsX ( self)

Gets the gradients on the X axis as an eVision.EImageBW8.

Remarks:

Gradients on the X axis are computed in eVision.Easy3D.EPhotometricStereoImager.Compute.

◆ GradientsY()

eVision.EImageBW8 eVision.Easy3D.EPhotometricStereoImager.GradientsY ( self)

Gets the gradients on the Y axis as an eVision.EImageBW8.

Remarks:

Gradients on the Y axis are computed in eVision.Easy3D.EPhotometricStereoImager.Compute.

◆ IsCalibrated()

bool eVision.Easy3D.EPhotometricStereoImager.IsCalibrated ( self)

Returns whether the eVision.Easy3D.EPhotometricStereoImager is calibrated or not.

◆ Load() [1/2]

None eVision.Easy3D.EPhotometricStereoImager.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.Easy3D.EPhotometricStereoImager.

The given eVision.ESerializer must have been created for reading.

Remarks:

Neither photometric stereo results nor intermediary computations are serialized. Thus, results of a call to eVision.Easy3D.EPhotometricStereoImager.Compute performed before serialization cannot be retrieved after serialization. On the other hand, the results of the calibration and the NonUniformLightingCorrection are serialized and can be used again.

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.Easy3D.EPhotometricStereoImager.Load ( self,
str path )

Loads the eVision.Easy3D.EPhotometricStereoImager.

The given eVision.ESerializer must have been created for reading.

Remarks:

Neither photometric stereo results nor intermediary computations are serialized. Thus, results of a call to eVision.Easy3D.EPhotometricStereoImager.Compute performed before serialization cannot be retrieved after serialization. On the other hand, the results of the calibration and the NonUniformLightingCorrection are serialized and can be used again.

Parameters
pathThe file path.

◆ Normals()

eVision.EImageC24 eVision.Easy3D.EPhotometricStereoImager.Normals ( self)

Gets the normals as an eVision.EImageC24.

Remarks:

Normals are computed in eVision.Easy3D.EPhotometricStereoImager.Compute.

◆ Save() [1/2]

None eVision.Easy3D.EPhotometricStereoImager.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.Easy3D.EPhotometricStereoImager.

The given eVision.ESerializer must have been created for writing.

Remarks:

Neither photometric stereo results nor intermediary computations are serialized. Thus, results of a call to eVision.Easy3D.EPhotometricStereoImager.Compute performed before serialization cannot be retrieved after serialization. On the other hand, the results of the calibration and the NonUniformLightingCorrection are serialized and can be used again.

Parameters
serializerThe eVision.ESerializer object that is written to.

◆ Save() [2/2]

None eVision.Easy3D.EPhotometricStereoImager.Save ( self,
str path )

Saves the eVision.Easy3D.EPhotometricStereoImager.

The given eVision.ESerializer must have been created for writing.

Remarks:

Neither photometric stereo results nor intermediary computations are serialized. Thus, results of a call to eVision.Easy3D.EPhotometricStereoImager.Compute performed before serialization cannot be retrieved after serialization. On the other hand, the results of the calibration and the NonUniformLightingCorrection are serialized and can be used again.

Parameters
pathThe file path.

◆ SetCalibrationAngles()

None eVision.Easy3D.EPhotometricStereoImager.SetCalibrationAngles ( self,
list[float] azimuths,
list[float] elevations )

Sets the calibration angles.

Remarks:

When facing the image, the axis x points right, y points top and z points towards the camera. Azimuth angles are oriented trigonometrically around the z axis. A light source on the right of the image would have an azimuth of 0 degrees. One on top would have an azimuth of 90 degrees. Elevation is the angle formed by the base plane and the light source. A light source on the horizon would have an elevation of 0 degrees. One on the camera would have an elevation of 90 degrees.

Parameters
azimuthsThe vector of azimuth angles to set
elevationsThe vector of elevation angles to set