1. A method for detecting detection patterns of a QR code, comprising: detecting the QR code along a first direction to detect a first line segment having a length ratio of black:white:black:white:black meeting a predetermined ratio, and determining the central point of the first line segment; detecting along a second direction a straight line running through the central point of the first line segment to get a second line segment having a length ratio of black:white:black:white:black meeting the predetermined ratio, and using the central point of the second line segment as the central point of the detection pattern.