To the baggage specification automatically detection problem of self-service bag drop system, a baggage size detection algorithm based on stereo vision is proposed. The algorithm is based on binocular stereo vision measurement principle. Firstly, the canny edges of baggage image are extracted as the feature points. With the disparity gradient constraint and epipolar constraint, Stereo matching algorithm based on edge features is proposed, meanwhile, the two images play a symmetric role to ensure the reliability of matching in the matching process. The coordinates of the three dimensional points are derived with approximation of the middle point of the common perpendicular line in different planes. Experimental results show that the proposed algorithm can detect the baggage specification with appropriate accuracy.