Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Anchor element of structuring element for morphological operations

Ladislav_K_
Beginner
383 Views

There are lot of functions for morphological operations (like MorphCloseBorder), which use morphology specification structure. This structure is initialised by for example ippiMorphAdvInit , which accepts parameter "pMask" (which is structuring element where non-zero elements signal selection) and "maskSize" (rectangular size of SE).

But I do not see where can be specified anchor element ... does it means, that it is always centre of maskSize ?
(si maskSize with odd dimensions cannot be used or ?)

 

 

 

 

0 Kudos
3 Replies
Andrey_B_Intel
Employee
383 Views

Hi Ladislav.
The new API of IPP morphology function does not have anchor as input parameter.
Anchor is always fixed –
 anchor_x = (maskSize.width-1)  / 2
 anchor_y = (maskSize.height-1) / 2
Could you say what is your reason for using other values of anchor? We can consider new function MorphSetAnchor in this case.

Thanks.

0 Kudos
Ladislav_K_
Beginner
383 Views

Hi Andrey,
thank you for information (anchor_x and anchor_y are 0-based ?; so for Width=3 is anchor_x=1 and also for Width=4 is anchor_x=1 ?). IMO this should be documented here: https://software.intel.com/en-us/node/504082 because there is structuring element with non-centric anchor point, which leads to confusion, that it can be somehow specified.

At this moment I do not need anchor to be not in centre. (I was expecting this because of comparing to MatLab or OpenCV, where anchor point can be specified). But if documented, no problem for me.
(If such need will arrise I will report back)

0 Kudos
Andrey_B_Intel
Employee
383 Views

Hi Ladislav.

Yes, according with formula anchor is close to up-left corner for even masks.

We'll update info about anchor

Thanks.

0 Kudos
Reply