CN117391102A - Code scanning method, device and storage medium - Google Patents

Code scanning method, device and storage medium Download PDF

Info

Publication number
CN117391102A
CN117391102A CN202311266552.2A CN202311266552A CN117391102A CN 117391102 A CN117391102 A CN 117391102A CN 202311266552 A CN202311266552 A CN 202311266552A CN 117391102 A CN117391102 A CN 117391102A
Authority
CN
China
Prior art keywords
code
electronic screen
code scanning
identification
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311266552.2A
Other languages
Chinese (zh)
Inventor
钮李明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Pinnacle Electrical Co ltd
Original Assignee
Xiamen Pinnacle Electrical Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Pinnacle Electrical Co ltd filed Critical Xiamen Pinnacle Electrical Co ltd
Priority to CN202311266552.2A priority Critical patent/CN117391102A/en
Publication of CN117391102A publication Critical patent/CN117391102A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14131D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The application provides a code scanning method, equipment and a storage medium, and relates to the technical field of code scanning. The method comprises the following steps: and acquiring a shaking image in the scene, and judging whether the screen highlight feature of the electronic screen exists in the current scene or not through the light spot area in the shaking image. If yes, adopting an identification method aiming at the electronic screen code to carry out identification, and if not, adopting an identification method aiming at the non-electronic screen code to carry out identification; the electronic screen is not polished, interference caused by reflection can be avoided, and the non-electronic screen objects such as commodity bar codes can be conveniently and quickly identified by polishing. Based on this, the scheme of this application can realize high-efficient code scanning in the scene that commodity bar code and electronic screen two-dimensional code mixed appear, both can avoid the electronic screen reflection of light or too bright, can carry out effective light filling to commodity bar code again, realizes efficient double code recognition effect, promotes greatly and sweeps the code speed.

Description

