Morphological Filtering On OpenCV
Hi guys, i want to ask about this statement :
3 x 3 disk morphological filtering
Does it mean the radius is 9 ? or the size = 2 * 3 - 1 ?
Thank you.
Hi guys, i want to ask about this statement :
3 x 3 disk morphological filtering
Does it mean the radius is 9 ? or the size = 2 * 3 - 1 ?
Thank you.
no, the radius is (size-1)/2 .
here is the 3x3 disk kernel, as you can see, it's pretty much the same as the MORPH_CROSS one, because it's so small:
Mat k = getStructuringElement(MORPH_ELLIPSE,Size(3,3));
cerr << k << endl;
[ 0, 1, 0;
1, 1, 1;
0, 1, 0]
ofc., it gets more "disk-like" with larger size (like 11):
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0;
0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0;
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0;
0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0;
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
please also see MORPH flags and tutorials
Asked: 2017-05-13 10:32:24 -0600
Seen: 238 times
Last updated: May 15 '17
opencv python - recognizing and identify coins
How does TopHat morpholgy works on color images?
Non-flat structuring elements for morphological operations
Detect spaces and fill with rectangle
removing small blob from image?
Efficient way to remove holes in an object
Motion detection illumination from the sun
sequence of morphological operators
Why MORPH_ELLIPSE kernel is slower than MORPH_RECT and others?