A method of detecting a pattern position in an image forming apparatus which reads a test pattern formed onto a recording medium to adjust an ejection timing of liquid droplets, the test pattern including multiple lines, the image forming apparatus including a reading unit including a light emitting unit which irradiates a light onto the recording medium and a light receiving unit which receives a reflected light from the recording medium, and a pattern data storage unit which stores pattern data of the test pattern, wherein a drawing density is adjusted for each of colors of the liquid droplets such that a difference between local minimum values of the reflected lights reflected by at least two of the colors of the test pattern becomes small relative to when the drawing density is the same for each of the colors of the liquid droplets, the method comprising the steps of:
- by an image forming unit, reading the pattern data to form the at least two colors of the test pattern onto the recording medium, each of the colors having a different drawing density;
- relatively moving, by a relative movement unit, the recording medium or the reading unit at a constant speed;
- obtaining, by an intensity data obtaining unit, intensity data on the reflected light which is received by the light receiving unit from a scanning position of the light while the light moves over the test pattern;
- and
- by a position detecting unit, applying a line position determining operation on the intensity data included between an upper limit and a lower limit which are predetermined, and detecting the line position.