버전 1.0.0.0 (3.66 KB) 작성자:

다운로드 수: 520

업데이트 날짜: 2014/5/1

라이선스 보기

INTERPMASK performs mask interpolation (tweening) via distance maps. Inbetweening or tweening is the process of generating intermediate frames between two images to give the appearance that the first image evolves smoothly into the second image

at query points Xq. The elements of X corresponds to the successive
masks along the last dimension of BW. The output BWq is a logical
matrix of equal size to BW except for the last dimension which is equal
to the number of query points in Xq.

BWq = INTERPMASK(...,'interpDim',D) specifies D as the dimension of BW
to interpolate along. By default, D is simply the last dimension of BW.

BWq = INTERPMASK(BW,Xq) assumes X = 1:N, where N is SIZE(BW,INTERPDIM).

Interpolation between masks is done via the distance matrix of each
mask in BW (calculated by BWDIST from the IP toolbox) using INTERP1.
Extra arguments ('linear', 'pchip', 'extrapval', etc) will be passed to
INTERP1 and can be used to control the interpolation method. To provide
an 'extrapval' to the output BWq mask, pass an 'extrapval' of 1 (TRUE)
or -1 (FALSE) to INTERPMASK as follows:

BWq = INTERPMASK(...,'pchip','extrapval',-1) % Extrap pixels set FALSE

For example, to interpolate smoothly from a small circle to a large
square to a large circle, consider the following:
% Make two circles and a rectangle
[x,y] = meshgrid(-51:51,-51:51);
circMat = sqrt(x.^2 + y.^2);
smallCirc = circMat<10;
largeCirc = circMat<30;
largeRect = false(size(x));
largeRect(2:100,2:100) = true;
% Stack them as masks 1, 2, and 3
BW = cat(3,smallCirc,largeRect,largeCirc);
figure, subplot(1,2,1)
patch(isosurface(BWout1,0.5),'FaceColor','g','EdgeColor','none')
camlight, view(3), camlight, axis image
subplot(1,2,2)
patch(isosurface(BWout2,0.5),'FaceColor','g','EdgeColor','none')
camlight, view(3), camlight, axis image

### 인용 양식

개발 환경: R2014a
모든 릴리스와 호환
##### 플랫폼 호환성
Windows macOS Linux
##### 카테고리
Help CenterMATLAB Answers에서 3-D Volumetric Image Processing에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0