mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Update documentation ( tutorials )
This commit is contained in:
@@ -66,6 +66,7 @@ int main( int, char** argv )
|
||||
return 0;
|
||||
}
|
||||
|
||||
//![erosion]
|
||||
/**
|
||||
* @function Erosion
|
||||
*/
|
||||
@@ -76,14 +77,19 @@ void Erosion( int, void* )
|
||||
else if( erosion_elem == 1 ){ erosion_type = MORPH_CROSS; }
|
||||
else if( erosion_elem == 2) { erosion_type = MORPH_ELLIPSE; }
|
||||
|
||||
//![kernel]
|
||||
Mat element = getStructuringElement( erosion_type,
|
||||
Size( 2*erosion_size + 1, 2*erosion_size+1 ),
|
||||
Point( erosion_size, erosion_size ) );
|
||||
//![kernel]
|
||||
|
||||
/// Apply the erosion operation
|
||||
erode( src, erosion_dst, element );
|
||||
imshow( "Erosion Demo", erosion_dst );
|
||||
}
|
||||
//![erosion]
|
||||
|
||||
//![dilation]
|
||||
/**
|
||||
* @function Dilation
|
||||
*/
|
||||
@@ -97,7 +103,9 @@ void Dilation( int, void* )
|
||||
Mat element = getStructuringElement( dilation_type,
|
||||
Size( 2*dilation_size + 1, 2*dilation_size+1 ),
|
||||
Point( dilation_size, dilation_size ) );
|
||||
|
||||
/// Apply the dilation operation
|
||||
dilate( src, dilation_dst, element );
|
||||
imshow( "Dilation Demo", dilation_dst );
|
||||
}
|
||||
//![dilation]
|
||||
|
||||
Reference in New Issue
Block a user