摘要 |
A QR code feature detection method and system. The method comprises: dividing a received QR code image into a multi-row image having the same number of rows of pixel points as a pre-set threshold value of the number of rows; calculating an average gray-scale value of each column of pixel points in the multi-row image, so as to form row data, and performing binarization on same; making statistics, in the binarized row data, of a rectangular image with a pre-set proportion similarity in a pre-set row proportion threshold value; performing binarization on the rectangular image and an area range for the rectangular image to respectively extend upwards and downwards with a pre-set width threshold value; searching, on an intermediate column of the rectangular image, for a column line segment satisfying a pre-set proportion; respectively performing upward translation and downward translation on a diagonal line of a square image containing the rectangular image and the column line segment; and searching for and recording black and white demarcation points at an edge of the square image on the translated diagonal line, so as to form a position detection pattern of a QR code. A position detection pattern of a received QR code can be quickly found, thereby reducing the computational burden of system data. |