Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. How to use the function 'cvCreateStructuringElementEx ()'?
Forum Updated to NodeBB v4.3 + New Features

How to use the function 'cvCreateStructuringElementEx ()'?

Scheduled Pinned Locked Moved The Lounge
2 Posts 2 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    isaacEnrique
    wrote on 9 Dec 2012, 04:57 last edited by
    #1

    Regards

    I think in my previous post, "Create a structuring element of 3 * 3", I do not clearly established what the problem was; maybe not well understood what I meant.

    The problem is: how to use the function

    cvCreateStructuringElementEx ()

    to create a structuring element of 3 * 3 with origin at the center (obviously a solid rectangular structuring element).

    As I understand it, this is the structuring element that is created by default when none is given ... Right?

    So the question is: what parameters should I pass to the function?

    I tested with the following:

    (case 1)
    cvCreateStructuringElementEx (3, 3, 1, 1, CV_SHAPE_RECT);

    and

    (case 2)
    cvCreateStructuringElementEx (3, 3, -1, -1, CV_SHAPE_RECT);

    In the first case I got an SE is not the one I'm waiting (I think), and that when used to dilate an image, as follows:

    cvDilate (entrada_gris, dilatacion2, ee, iterations);

    obtain a resulting image that is different from that obtained with:

    cvDilate (entrada_gris, dilatacion1, NULL, iterations);

    I think that the results should be the same (ie dilatacion1 = dilatacion2), but it is not.

    In case 1, I conclude that one of the two structural elements (either 'ee' or the structuring element is created when passing NULL to function) is not a rectangular structuring element of 3 * 3 with origin at the center ... Right?

    In the second case an error is generated at runtime.

    Thanks in advance to anyone who can provide some help regarding this issue.

    By the way, I'm working with OpenCV 2.2.0 and 1.2.1 QtSDK under Windows 7 64-bit

    Isaac Pérez
    Programming is understanding.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JKSH
      Moderators
      wrote on 9 Dec 2012, 05:34 last edited by
      #2

      What does the OpenCV documentation say?

      Even though you are using the Qt SDK, your problem is only about how to use an OpenCV function, which is not related to Qt at all. So, you can probably find more help at an OpenCV forum (http://answers.opencv.org ) than at a Qt forum.

      Having said that, please feel free to ask here if you'd like some help with how to link the Qt library to your project, or how to use the Qt SDK. :)

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0

      1/2

      9 Dec 2012, 04:57

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved