A flatness detection method is provided for detecting component tilt regardless of measurement conditions. The flatness detection method is based on data of an electronic component captured by a 3D camera and is realized by acquiring position information and height information of a plurality of reference points of the electronic component, creating a virtual plane based on the position and the height information of at least three of the plurality of reference points, determining, based on the height information that takes, as a reference, the virtual plane of the reference points excluding selected points from the reference points, whether the virtual plane is a valid plane or an invalid plane, and detecting flatness of the component by taking the valid plane as a reference.
展开▼