binocular_disparity_mg binocular_disparity_mg BinocularDisparityMg BinocularDisparityMg binocular_disparity_mg 双目视差多重网格(算子)
名称
binocular_disparity_mg binocular_disparity_mg BinocularDisparityMg BinocularDisparityMg binocular_disparity_mg — 使用多重网格方法计算校正后的立体图像对的视差。
签名
Herror binocular_disparity_mg (const Hobject ImageRect1 , const Hobject ImageRect2 , Hobject* Disparity , Hobject* Score , double GrayConstancy , double GradientConstancy , double Smoothness , double InitialGuess , const char* CalculateScore , const char* MGParamName , const char* MGParamValue )
Herror T_binocular_disparity_mg (const Hobject ImageRect1 , const Hobject ImageRect2 , Hobject* Disparity , Hobject* Score , const Htuple GrayConstancy , const Htuple GradientConstancy , const Htuple Smoothness , const Htuple InitialGuess , const Htuple CalculateScore , const Htuple MGParamName , const Htuple MGParamValue )
void BinocularDisparityMg (const HObject& ImageRect1 , const HObject& ImageRect2 , HObject* Disparity , HObject* Score , const HTuple& GrayConstancy , const HTuple& GradientConstancy , const HTuple& Smoothness , const HTuple& InitialGuess , const HTuple& CalculateScore , const HTuple& MGParamName , const HTuple& MGParamValue )
HImage HImage ::BinocularDisparityMg (const HImage& ImageRect2 , HImage* Score , double GrayConstancy , double GradientConstancy , double Smoothness , double InitialGuess , const HString& CalculateScore , const HTuple& MGParamName , const HTuple& MGParamValue ) const
HImage HImage ::BinocularDisparityMg (const HImage& ImageRect2 , HImage* Score , double GrayConstancy , double GradientConstancy , double Smoothness , double InitialGuess , const HString& CalculateScore , const HString& MGParamName , const HString& MGParamValue ) const
HImage HImage ::BinocularDisparityMg (const HImage& ImageRect2 , HImage* Score , double GrayConstancy , double GradientConstancy , double Smoothness , double InitialGuess , const char* CalculateScore , const char* MGParamName , const char* MGParamValue ) const
HImage HImage ::BinocularDisparityMg (const HImage& ImageRect2 , HImage* Score , double GrayConstancy , double GradientConstancy , double Smoothness , double InitialGuess , const wchar_t* CalculateScore , const wchar_t* MGParamName , const wchar_t* MGParamValue ) const
(
Windows only)
static void HOperatorSet .BinocularDisparityMg (HObject imageRect1 , HObject imageRect2 , out HObject disparity , out HObject score , HTuple grayConstancy , HTuple gradientConstancy , HTuple smoothness , HTuple initialGuess , HTuple calculateScore , HTuple MGParamName , HTuple MGParamValue )
HImage HImage .BinocularDisparityMg (HImage imageRect2 , out HImage score , double grayConstancy , double gradientConstancy , double smoothness , double initialGuess , string calculateScore , HTuple MGParamName , HTuple MGParamValue )
HImage HImage .BinocularDisparityMg (HImage imageRect2 , out HImage score , double grayConstancy , double gradientConstancy , double smoothness , double initialGuess , string calculateScore , string MGParamName , string MGParamValue )
def binocular_disparity_mg (image_rect_1 : HObject, image_rect_2 : HObject, gray_constancy : float, gradient_constancy : float, smoothness : float, initial_guess : float, calculate_score : str, mgparam_name : MaybeSequence[str], mgparam_value : MaybeSequence[Union[str, float, int]]) -> Tuple[HObject, HObject]
描述
binocular_disparity_mg binocular_disparity_mg BinocularDisparityMg BinocularDisparityMg BinocularDisparityMg binocular_disparity_mg 计算两幅校正后的立体图像 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 image_rect_1 和 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 image_rect_2 之间的视差,并将其以 Disparity Disparity Disparity Disparity disparity disparity 形式返回。与
binocular_disparity binocular_disparity BinocularDisparity BinocularDisparity BinocularDisparity binocular_disparity 不同,该函数采用基于多重网格方法的变分法,可为不含纹理的图像区域返回视差值。与
binocular_distance_mg binocular_distance_mg BinocularDistanceMg BinocularDistanceMg BinocularDistanceMg binocular_distance_mg 不同,其结果不会转换为距离值。
输入图像必须是一对校正过的立体图像,即对应点必须具有相同的垂直坐标。图像宽度可以不同,但高度必须相同。该算子的运行时间与图像尺寸近似呈线性关系。
视差是指第一幅图像
ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 image_rect_1 中每个点需要移动的距离,才能到达第二幅图像 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 image_rect_2 中对应的点。当两个点在原始场景中对应同一点时,则称为对应点。计算出的视差场是密集的,即使对于没有对应点的点,也会估计其视差。视差仅针对同时属于两幅输入图像域的线段进行计算。更精确地说,视差图的域被定义为输入图像域最小外接矩形高度的交集区域。
计算得到的视差场通常并不完美。若将参数 CalculateScore CalculateScore CalculateScore CalculateScore calculateScore calculate_score 设为 'true' "true" "true" "true" "true" "true" ,则会为每个像素估算视差质量度量值,并将其存储在 Score Score Score Score score score 中——该值以 0 至 10 的灰度值图像形式呈现,其中 0 代表最佳质量,10 代表最差质量。为此,系统会计算从第二帧到第一帧的反向视差场,并与返回的视差场进行比对。由于该操作,分数计算的运行时间约增加一倍。
该算子采用变分方法,为每个可能的视差场分配一个能量值。能量较低的视差场优于能量较高的视差场。算子计算出能量最小的视差场并返回该结果。
分配给视差场的能量由数据项和平滑项组成。数据项描述了对应点作为场景相同部分的图像而具有相等灰度值的特性。平滑项则描述了成像场景及其视差场呈分段光滑的特性,这导致视差在数据项信息量较低的区域(例如无纹理区域)进行插值。
假设的具体内容如下:
灰度值恒定性 :假设对应点具有相同的灰度值,即
。
灰度值梯度的恒定性 :假设对应点具有相同的灰度值梯度,即
。通过使用两个梯度差值的
范数来建模与该假设的偏差。灰度值梯度具有在两幅图像间对加性照明变化不变的优势。
数据项中的统稳健性 :为降低异常值(即违反恒定性假设的数据点)的影响,通过总变差项
对其进行统计稳健惩罚,其中
为固定正则化常数。
视差场的平滑性 :假设生成的视差场是分段光滑的。这通过视差场导数的
范数来建模。
平滑项的统计稳健性 :与数据项类似,平滑项也应用了统计稳健的总变差,以减少异常值的影响。这对保留视差场中物体边界处的边缘尤为重要。
能量泛函是上述项在第一图像区域上的线性组合积分。线性组合的系数是算子的参数,可实现模型对特定场景的精细调整。
GrayConstancy GrayConstancy GrayConstancy GrayConstancy grayConstancy gray_constancy 决定灰度值恒常性的影响,GradientConstancy GradientConstancy GradientConstancy GradientConstancy gradientConstancy gradient_constancy 决定灰度值梯度恒常性的影响,Smoothness Smoothness Smoothness Smoothness smoothness smoothness 决定平滑项的影响。前两个参数需根据图像的灰度值区间进行适配。所提出的参数适用于灰度值范围为 0 至 255 的图像。
设
为第一图像在坐标(x,y)处的灰度值,
为第二图像在该处的灰度值,u(x,y)为坐标(x,y)处的视差值。则能量泛函由下式给出:
假设使函数 E 最小化的视差场 u 满足上述假设,因此可作为两幅图像之间视差的良好近似。
通过求解积分的欧拉-拉格朗日方程(Euler-Lagrange equation,ELE)的根,可使上述泛函达到最小值。这类似于通过求解一维函数导数的根来确定其极值。ELE 是积分区域上的非线性偏微分方程,当 E 达到极值时该方程需取 0。由于该泛函通常不存在最大值,因此对应的 ELE 根即为泛函的最小值点。
以下技术用于寻找 ELC 的根:
固定点迭代法 :通过将其转化为固定点迭代过程来求解 ELE,该过程通过迭代逐步逼近解。迭代次数可用于在求解速度与精度之间进行权衡。固定点迭代的每一步都包含求解一个线性偏微分方程。
粗到细处理 :首先构建立体图像的高斯图像金字塔。在金字塔的粗层级上先求解 ELE,并将该解作为下一层级固定点迭代的初始值。此方法具有以下优缺点:
1、由于下一层的固定点迭代获得了良好的初始值,因此只需较少的迭代次数即可达到较高的精度。迭代过程只需对视差进行微小修正。
2、原图像中的大差异在粗网格层级上会转化为小差异,从而更易于计算。
3、由于大多数噪声在粗版本图像中消失,因此图像对噪声的稳健性得到增强。
4、当微小结构与周围环境存在显著视差差异时会引发问题,因为这些结构在图像的粗版本中会消失,导致周围环境的视差被错误计算。由于图像金字塔的精细层级仅计算微小修正,此类误差无法在该层级得到纠正。
多重网格方法 :在每个金字塔层级的固定点迭代中产生的线性偏微分方程,通过线性化转化为线性方程组。这些线性方程组使用迭代求解器进行求解。对于此类线性方程组,多重网格法属于最高效的求解器之一。其原理在于:经典迭代求解器,如高斯-赛德尔法(Gauss-Seidel ),能快速消除误差的高频分量,但对低频分量的消除效率较低。多重网格法通过在粗网格上计算误差实现优化——此时误差的低频分量表现为高频分量,可被经典求解器快速消除。该过程采用分层结构:在粗分辨率层计算误差时,通过更粗分辨率层的修正步骤,以相同策略高效计算其误差(即误差的误差)。根据每周期执行一次或两次误差修正步骤,可形成 V 型或 W 型循环。对应于两至四级分辨率层级的分层迭代策略如下:
在此,原始问题的迭代用大标记表示,而小标记则表示错误纠正问题的迭代。
从算法角度看,纠错循环可描述如下:
1、在第一步中,使用交互式线性或非线性基本求解器(例如高斯-赛德尔求解器的变体)进行若干(少量)迭代。此步骤称为预松弛步。
2、在第二步中,计算当前误差以修正当前解(即步骤 1 后的解)。为提高效率,误差计算在更粗的网格层级上进行。此步骤可迭代执行多次,称为粗网格修正步骤。
3、最终步骤中,再次使用步骤 1 中的交互式线性或非线性基础求解器进行若干(少量)迭代。此步骤称为后松弛步骤。
此外,解法可采用分层初始化方式。从原始线性方程组的粗解变体出发,逐步进行解的精细化。具体而言,将粗解变体的插值解作为下一级精细变体的初始解。在每个求解层级内部,通过上述 V 迭代或 W 迭代循环高效求解该层级的线性方程组。文献中将此类对应的多重网格方法称为完整多重网格法。完整多重网格算法可视化过程如下:
该示例展示了一个完整的多重网格算法,其在分层初始化的每个分辨率层级上采用两个 W 修正循环。解从一个分辨率层级到下一个层级的插值步骤用 i 表示,两个 W 修正循环分别用
和
表示。原始问题的迭代用大标记表示,而小标记则表示误差修正问题的迭代。
根据所选的多重网格求解器,可提供若干用于精细调整求解器的参数,具体说明如下。
参数 InitialGuess InitialGuess InitialGuess InitialGuess initialGuess initial_guess 为粗网格上的固定点迭代初始化提供初始值。通常取 0 即可,但为避免陷入局部极小值,也可使用其他数值。
通过参数 MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name 和 MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value 可控制求解器,即控制粗网格到细网格的过程、固定点迭代以及多重网格求解器。通常使用预定义参数集即可满足需求,可通过设置 MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name =
'default_parameters' "default_parameters" "default_parameters" "default_parameters" "default_parameters" "default_parameters" 和 MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value =
'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" 来调用这些参数集。
若需单独指定参数,则
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name 和 MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value 必须设置为相同长度的元组。MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name 中指定的参数对应值必须在 MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value 的对应位置进行指定。参数将按给定顺序进行评估。因此,可先选择一组默认参数(参见上文),随后仅修改其中部分参数。下文将描述可用的参数类型。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'mg_solver' "mg_solver" "mg_solver" "mg_solver" "mg_solver" "mg_solver" 设置线性系统的求解器。MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value 的可能取值包括:
'multigrid' "multigrid" "multigrid" "multigrid" "multigrid" "multigrid" 表示简单多重网格求解器,'full_multigrid' "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" 表示完整多重网格求解器,'gauss_seidel' "gauss_seidel" "gauss_seidel" "gauss_seidel" "gauss_seidel" "gauss_seidel" 表示普通高斯-赛德尔求解器。多重网格方法具有收敛速度快的优势,但需承担线性系统粗化带来的开销。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'mg_cycle_type' "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" 用于选择多重网格求解器的递归类型。
MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value 的可能取值包括:'v' "v" "v" "v" "v" "v" 表示 V 循环,'w' "w" "w" "w" "w" "w"
表示 W 循环,'none' "none" "none" "none" "none" "none" 表示不进行递归。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'mg_pre_relax' "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" 设置多重网格求解器中预松弛步骤的迭代次数,或高斯-赛德尔求解器的迭代次数,具体取决于所选求解器类型。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'mg_post_relax' "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" 设置后松弛步骤的迭代次数。
增加预松驰和后松驰步骤的数量会使计算时间呈渐近线性增长。然而,系统不会执行额外的限制和延长操作(即缩放错误校正图像)。因此,适度增加松驰步骤的数量仅会导致计算时间的轻微增长。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" 设置图像金字塔中最粗糙的级别,粗到细处理由此开始。该值可以为正数,此时直接指定初始级别。级别 0 为包含原始图像的最精细层级。若值为负,则相对于金字塔层级的最大数量进行计算。可用的最粗糙金字塔层级是两张图像在两个方向上尺寸均至少为 4 像素的层级。如下所述,'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" is -2 默认值为 -2。这有助于为具有极大视差的图像计算正确的视差值。在某些情况下(例如重复纹理场景),这可能导致部分图像区域计算出过大的视差值。此时应将 'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" 设置为更小的数值。
标准参数以每金字塔层 0.6 的缩放因子放大图像。若存在最大视差 d 的估计值,则初始层 s 应选取为
大于 d。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'iterations' "iterations" "iterations" "iterations" "iterations" "iterations" 设置每个金字塔层级的固定点迭代次数。精确迭代次数为
,其中 level 表示图像金字塔中的当前层级。若此值设为 0,则在最精细的金字塔层级 0 不执行迭代操作。此时将层级 1 的结果按比例缩放至原始图像尺寸后返回,该方案适用于对速度要求极高的场景。该算子的运行时间与迭代次数近似呈线性关系。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name = 'pyramid_factor' "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" 决定了在创建图像金字塔进行粗到细处理时,图像缩放的倍数。下一级较小图像的宽度和高度将按给定倍数进行缩放。该值必须介于 0.1 到 0.9 之间。
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name =
'default_parameters' "default_parameters" "default_parameters" "default_parameters" "default_parameters" "default_parameters" 的预定义参数集包含以下值:
'default_parameters' "default_parameters" "default_parameters" "default_parameters" "default_parameters" "default_parameters" = 'very_accurate' "very_accurate" "very_accurate" "very_accurate" "very_accurate" "very_accurate" :'mg_solver' "mg_solver" "mg_solver" "mg_solver" "mg_solver" "mg_solver" = 'full_multigrid' "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" ,
'mg_cycle_type' "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" = 'w' "w" "w" "w" "w" "w" ,
'mg_pre_relax' "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" = 5,
'mg_post_relax' "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" = 5,
'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" = -2,
'iterations' "iterations" "iterations" "iterations" "iterations" "iterations" = 5,
'pyramid_factor' "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" = 0.6。
'default_parameters' "default_parameters" "default_parameters" "default_parameters" "default_parameters" "default_parameters" = 'accurate' "accurate" "accurate" "accurate" "accurate" "accurate" :'mg_solver' "mg_solver" "mg_solver" "mg_solver" "mg_solver" "mg_solver" = 'full_multigrid' "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" ,
'mg_cycle_type' "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" = 'w' "w" "w" "w" "w" "w" ,
'mg_pre_relax' "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" = 5,
'mg_post_relax' "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" = 5,
'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" = -2,
'iterations' "iterations" "iterations" "iterations" "iterations" "iterations" = 2,
'pyramid_factor' "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" = 0.6。
'default_parameters' "default_parameters" "default_parameters" "default_parameters" "default_parameters" "default_parameters" = 'fast_accurate' "fast_accurate" "fast_accurate" "fast_accurate" "fast_accurate" "fast_accurate" :'mg_solver' "mg_solver" "mg_solver" "mg_solver" "mg_solver" "mg_solver" = 'full_multigrid' "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" ,
'mg_cycle_type' "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" = 'v' "v" "v" "v" "v" "v" ,
'mg_pre_relax' "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" = 2,
'mg_post_relax' "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" = 2,
'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" = -2,
'iterations' "iterations" "iterations" "iterations" "iterations" "iterations" = 1,
'pyramid_factor' "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" = 0.6。如果未指定默认参数集,则这些是算法的默认参数。
'default_parameters' "default_parameters" "default_parameters" "default_parameters" "default_parameters" "default_parameters" = 'fast' "fast" "fast" "fast" "fast" "fast" :'mg_solver' "mg_solver" "mg_solver" "mg_solver" "mg_solver" "mg_solver" = 'full_multigrid' "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" "full_multigrid" ,
'mg_cycle_type' "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" "mg_cycle_type" = 'v' "v" "v" "v" "v" "v" ,
'mg_pre_relax' "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" "mg_pre_relax" = 1,
'mg_post_relax' "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" "mg_post_relax" = 1,
'initial_level' "initial_level" "initial_level" "initial_level" "initial_level" "initial_level" = -2,
'iterations' "iterations" "iterations" "iterations" "iterations" "iterations" = 0,
'pyramid_factor' "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" "pyramid_factor" = 0.6。
该算子的缺点 :视差的大幅跳变,对应于观测物体距离的大幅变化,会被过度平滑处理。这会导致背景距离较远的细长物体出现显示问题。
在仅出现在其中一张图像中的区域,图像的左右边缘可能会出现变形。
此外,应避免立体视觉的普遍问题,包括水平重复的图案、纹理稀少的区域以及反射现象。.
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
在内部数据级别上自动并行化。
参数
ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 image_rect_1 (输入对象) singlechannelimage(-array) → object HImage HObject HImage Hobject (byte / uint2 / real)
相机 1 的校正图像。
ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 image_rect_2 (输入对象) singlechannelimage(-array) → object HImage HObject HImage Hobject (byte / uint2 / real)
相机 2 的校正图像。
Disparity Disparity Disparity Disparity disparity disparity (输出对象) singlechannelimage(-array) → object HImage HObject HImage Hobject * (real)
视差图。
GrayConstancy GrayConstancy GrayConstancy GrayConstancy grayConstancy gray_constancy (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
数据项中灰度值恒定性的权重。
默认值:
1.0
建议值:
0.0, 1.0, 2.0, 10.0
限制:
GrayConstancy >= 0.0
GradientConstancy GradientConstancy GradientConstancy GradientConstancy gradientConstancy gradient_constancy (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
数据项中梯度恒定性的权重。
默认值:
30.0
建议值:
0.0, 1.0, 5.0, 10.0, 30.0, 50.0, 70.0
限制:
GradientConstancy >= 0.0
Smoothness Smoothness Smoothness Smoothness smoothness smoothness (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
平滑项相对于数据项的权重。
默认值:
5.0
建议值:
1.0, 3.0, 5.0, 10.0
限制:
Smoothness > 0.0
InitialGuess InitialGuess InitialGuess InitialGuess initialGuess initial_guess (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
视差的初步估计。
默认值:
0.0
建议值:
-30.0, -20.0, -10.0, 0.0, 10.0, 20.0, 30.0
CalculateScore CalculateScore CalculateScore CalculateScore calculateScore calculate_score (输入控制) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
质量指标是否应返回至 Score Score Score Score score score ?
默认值:
'false'
"false"
"false"
"false"
"false"
"false"
建议值:
'true' "true" "true" "true" "true" "true" , 'false' "false" "false" "false" "false" "false"
MGParamName MGParamName MGParamName MGParamName MGParamName mgparam_name (输入控制) attribute.name(-array) → HTuple MaybeSequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
多重网格算法的参数名称。
默认值:
'default_parameters'
"default_parameters"
"default_parameters"
"default_parameters"
"default_parameters"
"default_parameters"
值列表:
'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"
MGParamValue MGParamValue MGParamValue MGParamValue MGParamValue mgparam_value (输入控制) attribute.value(-array) → HTuple MaybeSequence[Union[str, float, int]] HTuple Htuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)
多重网格算法的参数值。
默认值:
'fast_accurate'
"fast_accurate"
"fast_accurate"
"fast_accurate"
"fast_accurate"
"fast_accurate"
建议值:
'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
示例(HDevelop)
read_image (BaseballL, 'stereo/epipolar/baseball_l')
read_image (BaseballR, 'stereo/epipolar/baseball_r')
binocular_disparity_mg (BaseballL, BaseballR, Disparity, Score, \
0.25, 30, 5, 0, 'true', \
'default_parameters','fast_accurate')
结果
如果参数值正确 binocular_disparity_mg binocular_disparity_mg BinocularDisparityMg BinocularDisparityMg BinocularDisparityMg binocular_disparity_mg 返回值 2 ( H_MSG_TRUE )。当输入为空(没有可用输入图像)时,可设置行为通过算子 set_system('no_object_result',<Result>) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) set_system("no_object_result",<Result>) 。如有必要,则抛出异常。
可能的前趋
map_image map_image MapImage MapImage MapImage map_image
可能的后继
threshold threshold Threshold Threshold Threshold threshold ,
disparity_to_distance disparity_to_distance DisparityToDistance DisparityToDistance DisparityToDistance disparity_to_distance ,
disparity_image_to_xyz disparity_image_to_xyz DisparityImageToXyz DisparityImageToXyz DisparityImageToXyz disparity_image_to_xyz
替代
binocular_disparity binocular_disparity BinocularDisparity BinocularDisparity BinocularDisparity binocular_disparity ,
binocular_disparity_ms binocular_disparity_ms BinocularDisparityMs BinocularDisparityMs BinocularDisparityMs binocular_disparity_ms ,
binocular_distance binocular_distance BinocularDistance BinocularDistance BinocularDistance binocular_distance ,
binocular_distance_mg binocular_distance_mg BinocularDistanceMg BinocularDistanceMg BinocularDistanceMg binocular_distance_mg ,
binocular_distance_ms binocular_distance_ms BinocularDistanceMs BinocularDistanceMs BinocularDistanceMs binocular_distance_ms
另见
map_image map_image MapImage MapImage MapImage map_image ,
gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap GenBinocularRectificationMap gen_binocular_rectification_map ,
binocular_calibration binocular_calibration BinocularCalibration BinocularCalibration BinocularCalibration binocular_calibration
模块
三维计量