code: func newIntegrals(src image.Image) (*integral, *integral) {
  	b := src.Bounds()
  	srcg, ok := src.(*image.Gray)
  	if !ok {
  		srcg = image.NewGray(b)
  		draw.Draw(srcg, b, src, b.Min, draw.Src)
  	}
  
  	m := integral{
  		pix:    make([]uint64, b.Max.Y*b.Max.X),
  		stride: b.Max.X,
  		rect:   b,
  	}
  	mSq := integral{
  		pix:    make([]uint64, b.Max.Y*b.Max.X),
  		stride: b.Max.X,
  		rect:   b,
  	}
  	for y := b.Min.Y; y < b.Max.Y; y++ {
  		for x := b.Min.X; x < b.Max.X; x++ {
  			os := (y-b.Min.Y)*srcg.Stride + x - b.Min.X
  			om := (y-b.Min.Y)*m.stride + x - b.Min.X
  			c := uint64(srcg.Pix[os])
  			m.pix[om] = c
  			mSq.pix[om] = c * c
  		}
  	}
  	m.integrate()
  	mSq.integrate()
  	return &m, &mSq
  }
docs: // newIntegrals returns the integral and the squared integral.