Herror ::sfs_pentland (
    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
HImageArray HImageArray::SfsPentland (
    const HTuple &Slant,
    const HTuple &Tilt,
    const HTuple &Albedo,
    const HTuple &Ambient
) const

Reconstruct a surface from a gray value image.

::sfs_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 Image. The light source must be given by the parameters Slant, Tilt, Albedo and Ambient, and is assumed to lie infinitely far away in the direction given by Slant and Tilt. The parameter Albedo determines the albedo of the surface, i.e. the percentage of light reflected in all directions. Ambient 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.


Attention

::sfs_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_pentland. A Cartesian coordinate system with the origin in the lower left corner of the image is used internally. Since the operator is based on the Fast Fourier Transform, only square images with the edge length being a power of 2 are accepted. ::sfs_pentland can only handle byte-images.


Parameters

Image (input_object)
image(-array) -> Hobject: HImage(Array)
Shaded input image.

Height (output_object)
image(-array) -> Hobject * : HImage(Array)
Reconstructed height field.

Slant (input_control)
angle.deg -> HTuple.double / long
Angle between the light source and the positive z-axis (in degrees).
Default value: 45.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: 1.0
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: 45.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: 1.0
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


Result

If all parameters are correct ::sfs_pentland returns the value H_MSG_TRUE. Otherwise, an exception is raised.


Possible Predecessors

::estimate_al_am, ::estimate_sl_al_lr, ::estimate_sl_al_zc, ::estimate_tilt_lr, ::estimate_tilt_zc


Possible Successors

::shade_height_field


Module

Tools



Copyright © 1996-2002 MVTec Software GmbH