1 | initial version |
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