An optical sorter comprising: a first light source configured to emit first light toward a plurality of sorting targets in transit and disposed on a first side with respect to a transit route of the plurality of sorting targets; a second light source configured to emit second light having the same wavelength as the first light toward the plurality of sorting targets in transit and disposed on a second side opposite from the first side; an optical sensor disposed on at least one of the first side and the second side and configured to detect light associated with one sorting target among the plurality of sorting targets in transit during a plurality of scan periods including a first scan period and a second scan period; a determination part configured to determine a foreign object and/or a defective product with respect to the one sorting target based on a signal acquired by the optical sensor; and a light source control part configured to control the first light source and the second light source, characterized in that the light source control part is configured to control the first light source and the second light source during the first scan period so as to turn on the first light source and/or the second light source in a first lighting pattern, which is a lighting pattern arbitrarily selected from a lighting pattern in which the first light source and the second light source are at least partially on, a lighting pattern in which only one of the first light source and the second light source is at least partially on, and a lighting pattern in which only the other of the first light source and the second light source is at least partially on, and is further configured to control the first light source and the second light source during the second scan period so as to turn on the first light source and/or the second light source in a second lighting pattern, which is a lighting pattern selected arbitrarily except for the first lighting pattern from the lighting pattern in which the first light source and the second light source are at least partially on, the lighting pattern in which only the one of the first light source and the second light source is at least partially on, and the lighting pattern in which only the other of the first light source and the second light source is at least partially on. a first light source configured to emit first light toward a plurality of sorting targets in transit and disposed on a first side with respect to a transit route of the plurality of sorting targets; a second light source configured to emit second light having the same wavelength as the first light toward the plurality of sorting targets in transit and disposed on a second side opposite from the first side; an optical sensor disposed on at least one of the first side and the second side and configured to detect light associated with one sorting target among the plurality of sorting targets in transit during a plurality of scan periods including a first scan period and a second scan period; a determination part configured to determine a foreign object and/or a defective product with respect to the one sorting target based on a signal acquired by the optical sensor; and a light source control part configured to control the first light source and the second light source, characterized in that the light source control part is configured to control the first light source and the second light source during the first scan period so as to turn on the first light source and/or the second light source in a first lighting pattern, which is a lighting pattern arbitrarily selected from a lighting pattern in which the first light source and the second light source are at least partially on, a lighting pattern in which only one of the first light source and the second light source is at least partially on, and a lighting pattern in which only the other of the first light source and the second light source is at least partially on, and is further configured to control the first light source and the second light source during the second scan period so as to turn on the first light source and/or the second light source in a second lighting pattern, which is a lighting pattern selected arbitrarily except for the first lighting pattern from the lighting pattern in which the first light source and the second light source are at least partially on, the lighting pattern in which only the one of the first light source and the second light source is at least partially on, and the lighting pattern in which only the other of the first light source and the second light source is at least partially on.