Open Operation-lhmorpopen and closed operation-lhmorpclose

Source: Internet
Author: User
Tags scale image
Bytes

Morphology and opencv 21:15:18 read 63 comments 0 font size: LargeMediumSmall subscription

Enable binary images (7*7)

Gray Scale Image opening (9*9 elliptical structure)

 

 

Function: lhmorpopen

(Morphological Open Operation)

Parameters:

SRC input image

DST output image

Se structure element pointer

Number of expansion and corrosion times in iterations

Source code:

Void lhmorpopen (const iplimage * SRC, iplimage * DST, iplconvkernel * Se = NULL, int iterations = 1)

{

Cverode (SRC, DST, Se, iterations );

// Note: Use the ing of structural elements to expand !!!

Iplconvkernel * semap = lhstructuringelementmap (SE );

Cvdilate (DST, DST, semap, iterations );

Cvreleasestructuringelement (& semap );

}

 

 

 

 

 

Closed Operation-lhmorpclose

Morphology and opencv 21:20:49 read 25 comments 0 font size: LargeMediumSmall subscription

Closed binary image (7*7)

 

 

Grayscale image closure (9*9)

 

 

Function: lhmorpclose

Description: Morphological close operation

Parameters:

SRC input image

DST output image

Se structure element pointer

Number of expansion and corrosion times in iterations closed operation

Source code:

Void lhmorpclose (const iplimage * SRC, iplimage * DST, iplconvkernel * Se = NULL, int iterations = 1)

{

Cvdilate (SRC, DST, Se, iterations );

// Note: The ing of structural elements is used for corrosion.

Iplconvkernel * semap = lhstructuringelementmap (SE );

Cverode (DST, DST, semap, iterations );

Cvreleasestructuringelement (& semap );

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.