Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7669567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:37:22+00:00 2026-05-31T15:37:22+00:00

I am a beginner in OpenCv. I looked at opencv morphological dilation filter as

  • 0

I am a beginner in OpenCv. I looked at opencv morphological dilation filter as maximum filter and how remove binary image noise in opencv? but I could not exactly understand how to use dilate function. I want to do some thing like this picture with the function:

http://up98.org/upload/server1/02/e/q42oinl73zpv7epkccrz.jpg

Would you please explain me step by step? Should I use this function?

void cvDilate(
     IplImage* src,
     IplImage* dst,
     IplConvKernel* B = NULL,
     int iterations = 1
)

If yes , what should i put instead of

IplImage* src
IplImage* dst
B
IplConvKernel* B = NUL
int iterations = 1

how is its Operation?

i mean that what should i do before i call the function?

what should i write in .h and .cpp

Thank you!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:37:23+00:00Added an answer on May 31, 2026 at 3:37 pm

    You are using the plain C OpenCV API. Nothing wrong, but I prefer the new C++ API

    Regarding your question:

    • IplImage* src – is the source image, the one you already have and want it dilated;

    • IplImage* dst – is the destination image, that should only be declared prior to calling this funcion;

    • IplConvKernel* B – that’s a bit harder to explain in short words, but thing of a tiny image, typically a 3×3 pixels, that will be use to get the features of your image “more fat” at each of the given number of iterations, check here. If you let it be a null pointer, the default value will be used, and it should suffice for most applications;

    • int iterations – the number of times that kernel will be used around the contour of the source image to turn its features more “fat” at each time;

    As for your image, to achieve that result, you should first dilate for a certain number of iterations, then erode it back the same number of iterations.

    Check this code here.

    It uses the new C++ API, but you should not have problems into “translating” it back to the plain C API, as the structure of the functions are quite the same.

    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not a beginner at C# but I really need to increase my understanding,
Python beginner here. I've looked around and found similar questions but can't quite cobble
Once again a very beginner-ish question, but here I go: I would like to
beginner question. here's pdb output (Pdb) entry.image <FieldFile: None> (Pdb) entry.image is None False
Beginner in python, but been programming for about 5 years now. I suspect I
A beginner question I am sure, but I have just started working with a
A beginner's question: I am trying to remove a subview after having added it
I am not a Unix guy, so I have been trying to install openCV
another beginner problem. Why isn't the following code with an asp.net page not working?
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.