 }
 
 extern "C"
-void cudaGaussian(float *d_img, int3 size, const float gaussianVariance, unsigned int maxKernelWidth){
+float* cudaGaussian(float *d_img, int3 size, const float gaussianVariance, unsigned int maxKernelWidth){
 
   int threadsPerBlock = 256;
   int blocksPerGrid = ((size.z) + threadsPerBlock -1) >> 8;

  size.z = width*height;
  int imageSize = size.z*sizeof(float);

  ///Warmup
  unsigned int WarmupTimer = 0;
  cutCreateTimer( &WarmupTimer );
  cutStartTimer( WarmupTimer );

  cudaMalloc((void**) &d_magnitude, size.z*sizeof(float));
  CUT_CHECK_ERROR("Memory temporary image creation failed");

  cudaSobel(d_magnitude,d_direction,d_blur,size);

  gradientMaximumDetector(d_image,d_magnitude,d_direction,size,maxKernelWidth);

