The invention relates to the technical field of contour detection and recognition, and discloses a human and animal recognition method and
system based on contour detection, and the method comprises the steps: executing a contour rectangle fitting strategy, fitting an external rectangle of an object according to an
object point set, and outputting the geometric features of the object; executing a contour axial
change detection strategy, calculating a main shaft of an external rectangle, and calculating a change value of geometric features in real time; executing an adjoint relation detection strategy, calculating displacement vectors of the
human body point set and the
object point set, and identifying an object owner of the
object based on a set ratio threshold value; executing a surrounding-main back-and-forth motion judgment strategy, and detecting a displacement vector of the
object point set to judge a
motion mode; executing an active cooperative motion judgment strategy, and detecting displacement vectors of the object
point set and the
human body point set to judge a
motion mode; and a holding judgment strategy is executed, the
motion mode that the object point set is attached to the
human body point set is recognized, whether the object is a pet or not is detected, the vehicle recognition capacity of the
elevator is improved, and the misjudgment risk is reduced.