sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandsfs_pentland (算子)
名称
sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandsfs_pentland — 从灰度值图像重建表面。
签名
Herror sfs_pentland(const Hobject Image, Hobject* Height, double Slant, double Tilt, double Albedo, double Ambient)
Herror T_sfs_pentland(const Hobject Image, Hobject* Height, const Htuple Slant, const Htuple Tilt, const Htuple Albedo, const Htuple Ambient)
void SfsPentland(const HObject& Image, HObject* Height, const HTuple& Slant, const HTuple& Tilt, const HTuple& Albedo, const HTuple& Ambient)
HImage HImage::SfsPentland(const HTuple& Slant, const HTuple& Tilt, const HTuple& Albedo, const HTuple& Ambient) const
HImage HImage::SfsPentland(double Slant, double Tilt, double Albedo, double Ambient) const
static void HOperatorSet.SfsPentland(HObject image, out HObject height, HTuple slant, HTuple tilt, HTuple albedo, HTuple ambient)
HImage HImage.SfsPentland(HTuple slant, HTuple tilt, HTuple albedo, HTuple ambient)
HImage HImage.SfsPentland(double slant, double tilt, double albedo, double ambient)
def sfs_pentland(image: HObject, slant: Union[float, int], tilt: Union[float, int], albedo: Union[float, int], ambient: Union[float, int]) -> HObject
描述
sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandSfsPentlandsfs_pentland reconstructs a surface (i.e. the relative
height of each image point) using the algorithm of Pentland. The
surface is reconstructed from the input image ImageImageImageImageimageimage.
The light source must be given by the parameters SlantSlantSlantSlantslantslant,
TiltTiltTiltTilttilttilt, AlbedoAlbedoAlbedoAlbedoalbedoalbedo and AmbientAmbientAmbientAmbientambientambient, and is
assumed to lie infinitely far away in the direction given by
SlantSlantSlantSlantslantslant and TiltTiltTiltTilttilttilt. The parameter
AlbedoAlbedoAlbedoAlbedoalbedoalbedo determines the albedo of the surface, i.e. the
percentage of light reflected in all directions. AmbientAmbientAmbientAmbientambientambient
determines the amount of ambient light falling onto the surface. It
can be set to values greater than zero if, for example, the white
balance of the camera was badly adjusted at the moment the image was
taken.
注意
sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandSfsPentlandsfs_pentland assumes that the heights are to be extracted on
a lattice with step width 1. If this is not the case, the
calculated heights must be multiplied with the step width after the
call to sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandSfsPentlandsfs_pentland. A Cartesian coordinate system with
the origin in the lower left corner of the image is used internally.
sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandSfsPentlandsfs_pentland can only handle byte-images.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
ImageImageImageImageimageimage (输入对象) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte)
Shaded input image.
HeightHeightHeightHeightheightheight (输出对象) image(-array) → objectHImageHObjectHImageHobject * (real)
Reconstructed height field.
SlantSlantSlantSlantslantslant (输入控制) angle.deg → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Angle between the light source and the positive z-axis
(in degrees).
默认值:
45.0
建议值:
1.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0
值范围:
0.0
≤
Slant
Slant
Slant
Slant
slant
slant
≤
180.0 (lin)
最小增量:
1.0
建议增量:
10.0
TiltTiltTiltTilttilttilt (输入控制) angle.deg → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Angle between the light source and the x-axis after
projection into the xy-plane (in degrees).
默认值:
45.0
建议值:
1.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0
值范围:
0.0
≤
Tilt
Tilt
Tilt
Tilt
tilt
tilt
≤
360.0 (lin)
最小增量:
1.0
建议增量:
10.0
AlbedoAlbedoAlbedoAlbedoalbedoalbedo (输入控制) number → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Amount of light reflected by the surface.
默认值:
1.0
建议值:
0.1, 0.5, 1.0, 5.0
值范围:
0.0
≤
Albedo
Albedo
Albedo
Albedo
albedo
albedo
≤
5.0 (lin)
最小增量:
0.01
建议增量:
0.1
限制:
Albedo >= 0.0
AmbientAmbientAmbientAmbientambientambient (输入控制) number → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Amount of ambient light.
默认值:
0.0
建议值:
0.1, 0.5, 1.0
值范围:
0.0
≤
Ambient
Ambient
Ambient
Ambient
ambient
ambient
≤
1.0 (lin)
最小增量:
0.01
建议增量:
0.1
限制:
Ambient >= 0.0
结果
If all parameters are correct sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandSfsPentlandsfs_pentland 返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。
可能的前趋
estimate_al_amestimate_al_amEstimateAlAmEstimateAlAmEstimateAlAmestimate_al_am,
estimate_sl_al_lrestimate_sl_al_lrEstimateSlAlLrEstimateSlAlLrEstimateSlAlLrestimate_sl_al_lr,
estimate_sl_al_zcestimate_sl_al_zcEstimateSlAlZcEstimateSlAlZcEstimateSlAlZcestimate_sl_al_zc,
estimate_tilt_lrestimate_tilt_lrEstimateTiltLrEstimateTiltLrEstimateTiltLrestimate_tilt_lr,
estimate_tilt_zcestimate_tilt_zcEstimateTiltZcEstimateTiltZcEstimateTiltZcestimate_tilt_zc,
optimize_fft_speedoptimize_fft_speedOptimizeFftSpeedOptimizeFftSpeedOptimizeFftSpeedoptimize_fft_speed
可能的后继
shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldShadeHeightFieldshade_height_field
模块
三维计量