Smart glasses code scanning method and device, storage medium and electronic equipment

By adaptively obtaining and setting the scanning parameters of smart glasses, the problem of slow scanning and recognition of smart glasses is solved, the scanning efficiency and success rate are improved, and the working efficiency of smart glasses is improved.

CN119443134APending Publication Date: 2025-02-14GUANGZHOU SHIXIANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310968860.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Existing smart glasses are slow to recognize when scanning codes, resulting in low work efficiency.

Method used

By obtaining the scanning environment parameters of the smart glasses, the scanning distance and the graphics code size, we adaptively obtain the camera screen parameters, the camera resolution and focal length parameters, so as to set the smart glasses and obtain a clear graphic code image.

Benefits of technology

It improves the efficiency and success rate of scanning codes, improves the work efficiency of smart glasses, and performs excellently especially in long-distance scanning scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443134A_ABST
    Figure CN119443134A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an intelligent glasses code scanning method and device, a storage medium and electronic equipment. The method comprises the steps of obtaining code scanning environment parameters of intelligent glasses; obtaining a first code scanning parameter according to the code scanning environment parameter; the first code scanning parameter comprises a camera shooting picture parameter; determining a code scanning distance and a graphic code size; obtaining a second code scanning parameter according to the code scanning distance and the graphic code size; the second code scanning parameter comprises a camera shooting resolution and a camera shooting focal length; setting intelligent glasses according to the first code scanning parameter and the second code scanning parameter, and obtaining a corresponding graphic code image; and identifying the graphic code image to obtain a code scanning result. According to the embodiment of the invention, the first code scanning parameter and the second code scanning parameter are adaptively obtained through the code scanning environment parameter, the code scanning distance and the graphic code size, so that a clear graphic code image can be obtained for graphic codes with different environments, different distances and different sizes, the code scanning recognition efficiency and success rate are improved, and the user experience is improved. The working efficiency of the intelligent glasses is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of smart glasses, and in particular, to a smart glasses code scanning method, device, storage medium and electronic device. Background Art

[0002] Smart glasses, a device that can be controlled by voice or motion to take photos, shoot videos, and make video calls with friends, can be divided into VR (Virtual Reality) glasses, AR (Augmented Reality) glasses, and MR (Mix reality) glasses.

[0003] With the development of information technology, graphic codes are widely used in various application scenarios, such as payment, login or sharing. Scanning graphic codes with smart glasses to achieve various functions has also been widely used. However, in the related art, when scanning graphic codes with smart glasses, the scanning and recognition speed is slow, resulting in low working efficiency of smart glasses. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present application provides a smart glasses code scanning method, device, storage and electronic equipment to improve the efficiency and success rate of code scanning recognition and improve the working efficiency of smart glasses.

[0005] According to a first aspect of an embodiment of the present application, a smart glasses code scanning method is provided, comprising the following steps:

[0006] Obtaining a code scanning environment parameter of the smart glasses; obtaining a first code scanning parameter according to the code scanning environment parameter; the first code scanning parameter includes a camera screen parameter;

[0007] Determine a code scanning distance and a graphic code size; obtain a second code scanning parameter according to the code scanning distance and the graphic code size; the second code scanning parameter includes a camera resolution and a camera focal length;

[0008] According to the first code scanning parameter and the second code scanning parameter, the smart glasses are set, and a corresponding graphic code image is obtained;

[0009] The graphic code image is identified to obtain a code scanning result.

[0010] According to a second aspect of an embodiment of the present application, a smart glasses code scanning device is provided, including:

[0011] A first code scanning parameter acquisition module, used to acquire the code scanning environment parameters of the smart glasses; according to the code scanning environment parameters, first code scanning parameters are obtained; the first code scanning parameters include camera screen parameters;

[0012] A second code scanning parameter acquisition module is used to determine the code scanning distance and the size of the graphic code; according to the code scanning distance and the size of the graphic code, the second code scanning parameter is obtained; the second code scanning parameter includes a camera resolution and a camera focal length;

[0013] An image acquisition module, used to set the smart glasses according to the first code scanning parameter and the second code scanning parameter, and obtain a corresponding graphic code image;

[0014] The code scanning and recognition module recognizes the graphic code image and obtains a code scanning result.

[0015] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a memory; the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the smart glasses code scanning method as described above.

[0016] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the smart glasses code scanning method as described above is implemented.

[0017] The embodiment of the present application obtains the scanning environment parameters of the smart glasses; obtains the first scanning parameters according to the scanning environment parameters; the first scanning parameters include the camera screen parameters; determines the scanning distance and the graphic code size; obtains the second scanning parameters according to the scanning distance and the graphic code size; the second scanning parameters include the camera resolution and the camera focal length; sets the smart glasses according to the first scanning parameters and the second scanning parameters, and obtains the corresponding graphic code image; recognizes the graphic code image, and obtains the scanning result. The embodiment of the present application adaptively obtains the first scanning parameters and the second scanning parameters through the scanning environment parameters, the scanning distance, and the graphic code size, so that clear graphic code images can be obtained for graphic codes of different environments, different distances, and different sizes, especially in long-distance scanning scenarios, thereby improving the scanning recognition efficiency and success rate, and improving the working efficiency of the smart glasses.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0019] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 This is a flow chart of a smart glasses code scanning method shown in one embodiment of the present application;

[0022] Figure 2 This is a flow chart of a method for determining a first code scanning parameter according to an embodiment of the present application;

[0023] Figure 3 A flowchart of a method for determining a scanning distance and a graphic code size according to an embodiment of the present application;

[0024] Figure 4 A flowchart of a method for determining a scanning distance and a graphic code size shown in another embodiment of the present application;

[0025] Figure 5 A flowchart of a method for determining a code scanning distance shown in one embodiment of the present application;

[0026] Figure 6 A schematic block diagram of a smart glasses device according to an embodiment of the present application;

[0027] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. Wherein, when the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.

[0029] It should be clear that the implementation methods described in the embodiments described below do not represent all implementation methods consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0030] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone; the character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0031] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, such information should not be limited to these terms, and these terms are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. Depending on the context, the words "if" / "if" used in the present application can be interpreted as "at the time of" or "when" or "in response to determination".

[0032] The application environment of the smart glasses code scanning method shown in the embodiment of the present application includes smart glasses; the smart glasses include a glasses body, a light sensor, a camera device, a fill light and a processor. Among them, the light sensor, the camera device, the fill light and the processor are all arranged on the glasses body; the light sensor, the camera device and the fill light are all connected to the processor, and the light sensor, the camera device and the fill light are used to receive and execute the control instructions of the processor, and the light sensor transmits the detected ambient light intensity to the processor, and the camera device transmits the captured camera image to the processor. In addition, in some embodiments, the smart glasses may also include one or more other sensors, such as one or more of a depth camera, an infrared sensor, an ultrasonic sensor, a Hall sensor, and the like. Among them, the specific setting position of each sensor can be determined according to the actual application scenario, and this application does not limit it.

[0033] The main body of the glasses includes a frame and two temples connected to the frame. A lens is provided on the side of the frame close to the wearer's eyes. The user can observe the real environment through the lens, or watch the virtual reality image displayed on the lens. The light sensor is used to detect the light intensity of the real environment under the wearer's field of view. The camera device is used to capture the image of the real environment under the wearer's field of view. The fill light is used to enhance the light intensity of the real environment.

[0034] The processor may include one or more processing cores, which may implement the smart glasses code scanning method of the present application in a pure software manner, or in a combination of software and hardware, such as in a digital signal processing, a field programmable gate array, a programmable logic array, or in a hardware form; or may integrate a central processing unit, an image processor, a modem, or a combination of one or more of the above. The processor unit may run an application for the smart glasses code scanning method, and the application may be presented in a form adapted to the processing unit, such as an APP application. In some examples, it may also be presented in the form of a system plug-in, a web page plug-in, or the like. In addition, the application environment of the smart glasses code scanning method may also include a processing device independent of the smart glasses. After the processing device is connected to the light sensor, the camera device, and the fill light, the smart glasses code scanning method of the present application may be implemented in a pure software manner, or in a combination of software and hardware.

[0035] To this end, the embodiments of the present application propose a smart glasses code scanning method, device, storage medium and electronic device.

[0036] The following will be combined with the attached Figures 1 to 5 , the smart glasses scanning method provided in the embodiment of the present application is introduced in detail.

[0037] See also Figure 1 The smart glasses code scanning method provided in the embodiment of the present application includes the following steps:

[0038] Step S101: Obtain the code scanning environment parameters of the smart glasses; obtain the first code scanning parameters according to the code scanning environment parameters; the first code scanning parameters include camera screen parameters.

[0039] It can be understood that the smart glasses scanning method of the embodiment of the present application is applied to the scanning of graphic codes, wherein the graphic code can be a QR code or a barcode, etc., which can be a black and white graphic that records data symbol information distributed in a plane according to a certain rule using certain specific geometric shapes.

[0040] The code scanning environment parameters include the ambient light intensity. In the embodiment of the present application, when the wearer wears the smart glasses, or when it is detected that the wearer needs to perform a graphic code scanning operation, the processor sends a start instruction to the light sensor, and the light sensor detects the ambient light intensity of the real environment under the wearer's field of view. Among them, the detection of whether the wearer needs to perform a graphic code scanning operation can be that the wearer triggers the code scanning control on the lens, thereby causing the processor to detect the graphic code scanning operation, or it can be that the wearer's eye movement is detected as a preset action, thereby causing the processor to detect the graphic code scanning operation.

[0041] The camera picture parameters are used to indicate the quality of the captured picture, and the camera picture parameters include one or more of the following: exposure timing of the camera device, exposure time of the camera device, white balance of the camera device, clarity of the camera device, contrast of the camera device and brightness of the camera device.

[0042] In an optional embodiment, the processor presets a mapping relationship between the code scanning environment parameter and the first code scanning parameter, and matches the first code scanning parameter corresponding to the code scanning environment parameter through the mapping relationship.

[0043] In another optional embodiment, the processor presets a calculation formula between the code scanning environment parameter and the first code scanning parameter, and uses the calculation formula to calculate according to the code scanning environment parameter to obtain the corresponding first code scanning parameter.

[0044] In another optional embodiment, the processor is preset with a trained environment scanning parameter model, and the scanning environment parameters are input into the environment scanning parameter model to obtain the corresponding first scanning parameters. The environment scanning parameter model can be obtained by existing neural network training.

[0045] Step S102: Determine the scanning distance and the size of the graphic code; obtain the second scanning parameter according to the scanning distance and the size of the graphic code; the second scanning parameter includes the camera resolution and the camera focal length.

[0046] The scanning distance can be obtained through input by the wearer, or through detection by a distance sensor set on the main body of the glasses, or by pre-shooting the image to be detected through preset camera resolution and camera focal length and then estimating the distance.

[0047] The size of the graphic code can be obtained through input by the wearer, or it can be estimated by pre-shooting the image to be detected through preset camera resolution and camera focal length.

[0048] Camera resolution refers to the degree of resolution of the camera device to the photographed scene, generally referring to the number of pixels that can be provided in one frame.

[0049] The focal length of a camera is the distance from the optical center of the camera lens to the focal point of light when parallel light is incident. The length of the focal length determines the image size and field of view of the camera. The shorter the focal length, the wider the field of view of the camera lens, and the smaller the focal length, the narrower the field of view of the camera lens.

[0050] In an optional embodiment, the processor presets a mapping relationship between the scanning distance and the graphic code size and the second scanning parameter, and matches the second scanning parameter corresponding to the scanning distance and the graphic code size through the mapping relationship.

[0051] In another optional embodiment, the processor presets a calculation formula between the scanning distance and the graphic code size and the second scanning parameter. Through the calculation formula, the corresponding second scanning parameter is obtained according to the scanning distance and the graphic code size.

[0052] In another optional embodiment, the processor is preset with a trained distance scanning parameter model, and the scanning distance and the size of the graphic code are input into the distance scanning parameter model to obtain the corresponding second scanning parameter.

[0053] By adaptively obtaining the second scanning parameter according to the scanning distance and the size of the graphic code, the second scanning parameter can be adaptively adjusted at different distances, especially in long-distance scanning scenarios, to obtain a clear image.

[0054] Step S103: according to the first code scanning parameter and the second code scanning parameter, the smart glasses are set and a corresponding graphic code image is obtained.

[0055] After obtaining the first code scanning parameter and the second code scanning parameter, the photographing parameters of the camera device of the smart glasses are adjusted, and the corresponding first code scanning parameters such as the exposure timing of the camera device, the exposure time of the camera device, the white balance of the camera device, the clarity of the camera device, the contrast of the camera device and the brightness of the camera device are set, and the corresponding second code scanning parameters such as the camera resolution and the camera focal length are set, so as to shoot the graphic code and obtain the corresponding graphic code image.

[0056] Step S104: Identify the graphic code image and obtain the scan result.

[0057] The method of identifying the graphic code image can be various existing methods that can be implemented, and this application will not go into details.

[0058] The embodiment of the present application obtains the scanning environment parameters of the smart glasses; obtains the first scanning parameters according to the scanning environment parameters; the first scanning parameters include the camera screen parameters; determines the scanning distance and the graphic code size; obtains the second scanning parameters according to the scanning distance and the graphic code size; the second scanning parameters include the camera resolution and the camera focal length; sets the smart glasses according to the first scanning parameters and the second scanning parameters, and obtains the corresponding graphic code image; recognizes the graphic code image, and obtains the scanning result. The embodiment of the present application adaptively obtains the first scanning parameters and the second scanning parameters through the scanning environment parameters, the scanning distance, and the graphic code size, so that clear graphic code images can be obtained for graphic codes of different environments, different distances, and different sizes, especially in long-distance scanning scenarios, thereby improving the scanning recognition efficiency and success rate, and improving the working efficiency of the smart glasses.

[0059] See also Figure 2In an optional embodiment, the code scanning environment parameter includes the ambient light intensity; the step of obtaining the first code scanning parameter according to the code scanning environment parameter in step S101 includes:

[0060] Step S1111: Compare the ambient light intensity with a preset ambient light intensity threshold.

[0061] The preset ambient light intensity threshold can be set according to actual needs. Generally speaking, the ambient light intensity threshold is the minimum threshold at which the camera device can capture a clear image;

[0062] Step S1112: If the ambient light intensity is greater than or equal to the ambient light intensity threshold, obtain a first code scanning parameter according to the ambient light intensity.

[0063] Step S1113: If the ambient light intensity is less than the ambient light intensity threshold, control the fill light to be turned on to fill the ambient light, and obtain the ambient light intensity after the fill light is obtained; according to the ambient light intensity after the fill light is obtained, obtain the first code scanning parameter.

[0064] If the ambient light intensity is greater than or equal to the ambient light intensity threshold, it means that by adjusting the first scanning parameter, the camera device can capture a clear image; if the ambient light intensity is less than the ambient light intensity threshold, it means that the light is too dark and a clear image cannot be captured by adjusting the first scanning parameter. Therefore, the processor controls the turn-on of the supplementary light to increase the ambient light intensity of the smart glasses, and then re-detects the ambient light brightness to obtain the first scanning parameter, thereby improving the scanning success rate and scanning clarity.

[0065] In an optional embodiment, the step of obtaining the first code scanning parameter according to the code scanning environment parameter in step S101 includes:

[0066] Step S1121: Match the code scanning environment parameter with a preset environment code scanning parameter library to obtain a first code scanning parameter; the environment code scanning parameter library stores a mapping relationship between each code scanning environment parameter and the first code scanning parameter.

[0067] The environmental scanning parameter library can store a one-to-one mapping relationship between each scanning environment parameter and the first scanning parameter; for example, when the scanning environment parameter is the ambient light brightness, each ambient light brightness corresponds to a first scanning parameter. The environmental scanning parameter library can also store a mapping relationship between each scanning environment parameter range and a first scanning parameter; for example, when the scanning environment parameter is the ambient light brightness, multiple ambient light brightness ranges will be set, and each ambient light brightness range corresponds to a first scanning environment parameter.

[0068] The embodiment of the present application can quickly and conveniently obtain the first scanning parameters by matching the scanning environment parameters with a preset environment scanning parameter library.

[0069] See also Figure 3 In an optional embodiment, the step of determining the scanning distance and the size of the graphic code in step S102 includes:

[0070] Step S1211: receiving the scanning distance and graphic code size input by the user.

[0071] The lenses of the smart glasses also serve as a display screen, which can display a scanning distance input control and a graphic code size input control. Users can enter the scanning distance and graphic code size on the scanning distance input control and the graphic code size input control.

[0072] Specifically, when using smart glasses to scan codes, the smart glasses provide two modes, automatic mode and manual mode, for users to scan codes. If the user selects the manual mode, the smart glasses will display a code scanning distance input control and a graphic code size input control to receive the code scanning distance and graphic code size input by the user. If the user selects the automatic mode, the smart glasses will automatically determine the code scanning distance and graphic code size, which will be specifically described in steps S1221-S1223.

[0073] Step S1212: Update the second scanning parameter according to the scanning distance and graphic code size input by the user.

[0074] It can be understood that the processor has a preset mapping relationship between the scanning distance and the graphic code size and the second scanning parameter, or has a preset calculation formula between the scanning distance and the graphic code size and the second scanning parameter, or has a preset trained distance scanning parameter model, so as to obtain the second scanning parameter corresponding to the scanning distance and the graphic code size input by the user according to the mapping relationship, the calculation formula or the trained distance scanning parameter model.

[0075] Step S1213: According to the first code scanning parameter and the updated second code scanning parameter, the graphic code image is collected for recognition.

[0076] The processor adjusts the graphic code image and the shooting parameters of the camera device of the smart glasses according to the second scanning parameters determined by the scanning distance and the graphic code size input by the user and the first scanning parameters, and sets the corresponding first scanning parameters such as the exposure timing of the camera device, the exposure time of the camera device, the white balance of the camera device, the clarity of the camera device, the contrast of the camera device and the brightness of the camera device, and sets the corresponding second scanning parameters such as the camera resolution and the camera focal length, so as to shoot the graphic code and obtain the corresponding graphic code image.

[0077] Step S1214: If the recognition fails, determine the scanning distance and the size of the graphic code based on the camera image.

[0078] It is understandable that if the recognition is successful, the recognition result is directly obtained. If the recognition fails, it means that the scanning distance and the graphic code size are not appropriate. In this case, the scanning distance and the graphic code size are re-determined based on the camera image.

[0079] The embodiment of the present application determines the second scanning parameter based on the scanning distance and graphic code size input by the user, and when recognition fails, the scanning distance and graphic code size are adaptively re-determined, and the second scanning parameter is re-determined, so as to improve the recognition success rate and the recognition efficiency.

[0080] See also Figure 4 In an optional embodiment, the step of determining the scanning distance and the size of the graphic code in step S102 includes:

[0081] Step S1221: using the first code scanning parameter and the preset second code scanning parameter to detect whether there is a graphic code in the camera image.

[0082] Specifically, when using smart glasses to scan codes, the smart glasses provide automatic mode and manual mode. If the user selects the automatic mode, the processor will use the first scanning parameter and the pre-set second scanning parameter to detect whether there is a graphic code in the camera image.

[0083] Step S1222: If a graphic code exists, capture a camera image for recognition.

[0084] Step S1223: If the recognition fails, determine the scanning distance and the size of the graphic code based on the camera image.

[0085] It can be understood that if the recognition is successful, it means that the preset second scanning parameters are appropriate and the recognition result can be obtained directly. If the recognition fails, it means that the preset second scanning parameters are not appropriate and it is necessary to re-determine the scanning distance and graphic code size based on the camera image to determine the appropriate second scanning image.

[0086] The embodiment of the present application adopts the first scanning parameter and the preset second scanning parameter to scan the code. When the recognition is unsuccessful, the scanning distance and the size of the graphic code are adaptively determined, and then the second scanning parameter is determined, which can improve the scanning success rate and scanning efficiency.

[0087] See also Figure 5 In an optional embodiment, the steps of determining the scanning distance and the size of the graphic code according to the camera image in step S1213 and step S1223 include:

[0088] Step S1231: Determine the size of the graphic code according to the camera image.

[0089] It is understandable that, in step S1213, the size of the graphic code captured at the camera resolution corresponding to the updated second code scanning parameter can be obtained based on the camera image. In step S1223, the size of the graphic code at the camera resolution corresponding to the preset second code scanning parameter can be obtained based on the camera image.

[0090] Step S1232: Match the graphic code size with a preset distance model library to obtain a code scanning distance; wherein the distance model library stores a mapping relationship between each graphic code size and a code scanning distance.

[0091] The distance model library may store a one-to-one mapping relationship between each graphic code size and a code scanning distance. The distance model library may also store a mapping relationship between each graphic code size range and a code scanning distance.

[0092] The embodiment of the present application can quickly and conveniently obtain the scanning distance by matching the graphic code size with a preset distance model library.

[0093] In an optional embodiment, obtaining the second code scanning parameter according to the code scanning distance and the size of the graphic code in step S102 includes:

[0094] Step S1231: Match the code scanning distance and the graphic code size with a preset distance code scanning parameter library to obtain a second code scanning parameter; the distance code scanning parameter library stores a mapping relationship between each code scanning distance and graphic code size and the second code scanning parameter.

[0095] The distance code scanning parameter library may store a one-to-one mapping relationship between each code scanning distance and graphic code size and the second code scanning parameter. The distance code scanning parameter library may also store a mapping relationship between each code scanning distance and graphic code size range and a second code scanning parameter.

[0096] The embodiment of the present application can quickly and conveniently obtain the second scanning parameter by matching the scanning distance and the graphic code size with a preset distance scanning parameter library.

[0097] See also Figure 6 , which is a schematic diagram of the structure of the smart glasses code scanning device provided in an embodiment of the present application. The device 200 includes:

[0098] The first code scanning parameter acquisition module 201 is used to acquire the code scanning environment parameters of the smart glasses; according to the code scanning environment parameters, the first code scanning parameters are obtained; the first code scanning parameters include camera screen parameters;

[0099] The second code scanning parameter acquisition module 202 is used to determine the code scanning distance and the size of the graphic code; the second code scanning parameter is obtained according to the code scanning distance and the size of the graphic code; the second code scanning parameter includes the camera resolution and the camera focal length;

[0100] The image acquisition module 203 is used to set the smart glasses according to the first code scanning parameter and the second code scanning parameter, and obtain the corresponding graphic code image;

[0101] The code scanning recognition module 204 is used to recognize the graphic code image and obtain the code scanning result.

[0102] It should be noted that the smart glasses code scanning device provided in the embodiment of the present application only uses the division of the above-mentioned functional modules as an example when executing the smart glasses code scanning method. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the smart glasses code scanning device provided in the embodiment of the present application and the smart glasses code scanning method of the present application belong to the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0103] The smart glasses code scanning device of the embodiment of the present application can be applied to electronic devices, such as smart glasses, and the device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the file processing in which it is located reading the corresponding computer program instructions in the memory and running. From the hardware level, the electronic device in which it is located may include a processor and a memory, and the processor and the memory are connected through a data bus or other known methods.

[0104] See also Figure 7 , is a schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 300 can be specifically a computer, a mobile phone, a tablet computer, an interactive tablet, etc. In an exemplary embodiment of the present application, the electronic device 300 is smart glasses, and the electronic device 300 may include: at least one processor 310, at least one memory 320, at least one network interface 330, a user interface 340 and at least one communication bus 350.

[0105] The communication bus 350 is used to realize the connection and communication between these components.

[0106] The user interface 340 may include a display screen and a camera; the user interface 340 may also include a standard wired interface and a wireless interface.

[0107] The network interface 330 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0108] Among them, the processor 310 may include one or more processing cores. The processor 310 uses various interfaces and lines to connect various parts within the entire electronic device 300, and executes various functions and processes data of the electronic device 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 320, and calling data stored in the memory 320. Optionally, the processor 310 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 310 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed by the display layer; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 310, but implemented separately by a chip.

[0109] Among them, the memory 320 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 320 includes a non-transitory computer-readable storage medium. The memory 320 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 320 may also be optionally at least one storage device located away from the aforementioned processor 310. As Figure 7 As shown, the memory 320 as a computer storage medium may include an operating system, a network communication module, and a user.

[0110] exist Figure 7In the electronic device 300 shown, the user interface 340 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 310 can be used to call the smart glasses application stored in the memory 320, for example: a smart glasses code scanning application; and execute the relevant operations of any smart glasses code scanning method in the above-mentioned embodiments, with corresponding functions and beneficial effects.

[0111] The present application also provides a computer-readable storage medium on which a computer program is stored, and the instructions are suitable for being loaded by a processor and executing the steps of the smart glasses code scanning method shown above. The specific execution process can refer to the specific description shown in the embodiment, and will not be repeated here. The device where the storage medium is located can be a personal computer, a laptop, a smart phone, a tablet computer and other electronic devices.

