Exemplo n.º 1
0
def test_blockwise():

    shape = [1000, 1000, 400]
    blockShape = [100, 100, 100]

    totalData = numpy.random.rand(*shape).astype(numpy.float32)

    print "blockwiseGaussianSmoothing"
    result = blockwise_filters.blockwiseGaussianSmoothing(totalData,1.0,nThreads=12,blockShape=blockShape)
    for x in range(20):
        blockwise_filters.blockwiseGaussianGradientMagnitude(totalData,1.0,nThreads=12,blockShape=blockShape)
Exemplo n.º 2
0
def test_blockwise():

    shape = [1000, 1000, 400]
    blockShape = [100, 100, 100]

    totalData = numpy.random.rand(*shape).astype(numpy.float32)

    print "blockwiseGaussianSmoothing"
    result = blockwise_filters.blockwiseGaussianSmoothing(
        totalData, 1.0, nThreads=12, blockShape=blockShape)
    for x in range(20):
        blockwise_filters.blockwiseGaussianGradientMagnitude(
            totalData, 1.0, nThreads=12, blockShape=blockShape)
Exemplo n.º 3
0
import sys
import vigra
from time import time

path = "/home/tbeier/Desktop/data.h5"

shape = [1000, 100, 1000]

data = numpy.random.rand(*shape).astype(numpy.float32)
shape = data.shape
print shape
blockShape = [100, 100, 100]

print "blockwiseGaussianGradientMagnitude"
t0 = time()
result = blockwise_filters.blockwiseGaussianGradientMagnitude(
    data, 5.0, nThreads=22, blockShape=blockShape)
t1 = time()
print "done in", t1 - t0

tp = t0 - t1

print "blockwiseGaussianGradientMagnitude"
t0 = time()
result = vigra.filters.gaussianGradientMagnitude(data, 5.0)
t1 = time()
print "done in", t1 - t0

ts = t0 - t1

print ts / tp
Exemplo n.º 4
0
    def __call__(self):

        result = blockF.blockwiseGaussianGradientMagnitude(self.raw,
                                                           sigma=self.sigma)
        return result
Exemplo n.º 5
0
path = "/home/tbeier/Desktop/data.h5"

shape = [1000, 100, 1000]

data=numpy.random.rand(*shape).astype(numpy.float32)
shape = data.shape
print shape
blockShape = [100, 100, 100]





print "blockwiseGaussianGradientMagnitude"
t0=time()
result = blockwise_filters.blockwiseGaussianGradientMagnitude(data, 5.0, nThreads=22, blockShape=blockShape)
t1=time()
print "done in",t1-t0

tp = t0-t1

print "blockwiseGaussianGradientMagnitude"
t0=time()
result = vigra.filters.gaussianGradientMagnitude(data, 5.0)
t1=time()
print "done in",t1-t0

ts = t0-t1


print ts/tp