lvmcustom(3)

LIBRARY ROUTINE
lvmcustom - Customizes a morphological kernel via keyboard entry

LIBRARY CALL
#include "vinclude.h"
int
lvmcustom ( image, name, rows, cols, starti, startj)
struct xvimage **image;
int rows, cols, starti, startj;
char *name;

INPUT

    1. kernel - pointer to xvimage structure pointer
    2. rows - number of rows of image to generate
    3. cols - number of columns of image to generate
    4. xstart - x coordinate of upper left pixel
    5. ystart - y coordinate of upper left pixel

OUTPUT

    1. kernel - Holds the created kernel

MODIFICATIONS
Converted with GHOST on Thu May 24 16:24:44 MDT 1990

DESCRIPTION
vmcustom Creates a new morphological kernel via keyboard entry.

The term Structuring element is more often used than morphological kernel.

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 (or morphological kernel). 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.

The definition of a structuring element is very important, and depending on the applications, users have to create the appropriate kernel.

A Structuring Element can be described by :

_   A matrix or small image containing pixels with a value from 0 to 255.

_   The position of the upper left hand corner of this "matrix" relative to the origin.

This routine also ensures that the given dimensions are optimal. As a matter of fact, a user could give a dimension such that the first or last, column or row only contains values of 0. In this case, the dimension must be reduced for the following two reasons:

_   Increase of computation time.

_   Could cause errors for some morpho-function on the border of the image.

Set of morphological functions:

vmerode is part of a set of morphological functions available.

vmcustom:
    Customizes a structuring element

vm180:
    180 degree rotation of a structuring element.

vmdilate:
    dilation.

vmopen:
    opening.

vmclose:
    closing.

vmoredge:
    edge extractor.

vmskeleton:
    skeleton extractor.

This algorithm is obtained from :

    "Morphological Methods in Image and Signal Processing"

    Charles R.Giardina

    Edward R. Dougherty

    Prentice Hall, Englewood Cliffs, New Jersey 07632

SEE ALSO
vmcustom(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
vmcustom will only accept values of 0 or 1 for the kernel pixel value.

The row and column size are limited to 64.

The range of x and y kernel position is between -64 and 64.

AUTHOR
Pascal ADAM

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