예제 #1
0
def processProjectionSet(Is, Ir):
    sigma = 0.9
    alpha = 0

    subImage = Is - Ir
    subImage = np.median(subImage, axis=0)

    dI = (subImage * (np.mean(Is) / np.mean(Ir)))
    dx, dy = derivativesByOpticalflow(np.mean(Ir, axis=0),
                                      dI,
                                      alpha=alpha,
                                      sig_scale=sigma)
    phi = fc.frankotchellappa(dx, dy, False)
    phi3 = kottler(dx, dy)
    phi2 = LarkinAnissonSheppard(dx, dy)
    mintoAdd = min(np.amin(dx), np.amin(dy))
    dxPlus = dx + mintoAdd
    dyPlus = dy + mintoAdd

    gradientNorm = np.sqrt(dxPlus**2 + dyPlus**2)

    return {
        'dx': dx,
        'dy': dy,
        'phi': phi,
        'phi2': phi2,
        'phi3': phi3,
        'gradientNorm': gradientNorm
    }
예제 #2
0
def processOneProjection(Is, Ir):
    sigma = 0.9
    alpha = 0

    dI = (Is - Ir * (np.mean(gaussian_filter(Is, sigma=2.)) /
                     np.mean(gaussian_filter(Ir, sigma=2.))))
    alpha = np.finfo(np.float32).eps
    dx, dy = derivativesByOpticalflow(Is, dI, alpha=alpha, sig_scale=sigma)
    phi = fc.frankotchellappa(dx, dy, False)
    phi3 = kottler(dx, dy)
    phi2 = LarkinAnissonSheppard(dx, dy)

    mintoAdd = min(np.amin(dx), np.amin(dy))
    dxPlus = dx + mintoAdd
    dyPlus = dy + mintoAdd

    gradientNorm = np.sqrt(dxPlus**2 + dyPlus**2)

    return {
        'dx': dx,
        'dy': dy,
        'phi': phi,
        'phi2': phi2,
        'phi3': phi3,
        'gradientNorm': gradientNorm
    }
예제 #3
0
def processOneProjection(Is, Ir):
    sigma = 0.9
    alpha = 0

    dI = (Is - Ir * (np.mean(Is) / np.mean(Ir)))
    dx, dy = derivativesByOpticalflow(Ir, dI, alpha=alpha, sig_scale=sigma)
    phi = fc.frankotchellappa(dx, dy, False)
    phi3 = kottler(dx, dy)
    phi2 = LarkinAnissonSheppard(dx, dy)

    return {'dx': dx, 'dy': dy, 'phi': phi, 'phi2': phi2, 'phi3': phi3}
예제 #4
0
def processProjectionSet(Is, Ir):
    sigma = 1
    alpha = 0

    subImage = Is - Ir
    subImage = np.mean(subImage, axis=0)

    dI = (subImage * (np.mean(Is) / np.mean(Ir)))
    dx, dy = derivativesByOpticalflow(np.mean(Is, axis=0),
                                      dI,
                                      alpha=alpha,
                                      sig_scale=sigma)
    phi = fc.frankotchellappa(dx, dy, False)
    phi3 = kottler(dx, dy)
    phi2 = LarkinAnissonSheppard(dx, dy)

    return {'dx': dx, 'dy': dy, 'phi': phi, 'phi2': phi2, 'phi3': phi3}
예제 #5
0
def processProjectionSetWithDarkFields(Is, Ir, dark):
    sigma = 1
    alpha = 0

    #Is=corrections.normalizationMultipleDarkField(Is,dark)
    #Ir=corrections.normalizationMultipleDarkField(Ir,dark)

    subImage = Is - Ir
    subImage = np.median(subImage, axis=0)

    dI = (subImage * (np.mean(Is) / np.mean(Ir)))
    dx, dy = derivativesByOpticalflow(np.mean(Ir, axis=0),
                                      dI,
                                      alpha=alpha,
                                      sig_scale=sigma)
    phi = fc.frankotchellappa(dx, dy, False)
    phi3 = kottler(dx, dy)
    phi2 = LarkinAnissonSheppard(dx, dy)

    return {'dx': dx, 'dy': dy, 'phi': phi, 'phi2': phi2, 'phi3': phi3}