A primary localization method for QR codes, comprising the following steps: S1, binarizing the pixel points of a received image containing a QR code; S2, partitioning the received image containing the QR code into a plurality of mesh regions including m ∗ n pixel points so that mesh regions in a QR code region include black points; S3, recording the number of black pixel points in each mesh region, assigning the value 1 to the mesh region if the number of the black pixel points in the mesh region is greater than 0, otherwise, assigning the value 0 to the mesh region; S4, marking the image containing the QR code as a non-object region after values are assigned to the mesh regions, wherein the non-object region includes the QR code region and a background region; S5, scanning the non-object region (120; 111) from top to bottom line-by-line as well as from left to right column by column, marking the union of the mesh regions being continuously present with the value 1 for the first time in each line and the mesh regions being continuously present with the value 1 for the first time in each column as an object region (121; 112), and marking the union of other regions as a non-object region (111; 122); S6, recording the number of mesh regions and the number of pixel points in the length direction of the object region (121; 112), the number of mesh regions and the number of pixel points in the width direction of the object region and the number of mesh regions with the value 1 in the object region (121; 112), and judging whether the object region (121; 112) is the QR code region or not; if the object region (121; 112) is not the QR code region, returning to step S5 to perform corresponding operation again; if the object region (121; 112) is the QR code region, outputting the line numbers and the column numbers of the pixel points corresponding to the boundaries of the object region (121; 112). S1, binarizing the pixel points of a received image containing a QR code; S2, partitioning the received image containing the QR code into a plurality of mesh regions including m ∗ n pixel points so that mesh regions in a QR code region include black points; S3, recording the number of black pixel points in each mesh region, assigning the value 1 to the mesh region if the number of the black pixel points in the mesh region is greater than 0, otherwise, assigning the value 0 to the mesh region; S4, marking the image containing the QR code as a non-object region after values are assigned to the mesh regions, wherein the non-object region includes the QR code region and a background region; S5, scanning the non-object region (120; 111) from top to bottom line-by-line as well as from left to right column by column, marking the union of the mesh regions being continuously present with the value 1 for the first time in each line and the mesh regions being continuously present with the value 1 for the first time in each column as an object region (121; 112), and marking the union of other regions as a non-object region (111; 122); S6, recording the number of mesh regions and the number of pixel points in the length direction of the object region (121; 112), the number of mesh regions and the number of pixel points in the width direction of the object region and the number of mesh regions with the value 1 in the object region (121; 112), and judging whether the object region (121; 112) is the QR code region or not; if the object region (121; 112) is not the QR code region, returning to step S5 to perform corresponding operation again; if the object region (121; 112) is the QR code region, outputting the line numbers and the column numbers of the pixel points corresponding to the boundaries of the object region (121; 112).