Herror ::shade_height_field (
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 HTuple &Shadows
) const
HImageArray HImageArray::ShadeHeightField (
const HTuple &Slant,
const HTuple &Tilt,
const HTuple &Albedo,
const HTuple &Ambient,
const HTuple &Shadows
) const
Shade a height field.
::shade_height_field computes a shaded image from the
height field ImageHeight 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 Albedo and Ambient.
The parameter Shadows determines whether shadows are to
be calculated.
Attention
::shade_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_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.
Parameters
ImageHeight (input_object)
|
image(-array) -> Hobject: HImage(Array)
|
|
Height field to be shaded. |
ImageShade (output_object)
|
image(-array) -> Hobject * : HImage(Array)
|
|
Shaded image. |
Slant (input_control)
|
angle.deg -> HTuple.double / long
|
|
Angle between the light source and the positive z-axis
(in degrees). |
|
Default value: 0.0 |
|
Suggested values: 1.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0 |
|
Typical range of values: 0.0 <= Slant <= 180.0 (lin) |
|
Minimum increment: 0.01
|
Recommended increment: 10.0
|
Tilt (input_control)
|
angle.deg -> HTuple.double / long
|
|
Angle between the light source and the x-axis after
projection into the xy-plane (in degrees). |
|
Default value: 0.0 |
|
Suggested values: 1.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0 |
|
Typical range of values: 0.0 <= Tilt <= 360.0 (lin) |
|
Minimum increment: 0.01
|
Recommended increment: 10.0
|
Albedo (input_control)
|
number -> HTuple.double / long
|
|
Amount of light reflected by the surface. |
|
Default value: 1.0 |
|
Suggested values: 0.1, 0.5, 1.0, 5.0 |
|
Typical range of values: 0.0 <= Albedo <= 5.0 (lin) |
|
Minimum increment: 0.01
|
Recommended increment: 0.1
|
|
Restriction: Albedo >= 0.0 |
Ambient (input_control)
|
number -> HTuple.double / long
|
|
Amount of ambient light. |
|
Default value: 0.0 |
|
Suggested values: 0.1, 0.5, 1.0 |
|
Typical range of values: 0.0 <= Ambient <= 1.0 (lin) |
|
Minimum increment: 0.01
|
Recommended increment: 0.1
|
|
Restriction: Ambient >= 0.0 |
Shadows (input_control)
|
string -> HTuple.char *
|
|
Should shadows be calculated? |
|
Default value: 'false' |
|
Suggested values: 'true', 'false' |
Result
If all parameters are correct ::shade_height_field returns
the value H_MSG_TRUE. Otherwise, an exception is raised.
Possible Predecessors
::sfs_mod_lr,
::sfs_orig_lr,
::sfs_pentland,
::phot_stereo
Module
Tools
Copyright © 1996-2002 MVTec Software GmbH