Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Peter Ryan
Peter Ryan el 24 de Oct. de 2016
Editada: Peter Ryan el 24 de Oct. de 2016
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!

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by