roipolyaa.m
roipolyaa: Region of Interest Polygon Anti-Aliased.
This function works the same way as roipoly in the image processing toolbox, with one change. Elements along the boundary are shaded, depending on how far across the boundary they are. This removes the stepped edges when being used for image processing, creating a much smoother, antialiased polygon.
The method is as discussed on this blog post:
http://blogs.mathworks.com/steve/2007/02/06/antialiased-polygon-scan-conversion/
The function works in Matlab with no additional toolboxes.
The screenshot shows a mask using 'inpolygon' alone (left) and using roipolyaa (right). At full resolution, the right thumbnail has smoother edges.
It can be quite slow for large masks, especially if strong antialiasing is required. The majority of the time spent on the use of 'inpolygon'. It may be possible to speed this up by using one of the inpolygon replacements here on File Exchange.
인용 양식
Andrew Simpson (2025). roipolyaa.m (https://kr.mathworks.com/matlabcentral/fileexchange/47190-roipolyaa-m), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux카테고리
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > ROI-Based Processing >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Image Arithmetic >
태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!