An image forming apparatus comprising: image forming means for forming toner images of respective colors on an image carrier; detection means for irradiating a surface of the image carrier or the toner images formed on the image carrier with light, and receiving reflection light; and control means (301, 302) for detecting a relative misregistration amount of the toner images of the respective colors formed on the image carrier on the basis of a received light amount of said detection means, which is determined, using a threshold, upon detection of a first detection pattern as a toner image formed on the image carrier by said detection means, and detecting densities of the toner images of the respective colors formed on the image carrier on the basis of a second detection pattern as a toner image formed on the image carrier, which is detected by said detection means, wherein the first detection pattern includes a black portion as a portion of a black toner image, and a color portion as another color portion, wherein said control means (301, 302) is configured to control the image forming means to form, when the misregistration amount and the densities are to be successively detected, both the first detection pattern and the second detection pattern on the image carrier, characterized in that said control means (301, 302) is configured to set a light-emitting amount of said detection means, the threshold, or a sensitivity of said detection means, used for detecting both the first detection pattern and the second detection pattern, so that a received light amount of diffuse reflection light from the black portion received by said detection means is less than the threshold and a received light amount of diffuse reflection light from the color portion received by said detection means exceeds the threshold, and set the light-emitting amount of said detection means or the sensitivity of said detection means, used for detecting both the first detection pattern and the second detection pattern, so that the received light amount of the diffuse reflection light from the color portion is less than an upper limit value of the received light amount of the diffuse reflection light configured to be received by said detection means. image forming means for forming toner images of respective colors on an image carrier; detection means for irradiating a surface of the image carrier or the toner images formed on the image carrier with light, and receiving reflection light; and control means (301, 302) for detecting a relative misregistration amount of the toner images of the respective colors formed on the image carrier on the basis of a received light amount of said detection means, which is determined, using a threshold, upon detection of a first detection pattern as a toner image formed on the image carrier by said detection means, and detecting densities of the toner images of the respective colors formed on the image carrier on the basis of a second detection pattern as a toner image formed on the image carrier, which is detected by said detection means, wherein the first detection pattern includes a black portion as a portion of a black toner image, and a color portion as another color portion, wherein said control means (301, 302) is configured to control the image forming means to form, when the misregistration amount and the densities are to be successively detected, both the first detection pattern and the second detection pattern on the image carrier, characterized in that said control means (301, 302) is configured to set a light-emitting amount of said detection means, the threshold, or a sensitivity of said detection means, used for detecting both the first detection pattern and the second detection pattern, so that a received light amount of diffuse reflection light from the black portion received by said detection means is less than the threshold and a received light amount of diffuse reflection light from the color portion received by said detection means exceeds the threshold, and set the light-emitting amount of said detection means or the sensitivity of said detection means, used for detecting both the first detection pattern and the second detection pattern, so that the received light amount of the diffuse reflection light from the color portion is less than an upper limit value of the received light amount of the diffuse reflection light configured to be received by said detection means.