1. An image forming apparatus comprising: an image forming unit configured to form a positional deviation correction pattern including developer images of a plurality of colors on an image bearing member; a detection unit configured to emit light to the positional deviation correction pattern formed by the image forming unit and to detect reflected light from the positional deviation correction pattern; and a control unit configured to perform positional deviation correction based on the detected result by the detection unit, wherein the control unit is configured to cause the image forming unit to form the positional deviation correction pattern such that one black developer image is disposed between two color developer images of a same color, and not whole of the one black developer image but a part thereof is superimposed, in a direction perpendicular to a surface of the image bearing member, on either of the two color developer images of a same color in a state where positional deviation occurs between developer images of a plurality of different colors, wherein a sweeping in the color developer images occurs at a downstream edge in a conveyance direction of a transfer medium on which the color developer images are formed, wherein a timing to detect the edge of the color developer images in the detected result obtained by the detection unit is affected by a detection error due to the sweeping, and wherein the control unit obtains a center position of the two color developer images of a same color and a center position of the one black developer image based on the detected result detected by the detection unit, and cancels the detection error by obtaining a positional deviation amount based on the center position of the two color developer images of a same color and a center position of the one black developer image.