8.4.2.30. morphology
(packages/opencv/morphology.lsh)


dummy function that adds OpenCV C header files in C file

8.4.2.30.0. (cvCreateStructuringElementEx cols rows anchorx anchory shape values)
(packages/opencv/morphology.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //
 //    Name:    cvCreateStructuringElementEx
 //    Purpose:
 //      Allocates and fills IplConvKernel structure
 //      which can be used as a structuring element in following morphological operations
 //    Context:
 //    Parameters:
 //        cols   - number of columns in the kernel
 //        rows   - number of rows in the kernel
 //        anchorX - x-coordinate of anchor point(0..cols-1)
 //        anchorY - y-coordinate of anchor point(0..rows-1)
 //        shape   - shape of the structuring element
 //              CV_SHAPE_RECT - rectangular element
 //              CV_SHAPE_CROSS - cross-shaped element
 //              CV_SHAPE_ELLIPSE - elliptic element
 //              CV_SHAPE_CUSTOM - arbitrary element.
 //              <values> array determines mask
 //        values  - mask array. non-zero pixels determine shape of the element
 //    Returns:
 //        structuring element
 //F*/
 OPENCVAPI  IplConvKernel*  cvCreateStructuringElementEx( int  cols,    int rows,
                                                          int  anchorX, int anchorY,
                                                          CvElementShape shape,
                                                          int* values CV_DEFAULT(0) );


8.4.2.30.1. (cvReleaseStructuringElement ele)
(packages/opencv/morphology.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //
 //    Name:    cvReleaseStructuringElement
 //    Purpose:
 //      Releases structuring element and clears pointer
 //    Context:
 //    Parameters:
 //        element - double pointer to structuring element
 //    Returns:
 //F*/
 OPENCVAPI  void  cvReleaseStructuringElement( IplConvKernel** element );


8.4.2.30.2. (cvErode src dst ele ite)
(packages/opencv/morphology.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //
 //    Name:    cvErode
 //    Purpose:
 //      Applies minimum filter to the source image. Structuring element specifies
 //      a shape of a pixel neigborhood, over which the minimum is calculated
 //    Context:
 //    Parameters:
 //        src    - source image
 //        dst    - destination image, may be the same as source one.
 //        element - structuring element.
 //                  If the pointer is 0, 3x3 rectangular element is used.
 //        iterations - how many times the erosion needs to be applied
 //    Returns:
 //F*/
 OPENCVAPI  void  cvErode( const CvArr* src, CvArr* dst,
                           IplConvKernel* element CV_DEFAULT(0),
                           int iterations CV_DEFAULT(1) );


8.4.2.30.3. (cvDilate src dst ele ite)
(packages/opencv/morphology.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //
 //    Name:    cvDilate
 //    Purpose:
 //      Applies maximum filter to the source image. Structuring element specifies
 //      a shape of a pixel neigborhood, over which the maximum is calculated
 //    Context:
 //    Parameters:
 //        src    - source image
 //        dst    - destination image, may be the same as source one.
 //        element - structuring element.
 //                  If the pointer is 0, 3x3 rectangular element is used.
 //        iterations - how many times the dilation needs to be applied
 //    Returns:
 //F*/
 OPENCVAPI  void  cvDilate( const CvArr* src, CvArr* dst,
                            IplConvKernel* element CV_DEFAULT(0),
                            int iterations CV_DEFAULT(1) );


8.4.2.30.4. (cvMorphologyEx src dst temp ele op ite)
(packages/opencv/morphology.lsh)


 /*F///////////////////////////////////////////////////////////////////////////////////////
 //
 //    Name:    cvMorphologyEx
 //    Purpose:
 //      Applies one of the extended morphological operations that are based on
 //      erosion and dilation.
 //    Context:
 //    Parameters:
 //        src    - source image
 //        dst    - destination image, may be the same as source one.
 //        temp   - temporary image. The parameter must be non-zero
 //                 if operation is CV_MOP_TOPHAT or CV_MOP_BLACKHAT and src == dst, or
 //                 if operation is CV_MOP_GRADIENT
 //        element - structuring element.
 //                  If the pointer is 0, 3x3 rectangular element is used.
 //        operation - one of the following:
 //               (let's nB = "<element>, applied <iterations> times")
 //                CV_MOP_OPEN:   dst = dilate(erode(src,nB),nB);
 //                CV_MOP_CLOSE:  dst = erode(dilate(src,nB),nB);
 //                CV_MOP_GRADIENT: dst = dilate(src,nB)-erode(src,nB)
 //                CV_MOP_TOPHAT:   dst = src - erode(src,nB)
 //                CV_MOP_BLACKHAT: dst = dilate(src,nB) - src
 //        iterations - how many times the erosion/dilation needs to be applied
 //    Returns:
 //F*/