Name
binocular_distance_mgT_binocular_distance_mgBinocularDistanceMgbinocular_distance_mgBinocularDistanceMgBinocularDistanceMg — Compute the distance values for a rectified stereo image pair using
multigrid methods.
binocular_distance_mg(Image1, Image2 : Distance, Score : CamParamRect1, CamParamRect2, RelPoseRect, GrayConstancy, GradientConstancy, Smoothness, InitialGuess, CalculateScore, MGParamName, MGParamValue : )
Herror T_binocular_distance_mg(const Hobject Image1, const Hobject Image2, Hobject* Distance, Hobject* Score, const Htuple CamParamRect1, const Htuple CamParamRect2, const Htuple RelPoseRect, const Htuple GrayConstancy, const Htuple GradientConstancy, const Htuple Smoothness, const Htuple InitialGuess, const Htuple CalculateScore, const Htuple MGParamName, const Htuple MGParamValue)
Herror binocular_distance_mg(Hobject Image1, Hobject Image2, Hobject* Distance, Hobject* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HTuple& RelPoseRect, const HTuple& GrayConstancy, const HTuple& GradientConstancy, const HTuple& Smoothness, const HTuple& InitialGuess, const HTuple& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue)
HImage HImage::BinocularDistanceMg(const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HTuple& RelPoseRect, const HTuple& GrayConstancy, const HTuple& GradientConstancy, const HTuple& Smoothness, const HTuple& InitialGuess, const HTuple& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue) const
HImageArray HImageArray::BinocularDistanceMg(const HImageArray& Image2, HImageArray* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HTuple& RelPoseRect, const HTuple& GrayConstancy, const HTuple& GradientConstancy, const HTuple& Smoothness, const HTuple& InitialGuess, const HTuple& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue) const
void BinocularDistanceMg(const HObject& Image1, const HObject& Image2, HObject* Distance, HObject* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HTuple& RelPoseRect, const HTuple& GrayConstancy, const HTuple& GradientConstancy, const HTuple& Smoothness, const HTuple& InitialGuess, const HTuple& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue)
HImage HImage::BinocularDistanceMg(const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HPose& RelPoseRect, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const HString& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue) const
HImage HImage::BinocularDistanceMg(const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HPose& RelPoseRect, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const HString& CalculateScore, const HString& MGParamName, const HString& MGParamValue) const
HImage HImage::BinocularDistanceMg(const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, const HPose& RelPoseRect, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const char* CalculateScore, const char* MGParamName, const char* MGParamValue) const
HImage HPose::BinocularDistanceMg(const HImage& Image1, const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const HString& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue) const
HImage HPose::BinocularDistanceMg(const HImage& Image1, const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const HString& CalculateScore, const HString& MGParamName, const HString& MGParamValue) const
HImage HPose::BinocularDistanceMg(const HImage& Image1, const HImage& Image2, HImage* Score, const HTuple& CamParamRect1, const HTuple& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const char* CalculateScore, const char* MGParamName, const char* MGParamValue) const
void HOperatorSetX.BinocularDistanceMg(
[in] IHUntypedObjectX* Image1, [in] IHUntypedObjectX* Image2, [out] IHUntypedObjectX** Distance, [out] IHUntypedObjectX** Score, [in] VARIANT CamParamRect1, [in] VARIANT CamParamRect2, [in] VARIANT RelPoseRect, [in] VARIANT GrayConstancy, [in] VARIANT GradientConstancy, [in] VARIANT Smoothness, [in] VARIANT InitialGuess, [in] VARIANT CalculateScore, [in] VARIANT MGParamName, [in] VARIANT MGParamValue)
IHImageX* HImageX.BinocularDistanceMg(
[in] IHImageX* Image2, [out] IHImageX** Score, [in] VARIANT CamParamRect1, [in] VARIANT CamParamRect2, [in] VARIANT RelPoseRect, [in] double GrayConstancy, [in] double GradientConstancy, [in] double Smoothness, [in] double InitialGuess, [in] BSTR CalculateScore, [in] VARIANT MGParamName, [in] VARIANT MGParamValue)
IHImageX* HPoseX.BinocularDistanceMg(
[in] IHImageX* Image1, [in] IHImageX* Image2, [out] IHImageX** Score, [in] VARIANT CamParamRect1, [in] VARIANT CamParamRect2, [in] VARIANT RelPoseRect, [in] double GrayConstancy, [in] double GradientConstancy, [in] double Smoothness, [in] double InitialGuess, [in] BSTR CalculateScore, [in] VARIANT MGParamName, [in] VARIANT MGParamValue)
static void HOperatorSet.BinocularDistanceMg(HObject image1, HObject image2, out HObject distance, out HObject score, HTuple camParamRect1, HTuple camParamRect2, HTuple relPoseRect, HTuple grayConstancy, HTuple gradientConstancy, HTuple smoothness, HTuple initialGuess, HTuple calculateScore, HTuple MGParamName, HTuple MGParamValue)
HImage HImage.BinocularDistanceMg(HImage image2, out HImage score, HTuple camParamRect1, HTuple camParamRect2, HPose relPoseRect, double grayConstancy, double gradientConstancy, double smoothness, double initialGuess, string calculateScore, HTuple MGParamName, HTuple MGParamValue)
HImage HImage.BinocularDistanceMg(HImage image2, out HImage score, HTuple camParamRect1, HTuple camParamRect2, HPose relPoseRect, double grayConstancy, double gradientConstancy, double smoothness, double initialGuess, string calculateScore, string MGParamName, string MGParamValue)
HImage HPose.BinocularDistanceMg(HImage image1, HImage image2, out HImage score, HTuple camParamRect1, HTuple camParamRect2, double grayConstancy, double gradientConstancy, double smoothness, double initialGuess, string calculateScore, HTuple MGParamName, HTuple MGParamValue)
HImage HPose.BinocularDistanceMg(HImage image1, HImage image2, out HImage score, HTuple camParamRect1, HTuple camParamRect2, double grayConstancy, double gradientConstancy, double smoothness, double initialGuess, string calculateScore, string MGParamName, string MGParamValue)
binocular_distance_mgbinocular_distance_mgBinocularDistanceMgbinocular_distance_mgBinocularDistanceMgBinocularDistanceMg computes the distance values for a
rectified stereo image pair using multigrid methods.
The operator first calculates the disparities between two rectified
images Image1Image1Image1Image1Image1image1 and Image2Image2Image2Image2Image2image2 similar to
binocular_disparity_mgbinocular_disparity_mgBinocularDisparityMgbinocular_disparity_mgBinocularDisparityMgBinocularDisparityMg. The resulting disparity values are
then transformed into distance values of the corresponding 3D world points
to the rectified stereo camera system as in disparity_to_distancedisparity_to_distanceDisparityToDistancedisparity_to_distanceDisparityToDistanceDisparityToDistance.
The distances are returned in the single-channel image DistanceDistanceDistanceDistanceDistancedistance
in which each gray value represents the distance of the respective
3D world point to the stereo camera system.
Different from binocular_distancebinocular_distanceBinocularDistancebinocular_distanceBinocularDistanceBinocularDistance this operator uses a variational
approach based on multigrid methods. This approach returns distance values
also for image parts that contain no texture.
The input images Image1Image1Image1Image1Image1image1 and Image2Image2Image2Image2Image2image2 must be a pair of
rectified stereo images, i.e., corresponding points must have the same
row coordinate. In case this assumption is violated the images
can be rectified by using the operators calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras,
gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMap and map_imagemap_imageMapImagemap_imageMapImageMapImage.
For the transformation of the disparity to the distance, the internal camera
parameters of the rectified camera 1 CamParamRect1CamParamRect1CamParamRect1CamParamRect1CamParamRect1camParamRect1 and of the
rectified camera 2 CamParamRect2CamParamRect2CamParamRect2CamParamRect2CamParamRect2camParamRect2, as well as the relative pose of
the cameras RelPoseRectRelPoseRectRelPoseRectRelPoseRectRelPoseRectrelPoseRect must be specified. The relative pose
defines a point transformation from the rectified camera system 2 to the
rectified camera system 1. These parameters can be obtained from the
operators calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras and
gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMap.
A detailed description of the algorithm and of the remaining
parameters can be found in the documentation of
binocular_disparity_mgbinocular_disparity_mgBinocularDisparityMgbinocular_disparity_mgBinocularDisparityMgBinocularDisparityMg.
If using cameras with telecentric lenses, the DistanceDistanceDistanceDistanceDistancedistance is not
defined as the distance of a point to the camera but as the distance from
the point to the plane, defined by the y-axes of both cameras and their
baseline (see gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMap).
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
- Automatically parallelized on internal data level.
Rectified image of camera 1.
Rectified image of camera 2.
Internal camera parameters of the rectified
camera 1.
Number of elements: CamParamRect1 == 8 || CamParamRect1 == 12
Internal camera parameters of the rectified
camera 2.
Number of elements: CamParamRect2 == 8 || CamParamRect2 == 12
Point transformation from rectified camera 2 to
rectified camera 1.
Number of elements: 7
Weight of the gray value constancy in the data
term.
Default value: 1.0
Suggested values: 0.0, 1.0, 2.0, 10.0
Restriction: GrayConstancy >= 0.0
Weight of the gradient constancy in the data
term.
Default value: 30.0
Suggested values: 0.0, 1.0, 5.0, 10.0, 30.0, 50.0, 70.0
Restriction: GradientConstancy >= 0.0
Weight of the smoothness term in relation to
the data term.
Default value: 5.0
Suggested values: 1.0, 3.0, 5.0, 10.0
Restriction: Smoothness > 0.0
Initial guess of the disparity.
Default value: 0.0
Suggested values: -30.0, -20.0, -10.0, 0.0, 10.0, 20.0, 30.0
Should the quality
measure be returned in ScoreScoreScoreScoreScorescore?
Default value:
'false'
"false"
"false"
"false"
"false"
"false"
Suggested values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"
Parameter name(s) for the multigrid algorithm.
Default value:
'default_parameters'
"default_parameters"
"default_parameters"
"default_parameters"
"default_parameters"
"default_parameters"
List of values: 'default_parameters'"default_parameters""default_parameters""default_parameters""default_parameters""default_parameters", 'initial_level'"initial_level""initial_level""initial_level""initial_level""initial_level", 'iterations'"iterations""iterations""iterations""iterations""iterations", 'mg_cycle_type'"mg_cycle_type""mg_cycle_type""mg_cycle_type""mg_cycle_type""mg_cycle_type", 'mg_post_relax'"mg_post_relax""mg_post_relax""mg_post_relax""mg_post_relax""mg_post_relax", 'mg_pre_relax'"mg_pre_relax""mg_pre_relax""mg_pre_relax""mg_pre_relax""mg_pre_relax", 'mg_solver'"mg_solver""mg_solver""mg_solver""mg_solver""mg_solver", 'pyramid_factor'"pyramid_factor""pyramid_factor""pyramid_factor""pyramid_factor""pyramid_factor"
Parameter value(s) for the multigrid algorithm.
Default value:
'fast_accurate'
"fast_accurate"
"fast_accurate"
"fast_accurate"
"fast_accurate"
"fast_accurate"
Suggested values: 'very_accurate'"very_accurate""very_accurate""very_accurate""very_accurate""very_accurate", 'accurate'"accurate""accurate""accurate""accurate""accurate", 'fast_accurate'"fast_accurate""fast_accurate""fast_accurate""fast_accurate""fast_accurate", 'fast'"fast""fast""fast""fast""fast", 'v'"v""v""v""v""v", 'w'"w""w""w""w""w", 'none'"none""none""none""none""none", 'gauss_seidel'"gauss_seidel""gauss_seidel""gauss_seidel""gauss_seidel""gauss_seidel", 'multigrid'"multigrid""multigrid""multigrid""multigrid""multigrid", 'full_multigrid'"full_multigrid""full_multigrid""full_multigrid""full_multigrid""full_multigrid", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, -1, -2, -3, -4, -5
If the parameter values are correct, binocular_distance_mgbinocular_distance_mgBinocularDistanceMgbinocular_distance_mgBinocularDistanceMgBinocularDistanceMg
returns the value 2 (H_MSG_TRUE). If the input is empty (no input images are
available) the behavior can be set via
set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an
exception is raised.
map_imagemap_imageMapImagemap_imageMapImageMapImage
thresholdthresholdThresholdthresholdThresholdThreshold
binocular_disparitybinocular_disparityBinocularDisparitybinocular_disparityBinocularDisparityBinocularDisparity,
binocular_distancebinocular_distanceBinocularDistancebinocular_distanceBinocularDistanceBinocularDistance,
binocular_disparity_mgbinocular_disparity_mgBinocularDisparityMgbinocular_disparity_mgBinocularDisparityMgBinocularDisparityMg
map_imagemap_imageMapImagemap_imageMapImageMapImage,
gen_binocular_rectification_mapgen_binocular_rectification_mapGenBinocularRectificationMapgen_binocular_rectification_mapGenBinocularRectificationMapGenBinocularRectificationMap,
binocular_calibrationbinocular_calibrationBinocularCalibrationbinocular_calibrationBinocularCalibrationBinocularCalibration,
disparity_to_distancedisparity_to_distanceDisparityToDistancedisparity_to_distanceDisparityToDistanceDisparityToDistance,
distance_to_disparitydistance_to_disparityDistanceToDisparitydistance_to_disparityDistanceToDisparityDistanceToDisparity,
disparity_image_to_xyzdisparity_image_to_xyzDisparityImageToXyzdisparity_image_to_xyzDisparityImageToXyzDisparityImageToXyz
3D Metrology