public  double[] convolve_cols_gauss(double[] h,double[] mask) 
	{
	  long      j, r, c, l;
	  double    sum;
	  double[] k;
	  int n;
	  
	  n=(int) ((mask.length-1)*0.5);
	  
	  k=new double[(int) (width*height)];
	
	  // Inner region 
	  for (r=0; r<height; r++) {
	    for (c=n; c<width-n; c++) {
	      l = LINCOOR(r,c,width);
	      sum = 0.0;
	      for (j=-n;j<=n;j++)
	        sum += h[(int) (l+j)]*mask[(int) j+n];
	      k[(int) l] = (float)sum;
	    }
	  }
	  // Border regions 
	  for (r=0; r<height; r++) {
	    for (c=0; c<n; c++) {
	      l = LINCOOR(r,c,width);
	      sum = 0.0;
	      for (j=-n;j<=n;j++)
	        sum += h[(int) LINCOOR(r,BC(c+j),width)]*mask[(int) j+n];
	      k[(int) l] = (float)sum;
	    }
	  }
	  for (r=0; r<height; r++) {
	    for (c=width-n; c<width; c++) {
	      l = LINCOOR(r,c,width);
	      sum = 0.0;
	      for (j=-n;j<=n;j++)
	        sum += h[(int) LINCOOR(r,BC(c+j),width)]*mask[(int) j+n];
	      k[(int) l] = (float)sum;
	    }
	  }
	  
	  return k;
	}