Identification method of two-dimensional code and apparatus thereof

The invention discloses an identification method of a two-dimensional code and an apparatus thereof. The two-dimensional code comprises a data coding area, a format information area, a correction pattern and a frame surrounding the data coding area, the format information area and the correction pattern. The method comprises the following steps of collecting two-dimensional code pattern information and carrying out pretreatment on the pattern; through searching a long straight line segment, positioning a frame and a vertex of the two-dimensional code; according to the frame and the vertex of the two-dimensional code, positioning a format information area and decoding format information; positioning the correction pattern and carrying out pattern correction; and decoding an error correction code word and a data code word. By using the identification method, matrix information of the two-dimensional code can be rapidly positioned and acquired and advantages of a rapid identification speed, high fouling-resistance and anti-distortion capabilities and a wide application scope are possessed.