criticalAlpha
알파 셰이프에서 임계 변환을 정의하는 알파 반지름
설명
예제
2차원 포인트 클라우드의 임계 알파 값 구하기
2차원 점 집합을 만들고 플로팅합니다.
th = (pi/12:pi/12:2*pi)'; x1 = [reshape(cos(th)*(1:5), numel(cos(th)*(1:5)),1); 0]; y1 = [reshape(sin(th)*(1:5), numel(sin(th)*(1:5)),1); 0]; x = [x1; x1+15;]; y = [y1; y1]; plot(x,y,'.') axis equal
디폴트 알파 반지름을 사용하여 알파 셰이프를 만듭니다.
shp = alphaShape(x,y);
모든 점을 포함할 수 있는 알파 셰이프를 생성하는 가장 작은 알파 반지름을 계산하고 해당하는 알파 셰이프를 플로팅합니다.
pc = criticalAlpha(shp,'all-points');
shp.Alpha = pc;
plot(shp)
모든 점을 둘러싸고 영역이 하나만 포함된 알파 셰이프를 생성하는 가장 작은 알파 반지름을 계산합니다.
shp = alphaShape(x,y);
pc = criticalAlpha(shp,'one-region');
shp.Alpha = pc;
plot(shp)
입력 인수
shp
— 알파 셰이프
alphaShape
객체
알파 셰이프로, alphaShape
객체로 지정됩니다. 자세한 내용은 alphaShape
를 참조하십시오.
예: shp = alphaShape(x,y)
는 (x,y)
점 좌표에서 2차원 alphaShape
객체를 만듭니다.
type
— 임계 변환의 유형
'all-points'
| 'one-region'
임계 변환의 유형으로, 'all-points'
, 'one-region'
중 하나로 지정됩니다.
'all-points'
는 모든 점을 포함하는 알파 셰이프를 생성하는 가장 작은 알파 반지름에 해당합니다.'one-region'
은 모든 점을 포함하면서 영역은 하나만 포함된 알파 셰이프를 생성하는 가장 작은 알파 반지름에 해당합니다.
데이터형: char
출력 인수
a
— 임계 알파 반지름
스칼라
임계 알파 반지름으로, 스칼라로 반환됩니다. type
이 'all-points'
인 경우 a
는 모든 점을 포함하고, type
이 'one-region'
인 경우 단일 영역 내의 모든 점을 포함하는 알파 셰이프를 생성하는 알파 반지름의 값입니다.
criticalAlpha
를 사용하여 a
를 구한 후에, shp.Alpha = a
를 입력하여 shp
의 알파 반지름을 a
와 동일하게 만들 수 있습니다.
버전 내역
R2014b에 개발됨
참고 항목
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)