Code scanning method, device and storage medium
Technical Field
The present disclosure relates to the field of code scanning technologies, and in particular, to a code scanning method, device, and storage medium.
Background
With the development of network technology, code scanning becomes an effective way of information identification and entry. In a typical commodity purchase scenario, the information codes that may be scanned include bar codes, which are typically printed on the commodity outer packaging, and two-dimensional codes, which are typically shown by the user through an electronic screen. At present, the code scanning equipment on the market generally directly starts to light to illuminate the information code to be identified after sensing the change of the brightness of the surrounding environment, so as to identify the acquired information code.
However, due to the characteristics of glass reflection and self-luminescence of the electronic screen, the conventional code scanning method can cause the problems that the two-dimensional code displayed by the electronic screen is reflected or shiny too much, and the two-dimensional code is difficult to read. In some technologies, there are also technical schemes for eliminating the problems of screen reflection and screen self-luminescence and over-brightness caused by polishing by repeatedly adjusting the aperture for a plurality of times, but this method needs to waste time for a plurality of times of switching, which results in a large delay in code scanning and influence on code scanning and reading speed.
Therefore, a technical scheme is needed, the code can be efficiently scanned aiming at the scene where the commodity bar code and the electronic screen two-dimensional code are mixed, the electronic screen can be prevented from reflecting or being too bright, the commodity bar code can be effectively supplemented with light, the efficient double-code identification effect is realized, and the code scanning speed is greatly improved.
Disclosure of Invention
The application provides a code scanning method, equipment and storage medium, which can realize efficient code scanning in a scene where a commodity bar code and an electronic screen two-dimensional code are mixed, can avoid reflection or excessive brightness of the electronic screen, can perform effective light supplementing on the commodity bar code, realize efficient double-code separate identification effect, and greatly improve code scanning speed.
In order to achieve the above object, in a first aspect, the present application provides a code scanning method, which includes:
s1, responding to detection of scene change, and acquiring a shaking image in the scene, wherein the shaking image comprises an information code to be identified;
s2, when the ratio of the area of the light spot in the shaking image to the total area of the shaking image exceeds a preset ratio, judging that an electronic screen code appears in the shaking image, and executing S3, wherein the light spot refers to an area with brightness higher than a preset brightness threshold value in the shaking image;
s3, under the condition that a code scanning illuminating lamp is not started, carrying out electronic screen code recognition on the information code to be recognized in the scene;
s4, when the ratio of the area of the light spot in the total area of the shaking image does not exceed the preset ratio, judging that a non-electronic screen code appears in the shaking image, and executing a step S5;
s5, under the condition that the code scanning illuminating lamp is turned on, non-electronic screen code recognition is conducted on the information codes to be recognized in the scene.
In one possible embodiment, the S3 includes:
and after the code scanning illuminating lamp is controlled to flash for a preset time period, the code scanning illuminating lamp is turned off, and electronic screen code recognition is carried out on the information code to be recognized in the scene.
In one possible embodiment, the method further comprises:
reading the duration of the identification code under the condition that the screen code identification is unsuccessful in the step S3 or under the condition that the non-screen code identification is unsuccessful in the step S5;
if the duration of the identification code does not exceed the preset duration, continuing the identification code;
and if the identification duration exceeds the preset duration, executing step S1.
In one possible embodiment, the method further comprises:
under the condition that the electronic screen code identification is successful in the step S3, sending out a code scanning prompt voice corresponding to the electronic screen code, and ending the electronic screen code identification flow;
and under the condition that the non-electronic screen code identification is successful in the step S5, the code scanning illuminating lamp is turned off, code scanning prompt voice corresponding to the non-electronic screen code is sent out, and the non-electronic screen code identification flow is ended.
In one possible embodiment, the S1 includes:
and acquiring the shaking image in response to detecting that the variation of the ambient brightness in the scene exceeds a preset shaking threshold.
In one possible implementation, the electronic screen code includes: two-dimensional codes or one-dimensional codes shown by an electronic screen; the non-electronic screen code includes: bar codes shown by non-electronic screens.
In a second aspect, a code scanning device is provided, where the code scanning device scans a code illuminating lamp and a code identifying module, and the code identifying module is configured to perform:
s1, responding to detection of scene change, and acquiring a shaking image in the scene, wherein the shaking image comprises an information code to be identified;
s2, when the ratio of the area of the light spot in the shaking image to the total area of the shaking image exceeds a preset ratio, judging that an electronic screen code appears in the shaking image, and executing S3, wherein the light spot refers to an area with brightness higher than a preset brightness threshold value in the shaking image;
s3, under the condition that the code scanning illuminating lamp is not turned on, carrying out electronic screen code recognition on the information code to be recognized in the scene;
s4, when the ratio of the area of the light spot in the total area of the shaking image does not exceed the preset ratio, judging that a non-electronic screen code appears in the shaking image, and executing a step S5;
s5, under the condition that the code scanning illuminating lamp is turned on, non-electronic screen code recognition is conducted on the information codes to be recognized in the scene.
In a third aspect, there is provided a computer readable storage medium having stored therein at least one program that is executed by a processor to implement the code scanning method as provided in the first aspect.
The technical scheme provided by the application at least comprises the following technical effects:
according to the scheme, the interference caused by light reflection can be avoided when the electronic screen is not polished, the bar codes can be conveniently and rapidly identified when the commodity bar codes are polished, the efficient code scanning can be realized in a scene where the commodity bar codes and the two-dimension codes of the electronic screen are mixed, the light reflection or the excessive brightness of the electronic screen can be avoided, the effective light supplementing can be carried out on the commodity bar codes, the efficient double-code identification effect is realized, and the code scanning speed is greatly improved.
Drawings
FIG. 1 is a flow chart of a code scanning method according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of another code scanning method provided in accordance with an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a code scanning device according to an exemplary embodiment of the present application.
Detailed Description
To further illustrate the embodiments, the present application provides the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments and together with the description, serve to explain the principles of the embodiments. With reference to these matters, one of ordinary skill in the art would understand other possible embodiments and the advantages of the present application. The components in the figures are not drawn to scale and like reference numerals are generally used to designate like components. The term "at least one" means one or more, and the term "plurality" means two or more.
The present application will now be further described with reference to the drawings and detailed description.
The code scanning method provided by the embodiment of the application can be applied to any code scanning equipment to improve the code scanning speed and the code recognition efficiency. The code scanning device is, for example, a code scanning gun, a code scanning box or a code scanning module, and the code scanning device can be handheld, fixed or embedded (embedded in the whole machine), which is not limited in this application.
Fig. 1 is a flow chart of a code scanning method according to an exemplary embodiment of the present application. Referring to fig. 1, the code scanning method provided in the embodiment of the present application includes steps S1 to S5.
S1, responding to detection of scene change, and acquiring a shaking image in the scene, wherein the shaking image comprises an information code to be identified.
In the embodiment of the application, whether the code display device or the commodity waits for the scanned code is judged by detecting whether the ambient brightness in the scene is changed greatly. The step S1 specifically includes: and acquiring the shaking image in response to detecting that the variation of the ambient brightness in the scene exceeds a preset shaking threshold.
In one possible embodiment, the shake image includes a plurality of images acquired at successive times, and may be used to detect whether a moving object, which may be a coding device or merchandise, is present.
The preset shaking threshold value is used for judging whether the change of the environment brightness is caused by shielding of the code display equipment or the commodity.
Wherein, rock the image and mean: the image (also referred to as an image) acquired by the code display device or the commodity when the code display device or the commodity shakes in the image acquisition area of the code scanning device. It can be understood that the shaking image is collected after the scene is detected to change, so that the information code to be identified in the code display device or the commodity can be captured more accurately.
In one possible implementation, after the code scanning device is powered on, the step S1 is performed in the image sensing mode. Optionally, after the code scanning device is powered on, an indication is made, for example, by a prompt tone (for example, a "beep" sound), that the device has entered the working state of the image sensing mode. The image sensing mode may also be called an auto-sensing mode, in which the code scanning device is in a state of monitoring scene change, shoots an image after detecting scene change and performs information code reading, and reenters the state of monitoring scene change after successful reading output of effective information or unsuccessful reading overtime.
In this embodiment of the present application, the information code to be identified includes a bar code and a two-dimensional code, and by way of example, the bar code generally refers to a bar code printed on an outer package of a commodity, and the two-dimensional code refers to a two-dimensional code shown by a user through an electronic screen of a code display device.
Of course, in some embodiments, the electronic screen of the code display device may be a bar code, and at the heart of the application, how to distinguish the electronic screen code from the non-electronic screen code, where the electronic screen code is a two-dimensional code or a one-dimensional code, and the non-electronic screen code is a bar code, the embodiments of the application are exemplified, but not limited to this.
S2, when the ratio of the area of the light spot in the shaking image to the total area of the shaking image exceeds a preset ratio, judging that an electronic screen code appears in the shaking image, and executing S3.
Wherein the preset duty cycle is for example 40%. The flare refers to an area with brightness higher than a preset brightness threshold in the shaking image, the preset brightness threshold can be adjusted according to the ambient brightness, and the flare can be directly fixed and set to 60% of a default brightness value, so that the flare is not limited in the application.
The code scanning device judges whether a plane light spot (i.e., a highlight light spot) with a brightness value exceeding 60% of a default brightness value and an overall area exceeding 40% exists in the shaking image, if so, the current shaking image can be considered to be consistent with the brightness of the electronic screen, and the electronic screen code appears in the shaking image, i.e., the information code to be identified in the current shaking image is the electronic screen code.
In one possible embodiment, the shake image includes a plurality of images acquired at successive times. According to the principle, the plurality of images included in the shaking image are judged, and when two continuous images are judged to have the electronic screen code, the electronic screen code in the shaking image can be judged to appear, namely, the code display device exists in the current scene.
In this embodiment of the present application, an electronic screen code includes: two-dimensional codes or one-dimensional codes shown by an electronic screen, for example, mobile phone payment codes; the non-electronic screen code includes: the bar code shown by the non-electronic screen, for example, a bar code printed on the outer package of the commodity.
And S3, under the condition that the code scanning illuminating lamp is not started, carrying out electronic screen code recognition on the information code to be recognized in the scene.
In the embodiment of the application, after the electronic screen code appears in the shaking image, the code scanning device controls the code scanning illuminating lamp to flash for a preset time period, the code scanning illuminating lamp is turned off, and the electronic screen code recognition is carried out on the information code to be recognized in the scene. The preset duration is, for example, 0.1 seconds.
Through the process, the code scanning device indicates that the electronic screen code is read through the flashing lamp, and reminds the user equipment that the code recognition is started.
In one possible implementation manner, under the condition that the electronic screen code identification is successful, the code scanning device sends out code scanning prompt voice corresponding to the electronic screen code, and the electronic screen code identification flow is ended. The scan code prompt tone corresponding to the electronic screen code is, for example, "welcome payment with mobile phone". Further, different payment channels corresponding to the electronic screen codes can be embodied in the prompt tone.
In one possible implementation, the code scanning device reads the identification duration in case the electronic screen code identification is unsuccessful. The identification duration is the identification duration of this time, and can be calculated from the time of turning off the lighting lamp after flashing. If the duration of the code identification does not exceed the preset duration, continuing the code identification; if the duration of the identification code exceeds the preset duration, step S1 is executed. The preset duration is 2 seconds, in this example, if the duration of the identification code does not exceed 2 seconds, the identification is continued, and the content of the two-dimensional code is judged until the identification is successful within 2 seconds; if the identification duration exceeds 2 seconds, the operation state of the image sensing mode is re-entered (step S1).
And S4, when the ratio of the area of the light spot in the total area of the shaking image does not exceed the preset ratio, judging that a non-electronic screen code appears in the shaking image, and executing the step S5.
This step is described with reference to step S2, and is not described here in detail.
S5, under the condition that the code scanning illuminating lamp is turned on, non-electronic screen code recognition is conducted on the information code to be recognized in the scene.
In the embodiment of the application, after judging that the non-electronic screen code appears in the shaking image, the code scanning device turns on the code scanning illuminating lamp, and enters the commodity bar code identification flow, and the bar code content is judged. For example, the commodity barcode identification process may be a european commodity number (European Article Number, EAN) code, which is a commodity barcode specification established by the international association for coding articles.
In one possible implementation manner, under the condition that the non-electronic screen code identification is successful, the code scanning device turns off the code scanning illuminating lamp, sends out code scanning prompt voice corresponding to the non-electronic screen code, and ends the non-electronic screen code identification flow. The scan code prompt voice corresponding to the non-electronic screen code is, for example, "scan code successful".
In one possible implementation, the code scanning device reads the identification duration in case the non-electronic screen code identification is unsuccessful. The identification duration is the identification duration of this time, and can be calculated from the time of starting the lighting lamp. If the duration of the code identification does not exceed the preset duration, continuing the code identification; if the duration of the identification code exceeds the preset duration, step S1 is executed. Illustratively, the preset duration is 2 seconds, in this example, if the code identification duration does not exceed 2 seconds, continuing to identify and read, and judging the content of the bar code until the identification is successful within 2 seconds; if the identification duration exceeds 2 seconds, the operation state of the image sensing mode is re-entered (step S1).
In order to facilitate understanding of the technical solution provided in the foregoing embodiments, the present application provides a flow chart of another code scanning method according to an exemplary embodiment. Referring to fig. 2, the code scanning method includes the following steps a to f.
Step a, the code scanning device is in an image sensing mode after being powered on (refer to step S1).
And b, detecting whether a shaking image exists in the scene, if so, executing the step c, and if not, returning to the step a.
And c, judging the type of the information code to be identified according to the light spot area in the shaking image, if the light spot area ratio exceeds the preset ratio, executing the step d, and if the light spot area ratio does not exceed the preset ratio, executing the step e.
Step d, the lighting lamp is turned off after flashing for 0.1 second, and an electronic screen code identification process is entered; if the reading is successful, after a corresponding code scanning prompt tone (for example, prompting a payment mode corresponding to a mobile phone payment code) is sent out, the step g is entered; if the reading is unsuccessful, the step f is entered.
Step e, turning on the illuminating lamp, and entering a non-electronic screen code (commodity bar code) identification process; if the reading is successful, after a corresponding code scanning prompt tone (for example, the code scanning is successful) is sent out, the step g is entered; if the reading is unsuccessful, the step f is entered.
And f, judging whether the duration of the identification code exceeds the preset duration, if not, continuing to identify and read, and if so, returning to the step a.
Step h, judging whether the shaking image stops (the shielding object leaves) according to the non-electronic screen code, and returning to the step a if the shaking image leaves; and d, aiming at the electronic screen code, judging whether the light spot characteristics disappear, and returning to the step a if the light spot characteristics disappear.
According to the scheme, the interference caused by light reflection can be avoided when the electronic screen is not polished, the bar codes can be conveniently and rapidly identified when the commodity bar codes are polished, the efficient code scanning can be realized in a scene where the commodity bar codes and the two-dimension codes of the electronic screen are mixed, the light reflection or the excessive brightness of the electronic screen can be avoided, the effective light supplementing can be carried out on the commodity bar codes, the efficient double-code identification effect is realized, and the code scanning speed is greatly improved.
Further, by judging whether the electronic screen code or the commodity bar code is the electronic screen code or the commodity bar code, the follow-up reading process is accurately controlled, the code recognition efficiency can be greatly improved, and the code scanning speed can be improved by 45% compared with the code scanning equipment in the related technology.
The application also provides code scanning equipment for realizing the code scanning method. Fig. 3 is a schematic diagram of a code scanning device according to an exemplary embodiment of the present application. Referring to fig. 3, the code scanning apparatus includes: a code scanning illuminating lamp 31 and a code scanning module 32. The code identifying module 32 is configured to perform:
s1, responding to detection of scene change, and acquiring a shaking image in the scene, wherein the shaking image comprises an information code to be identified;
s2, when the ratio of the area of the light spot in the shaking image to the total area of the shaking image exceeds a preset ratio, judging that an electronic screen code appears in the shaking image, and executing S3, wherein the light spot refers to an area with brightness higher than a preset brightness threshold value in the shaking image;
s3, under the condition that the code scanning illuminating lamp is not turned on, carrying out electronic screen code recognition on the information code to be recognized in the scene;
s4, when the ratio of the area of the light spot in the total area of the shaking image does not exceed the preset ratio, judging that a non-electronic screen code appears in the shaking image, and executing a step S5;
s5, under the condition that the code scanning illuminating lamp is turned on, non-electronic screen code recognition is conducted on the information codes to be recognized in the scene.
It should be noted that, when implementing the corresponding steps, the code scanning device provided in the foregoing embodiment is only illustrated by dividing the functional modules, in practical application, the foregoing functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the code scanning device provided in the above embodiment and the code scanning method described above belong to the same concept, and detailed implementation processes of the code scanning device are described in method embodiments, which are not repeated here.
Illustratively, the code recognition module is a computer unit with decoding capability for bar codes and two-dimensional codes. Computer units may include, but are not limited to, processors, memory. It will be appreciated by those skilled in the art that the constituent structures of the computer unit described above are merely examples of the computer unit and are not limiting, and may include more or fewer components than those described above, or may combine certain components, or different components. For example, the computer unit may further include an input/output device, a network access device, a bus, etc., which is not limited in this embodiment of the present application.
Further, as an implementation, the processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the computer unit, connecting various parts of the entire computer unit using various interfaces and lines.
The memory may be used to store the computer program and/or modules, and the processor may implement the various functions of the computer unit by running or executing the computer program and/or modules stored in the memory, and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the cellular phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
The present application also provides a computer readable storage medium storing a computer program, which when executed by a processor, implements the steps of the code scanning method provided by the embodiments of the present application.
The modules/units integrated with the computer unit may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present application implements all or part of the procedures in the code scanning method provided in the foregoing embodiments, or may be implemented by instructing relevant hardware through a computer program, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of each of the foregoing method embodiments when executed by a processor. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction.
While this application has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the application as defined by the appended claims.

