GeodesicOpening[image,ker]
gives the geodesic opening of image with respect to the structuring element ker.
GeodesicOpening[image,r]
gives the geodesic opening with respect to a range r square.
GeodesicOpening[data,…]
applies geodesic opening to an array of data.
GeodesicOpening
GeodesicOpening[image,ker]
gives the geodesic opening of image with respect to the structuring element ker.
GeodesicOpening[image,r]
gives the geodesic opening with respect to a range r square.
GeodesicOpening[data,…]
applies geodesic opening to an array of data.
Details
- GeodesicOpening works with binary, grayscale, and other images.
- GeodesicOpening works with 3D as well as 2D images, and also with data arrays of any rank.
- The structuring element ker is a matrix containing 0s and 1s.
- GeodesicOpening automatically pads structuring elements to have odd dimensions.
- GeodesicOpening[image,r] is equivalent to GeodesicOpening[image,BoxMatrix[r]].
- If multiple image channels are present, GeodesicOpening operates on each of them separately.
Examples
open all close allBasic Examples (2)
Scope (5)
Data (3)
GeodesicOpening of a 1D binary array:
GeodesicOpening[{0, 1, 0, 1, 1, 1}, 1]GeodesicOpening of a 2D binary array:
GeodesicOpening[(| | | | | |
| - | - | - | - | - |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 |), (| | | |
| - | - | - |
| 1 | 1 | 1 |
| 1 | 1 | 1 |
| 1 | 1 | 1 |)]//MatrixFormRemove salt noise from a 3D image:
i = [image];GeodesicOpening[i, 1]Parameters (2)
Remove small regions of ones with a 2x2 kernel:
GeodesicOpening[(| | | | | |
| - | - | - | - | - |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 |), (| | |
| - | - |
| 1 | 1 |
| 1 | 1 |)]//MatrixFormRemove small, bright regions from a binary image using a 3x3 kernel:
GeodesicOpening[[image], 1]Related Guides
History
Text
Wolfram Research (2012), GeodesicOpening, Wolfram Language function, https://reference.wolfram.com/language/ref/GeodesicOpening.html.
CMS
Wolfram Language. 2012. "GeodesicOpening." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GeodesicOpening.html.
APA
Wolfram Language. (2012). GeodesicOpening. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeodesicOpening.html
BibTeX
@misc{reference.wolfram_2026_geodesicopening, author="Wolfram Research", title="{GeodesicOpening}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/GeodesicOpening.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_geodesicopening, organization={Wolfram Research}, title={GeodesicOpening}, year={2012}, url={https://reference.wolfram.com/language/ref/GeodesicOpening.html}, note=[Accessed: 12-June-2026]}