shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldshade_height_field (算子)
名称
shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldshade_height_field — 阴影高度场。
签名
Herror shade_height_field(const Hobject ImageHeight, Hobject* ImageShade, double Slant, double Tilt, double Albedo, double Ambient, const char* Shadows)
Herror T_shade_height_field(const Hobject ImageHeight, Hobject* ImageShade, const Htuple Slant, const Htuple Tilt, const Htuple Albedo, const Htuple Ambient, const Htuple Shadows)
void ShadeHeightField(const HObject& ImageHeight, HObject* ImageShade, const HTuple& Slant, const HTuple& Tilt, const HTuple& Albedo, const HTuple& Ambient, const HTuple& Shadows)
HImage HImage::ShadeHeightField(const HTuple& Slant, const HTuple& Tilt, const HTuple& Albedo, const HTuple& Ambient, const HString& Shadows) const
HImage HImage::ShadeHeightField(double Slant, double Tilt, double Albedo, double Ambient, const HString& Shadows) const
HImage HImage::ShadeHeightField(double Slant, double Tilt, double Albedo, double Ambient, const char* Shadows) const
HImage HImage::ShadeHeightField(double Slant, double Tilt, double Albedo, double Ambient, const wchar_t* Shadows) const
(
Windows only)
static void HOperatorSet.ShadeHeightField(HObject imageHeight, out HObject imageShade, HTuple slant, HTuple tilt, HTuple albedo, HTuple ambient, HTuple shadows)
HImage HImage.ShadeHeightField(HTuple slant, HTuple tilt, HTuple albedo, HTuple ambient, string shadows)
HImage HImage.ShadeHeightField(double slant, double tilt, double albedo, double ambient, string shadows)
描述
shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldShadeHeightFieldshade_height_field computes a shaded image from the
height field ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height as if the image were illuminated
by an infinitely far away light source. It is assumed that the
surface described by the height field has Lambertian reflection
properties determined by AlbedoAlbedoAlbedoAlbedoalbedoalbedo and AmbientAmbientAmbientAmbientambientambient.
The parameter ShadowsShadowsShadowsShadowsshadowsshadows determines whether shadows are to
be calculated.
注意
shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldShadeHeightFieldshade_height_field assumes that the heights are given
on a lattice with step width 1. If this is not the case, the
heights must be divided by the step width before the call to
shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldShadeHeightFieldshade_height_field. Otherwise, the derivatives used
internally to compute the orientation of the surface will be
estimated to steep or too flat. Example: The height field is given
on 100*100 points on the square [0,1]*[0,1]. Then the heights must
be divided by 1/100 first. A Cartesian coordinate system with the
origin in the lower left corner of the image is used internally.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height (输入对象) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte / int4 / real)
Height field to be shaded.
ImageShadeImageShadeImageShadeImageShadeimageShadeimage_shade (输出对象) image(-array) → objectHImageHObjectHImageHobject * (byte)
Shaded image.
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).
默认值:
0.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)
最小增量:
0.01
建议增量:
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).
默认值:
0.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)
最小增量:
0.01
建议增量:
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
ShadowsShadowsShadowsShadowsshadowsshadows (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Should shadows be calculated?
默认值:
'false'
"false"
"false"
"false"
"false"
"false"
建议值:
'true'"true""true""true""true""true", 'false'"false""false""false""false""false"
结果
If all parameters are correct shade_height_fieldshade_height_fieldShadeHeightFieldShadeHeightFieldShadeHeightFieldshade_height_field 返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。
可能的前趋
sfs_mod_lrsfs_mod_lrSfsModLrSfsModLrSfsModLrsfs_mod_lr,
sfs_orig_lrsfs_orig_lrSfsOrigLrSfsOrigLrSfsOrigLrsfs_orig_lr,
sfs_pentlandsfs_pentlandSfsPentlandSfsPentlandSfsPentlandsfs_pentland,
photometric_stereophotometric_stereoPhotometricStereoPhotometricStereoPhotometricStereophotometric_stereo
模块
基础