Herror ::crop_domain_rel (
    Hobject Image,
    Hobject *ImagePart,
    const HTuple &Top,
    const HTuple &Bottom,
    const HTuple &Left,
    const HTuple &Right
)
HImage HImage::CropDomainRel (
    const HTuple &Top,
    const HTuple &Bottom,
    const HTuple &Left,
    const HTuple &Right
) const
HImageArray HImageArray::CropDomainRel (
    const HTuple &Top,
    const HTuple &Bottom,
    const HTuple &Left,
    const HTuple &Right
) const

Cut out an image area relative to the domain.

::crop_domain_rel cuts a rectangular area from the input images. The area is determined by the surrounding rectangle of the domain of the input image. The rectangle can be influenced by the control parameters to modify at the top (Top), at the bottom (Bottom), at the left (Left), and at the right (Right). Positive values results in a smaller, negative values in a larger size. If all parameters are set to zero, the region remains unchanged. The new image matrix has the size of a rectangle.


Parameters

Image (input_object)
(multichannel-)image(-array) -> Hobject: HImage(Array)
Input image.

ImagePart (output_object)
(multichannel-)image(-array) -> Hobject * : HImage(Array)
Image area.

Top (input_control)
integer -> HTuple.long
Number of rows clipped at the top.
Default value: -1
Suggested values: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

Bottom (input_control)
integer -> HTuple.long
Number of rows clipped at the bottom.
Default value: -1
Suggested values: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

Left (input_control)
integer -> HTuple.long
Number of columns clipped at the left.
Default value: -1
Suggested values: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20

Right (input_control)
integer -> HTuple.long
Number of columns clipped at the right.
Default value: -1
Suggested values: -20, -10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 20


Result

::crop_domain_rel returns H_MSG_TRUE if all parameters are correct. The behavior in case of empty input (no regions given) can be set via ::set_system('no_object_result',<Result>) and the behavior in case of an empty input region via ::set_system('empty_region_result',<Result>). If necessary, an exception handling is raised.


Possible Predecessors

::reduce_domain, ::threshold, ::connection, ::regiongrowing, ::pouring


Alternatives

::crop_domain, ::crop_rectangle1


See also

::smallest_rectangle1, ::intersection, ::gen_rectangle1, ::clip_region


Module

Image / region / XLD management



Copyright © 1996-2002 MVTec Software GmbH