- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As I understood from the ippi manual, we should use some primary functions like MorphologyInit and MorphologyInitAlloc before any call to the basic morphological functions such as Dilate. But unfortunately, I couldn't understand the main goal of such functions. For example, I don't know what is the rule of the "IppiMorphState pState"?! Or even, what is the definition of IppiMorphState and where can I find its related definition? In fact, I want to know how can I first define a structure element with an arbitrary size and then use it in a basic morphological operation like the Dilate operation.I would be grateful if you could give me a completeexample to do so (Delphi or C). Thanks
Hadi
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Hadi,
As I understood from the ippi manual, we should use some primary functions like MorphologyInit and MorphologyInitAlloc before any call to the basic morphological functions such as Dilate. But unfortunately, I couldn't understand the main goal of such functions.
IPP is the library of highly optimized functions for different Intel platforms. Methods of optimization depend on CPU and can require using of different data structures. A lot of IPP functions including morphology allocate memory and/or create in this memory data structures for optimized implementation. So, memory allocation and data structure creation is performed only once for all successive calls of optimized functions. Some functions have GetSize/external alloc/Init interface for applications with prohibited memory allocation (eg drivers).
For example, I don't know what is the rule of the "IppiMorphState pState"?! Or even, what is the definition of IppiMorphState and where can I find its related definition?
Suchstructures (eg IppiMorphState pState) contain data (for morphology it is the special representation of thestructuring element) for fast implementation of operations. These structures are used "as is". It is not quite clear what benefit customers could get from knowing the definition of this structure (different for PX, A6, W7 and other platforms).
In fact, I want to know how can I first define a structure element with an arbitrary size and then use it in a basic morphological operation like the Dilate operation.
The preface of Chapter 8 of the manual and the description of MorphologyInitAlloc function contain the description of the structuring element: the row-wise array of length height*width. Its non-zero elements compose the erosion or dilatiom mask (SE)
I would be grateful if you could give me a completeexample to do so (Delphi or C).
See Example 8-2 (pp 8-20 - 8-21 of the manual)
Thanks,
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply and attention. If I understood correctly, the fields or elements of the IppiMorphState is not known for the programmers and when we call ippiMorphologyInitAlloc_8u_C1R or similar functions its fields are created and initalized. And that is why in ippcv.h , we only see this:
struct ipcvMorphAdvState;
typedef struct ipcvMorphAdvState IppiMorphAdvState;
That is, we don't need to know the elements of such structures. But is it true? I am going to try that example in Delphi (example 8-2) and I will tell you the results. Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page