I am trying to apply morphological operations on image in octave/matlab. I need to use structuring elements for using operations like dialate, erode. The origin of structuring elements is set by default using this:
origin = floor((size(nhood)+1)/2)
reference : http://www.mathworks.in/help/images/ref/strel.html
i need to change this origin to some other element of the structuring element. FYI I am using flat structuring element.
I couldn't find any document for this. Any help is welcome.
Thanks
If I got your question right you can shift the structuring element using translate .
Example from the help page:
se = strel(ones(3))
%// Translate it 2 rows up and 2 columns to the left
se2 = translate(se,[-2 -2])
Giving this:
Is this what you had in mind?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.