fix a bug in SubpixelEdgelDetection: out-of-bounds access could occur if
the input image size was less than 5 pixels in any dimension.