lvmclose(3)

LIBRARY ROUTINE
lvmclose - Computes the closing of image by a structuring element

LIBRARY CALL
#include "vinclude.h"
int
lvmclose(image,kernel)
struct xvimage *image, *kernel;

INPUT

    1. img -- first xvimage structure
    2. ker -- second xvimage structure (morphological kernel)

OUTPUT

    1. img -- hold the closing resulting image

MODIFICATIONS
Ghosted by Pascal ADAM Fri May 25 14:57:37 MDT 1990

DESCRIPTION
vmclose computes the closing of an image by a structuring element, B

From a general scientific perspective, the word MORPHOLOGY refers to the study of form and structure.

The morphological approach is generally based upon the analysis of a two valued image in terms of some predetermined geometric shape known as a structuring element.

Essentially, the manner in which the structuring element fits into the image is studied.

The morphological operations can be employed for many purposes, including edge detection, segmentation, and enhancement of images.

BASIC OPERATIONS:

Most morphological operations can be defined in terms of two basic operations, the EROSION and the DILATION.

Besides these two fundamental operations, two other operations play an important role in image analysis.

These two secondary operations, called OPENING and CLOSING are defined by a combination of erosion and dilation.

Notation:
    erode(A,B) = E(A,B)
    dilate(A,B) = D(A,B)
    open(A,B) = O(A,B)
    close(A,B) = C(A,B)
    complement(A) = Ac (complement of A)

DEFINITION OF THE CLOSING
    C(A,B) = E(D(A,-B),-B) with
    -B=rotation(B,180 degrees) = vm180(B).
    For information O(A,B) = D(E(A,B),B)

PROPERTIES of the CLOSING:

1. duality between the opening & closing
    C(Ac,B) = O(A,B)
    C(Ac,B) = COMPLEMENT [ O(A,B) ]
    COMPLEMENT [ C(A,B) ] = O(Ac,B)
    C(A,B) = COMPLEMENT [ (Ac,B) ]

3. Extensivity
    A is a subimage of C(A,B)

3. Increasing monotonicity
    If A1 is a subimage of A2, then C(A1,B) is a subimage of C(A2,B)

4. Idempotence
    C [ C(A,B),B ] = C(A,B)

These properties play a role in the use of opening for the construction of morphological filters.

The opening by a disk can have a smoothing effect (from the outside); it acts as a filter, with the exact result being dependent upon the shape of the structuring template.

Set of morphological functions:
vmclose is part of a set of morphological functions available.

vmcustom:
    Customizes a structuring element.

vm180:
    180 degrees rotation of a structuring element.

vmerode:
    dilation.

vmdilate:
    dilation.

vmopen:
    opening.

vmoredge:
    edge extractor.

vmskeleton:
    skeleton extractor.

ADVICE:

1.  For this binary closing function, all grey levels different from 0 are considered "white" or equivalent to 255. Therefore, the image is not required to be binary, however, it is strongly advisable to use vthresh on grey level images before using any morphological function.

The structuring element must be a morphological kernel (created by vmcustom).

This kernel is nothing but an image form file with two variables, ispare1 and ispare2 that define the origin of the structuring element (refer to vmcustom and lvmcustom).

This algorithm was obtained from :

    "Morphological Methods in Image and Signal Processing"

    Charles R. Giardina

    Edward R. Dougherty

    Prentice Hall, Englewood Cliffs, New Jersey 07632

SEE ALSO
vmclose(1), intro(3), vipl(3), verror(3), vutils(3) vmerode(1), vmcustom(1), vmdilate(1), lvmerode(3), lvmdilate(3)

RESTRICTIONS
vmclose accepts only BYTE images, and it is strongly dvisable to use vthresh to binarize the image before doing an opening.

The structuring element is an image form file, nevertheless, it should always be created by vmcusto1

AUTHOR
Pascal ADAM

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.