Claims (10)

1. A code scanning method, the method comprising:
s1, responding to detection of scene change, and acquiring a shaking image in the scene, wherein the shaking image comprises an information code to be identified;
s2, when the ratio of the area of the light spot in the shaking image to the total area of the shaking image exceeds a preset ratio, judging that an electronic screen code appears in the shaking image, and executing S3, wherein the light spot refers to an area with brightness higher than a preset brightness threshold value in the shaking image;
s3, under the condition that a code scanning illuminating lamp is not started, carrying out electronic screen code recognition on the information code to be recognized in the scene;
s4, when the ratio of the area of the light spot in the total area of the shaking image does not exceed the preset ratio, judging that a non-electronic screen code appears in the shaking image, and executing a step S5;
s5, under the condition that the code scanning illuminating lamp is turned on, non-electronic screen code recognition is conducted on the information codes to be recognized in the scene.
2. The code scanning method according to claim 1, wherein said S3 comprises:
and after the code scanning illuminating lamp is controlled to flash for a preset time period, the code scanning illuminating lamp is turned off, and electronic screen code recognition is carried out on the information code to be recognized in the scene.
3. The code scanning method according to claim 1, characterized in that the method further comprises:
reading the duration of the identification code under the condition that the screen code identification is unsuccessful in the step S3 or under the condition that the non-screen code identification is unsuccessful in the step S5;
if the duration of the identification code does not exceed the preset duration, continuing the identification code;
and if the identification duration exceeds the preset duration, executing step S1.
4. The code scanning method according to claim 1, characterized in that the method further comprises:
under the condition that the electronic screen code identification is successful in the step S3, sending out a code scanning prompt voice corresponding to the electronic screen code, and ending the electronic screen code identification flow;
and under the condition that the non-electronic screen code identification is successful in the step S5, the code scanning illuminating lamp is turned off, code scanning prompt voice corresponding to the non-electronic screen code is sent out, and the non-electronic screen code identification flow is ended.
5. The code scanning method according to claim 1, wherein said S1 comprises:
and acquiring the shaking image in response to detecting that the variation of the ambient brightness in the scene exceeds a preset shaking threshold.
6. The code scanning method according to claim 1, wherein the electronic screen code includes: two-dimensional codes or one-dimensional codes shown by an electronic screen; the non-electronic screen code includes: bar codes shown by non-electronic screens.
7. The code scanning device is characterized by comprising a code scanning illuminating lamp and a code identifying module, wherein the code identifying module is used for executing the following steps:
s1, responding to detection of scene change, and acquiring a shaking image in the scene, wherein the shaking image comprises an information code to be identified;
s2, when the ratio of the area of the light spot in the shaking image to the total area of the shaking image exceeds a preset ratio, judging that an electronic screen code appears in the shaking image, and executing S3, wherein the light spot refers to an area with brightness higher than a preset brightness threshold value in the shaking image;
s3, under the condition that the code scanning illuminating lamp is not turned on, carrying out electronic screen code recognition on the information code to be recognized in the scene;
s4, when the ratio of the area of the light spot in the total area of the shaking image does not exceed the preset ratio, judging that a non-electronic screen code appears in the shaking image, and executing a step S5;
s5, under the condition that the code scanning illuminating lamp is turned on, non-electronic screen code recognition is conducted on the information codes to be recognized in the scene.
8. The code scanning device of claim 7, wherein the code recognition module is configured to:
and after the code scanning illuminating lamp is controlled to flash for a preset time period, the code scanning illuminating lamp is turned off, and electronic screen code recognition is carried out on the information code to be recognized in the scene.
9. The code scanning device of claim 7, wherein the code recognition module is further configured to:
under the condition that the screen code identification is successful in the step S3, sending out a code scanning prompt voice corresponding to the electronic screen code, and ending the electronic screen code identification flow;
and under the condition that the non-screen code identification is successful in the step S5, the code scanning illuminating lamp is turned off, code scanning prompt voice corresponding to the non-electronic screen code is sent out, and the non-electronic screen code identification flow is ended.
10. A computer readable storage medium, wherein at least one program is stored in the storage medium, and the at least one program is executed by a processor to implement the code scanning method of any one of claims 1 to 6.
CN202311266552.2A 2023-09-28 2023-09-28 Code scanning method, device and storage medium Pending CN117391102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311266552.2A CN117391102A (en) 2023-09-28 2023-09-28 Code scanning method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311266552.2A CN117391102A (en) 2023-09-28 2023-09-28 Code scanning method, device and storage medium