[0112] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. Ordinary technicians in this field can understand and implement it without paying creative work.

[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0114] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.

[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0117] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0118] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0119] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0120] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A smart glasses code scanning method, characterized in that: The steps include: Obtaining a code scanning environment parameter of the smart glasses; obtaining a first code scanning parameter according to the code scanning environment parameter; the first code scanning parameter includes a camera screen parameter; Determine a code scanning distance and a graphic code size; obtain a second code scanning parameter according to the code scanning distance and the graphic code size; the second code scanning parameter includes a camera resolution and a camera focal length; According to the first code scanning parameter and the second code scanning parameter, the smart glasses are set, and a corresponding graphic code image is obtained; The graphic code image is identified to obtain a code scanning result.

2. The smart glasses code scanning method according to claim 1, characterized in that: The step of determining the scanning distance and the size of the graphic code includes: Using the first code scanning parameter and the preset second code scanning parameter, detecting whether there is a graphic code in the camera image; If there is a graphic code, collecting the camera image for identification; If the recognition fails, the scanning distance and the size of the graphic code are determined based on the camera image.

3. The smart glasses code scanning method according to claim 1, characterized in that: The step of determining the scanning distance and the size of the graphic code includes: Receive the scanning distance and graphic code size input by the user; Update the second scanning parameter according to the scanning distance and the graphic code size input by the user; According to the first code scanning parameter and the updated second code scanning parameter, collecting a graphic code image for recognition; If the recognition fails, the scanning distance and the size of the graphic code are determined based on the camera image.

4. The smart glasses code scanning method according to claim 2 or 3, characterized in that: The step of determining the scanning distance and the size of the graphic code according to the camera image comprises: Determining the size of the graphic code according to the camera image; The graphic code size is matched with a preset distance model library to obtain a code scanning distance; wherein the distance model library stores a mapping relationship between each graphic code size and a code scanning distance.

5. The smart glasses code scanning method according to any one of claims 1 to 3, characterized in that: The obtaining of a second code scanning parameter according to the code scanning distance and the graphic code size includes: The code scanning distance and the graphic code size are matched with a preset distance code scanning parameter library to obtain a second code scanning parameter; the distance code scanning parameter library stores a mapping relationship between each code scanning distance and graphic code size and the second code scanning parameter.

6. The smart glasses code scanning method according to any one of claims 1 to 3, characterized in that: The step of obtaining the first code scanning parameter according to the code scanning environment parameter includes: The code scanning environment parameter is matched with a preset environment code scanning parameter library to obtain a first code scanning parameter; the environment code scanning parameter library stores a mapping relationship between each code scanning environment parameter and the first code scanning parameter.

7. The smart glasses code scanning method according to any one of claims 1 to 3, characterized in that: The code scanning environment parameters include ambient light intensity; The step of obtaining the first code scanning parameter according to the code scanning environment parameter includes: comparing the ambient light intensity with a preset ambient light intensity threshold; If the ambient light intensity is greater than or equal to the ambient light intensity threshold, obtaining a first code scanning parameter according to the ambient light intensity; If the ambient light intensity is less than the ambient light intensity threshold, control the fill light to be turned on to fill the ambient light, and obtain the ambient light intensity after the fill light is obtained; and obtain the first code scanning parameter according to the ambient light intensity after the fill light is obtained.

8. A smart glasses code scanning device, characterized in that: include: A first code scanning parameter acquisition module, used to acquire the code scanning environment parameters of the smart glasses; according to the code scanning environment parameters, first code scanning parameters are obtained; the first code scanning parameters include camera screen parameters; A second code scanning parameter acquisition module is used to determine the code scanning distance and the size of the graphic code; according to the code scanning distance and the size of the graphic code, the second code scanning parameter is obtained; the second code scanning parameter includes a camera resolution and a camera focal length; An image acquisition module, used to set the smart glasses according to the first code scanning parameter and the second code scanning parameter, and obtain a corresponding graphic code image; The code scanning recognition module is used to recognize the graphic code image and obtain the code scanning result.

9. An electronic device comprising a processor and a memory; characterized in that: The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the smart glasses code scanning method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the smart glasses code scanning method as described in any one of claims 1 to 7 is implemented.