A sample processing apparatus, comprising: (a) an image capture unit configured to capture an image of a sample container; and (b) a sorting unit configured to perform a sorting process for the sample container based on a type of the sample container detected from the image; (c) a carrier unit configured to carry a plurality of the sample containers along a predetermined carrier path; (d) a control unit which is configured to (i) detect a type of the sample container from the image of the sample container, (ii) detect the display information from a bar code affixed to the sample container, (iii) control the sorting unit based o a correspondence relationship between the type and the display information, (iv) control the sorting unit to remove the sample container from a test line corresponding to the test item, when a test item corresponding to the display information and a test item corresponding to the type do not match, (v) detect a top edge position information of a sample in the sample container from the image, and to control the sorting unit based on the top edge position information, (vi) determine an error if the liquid level is determined to be higher than a reference range, wherein the reference range is chosen so that spray is avoided, and (vii) remove the sample container determined to be erroneous from the test line. (a) an image capture unit configured to capture an image of a sample container; and (b) a sorting unit configured to perform a sorting process for the sample container based on a type of the sample container detected from the image; (c) a carrier unit configured to carry a plurality of the sample containers along a predetermined carrier path; (d) a control unit which is configured to (i) detect a type of the sample container from the image of the sample container, (ii) detect the display information from a bar code affixed to the sample container, (iii) control the sorting unit based o a correspondence relationship between the type and the display information, (iv) control the sorting unit to remove the sample container from a test line corresponding to the test item, when a test item corresponding to the display information and a test item corresponding to the type do not match, (v) detect a top edge position information of a sample in the sample container from the image, and to control the sorting unit based on the top edge position information, (vi) determine an error if the liquid level is determined to be higher than a reference range, wherein the reference range is chosen so that spray is avoided, and (vii) remove the sample container determined to be erroneous from the test line. (i) detect a type of the sample container from the image of the sample container, (ii) detect the display information from a bar code affixed to the sample container, (iii) control the sorting unit based o a correspondence relationship between the type and the display information, (iv) control the sorting unit to remove the sample container from a test line corresponding to the test item, when a test item corresponding to the display information and a test item corresponding to the type do not match, (v) detect a top edge position information of a sample in the sample container from the image, and to control the sorting unit based on the top edge position information, (vi) determine an error if the liquid level is determined to be higher than a reference range, wherein the reference range is chosen so that spray is avoided, and (vii) remove the sample container determined to be erroneous from the test line.