Publications (1)

Publication Number Publication Date
CN117391102A true CN117391102A (en) 2024-01-12

Family

ID=89436503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311266552.2A Pending CN117391102A (en) 2023-09-28 2023-09-28 Code scanning method, device and storage medium

Country Status (1)

Country Link
CN (1) CN117391102A (en)

Similar Documents

Publication Publication Date Title
US10311274B2 (en) Reader for optical indicia presented under two or more imaging conditions within a single frame time
US7137555B2 (en) Multi-format bar code reader
EP2460116B1 (en) Method of setting amount of exposure for photodetector array in barcode scanner
US8857719B2 (en) Decoding barcodes displayed on cell phone
US8083147B2 (en) Arrangement for and method of controlling image exposure in an imaging reader
CA3152572C (en) Systems and methods for user choice of barcode scanning range
US9734375B2 (en) Method of controlling exposure on barcode imaging scanner with rolling shutter sensor
US9152834B2 (en) Image capture based on scanning resolution setting compared to determined scanning resolution relative to target distance in barcode reading
CN117391102A (en) Code scanning method, device and storage medium
JP2005276119A (en) Code symbol reading device and program
EP2691913B1 (en) User-customizable data capture terminal and method of imaging and processing target data
US20190286858A1 (en) Barcode Readers Having Multiple Image Sensors and Methods Associated Therewith
US9798914B1 (en) System for and method of efficiently processing targets to be electro-optically read by image capture
US20130098997A1 (en) Apparatus for and method of reading targets by image capture by processing captured target images in a batch or free-running mode of operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination