Ejemplo n.º 1
0
def edgeFill2(arr, cutoff=0.8):
    edgeN = c2.getEdges(arr, cutoff=cutoff)
    er1 = ndimage.morphology.binary_erosion(edgeN, iterations=2)
    di1 = ndimage.morphology.binary_dilation(er1, iterations=4)
    edgemap = np.logical_and(di1, edgeN)
    fillN = ndimage.morphology.binary_fill_holes(edgemap)
    return (fillN)
Ejemplo n.º 2
0
def edgeFill2(arr,cutoff=0.8):
    edgeN=c2.getEdges(arr,cutoff=cutoff)
    er1=ndimage.morphology.binary_erosion(edgeN,iterations=2)
    di1=ndimage.morphology.binary_dilation(er1,iterations=4)
    edgemap=np.logical_and(di1,edgeN)
    fillN=ndimage.morphology.binary_fill_holes(edgemap)
    return(fillN)
Ejemplo n.º 3
0
def edgeFill(arr,locations,dx,dy,cutoff=0.8):
    edgeN=c2.getEdges(arr,cutoff=cutoff)
    dilN=ndimage.morphology.binary_dilation(edgeN,iterations=2)
    erodeN=ndimage.morphology.binary_erosion(dilN,iterations=1)
    dil2N=ndimage.morphology.binary_dilation(dilN,iterations=3)
    
    fillN=ndimage.morphology.binary_fill_holes(cutEdgesFromMask(dil2N,locations,dx,dy))
    maskN=ndimage.morphology.binary_erosion(fillN,iterations=7)
    return(maskN)
Ejemplo n.º 4
0
def edgeFill(arr,locations,dx,dy,cutoff=0.8):
    edgeN=c2.getEdges(arr,cutoff=cutoff)
    dilN=ndimage.morphology.binary_dilation(edgeN,iterations=2)
    erodeN=ndimage.morphology.binary_erosion(dilN,iterations=1)
    dil2N=ndimage.morphology.binary_dilation(dilN,iterations=3)
    
    fillN=ndimage.morphology.binary_fill_holes(cutEdgesFromMask(dil2N,locations,dx,dy))
    maskN=ndimage.morphology.binary_erosion(fillN,iterations=7)
    return(maskN)