필터 지우기
필터 지우기

How to create a signed distance transform of binary multiframe array?

조회 수: 2 (최근 30일)
Peter Ryan
Peter Ryan 2016년 10월 24일
편집: Peter Ryan 2016년 10월 24일
I wish to perform a signed distance transform on my binary multi-frame array with dimensions, N x N x Numframes.
In case it's not clear what I want to do, I specify the problem here:
My variables are:
imArr % my binary image array,
Omega % the set of non zero elements of imArr,
Omega_c % the set of zero elements
boundaryOmega % the set of elements that lie
on the boundary between 'Omega' and 'Omega_c'
SDFimArr % the N x N x Numframes which represents the signed distance
transform of ImArr
then I want my distance transform to do the following:
for each x in imArr
if x in Omega
SDFimArr(x) = distance(x,boundaryOmega)
else if x in Omega_c
SDFimArr(x) = - distance(x,boundaryOmega)
end
Please note that imArr could contain several disconnected non zero regions and 'distance' is the euclidean distance.
I'd like to avoid having to write my own code as it definitely seems that there should be efficient code out there either written in matlab or a mex file that should do this.
I would be super grateful for any pointers!

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by