Electronic grating manufacturing method for mobile terminal and method for performing image recognition
By generating electronic grating images on mobile terminals, the problems of high cost and inconvenience of carrying physical grating sheets are solved, achieving convenient image recognition and anti-counterfeiting effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI DONNELLEY PRINTING
- Filing Date
- 2021-04-21
- Publication Date
- 2026-04-24
AI Technical Summary
Existing grating recognition anti-counterfeiting technology requires the production of different physical grating sheets, which is costly and inconvenient for users to carry, thus limiting its widespread application.
An electronic grating fabrication method is employed, which generates colored and colorless grating images on a mobile terminal, calculates the grating width based on the parameters of the image to be recognized, and applies it to the mobile terminal for image recognition.
It saves on the manufacturing cost of physical gratings, enables portable image recognition, and expands the application of grating recognition anti-counterfeiting technology.
Smart Images

Figure CN115311340B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image anti-counterfeiting, and in particular to a method for manufacturing an electronic grating for a mobile terminal and a method for image recognition using an electronic grating. Background Technology
[0002] Lattice recognition anti-counterfeiting technology belongs to the field of image anti-counterfeiting. It refers to loading hidden graphics or text into the halftone image after pre-printing color separation and halftone processing, and hiding the information by changing the position of the halftone dots. To identify the hidden information, simply place the corresponding physical lenticular sheet on top of the image containing the hidden information and rotate it to the correct angle. However, using physical lenticular sheets to identify hidden information requires manufacturing different lenticular sheets for different images, which is inconvenient for users to carry and use. Furthermore, manufacturing physical lenticular sheets has certain printing requirements and is costly, preventing the widespread application of lenticular recognition anti-counterfeiting technology. The background technology section only covers technologies known to the public and does not necessarily represent existing technology in this field. Summary of the Invention
[0003] In view of at least one deficiency of the prior art, the present invention designs a method for manufacturing an electronic grating for a mobile terminal and a method for image recognition using an electronic grating, which not only saves the cost of manufacturing a physical grating, but also solves the problem of portability.
[0004] This invention provides a method for manufacturing an electronic grating for a mobile terminal, comprising:
[0005] S11: Obtain the display width of the image to be recognized, containing hidden information, within the display screen of the recognition device at a predetermined recognition distance;
[0006] S12: Calculate the width of the colored stripes and the width of the colorless stripes of the electronic grating based on the display width and the parameters of the image to be identified;
[0007] S13: Generate an electron grating image based on the widths of the colored and colorless stripes of the electron grating;
[0008] S14: Applying electron grating images to mobile terminals.
[0009] According to one aspect of the invention, in step S11: the range of the predetermined recognition distance is set to 23-27 cm.
[0010] According to one aspect of the present invention, the parameters of the image to be identified include the theoretical width of the image to be identified, the theoretical width of the colored fringe corresponding to the hidden information, and the theoretical width of the colorless fringe, wherein step S12 further includes: calculating the width of the colored fringe and the width of the colorless fringe of the electron grating according to the formula.
[0011] The width of the colored stripes of the electron grating = theoretical colored stripe width * display width of the image to be recognized / theoretical width of the image to be recognized;
[0012] The width of the colorless stripe of the electron grating = theoretical width of the colorless stripe * display width of the image to be recognized / theoretical width of the image to be recognized.
[0013] According to one aspect of the present invention, the parameters of the image to be identified further include the rotation angle of the hidden information, wherein step S13 further includes: when the rotation angle is an integer multiple of 90 degrees, the length direction of the grating image is parallel to the length or width direction of the display screen of the mobile terminal; when the rotation angle is not an integer multiple of 90 degrees, the grating image is tilted relative to the length or width direction of the display screen of the mobile terminal according to the rotation angle.
[0014] According to one aspect of the present invention, the display width of the image to be identified within the display screen of the identification device is the distance between feature points in the image to be identified displayed within the display screen of the identification device.
[0015] According to one aspect of the present invention, step S13 further includes: setting the colored stripes of the electron grating image to black or color, wherein the grayscale value of the colored stripes is set to not less than 50%.
[0016] The present invention also provides a method for image recognition using an electron grating, wherein the electron grating is fabricated by the method described above, the method comprising:
[0017] S21: Obtain the image to be identified containing hidden information;
[0018] S22: Display the image to be recognized on the screen of the mobile terminal;
[0019] S23: Select the corresponding grating image;
[0020] S24: Overlay the electron grating image onto the image to be identified displayed on the screen of the mobile terminal to display the hidden information.
[0021] According to one aspect of the invention, the image to be identified is printed or printed on an object, wherein step S21 further includes: acquiring the image to be identified via a camera device of a mobile terminal.
[0022] According to one aspect of the present invention, step S21 further includes: creating an electronic image with a width corresponding to an electronic grating image; step S22 further includes: loading the electronic image from the storage medium of the mobile terminal to display it on the display screen of the mobile terminal.
[0023] According to one aspect of the invention, step S23 further includes: selecting a corresponding grating image from a list provided by the mobile terminal.
[0024] According to one aspect of the present invention, step S23 further includes: scanning the grating ID information of the image to be identified, and selecting the corresponding electronic grating image according to the grating ID information.
[0025] According to one aspect of the invention, the raster ID information is either separate from or included in the image to be identified.
[0026] According to one aspect of the present invention, step S22 further includes: setting the distance between the mobile terminal and the image to be identified to be within a predetermined identification distance ±5cm.
[0027] According to one aspect of the invention, step S22 further includes placing the image to be identified within the identification area.
[0028] According to one aspect of the invention, the mobile terminal provides a visible recognition area on its display screen, wherein step S22 further includes: adjusting the focal length of the camera device of the mobile terminal so that the display width of the image to be recognized on the display screen of the mobile terminal matches the grating image.
[0029] According to one aspect of the present invention, step S24 further includes: determining, based on the orientation information of feature points in the image to be identified displayed on the screen of the mobile terminal, that when the image to be identified is tilted relative to the length or width direction of the mobile terminal, the electron grating image tilts accordingly.
[0030] According to one aspect of the invention, step S24 further includes: the electron grating image scrolling within the display screen of the mobile terminal at a preset speed.
[0031] The present invention also provides a method for image recognition using an electronic grating, comprising:
[0032] S31: Provide the parameters of the image to be identified, which contains hidden information, to the mobile terminal;
[0033] S32: Obtain the display width of the image to be identified within the display screen of the mobile terminal;
[0034] S33: Calculate the width of the colored stripes and the width of the colorless stripes of the electronic grating based on the display width and the parameters of the image to be recognized;
[0035] S34: Generate an electron grating image based on the widths of the colored and colorless stripes of the electron grating;
[0036] S35: Overlay the electron grating image onto the image to be identified displayed on the screen of the mobile terminal to display the hidden information.
[0037] According to one aspect of the present invention, the parameters of the image to be identified include the theoretical width of the image to be identified, the theoretical colored fringe width corresponding to the hidden information, and the theoretical colorless fringe width, wherein step S33 further includes: calculating the colored fringe width and the colorless fringe width of the electron grating according to the formula.
[0038] The width of the colored stripes of the electron grating = theoretical colored stripe width * display width of the image to be recognized / theoretical width of the image to be recognized;
[0039] The width of the colorless stripe of the electron grating = theoretical width of the colorless stripe * display width of the image to be recognized / theoretical width of the image to be recognized.
[0040] According to one aspect of the present invention, the parameters of the image to be identified further include the rotation angle of the hidden information, wherein step S34 further includes: when the rotation angle is an integer multiple of 90 degrees, the length direction of the grating image is parallel to the length or width direction of the display screen of the mobile terminal; when the rotation angle is not an integer multiple of 90 degrees, the grating image is tilted relative to the length or width direction of the display screen of the mobile terminal according to the rotation angle.
[0041] According to one aspect of the present invention, the image to be identified is printed or printed on an object, and the image to be identified is captured by a camera device of a mobile terminal;
[0042] The display width of the image to be identified on the screen of the mobile terminal is the distance between the feature points in the image to be identified displayed on the screen of the mobile terminal.
[0043] According to one aspect of the invention, step S34 further includes: setting the colored stripes of the electron grating image to black or color, wherein the grayscale value of the colored stripes is set to not less than 50%.
[0044] According to one aspect of the present invention, step S35 further includes: determining, based on the orientation information of feature points in the image to be identified displayed on the screen of the mobile terminal, that when the image to be identified is tilted relative to the length or width direction of the mobile terminal, the electron grating image tilts accordingly.
[0045] According to one aspect of the present invention, step S35 further includes: the electron grating image scrolling within the display screen of the mobile terminal at a preset speed. Attached Figure Description
[0046] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure. In the drawings:
[0047] Figure 1 A flowchart of an embodiment of the present invention for fabricating an electron grating is shown;
[0048] Figure 2 A schematic diagram of an electron grating according to an embodiment of the present invention is shown;
[0049] Figures 3a-3d An image to be identified containing hidden information, and its display effect after being covered with a theoretical grating, according to an embodiment of the present invention, are shown.
[0050] Figure 4a A schematic diagram of an image to be identified containing feature points and an electronic grating according to an embodiment of the present invention is shown;
[0051] Figure 4b A schematic diagram of an image to be identified containing feature points and an electronic grating according to an embodiment of the present invention is shown;
[0052] Figure 5 A flowchart of a method for image recognition using a fixed-size electronic grating according to an embodiment of the present invention is shown;
[0053] Figure 6 A schematic diagram of a recognition area in a mobile terminal display screen according to an embodiment of the present invention is shown;
[0054] Figure 7 A schematic diagram of the image to be identified, including the rotation angle, and the electronic grating is shown;
[0055] Figure 8 A schematic diagram of an image to be identified containing dynamically hidden information and an electronic grating is shown;
[0056] Figure 9a This diagram illustrates an embodiment of the present invention where an electron grating reveals hidden information at time t1.
[0057] Figure 9b A schematic diagram showing the hidden information displayed by an electron grating at time t2 according to an embodiment of the present invention is shown;
[0058] Figure 9c This diagram illustrates an embodiment of the present invention where an electron grating reveals hidden information at time t3.
[0059] Figure 9d A schematic diagram showing an electronic grating displaying hidden information at time t4 according to an embodiment of the present invention is illustrated.
[0060] Figure 9e A schematic diagram showing the hidden information displayed by an electronic grating at time t5 according to an embodiment of the present invention is shown;
[0061] Figure 10 A schematic diagram of the image to be identified containing magnified hidden information and an electronic grating is shown;
[0062] Figure 11a This diagram illustrates an embodiment of the present invention where an electron grating reveals hidden information at time t1.
[0063] Figure 11b A schematic diagram showing the hidden information displayed by an electron grating at time t2 according to an embodiment of the present invention is shown;
[0064] Figure 11c This diagram illustrates an embodiment of the present invention where an electron grating reveals hidden information at time t3.
[0065] Figure 12a A schematic diagram of an electron grating of an embodiment of the present invention at time t1 is shown in a practical application.
[0066] Figure 12b A schematic diagram of an electron grating of an embodiment of the present invention at time t2 is shown in a practical application.
[0067] Figure 12c This diagram illustrates an electron grating of one embodiment of the present invention at time t3 in a practical application; and
[0068] Figure 12d A schematic diagram of an electron grating of an embodiment of the present invention at time t4 is shown in a practical application.
[0069] Figure 13 A flowchart of an image recognition method using a variable-size electron grating according to an embodiment of the present invention is shown. Detailed Implementation
[0070] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0071] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0072] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows for communication; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0073] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0074] The following disclosure provides many different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.
[0075] This invention designs a method for manufacturing an electronic grating for mobile terminals and a method for image recognition using an electronic grating. By performing image recognition using the manufactured electronic grating, the cost of manufacturing physical gratings is saved, making it convenient for end users to carry and expanding the application of grating recognition anti-counterfeiting technology.
[0076] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0077] This invention designs a method for manufacturing an electronic grating for a mobile terminal. The final electronic grating will be applied to the mobile terminal, but the manufacturing process uses an identification device that has all the functions of the mobile terminal.
[0078] like Figure 1 As shown, manufacturing method 10 includes:
[0079] S11: Obtain the display width of the image to be recognized, containing hidden information, within the display screen of the recognition device at a predetermined recognition distance;
[0080] S12: Calculate the width of the colored stripes and the width of the colorless stripes of the electronic grating based on the display width and the parameters of the image to be identified;
[0081] S13: Generate an electron grating image based on the widths of the colored and colorless stripes of the electron grating;
[0082] S14: Applying electron grating images to mobile terminals.
[0083] In step S11, firstly, an image to be recognized containing hidden information is prepared, and the theoretical width d1 of the image is recorded. Next, the distance between the recognition device and the image to be recognized is determined. This predetermined recognition distance can be any value within the range of 23-27 cm, for example, 25 cm. The 23-27 cm range corresponds to the typical human viewing distance. After the predetermined recognition distance is determined, the display width d2 of the image to be recognized on the display screen of the recognition device is obtained. For example, after the image to be recognized is stably displayed on the display screen of the recognition device, the value of d2 can be obtained based on the distance between two feature points of the image displayed on the display screen of the recognition device at this time.
[0084] In step S12, the widths of the colored and colorless stripes of the electronic grating are calculated based on the display width d2 and the parameters of the image to be recognized. Similar to a physical grating, an electronic grating also includes multiple colored and colorless stripes arranged alternately. Generally, the colored stripes can be black or multicolored, while the colorless stripes are transparent. The multiple colored stripes can be a uniform color, or different colors can be used as needed, for example, multiple colored stripes can form a gradient effect. Compared to a physical grating, preparing a colored electronic grating can almost completely avoid printing problems such as color difference.
[0085] According to a preferred embodiment of the present invention, the parameters of the image to be identified include the theoretical width d1 of the image to be identified, the theoretical colored fringe width B1 corresponding to the hidden information, and the theoretical colorless fringe width y1. The colored fringe width B2 and the colorless fringe width y2 of the electron grating are calculated according to the formula as follows:
[0086] The width of the colored stripe of the electron grating, B2 = theoretical width of the colored stripe, B1 * display width of the image to be recognized, d2 / theoretical width of the image to be recognized, d1 (Formula 1)
[0087] The width of the colorless fringe of the electron grating, y2, = theoretical width of the colorless fringe, y1 * display width of the image to be recognized, d2 / theoretical width of the image to be recognized, d1 (Formula 2)
[0088] In step S11, the display width d2 of the image to be recognized on the display screen of the recognition device has been obtained. Once the image to be recognized containing hidden information is determined, the theoretical width d1 of the image to be recognized, the theoretical colored stripe width B1 and the theoretical colorless stripe width y1 corresponding to the hidden information are also known values. Therefore, the parameters of the electronic grating can be calculated using the above formula.
[0089] In step S13, an electron grating image is generated based on the parameters of the electron grating, namely the widths of the colored and colorless stripes. In actual production, two images can be imported into the application: a black image and a white image. The pixel values in the width direction of the black image are set according to the width value B2 of the electron grating's colored stripes, and the pixel values in the width direction of the white image are set according to the width value y2 of the electron grating's colorless stripes. Then, the pixel values in the length direction of both the black and white images are set, and these sets of black and white images are repeatedly arranged to form electron grating stripes. Finally, the white image, i.e., the white stripes at this point, is made transparent to generate the final electron grating image. Figure 2 The image shows an electron grating image with black and transparent stripes as examples. The width of the colored stripes in the electron grating is represented by B2, and the width of the colorless stripes is represented by y2. In step S14, the electron grating image generated in step S13 is applied to a mobile terminal, for example, loaded into a mobile terminal APP or a mini-program of the APP. Figures 3a-3d This illustration shows an image to be identified containing hidden information, and its display effect after being covered with a theoretical grating, according to an embodiment of the present invention. Figure 3a The dot arrangement of the carrier image is shown, here represented by solid circles. Figure 3b The image to be recognized is shown after a hidden image is loaded into a carrier image. The dots in the hidden image are represented by hollow circles. The distance between the dots in the hidden image and the dots in the carrier image is set to be less than 0.073 mm. Since the human eye requires a visual recognition distance greater than 0.073 mm, the hidden image cannot be observed by the human eye when the distance between the dots in the hidden image and the carrier image is less than 0.073 mm. Figure 3c As shown, when the width of the colored fringes of the theoretical grating, that is, the value of the theoretical colored fringe width B1, is exactly equal to the dot diameter of the carrier image, and at the same time, the width of the colorless fringes of the theoretical grating, that is, the value of the theoretical colorless fringe width y1, is exactly equal to the dot diameter of the hidden image, then... Figure 3d As shown, when the grating covers the image to be identified, the hidden image can be observed. Based on the above settings, the theoretical colored fringe width B1 and the theoretical colorless fringe width y1 are determined. At this time, the theoretical width d1 of the image to be identified is known.
[0090] Using a recognition device, the distance between the recognition device and the image to be recognized is 25cm. At this time, the display width of the image to be recognized on the display screen of the recognition device is d2. According to Formula 1 and Formula 2, the width of the colored stripes B2 and the width of the colorless stripes y2 of the electronic grating can be calculated, thereby creating an electronic grating image.
[0091] The resulting lenticular image can be applied to mobile devices, such as being loaded into a mobile app or a mini-program within the app.
[0092] According to a preferred embodiment of the present invention, the parameters of the image to be recognized further include the rotation angle of the hidden information. When the rotation angle is an integer multiple of 90 degrees, the length direction of the grating image is parallel to the length or width direction of the display screen of the recognition device. When the grating image is applied to the mobile terminal, it still maintains the same orientation as the recognition device to ensure that the grating displays the hidden information normally on the display screen of the mobile terminal. When the rotation angle is not an integer multiple of 90 degrees, the grating image is tilted relative to the length or width direction of the display screen of the recognition device according to the rotation angle. When the grating image is applied to the mobile terminal, it still maintains the same orientation as the recognition device to ensure that the grating rotates accordingly on the display screen of the mobile terminal to display the hidden information normally.
[0093] According to a preferred embodiment of the present invention, the image to be identified includes feature points, and the display width d2 on the display screen of the identification device is the distance between the feature points in the image to be identified displayed on the display screen of the identification device. The feature points are preset to confirm the display width d2 of the image.
[0094] According to a preferred embodiment of the present invention, the colored stripes of the electron grating image are set to black, or set to color as needed, and the grayscale value of the colored stripes is set to not less than 50%.
[0095] In summary, an electronic grating that can be used in mobile terminals is produced through steps S11-S14. The following describes the method of image recognition using an electronic grating.
[0096] The present invention also provides a method for image recognition using an electronic grating, wherein the electronic grating is manufactured by the manufacturing method 10 described above, and has a fixed size. Figure 5 As shown, method 20 includes:
[0097] S21: Obtain the image to be identified containing hidden information.
[0098] S22: Display the image to be recognized on the screen of the mobile terminal;
[0099] S23: Select the corresponding grating image;
[0100] S24: Overlay the electron grating image onto the image to be identified displayed on the screen of the mobile terminal to display the hidden information.
[0101] According to a preferred embodiment of the present invention, if the image to be identified is printed or engraved on an object, the image to be identified on the object is captured by the camera device of the mobile terminal, wherein the distance between the camera device of the mobile terminal and the image to be identified is approximately equal to a predetermined recognition distance. For example, if the predetermined recognition distance selected when manufacturing the electron grating in manufacturing method 10 is 25cm, then the distance between the camera device of the mobile terminal and the image to be identified should be approximately 25cm, so that the image to be identified on the object is displayed on the display screen of the mobile terminal according to the desired display width.
[0102] In the above embodiments, the distance between the camera device of the mobile terminal and the image to be recognized should be approximately 25cm, but does not need to be exactly 25cm; for example, it can be any value within the range of 25cm ± 5cm. Corresponding to this range, the display width of the image to be recognized on the object displayed on the mobile terminal's screen may vary slightly, but by overlaying the electron grating image onto the image to be recognized displayed on the mobile terminal's screen, even if the size of the electron grating is fixed, the hidden information in the image to be recognized can still be displayed. Similarly, if the predetermined recognition distance selected when manufacturing the electron grating in manufacturing method 10 is 23cm, then the distance between the camera device of the mobile terminal and the image to be recognized should be approximately 23cm, but does not need to be exactly 23cm; for example, it can be any value within the range of 23cm ± 5cm. Furthermore, when the image to be recognized on the object is displayed on the mobile terminal's screen, a photograph can be taken to record the image to be recognized at this time, and then a corresponding electron grating image can be selected to overlay the photographed and recorded image to display the hidden information therein.
[0103] The electronic grating used in recognition method 20 is manufactured according to manufacturing method 10. Its dimensions are fixed (its colored stripe width is B2 and its colorless stripe width is y2), and it corresponds to the display width d2 of the image to be recognized displayed on the screen of the recognition device at a predetermined recognition distance. Therefore, in recognition method 20, when using a mobile terminal to recognize the image to be recognized, the distance between the mobile terminal and the image to be recognized should be close to the predetermined recognition distance described in manufacturing method 10, that is, as shown in the image. Figure 4a The display width dx of the image to be recognized displayed on the screen of the mobile terminal (calculated by the distance between two feature points of the image to be recognized displayed on the screen of the mobile terminal) is close to d2. To achieve this, besides ensuring the recognition effect by having the user visually judge the distance between the mobile terminal and the image to be recognized, other methods can also be used. For example, according to a preferred embodiment of the present invention, a visible recognition area can be provided on the screen of the mobile terminal, such as... Figure 6As shown, when the image to be recognized is located in the recognition area within the display screen of the mobile terminal, for example, when the length and width of the image to be recognized within the display screen of the mobile terminal match the length and width of the recognition area, the distance between the mobile terminal and the image to be recognized is close to the predetermined recognition distance.
[0104] For mobile terminals with zoom capabilities in their camera devices, the limitation that the distance between the mobile terminal and the image to be recognized must be close to a predetermined recognition distance can be overcome. According to a preferred embodiment of the present invention, the camera device of the mobile terminal used has a zoom capability. When the image to be recognized is displayed on the mobile terminal's screen, the zoom capability of the mobile terminal's camera device adjusts the display width of the image on the mobile terminal's screen to be close to d2. At this time, it is unnecessary to consider whether the distance between the mobile terminal and the image to be recognized is close to the predetermined recognition distance.
[0105] According to a preferred embodiment of the present invention, when the image to be recognized is displayed on the screen of a mobile terminal, such as Figure 4b As shown, when the image to be recognized is at a certain angle on the display screen—that is, when the line connecting two feature points of the image to be recognized displayed on the mobile terminal's screen is tilted relative to the length or width of the mobile terminal's screen—the electron grating image tilts accordingly. Furthermore, if the hidden information contained in the image to be recognized includes a rotation angle, and the image is also at a certain angle on the display screen during recognition, the final output direction of the electron grating will be determined by the superposition of the aforementioned two angles. For example... Figure 7 As shown, the hidden information contained in the image to be recognized includes a rotation angle, and the image to be recognized also has a certain angle when displayed on the screen of the mobile terminal. At this time, the output direction of the electronic grating image is determined by the superposition of the two angles mentioned above, and when it is covered on the image to be recognized displayed on the screen of the mobile terminal, the hidden maple leaf graphic information is displayed.
[0106] According to a preferred embodiment of the present invention, the image to be identified can be created as an electronic image with a width of d2 and then distributed to a designated user. The user can load the electronic image of the image to be identified with a width of d2 from the storage medium of a mobile terminal, and then overlay an electronic raster image onto the electronic image of the image to be identified with a width of d2 to display its hidden information. The width of the electronic image of the image to be identified can be precisely set to d2, and it can have relatively high image quality.
[0107] According to a preferred embodiment of the present invention, a corresponding grating image is selected from a list provided by a mobile terminal. The list can be a list of gratings corresponding to the image to be identified, or a list of gratings corresponding to certain brands, models, or manufacturers. For example, some grating images of certain brands or manufacturers can be pre-stored in a storage medium, or grating images can be downloaded to the storage medium via the Internet and the pre-stored list can be updated or expanded periodically. Upon receiving a user's manual selection instruction, the corresponding grating image can be retrieved.
[0108] According to a preferred embodiment of the present invention, the image to be identified contains grating ID information. A corresponding grating image is selected by scanning the grating ID information associated with the image to be identified. The grating ID information may be separate from or included in the image to be identified. According to a preferred embodiment of the present invention, the camera device scrolls the grating image on the display screen of a mobile terminal at a preset speed. If the image to be identified contains static hidden information, the hidden information can be displayed by directly overlaying the grating onto the image; if the image to be identified contains dynamic or magnified hidden information, the grating needs to be scrolled to correctly display the hidden information. Experiments have shown that dynamic gratings do not hinder the recognition effect of static hidden information.
[0109] When the image to be recognized contains dynamic hidden information, in order to achieve a dynamic effect, assuming that the width of a set of colored stripes plus colorless stripes of the electronic grating is w, according to the principle of persistence of vision, the distance moved per second should be equal to w in order to make the image present a dynamic effect. At this time, the electronic grating image should be scrolled on the display screen of the mobile terminal at a preset speed of w / second.
[0110] like Figure 8 As shown, the left side is an image to be identified containing dynamic hidden information displayed on the screen of a mobile terminal, and the right side is an electronic grating made according to method 10. The dynamic hidden information can be seen when the electronic grating moves to the left. Figures 9a-9e The image shows the position of the electron grating relative to the image to be recognized displayed on the mobile terminal screen at different times. Comparing each moment, it can be seen that the leftmost part is an ellipse that is constantly opening and closing, and to its right are four oval beans. Figures 9a-9e The overall dynamic effect is "eating beans". Figures 12a-12d The illustration shows the display of an electron grating on a mobile terminal screen during a practical application. The image to be recognized contains dynamically hidden information, and the electron grating scrolls at a preset speed. As the electron grating moves, dynamic "Pac-Man" information can be obtained. This verifies the feasibility and accuracy of one embodiment of the present invention.
[0111] When the image to be identified contains magnified hidden information, such as Figure 10As shown, the lower part is an image to be identified containing magnified hidden information displayed on the screen of a mobile terminal, and the upper part is an electronic grating created according to method 10. The magnified hidden information can be seen when the electronic grating is moved downwards. Figures 11a-11c The image shows the position of the electron grating relative to the image to be recognized displayed on the screen of a mobile terminal at different times. It can be seen that the image to be recognized displayed on the mobile terminal's screen consists of two strings of elongated S-shaped characters, which appear enlarged when the electron grating is placed over them.
[0112] The above steps S21-S24 describe in detail the method for image recognition based on a fixed-size electronic grating.
[0113] This invention also provides a method for image recognition using an electronic grating, wherein the size of the electronic grating is variable during application. For example... Figure 13 As shown, method 30 includes:
[0114] S31: Provide the parameters of the image to be identified, which contains hidden information, to the mobile terminal;
[0115] S32: Obtain the display width of the image to be identified within the display screen of the mobile terminal;
[0116] S33: Calculate the width of the colored stripes and the width of the colorless stripes of the electronic grating based on the display width and the parameters of the image to be recognized;
[0117] S34: Generate an electron grating image based on the widths of the colored and colorless stripes of the electron grating;
[0118] S35: Overlay the electron grating image onto the image to be identified to display the hidden information.
[0119] In step S31, the parameters of the image to be identified, which contains hidden information, are provided to the mobile terminal. The parameters of the image to be identified include the theoretical width d1 of the image to be identified, the theoretical colored stripe width B1 corresponding to the hidden information, and the theoretical colorless stripe width y1.
[0120] In step S32, the display width dx of the image to be recognized on the mobile terminal's screen is obtained. At this time, the distance between the mobile terminal and the image to be recognized does not need to be considered. However, in order to prevent the image to be recognized from losing too much detail due to its small size on the mobile terminal's screen, or on the other hand, to prevent the image to be recognized from not being fully displayed on the mobile terminal's screen, the distance between the mobile terminal and the image to be recognized can preferably be in the range of 10-80cm.
[0121] In step S33, based on the display width dx and the parameters of the image to be recognized, the colored stripe width Bx and the colorless stripe width yx of the electron grating are calculated according to Formulas 3 and 4.
[0122] The width of the colored fringe of the electron grating, Bx, is equal to the theoretical width of the colored fringe, B1, * the display width of the image to be recognized, dx, and the theoretical width of the image to be recognized, d1 (Formula 3).
[0123] The width of the colorless fringe of the electron grating is yx = theoretical width of the colorless fringe y1 * display width of the image to be recognized dx / theoretical width of the image to be recognized d1 (Formula 4)
[0124] In step S34, an electron grating image is generated based on the width Bx of the colored stripes and the width yx of the colorless stripes. According to a preferred embodiment of the present invention, the parameters of the image to be identified further include the rotation angle of the hidden information. When the rotation angle is an integer multiple of 90 degrees, the length direction of the electron grating image is parallel to the length or width direction of the mobile terminal's display screen to ensure that the electron grating displays the hidden information correctly on the mobile terminal's display screen. When the rotation angle is not an integer multiple of 90 degrees, the electron grating image is tilted relative to the length or width direction of the mobile terminal's display screen according to the rotation angle to ensure that the electron grating rotates accordingly on the mobile terminal's display screen to display the hidden information correctly.
[0125] According to a preferred embodiment of the present invention, the colored stripes of the electron grating image are set to black, or can be set to color as needed, and the grayscale value of the colored stripes is set to not less than 50%. Multiple colored stripes of the electron grating can be of a uniform color, or different colors can be used as needed, for example, multiple colored stripes can form a gradient effect. According to a preferred embodiment of the present invention, the image to be recognized is printed or printed on an object, and the image to be recognized is acquired by a camera device of a mobile terminal; the image to be recognized contains feature points, and in the display screen of the mobile terminal, the display width dx of the image to be recognized is the distance between the feature points in the image to be recognized displayed in the display screen of the mobile terminal. Preferably, when the image to be recognized has a certain angle in the display screen, that is, when the line connecting two feature points of the image to be recognized displayed in the display screen of the mobile terminal is tilted relative to the length or width direction of the mobile terminal display screen, the electron grating image tilts accordingly. Furthermore, if the hidden information contained in the image to be recognized contains a rotation angle, and the image to be recognized has a certain angle in the display screen during recognition, the electron grating needs to consider both angles simultaneously to determine the final output direction.
[0126] According to a preferred embodiment of the present invention, an electron grating image is scrolled on the display screen of a mobile terminal at a preset speed to display the magnified effect or dynamic effect of hidden information, without affecting the display effect of static hidden information.
[0127] The above steps S31-S35 describe in detail the method for image recognition based on a variable-size electron grating. Hidden information can be revealed by directly overlaying the electron grating onto the image to be recognized displayed on the screen of a mobile terminal. When the width dx of the image to be recognized displayed on the mobile terminal's screen changes, the electron grating calculates the Bx and Yx values based on the real-time dx value and redraws it. The redrawn electron grating image is then overlaid onto the image to be recognized displayed on the mobile terminal's screen to reveal the hidden information.
[0128] The above describes in detail the image recognition method using electronic gratings through multiple embodiments. The method for manufacturing electronic gratings designed in this invention can reveal hidden information about images, including static, dynamic, and magnified effects. This not only saves on the cost of physical gratings and solves the problem of portability, but also enhances product marketing and provides more interest and advertising effectiveness for printed images.
[0129] The present invention also provides a computer-readable storage medium including computer-executable instructions stored thereon, which, when executed by a processor, implement the method described above.
[0130] The present invention also provides an electronic device, comprising:
[0131] A camera device configured to capture an image to be identified containing hidden information;
[0132] Display screen; and
[0133] The processor is configured to create an electronic grating based on the display width of the image to be identified within the display screen and the parameters of the image to be identified, and to overlay the electronic grating onto the image to be identified on the display screen to reveal hidden information in the image to be identified.
[0134] According to a preferred embodiment of the present invention, the processor is configured to execute the method for manufacturing an electronic grating for a mobile terminal and the method for image recognition using an electronic grating as described above.
[0135] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for manufacturing an electronic grating for a mobile terminal, comprising: S11: Obtain the display width of the image to be recognized, containing hidden information, within the display screen of the recognition device at a predetermined recognition distance; S12: Calculate the colored stripe width and colorless stripe width of the electronic grating based on the display width and the parameters of the image to be identified, wherein the parameters of the image to be identified include the theoretical width of the image to be identified, the theoretical colored stripe width and the theoretical colorless stripe width corresponding to the hidden information; S13: Generate an electron grating image based on the widths of the colored and colorless stripes of the electron grating; S14: Applying electronic lenticular images to mobile terminals; Step S11 includes: preparing an image to be identified containing hidden information; Determine the distance between the recognition device and the image to be recognized; After the predetermined recognition distance is determined, the display width of the image to be recognized on the display screen of the recognition device is obtained; Step S12 further includes: calculating the width of the colored stripes and the width of the colorless stripes of the electron grating according to the formula. The width of the colored stripes of the electron grating = theoretical colored stripe width * display width of the image to be recognized / theoretical width of the image to be recognized; The width of the colorless stripe of the electron grating = theoretical width of the colorless stripe * display width of the image to be recognized / theoretical width of the image to be recognized.
2. The manufacturing method as described in claim 1, wherein in step S11: the range of the predetermined recognition distance is set to 23-27cm.
3. The manufacturing method as described in claim 1, wherein the parameters of the image to be identified further include the rotation angle of the hidden information, and wherein step S13 further includes: When the rotation angle is an integer multiple of 90 degrees, the length direction of the grating image is parallel to the length or width direction of the mobile terminal's display screen; when the rotation angle is not an integer multiple of 90 degrees, the grating image is tilted relative to the length or width direction of the mobile terminal's display screen according to the rotation angle.
4. The manufacturing method as described in claim 1, wherein the display width of the image to be recognized on the display screen of the recognition device is the distance between feature points in the image to be recognized displayed on the display screen of the recognition device.
5. The manufacturing method according to any one of claims 1-4, wherein step S13 further comprises: The colored stripes of the electron grating image are set to black or color, wherein the grayscale value of the colored stripes is set to not less than 50%.
6. A method for image recognition using an electron grating, wherein the electron grating is fabricated by the fabrication method described in any one of claims 1-5, the method comprising: S21: Obtain the image to be identified containing hidden information; S22: Display the image to be recognized on the screen of the mobile terminal; S23: Select the corresponding grating image; S24: Overlay the electron grating image onto the image to be identified displayed on the screen of the mobile terminal to display the hidden information.
7. The method of claim 6, wherein the image to be identified is printed or printed on an object, wherein step S21 further comprises: The image to be identified is captured by the camera device of the mobile terminal.
8. The method of claim 6, wherein step S21 further comprises: The image to be identified is made into an electronic image with a width corresponding to that of an electronic grating image; Step S22 further includes: loading the electronic image from the storage medium of the mobile terminal so as to display it on the display screen of the mobile terminal.
9. The method of claim 6, wherein step S23 further comprises: Select the corresponding grating image from the list provided by the mobile terminal.
10. The method of claim 6, wherein step S23 further comprises: Scan the grating ID information of the image to be identified, and select the corresponding electronic grating image based on the grating ID information.
11. The method of claim 10, wherein the raster ID information is separate from or included in the image to be identified.
12. The method of claim 7, wherein step S22 further comprises: The distance between the mobile terminal and the image to be identified is set to be within a predetermined recognition distance ±5cm.
13. The method of claim 7, wherein a visible recognition area is provided on the display screen of the mobile terminal, wherein step S22 further comprises: The image to be identified is placed within the recognition area.
14. The method of claim 7, wherein step S22 further comprises: By adjusting the focal length of the camera device on the mobile terminal, the display width of the image to be identified on the mobile terminal's screen is made to match the electronic grating image.
15. The method of claim 7, wherein step S24 further comprises: Based on the orientation information of feature points in the image to be identified displayed on the screen of the mobile terminal, when it is determined that the image to be identified is tilted relative to the length or width direction of the mobile terminal, the electron grating image tilts accordingly.
16. The method of any one of claims 6-15, wherein step S24 further comprises: The electron grating image is scrolled on the display screen of the mobile terminal at a preset speed.
17. A method for image recognition using an electronic grating, comprising: S31: Provide the parameters of the image to be identified, which contains hidden information, to the mobile terminal, wherein the parameters of the image to be identified include the theoretical width of the image to be identified, the theoretical width of the colored stripes corresponding to the hidden information, and the theoretical width of the colorless stripes. S32: Obtain the display width of the image to be identified within the display screen of the mobile terminal; S33: Calculate the width of the colored stripes and the width of the colorless stripes of the electronic grating based on the display width and the parameters of the image to be recognized; S34: Generate an electron grating image based on the widths of the colored and colorless stripes of the electron grating; S35: Overlay the electron grating image onto the image to be identified displayed on the screen of the mobile terminal to display the hidden information; Step S33 further includes: calculating the width of the colored stripes and the width of the colorless stripes of the electron grating according to the formula. The width of the colored stripes of the electron grating = theoretical colored stripe width * display width of the image to be recognized / theoretical width of the image to be recognized; The width of the colorless stripe of the electron grating = theoretical width of the colorless stripe * display width of the image to be recognized / theoretical width of the image to be recognized.
18. The method of claim 17, wherein the parameters of the image to be identified further include the rotation angle of the hidden information, wherein step S34 further includes: When the rotation angle is an integer multiple of 90 degrees, the length direction of the grating image is parallel to the length or width direction of the mobile terminal's display screen; when the rotation angle is not an integer multiple of 90 degrees, the grating image is tilted relative to the length or width direction of the mobile terminal's display screen according to the rotation angle.
19. The method of claim 17, wherein the image to be identified is printed or printed on an object, and the image to be identified is acquired by a camera device of a mobile terminal; The display width of the image to be identified on the screen of the mobile terminal is the distance between the feature points in the image to be identified displayed on the screen of the mobile terminal.
20. The method of any one of claims 17-19, wherein step S34 further comprises: The colored stripes of the electron grating image are set to black or color, wherein the grayscale value of the colored stripes is set to not less than 50%.
21. The method of any one of claims 17-19, wherein step S35 further comprises: Based on the orientation information of feature points in the image to be identified displayed on the screen of the mobile terminal, when it is determined that the image to be identified is tilted relative to the length or width direction of the mobile terminal, the electron grating image tilts accordingly.
22. The method of any one of claims 17-19, wherein step S35 further comprises: The electron grating image is scrolled on the display screen of the mobile terminal at a preset speed.
Citation Information
Patent Citations
Manufacturing method of explicit and implicit grating based on image pixel relationship
CN110533574A