コード例 #1
0
def lotze_disarray(pic, reach, grain):
    (h, w) = pic.fatFiducialDataPlane.shape
    fiducialDOGScaleSpace = scl.DOGScaleSpace(pic)

    ei_dat = hel.LotzeDisarray(fiducialDOGScaleSpace, reach, grain,
                               pic.numScaleLevels, w, h)

    eidolon = pic.DisembedDataPlane(ei_dat)
    return np.asarray(Image.fromarray(eidolon, 'L'))
コード例 #2
0
def coherent_disarray(pic, reach):
    """Return a coherently scattered image"""

    (h, w) = pic.fatFiducialDataPlane.shape

    dog_scale_space = scl.DOGScaleSpace(pic)
    ei_dat = hel.CoherentDisarray(dog_scale_space, reach, w, h, pic.MAX_SIGMA,
                                  pic.numScaleLevels, pic.scaleLevels)

    eidolon = pic.DisembedDataPlane(ei_dat)
    return np.asarray(Image.fromarray(eidolon, 'L'))
コード例 #3
0
def coherent_disarray_of_edges(pic, reach):

    (h, w) = pic.fatFiducialDataPlane.shape
    fiducialDOGScaleSpace = scl.DOGScaleSpace(pic)

    eidolonDataPlane = hel.CoherentDisarray(fiducialDOGScaleSpace, reach, w, h,
                                            pic.MAX_SIGMA, pic.numScaleLevels,
                                            pic.scaleLevels)

    eidolon = pic.DisembedDataPlane(eidolonDataPlane)
    return np.asarray(Image.fromarray(eidolon, 'L'))
コード例 #4
0
def superficial_disarray(pic, reach, grain):

    (h, w) = pic.fatFiducialDataPlane.shape
    b1 = noi.BlurredRandomGaussianDataPlane(w, h, grain)
    xDisplacements = b1.blurredRandomGaussianDataPlane
    b2 = noi.BlurredRandomGaussianDataPlane(w, h, grain)
    yDisplacements = b2.blurredRandomGaussianDataPlane
    eidolonDataPlane = hel.DataPlaneDisarray(pic.fatFiducialDataPlane,
                                             xDisplacements, yDisplacements,
                                             reach)

    eidolon = pic.DisembedDataPlane(eidolonDataPlane)
    return np.asarray(Image.fromarray(eidolon, 'L'))
コード例 #5
0
def partially_coherent_disarray(pic, reach, coherence, grain):

    fiducialDOGScaleSpace = scl.DOGScaleSpace(pic)
    (h, w) = pic.fatFiducialDataPlane.shape

    eidolonDataPlane = hel.PartiallyCoherentDisarray(fiducialDOGScaleSpace,
                                                     reach, coherence, grain,
                                                     w, h, pic.MAX_SIGMA,
                                                     pic.numScaleLevels,
                                                     pic.scaleLevels)

    eidolon = pic.DisembedDataPlane(eidolonDataPlane)
    return np.asarray(Image.fromarray(eidolon, 'L'))