Leptonica 1.68
C Image Processing Library

colormorph.c File Reference

Color morphological operations (apply grayscale separately to each component) More...

#include <stdio.h>
#include <stdlib.h>
#include "allheaders.h"

Go to the source code of this file.

Functions

PIXpixColorMorph (PIX *pixs, l_int32 type, l_int32 hsize, l_int32 vsize)

Detailed Description

Color morphological operations (apply grayscale separately to each component)

    Top-level color morphological operations

          PIX     *pixColorMorph()

    Method: Algorithm by van Herk and Gil and Werman, 1992
            Apply grayscale morphological operations separately
            to each component.

Definition in file colormorph.c.


Function Documentation

PIX* pixColorMorph ( PIX pixs,
l_int32  type,
l_int32  hsize,
l_int32  vsize 
)

pixColorMorph()

Input: pixs type (L_MORPH_DILATE, L_MORPH_ERODE, L_MORPH_OPEN, or L_MORPH_CLOSE) hsize (of Sel; must be odd; origin implicitly in center) vsize (ditto) Return: pixd

Notes: (1) This does the morph operation on each component separately, and recombines the result. (2) Sel is a brick with all elements being hits. (3) If hsize = vsize = 1, just returns a copy.

Definition at line 53 of file colormorph.c.

References COLOR_BLUE, COLOR_GREEN, COLOR_RED, ERROR_PTR, L_MORPH_CLOSE, L_MORPH_DILATE, L_MORPH_ERODE, L_MORPH_OPEN, L_WARNING, NULL, pixCloseGray(), pixCopy(), pixCreateRGBImage(), pixDestroy(), pixDilateGray(), pixErodeGray(), pixGetDepth(), pixGetRGBComponent(), pixOpenGray(), and PROCNAME.

Referenced by main(), and pixColorMorphSequence().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines