IMAGE CODE FOR PROCESSING INFORMATION AND DEVICE AND METHOD FOR GENERATING AND PARSING SAME
20170293992 · 2017-10-12
Inventors
Cpc classification
G06K19/06131
PHYSICS
G06T1/0028
PHYSICS
G06T2201/0203
PHYSICS
G06T1/0064
PHYSICS
International classification
Abstract
An image code is for information storage, transfer and identification, a method of generating and analyzing the same, and an apparatus for implementing the method, the image code includes a standard image area, at least one image filled in the standard image region, at least one segment of information stream implanted in the at least one image by using digital watermarking technique and 4 location identification graphics arranged in different positions of the standard image region, the location identification graphics are arranged in the 4 vertex angles of the standard image region, including 1 feature location identification graphic and 3 basic location identification graphics; the 3 basic location identification graphics are identical and the feature location identification graphic is different from the basic location identification graphic.
Claims
1. A system for information processing comprises an image code and an image code apparatus for information storage, transfer and identification, the characterized in that the image code comprises a standard image region, at least one image filled in the standard image region, at least one segment of information stream embedded in the at least one image by using digital watermarking technology and 4 location identification graphics arranged in different positions of the standard image region, the location identification graphics are arranged in 4 vertex angles of the standard image region, including 1 feature location identification graphic and 3 basic location identification graphics; the 3 basic location identification graphics are identical and the feature location identification graphic is different from the basic location identification graphic, the location identification graphic includes a dark central part, a white inner ring, a dark ring and a white outer ring, wherein the area of the dark central part of the basic location identification graphic is different from that of the feature location identification graphic.
2. The system according to claim 1, characterized in that the location identification graphic is a square region, in which a dark central part, a white inner ring, a dark inner ring and a white outer ring are all square regions, the dark central part and the dark inner ring are black central part and black inner ring; the horizontal characteristic scale and the vertical characteristic ratio of the basic location identification graphic segmented by each part are 1:1:1:3:1:1:1, respectively; the horizontal characteristic scale and the vertical characteristic ratio of the feature location identification graphic are 1:1:1:1:1:1:1, respectively.
3. The system according to claim 1, the image code apparatus for information storage, transfer and identification comprises: an image adjusting module, the image adjusting module is used to adjust images associated with the information to be embedded to fit the standard image region; a digital watermarking embedding module, the digital watermarking embedding module embeds the information to be embedded in the image by using digital watermarking encoding technology; a location identification setting module, the location identification setting module is used to place 4 location identification graphics (P0, P1, P2, P3) in the 4 vertex angles of the standard image region respectively, wherein comprising 1 feature location identification graphic (P3) and 3 basic location identification graphics (P0, P1, P2); the 3 basic location identification graphics (P0, P1, P2) are identical and are different from the feature location identification graphic (P3); and an image code generating module, the image code generating module synthesizes the watermarking information, the image and the location identification graphic to generate the image code.
4. The system according to claim 1, the image code is generating by the following steps: provides an image adjusting module to adjust images associated with the information to be embedded to fit the standard image region; provides a digital watermarking embedding module to embed the information to be embedded in the image by using digital watermarking coding technology; provides a location identification setting module to place 4 location identification graphics (P0, P1, P2, P3) in the 4 vertex angles of the standard image region respectively, wherein comprising 1 feature location identification graphic (P3) and 3 basic location identification graphics (P0, P1, P2); the 3 basic location identification graphics (P0, P1, P2) are identical and are different from the feature location identification graphic (P3); and provides an image code generating module to generate image code.
5. The method according to claim 4, characterized in that in the step (3), the embedded location identification graphic includes a dark central part, a white inner ring, a dark inner ring and a white outer ring, wherein the horizontal characteristic scale and the vertical characteristic ratio of the basic location identification graphic segmented by the parts are 1:1:1:3:1:1:1, respectively; the horizontal characteristic scale and the vertical characteristic ratio of the feature location identification graphics are 1:1:1:1:1:1.
6. The method according to claim 5, characterized in that it further comprises a step of registering the information to be embedded in the server database before generating the image code.
7. An apparatus of analyzing image code for information storage, transfer and identification, characterized in that the apparatus of analyzing image code for information storage, transfer and identification comprises: an image acquiring apparatus, the image acquiring apparatus is used for acquiring image code (called “acquired image” below); an image processing module, the image processing module is used for performing image processing on the acquired image; a location identification graphic positioning module, the location identification graphic positioning module is used for positioning the 4 location identification graphics in the acquired image and identifying the feature location identification graphic; a calculating module, the calculating module is centered on the feature location identification graphic and calculates the location coordinates of the 3 basic location identification graphics in the acquired image according to the location relationship with the 3 basic location identification graphics in the actual image; an image correcting module, the image correcting module corrects the image code image to the standard image format by the Perspective Transform and the Bilinear Interpolation principle of coordinates; and an information decoding module, the information decoding module acquires the information embedded in the standard image by using the digital watermarking decoding technology.
8. A method for analyzing an image code, characterized by comprising the following steps: (1) provides an image acquiring apparatus to acquire image code (called “acquired image” below); (2) provides an image processing module to perform image processing on the acquired image; (3) provides a location identification graphic positioning module to position the 4 location identification graphics in the actual acquired image and identify the feature location identification graphic; (4) provides a calculating module, which is centered on the feature location identification graphic and calculates the location coordinates of the 3 basic location identification graphics according to the location relationship with the 3 basic location identification graphics in the acquired-image; (5) provides an image correcting module to correct the acquired image to the standard image format by the Perspective Transform and the Bilinear Interpolation principle of coordinates; and (6) provides an information decoding module to acquire the information embedded in the standard image by using the digital watermarking decoding technology.
9. The method according to claim 8, characterized in that the step (5) further comprises: (a) the location coordinates pi′ (xi, yi) (0≦i≦3) of 4 sets of the location identification graphics in the acquired image and the location coordinates pi (xi, yi) (0≦i≦3) (0≦xi≦255, 0≦yi≦255) of 4 sets of the vertex angles in the corrected standard image are substituted into the following formula 1 to obtain the 8 parameter values of a, b, c, d and m, n, p, q;
f(x.sub.i,y.sub.i)=[f(x.sub.1′,y.sub.0′)−f(x.sub.0′,y.sub.0′)]×(x.sub.1′−x.sub.0′)+[f(x.sub.0′,y.sub.1′)−f(x.sub.0′,y.sub.0′)]×(y.sub.1′−y.sub.0′)+[f(x.sub.1′,y.sub.1′)+f(x.sub.0′,y.sub.0′)−f(x.sub.0′,y.sub.1′)−f(x.sub.1′,y.sub.0′)]×(x.sub.1′−x.sub.0′)×(y.sub.1′−y.sub.0′)+f(x.sub.0′,y.sub.0′) Formula (2) (e) repeats steps (b) to (d) to obtain the all image pixels values f(xi, yi)(0≦xi≦255, 0≦yi≦255) of corrected standard image.
10. The method according to claim 9, characterized in that the step (3) identifies the feature location identification graphic by calculating and comparing the area of the dark central parts of the 4 location identification graphics.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
DETAILED DESCRIPTION
[0060] In order that the objectives, technical schemes and advantages of the present invention will become more apparent, the present invention will be described in more detail with reference to the drawings and examples above. It should be understood that the specific embodiments described herein are only for illustrating but not for limiting the present invention.
[0061] On the contrary, the invention is intended to cover any alternatives, modifications, equivalent methods and solutions falling within the spirit and scope of the invention as defined by the claims. Furthermore, in order to provide a better understanding of the present invention, specific details will be described in detail in the following detailed description of the present invention. The present invention may also be fully understood by those skilled in the art without a detailed description of these details.
[0062] In the hand-held communication device, the identification image code is much restricted by its own resources, mainly in the following technical problems: (1) the image disproportions due to the uncertainty of the distance between the mobile phone and the image; (2) the rotation of the angle of the image due to the uncertainty of the horizontal angle between the mobile phone camera and the image; (3) the image form deformation due to the disalignment of the mobile phone camera surface and the image surface. The above technical problem causes the hand-held communication device to have the problems of slow processing speed and high misrecognition rate when recognizing the image code, which greatly affect the practical application of the image code. It will be appreciated that the hand-held communication device is a device having an image acquiring apparatus (e.g., CCD) and communicable with the Internet (e.g., through wifi, bluetooth, cellular network, etc.), including mobile phone, Ipad, camera with communication function, e-books and other similar electronic devices.
[0063] In order to realize quick identification of an image code of a printed image (including an electronic screen display) in a hand-held communication device, the present invention proposes an image code for information storage, transfer and identification, which is usually printed on a surface of a carrier (the carrier includes paper, plastic, metal, fabric, building, etc.), or displayed on an electronic screen. Refer to
[0064] The standard image region (40) is used to fill the image and embed the information to be embedded in the image by using the digital watermarking technology; in a preferred embodiment, the standard image region (40) is a square region. The shape of the outer contour of the image is not limited, but may be a square shape, a circular shape having a regular shape, or an irregular shape.
[0065] The location identification graphic is used for positioning of the image code and is provided at the 4 vertex angles of the standard image region, and the location identification graphic includes 1 feature location identification graphic and 3 location identification graphics. The 3 basic location identification graphics are identical and the feature location identification graphic is different from the basic location identification graphics. Typically, the area of the feature location identification graphic is smaller than the basic location identification graphic. As illustrated in
[0066] Refer to
[0067] Refer to
[0068] In the existing two-dimensional code technology, 3 identical positioning points are usually used in conjunction with the two-dimensional code frame to correct the image. Wherein the identification of 3 identical positioning points can be done only by 2D Affine Transform to make the angle correction of the image within 360-degree range, to perform correction of the image form deformation through the Perspective Transform, it is necessary to calculate the 4 intersections of 4 border lines by identifying the 4 border lines of the image. Therefore, when the two-dimensional code area is non-black-and-white square and has no regular frame, it can not correct the image form deformation by the 3 positioning points themselves. Meanwhile, the patent application CN 103632182 A proposes a method of correcting an image by using 4 identical positioning points, although this method can correct the angle of the image and the deformation of the form by the Perspective Transform, since the 4 identical positioning marks are used, the correction can only be limited to angles within 90 degrees (between −45 degrees and +45 degrees). The 4 positioning points adopted in the image code embedded with watermarking information provided by the present invention consist of 3 identical basic location identification graphics and one different feature location identification graphic, which can position the feature location identification graphic quickly, through the Perspective Transform, the correction of the form deformation, the disproportions and the rotation of angle within 360-degree range of the mobile phone image can be made simultaneously. That is, the image code provided by the present invention can be identified by the hand-held communication device quickly and accurately, so that the watermarking technology can be applied in the image code successfully.
[0069] The present invention also provides an apparatus of generating an image code for information storage, transfer and identification, refer to
[0070] the image adjusting module is used for adjusting the image associated with the information to be embedded to fit the standard image region; the standard image region (40) in the image code is a predefined image format, it is needed to adjust the image to the corresponding image format through the image adjusting module before the image is filled in the standard image region (40).
[0071] The digital watermarking embedding module is used for embedding the information to be embedded in the image by using the digital watermarking encoding technology; the digital watermarking encoding technology is a mature image coding technology in prior art, by which the digital information can be embedded in the image without damaging the original image.
[0072] The location identification setting module is used for placing 4 location identification graphics (P0, P1, P2, P3) in the 4 vertex angles of the standard image area respectively, wherein comprising 1 feature location identification graphic (P3) and 3 basic location identification graphics (P0, P1, P2); the 3 basic location identification graphics (P0, P1, P2) are identical and are different from the feature location identification graphic (P3); and
[0073] the image code generating module is used for synthesizing the watermarking information, the image and the location identification graphic to generate the image code.
[0074] The present invention also provides a method of generating an image code, refer to
[0075] (1) provides an image adjusting module to adjust images associated with the information to be embedded to fit the standard image region; generally, the selected image is associated with the information to be embedded. In order to facilitate the image processing, the image format is adjusted to just fit the agreed standard image region. In the preferable implementation, the standard image region is a square image region.
[0076] (2) provides a digital watermarking embedding module to embed the information to be embedded in the image by using the digital watermarking coding technology;
[0077] (3) provides a location identification setting module to place 4 location identification graphics (P0, P1, P2, P3) in the 4 vertex angles of the standard image region respectively, wherein comprising 1 feature location identification graphic (P3) and 3 basic location identification graphics (P0, P1, P2); the 3 basic location identification graphics (P0, P1, P2) are identical and are different from the feature location identification graphic (P3); and (4) provides an image code generating module to generate an image code.
[0078] The image code generated by the image code generating apparatus and method adopted the above technical scheme consists of 3 identical basic location identification graphics and one different feature location identification graphic, so that the feature location identification graphic can be quickly positioned when the mobile phone processes the image code, using the Perspective Transform to complete the correction of the rotation of the angle within 360-degree range, as well as the correction of the form deformation and the disproportions of the mobile phone image.
[0079] The storage information amount in the image code is limited, when the information amount embedded in the image code is large, in order to make the image code carry more information, in one preferable embodiment of the invention, it further includes a step of registering the information to be embedded in the server database before generating the image code. That is, embedding the representative website ID information in the image, and registering the website ID information and the website information in the server database; correspondingly, the website information can be found in the server database by using the acquired website ID information at the time of decoding.
[0080] The present invention also provides an apparatus of analyzing an image code for information storage, transfer and identification. The apparatus is hand-held communication device. The hand-held communication device is a device having an image acquiring apparatus (e.g., CCD) and communicable with the Internet (e.g., through wifi, bluetooth, cellular network, etc.), including mobile phone, Ipad, camera with communication function, e-books and other similar electronic devices. Refer to
[0081] the image acquiring apparatus is used for acquiring image code (called “acquired image” below);
[0082] the image processing module is used for performing image processing on the acquired image code image;
[0083] the location identification graphic positioning module is used for positioning the 4 location identification graphics in the acquired image and identifying the feature location identification graphic;
[0084] the calculating module is used for being centered on the feature location identification graphic and calculating the location coordinates of the 3 basic location identification graphics according to the location relationship with the 3 basic location identification graphics in the acquired image;
[0085] the image correcting module is used for correcting the acquired image code image to the standard image format by the Perspective Transform and the Bilinear Interpolation principle of coordinates; and
[0086] the information decoding module is used for acquiring the information embedded in the standard image by using the digital watermarking decoding technology.
[0087] The present invention also proposes a method of analyzing an image code, refer to
[0088] (1) provides an image acquiring apparatus to acquire an image code (called “acquired image” below), the image code is acquired by hand-held communication device; uses the camera of the hand-held communication device to take pictures of the image code displayed on the electronic screen or printed on the paper or directly import the image code image into the hand-held communication device, and generates an image code image.
[0089] (2) provides an image processing module to perform image processing on the acquired image; performs image processing on the generated image code image; the image code image is converted to a gray-scale image of 256 gray-scale first, and then use the Niblack method to do the binarization processing on the image.
[0090] (3) provides a location identification graphic positioning module to position the 4 location identification graphics in the actual image and identify the feature location identification graphic; the 4 location identification graphics are identified in the binarized image and the coordinate values of the 4 location detection graphics are calculated; due to it is composed of 3 identical basic location identification graphics and one different feature location identification graphics, so that it can position the feature identification graphic quickly.
[0091] Wherein, the feature location identification graphic is identified by calculating and comparing the area of the dark central part of the 4 location identification graphics, the specific steps are as follows, calculating the areas of the black portion in the central part of the 4 location detection graphics and comparing the areas of the black portion in the central part of the 4 location detection graphics, to find out the location identification graphic, in which the area of the black portion is different from the other three graphics, as illustrated in
[0092] (4) provides a calculating module, which is centered on the feature location identification graphic and calculates the location coordinates of the 3 basic location identification graphics according to the location relationship with the 3 basic location identification graphics in the actual image.
[0093] (5) provides an image correcting module to correct the acquired image to the standard image format by the Perspective Transform and the Bilinear Interpolation principle of coordinates; that is, obtains the standard image through the Perspective Transform (the following formula 1) and the Bilinear Interpolation principle of coordinates (the following formula 2).
[0094] (6) provides an information decoding module to acquire the information embedded in the standard image by using the digital watermarking decoding technology. Refer to
[0095] In one preferable embodiment, the step (5) further includes:
[0096] (a) the location coordinates pi′ (xi, yi) (0≦i≦3) of 4 sets of the location identification graphics in the acquired image and the location coordinates pi (xi, yi) (0≦i≦3) (0≦xi≦255,0≦yi≦255) of 4 sets of the vertex angles in the corrected standard image are substituted into the following formula 1 to obtain the 8 parameter values of a, b, c, d and m, n, p, q; refer to
yi′=mxi+nyi+pxiyi+q (0≦i≦3)
xi′=axi+byi+cxiyi+d (0≦i≦3) Formula (1)
[0097] The 8 parameters a, b, c, d and m, n, p, q in formula 1 can be obtained by substituting the 8 sets of data, pi′ (xi, yi) (0≦i≦3) and pi (xi,yi) (0≦i≦3) in formula 1.
[0098] (b) the coordinate values (0≦xi≦255, 0≦yi≦255) of the corrected image are substituted into formula 1 to calculate the corresponding coordinate values (xi′, yi′) of the image before correction;
[0099] (c) according to the adjacent relationship of the coordinate values shown in
[0100] (d) the image pixel values f(x0′, y0′), f(x0′, y1′), f(x1′, y0′), f(x1′, y1′) of the 4 coordinate values (x0′, y0′), (x0′, y1′), (x1′, y0′), (x1′, y1′) after the Bilinear Interpolation calculation are substituted into formula 2 to obtain the image pixel values f(xi, yi) (0≦xi≦255, 0≦yi≦255) after the Perspective Transform;
f(x.sub.i,y.sub.i)=[f(x.sub.1′,y.sub.0′)−f(x.sub.0′,y.sub.0′)]×(x.sub.1′−x.sub.0′)+[f(x.sub.0′,y.sub.1′)−f(x.sub.0′,y.sub.0′)]×(y.sub.1′−y.sub.0′)+[f(x.sub.1′,y.sub.1′)+f(x.sub.0′,y.sub.0′)−f(x.sub.0′,y.sub.1′)−f(x.sub.1′,y.sub.0′)]×(x.sub.1′−x.sub.0′)×(y.sub.1′−y.sub.0′)+f(x.sub.0′,y.sub.0′) Formula (2)
[0101] (e) repeats steps (b) to (d) to obtain the all image pixels values f(xi, yi)(0≦xi≦255, 0≦yi≦255) of corrected standard image.
[0102] The foregoing is only preferred exemplary embodiments of the present invention and is not intended to be limiting of the present invention, and any modifications, equivalent substitutions, improvements and the like within the spirit and principles of the present invention are intended to be embraced by the protection range of the present invention.