`stepSize` is as a scale factor to the detector window height. Thus, should be roughly `y+=(scaleFactor*rows)`