728x90
반응형
오늘은 영상처리에서 자주 사용되는 모폴리지 처리에 대해 포스팅하겠다. 구현은 scipy 라이브러리의 ndimage 함수를 사용했다.
Morphological Operations
• An important part of image analysis involves understanding the shape of the objects in that image through morphological operations
• Morphology means form or structure
• The goal is to transform the structure or form of the objects using a structuring element
• Morphological operations can be applied on binary, grayscale and color images
- Dilation, Erosion, Opening, and Closing
Dilation
•The dilation of the image I with a structuring element S is denoted as (I + S)
1. Foreground pixels in an image grow or expand
2. Fill small holes in an object
3. Combine objects that are close enough to each other but are not connected

[Dilation 구현]


Erosion
• The erosion of the image I and with a structuring element S is denoted as (I - S)
- Shrink objects in an image by removing pixels
- Erosion is opposite of dilation.



Opening and Closing
• Opening and closing operations are complex morphological operations
• They are obtained by combining dilation and erosion
• Opening and closing can be performed on binary, grayscale and color images.

Opening

• Opening generally smooths a contour in an image, breaking narrow isthmuses and eliminating thin protrusions



Closing

• Closing tends to narrow smooth sections of contours, fusing narrow breaks and long thin gulfs, eliminating small holes, and filling gaps in contours



728x90
반응형
'Python > Image processing' 카테고리의 다른 글
[Python] 3D 배열 Resize하기 (skimage, scipy 활용) (0) | 2023.01.10 |
---|---|
[Python] Image filtering - 영상처리에 대해 (0) | 2022.09.26 |
댓글