CN114205482B - Scanning device, scanning control method, electronic apparatus, and storage medium - Google Patents

Scanning device, scanning control method, electronic apparatus, and storage medium Download PDF

Info

Publication number
CN114205482B
CN114205482B CN202111290377.1A CN202111290377A CN114205482B CN 114205482 B CN114205482 B CN 114205482B CN 202111290377 A CN202111290377 A CN 202111290377A CN 114205482 B CN114205482 B CN 114205482B
Authority
CN
China
Prior art keywords
image
light
value
scanning
brightness
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.)
Active
Application number
CN202111290377.1A
Other languages
Chinese (zh)
Other versions
CN114205482A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Shanghai Xiaodu Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Shanghai Xiaodu Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd, Shanghai Xiaodu Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111290377.1A priority Critical patent/CN114205482B/en
Publication of CN114205482A publication Critical patent/CN114205482A/en
Application granted granted Critical
Publication of CN114205482B publication Critical patent/CN114205482B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00519Constructional details not otherwise provided for, e.g. housings, covers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/024Details of scanning heads ; Means for illuminating the original
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/04Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa

Abstract

The disclosure provides a scanning device, a scanning control method, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the technical field of computer vision and natural language processing. The specific implementation scheme is as follows: the light supplementing device, the camera device and the controller are arranged in the shell, the controller is respectively electrically connected with the light supplementing device and the camera device, the light supplementing device is used for supplementing light when the light supplementing device is started, the camera device is used for capturing a scanning image based on the light supplementing device, the controller is used for detecting whether the scanning image has light spots or not, and when the scanning image has the light spots, the light supplementing device is subjected to first control operation, whether the light spots exist in the scanning image or not can be effectively identified, when the light spots exist in the scanning image, corresponding control operation can be adopted, so that the influence of the light spots in the scanning image on scanning identification is avoided, the scanning identification success rate of the scanning device can be effectively assisted and promoted, and the scanning identification effect of the scanning device is improved.

Description

Scanning device, scanning control method, electronic apparatus, and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and in particular, to the field of computer vision and natural language processing technologies, and in particular, to a scanning device, a scanning control method, an electronic device, and a storage medium.
Background
Artificial intelligence is the discipline of studying the process of making a computer mimic certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning technology, a deep learning technology, a big data processing technology, a knowledge graph technology and the like.
In the related art, an included angle between a scanning device and a surface of a scanned medium (the scanned medium may be, for example, paper or a display screen) is generally limited, so as to avoid carrying image spots in a scanned image captured by an image capturing device.
Disclosure of Invention
The present disclosure provides a scanning apparatus, a scanning control method, an electronic device, a storage medium, and a computer program product.
According to a first aspect of the present disclosure, there is provided a scanning apparatus comprising: a housing; a light supplementing device, a camera device and a controller are arranged in the shell, and the controller is respectively and electrically connected with the light supplementing device and the camera device; the light supplementing device is used for supplementing light when the light supplementing device is started; the image pickup device is used for capturing and obtaining a scanning image based on the light supplement; and the controller is used for detecting whether the scanned image has light spots or not, and performing a first control operation on the light supplementing device when the scanned image has the light spots.
According to a second aspect of the present disclosure, there is provided a scan control method including: when the light supplementing device is started, controlling the light supplementing device to supplement light; capturing a scanning image, wherein the scanning image is obtained based on light supplementing capturing by a light supplementing device; detecting whether the scanned image has light spots or not; when the scanned image has a light spot, a first control operation is performed on the light supplementing device.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a scan control method of an embodiment of the second aspect of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the scan control method of the embodiment of the second aspect of the present disclosure.
According to a fifth aspect of the present disclosure, a computer program product is presented, comprising a computer program, which when executed by a processor implements a scan control method of an embodiment of the second aspect of the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
fig. 2 is a schematic diagram of a light reflection detection algorithm judgment flow according to an embodiment of the disclosure;
FIG. 3 is a flowchart of a brightness compensation value calculation algorithm according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a scan identification flow in an embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 7 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 8 is a schematic diagram according to a fifth embodiment of the present disclosure;
fig. 9 shows a schematic block diagram of an example electronic device that may be used to implement the scan control method of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure.
It should be noted that, the execution body of the present embodiment is a scanning device, and the device may be implemented by software and/or hardware, and the scanning device may be, for example, a scanning pen or a stylus pen, which is not limited.
The embodiment of the disclosure relates to the technical field of artificial intelligence, in particular to the technical field of computer vision and natural language processing.
Wherein, artificial intelligence (Artificial Intelligence), english is abbreviated AI. It is a new technical science for researching, developing theory, method, technology and application system for simulating, extending and expanding human intelligence.
The computer vision is to replace human eyes with a camera and a computer to identify, track and measure targets and perform graphic processing further, so that the computer is processed into images which are more suitable for human eyes to observe or transmit to an instrument to detect.
Natural language processing (Natural Language Processing, NLP), i.e. computer science, artificial intelligence, linguistics focus on the field of interactions between computer and human (natural) language. The method takes language as an object, utilizes computer technology to analyze, understand and process natural language, namely takes a computer as a language research tool, carries out quantitative research processing on language information under the support of the computer, and provides language description which can be used together between people and the computer.
As shown in fig. 1, the scanning device 10 includes:
the light supplementing device 102, the image capturing device 103 and the controller 104 are arranged in the shell 101, the controller 104 is respectively and electrically connected with the light supplementing device 102 and the image capturing device 103, the light supplementing device 102 is used for supplementing light when being started, the image capturing device 103 is used for capturing and obtaining a scanning image based on the light supplemented by the light supplementing device 102, and the controller 104 is used for detecting whether the scanning image has light spots or not and performing a first control operation on the light supplementing device 102 when the scanning image has the light spots.
Wherein, the "light spot" in the embodiment of the present disclosure refers to a light spot in an image.
Wherein the casing 101 is a housing part for wrapping and protecting the light supplementing device 102, the image capturing device 103 and the controller 104 arranged therein.
The image capturing device 103 is configured to scan a scanned medium (the scanned medium may be, for example, paper or a display screen) to obtain a scanned image, and the light compensating device 102 may be turned on at the beginning of scanning of the image capturing device 103 to compensate light of the image capturing device 103, where the light compensating device 102 may be a light compensating lamp, that is, the scanned image captured by the image capturing device 103 is obtained based on the light compensating captured by the light compensating device 102.
In the embodiment of the disclosure, the controller 104 may be configured to detect whether the scanned image has a flare, and control the brightness of the light compensating light of the light compensating device 102.
In the embodiment of the disclosure, the controller 104 is configured to be electrically connected to the light compensating device 102 and the image capturing device 103, that is, the controller 104 is connected to the light compensating device 102 and the image capturing device 103 through a physical circuit capable of transmitting an electrical signal.
The first control operation may be a control operation performed on the light compensating device 102 after detecting that the scanned image has the light spot, and the first control operation may be an off operation performed on the light compensating device 102, or may be another operation capable of avoiding the light compensating device 102 from performing light compensation, for example, the first control operation may also be a sleep operation performed on the light compensating device 102, which is not limited.
In the embodiment of the disclosure, when the scanning of the scanning device 10 starts, the light compensating device 102 is turned on to perform light compensation, then the image capturing device 103 is used to scan and capture the surface of the scanned medium based on the light compensated by the light compensating device 102 so as to capture a scanned image, after the scanned image captured by the image capturing device 103 is obtained, the scanned image is transmitted into the controller 104 to be detected, and the controller 104 can be used to detect the scanned image so as to determine whether the scanned image has a light spot.
In the embodiment of the disclosure, when the light spot is detected on the scanned image, the controller 104 may be used to analyze the brightness value of the scanned image to obtain the brightness distribution value of the scanned image, determine whether the scanned image has the light spot according to the peak value of the brightness distribution value, and after the light spot is detected in the scanned image, the controller 104 may be used to perform a first control operation on the light compensating device 102, where the first control operation may be to perform a closing operation on the light compensating device 102.
The scanning device in this embodiment includes: the light supplementing device, the camera device and the controller are arranged in the shell, the controller is respectively electrically connected with the light supplementing device and the camera device, the light supplementing device is used for supplementing light when the light supplementing device is started, the camera device is used for capturing a scanning image based on the light supplementing device, the controller is used for detecting whether the scanning image has light spots or not, and when the scanning image has the light spots, the light supplementing device is subjected to first control operation, whether the light spots exist in the scanning image or not can be effectively identified, when the light spots exist in the scanning image, corresponding control operation can be adopted, so that the influence of the light spots in the scanning image on scanning identification is avoided, the scanning identification success rate of the scanning device can be effectively assisted and promoted, and the scanning identification effect of the scanning device is improved.
Optionally, in some embodiments, when the scanning workflow of the scanning device 10 begins, the image capturing device 103 is further configured to capture a first reference image based on ambient light, and the controller 104 is further configured to detect the first reference image to obtain a first brightness value, and turn on the light compensating device 102 when the first brightness value is less than or equal to a first brightness threshold, so that when the scanning device scans, it can determine whether an underexposure condition caused by insufficient ambient light exists based on the first reference image, and trigger to turn on the light compensating device to perform light compensation when the underexposure condition exists, so as to improve the flexibility of control of the light compensating device, adapt to the personalized requirement of an actual scan recognition scene, effectively avoid the decrease of the scan recognition rate caused by excessively dark ambient light, and improve the scan recognition effect.
The first reference image is a frame of image of the scanned medium captured by the image capturing device 103 based on ambient light before the scanning device 10 starts the scanning workflow and the light supplementing device 102 is turned on to supplement light, where the ambient light refers to a scene light of the scanned medium.
The first luminance threshold may be a luminance threshold set in advance for the first luminance value, which is used to determine that the first reference image has an underexposure condition, that is, the first luminance threshold may be used to determine whether the first reference image captured by the image capturing device 103 has an underexposure caused by insufficient light.
In the embodiment of the disclosure, before the light supplementing device 102 is turned on to supplement light, the image capturing device 103 may be controlled to capture an image of a scanned medium based on ambient light of a current scene, and take a captured frame of image as a first reference image, and then the first reference image may be transferred into the controller 104 to perform brightness analysis processing on the first reference image, so as to obtain a brightness value of the first reference image and be used as the first brightness value.
In embodiments of the present disclosure, when the controller 104 is utilized to detect the first reference image to obtain the first luminance value, the image signal processor (Image Signal Processor, ISP) may be utilized to process the first reference image to obtain the first luminance value of the first reference image.
After the controller 104 detects the first reference image to obtain the first luminance value, the detection of the first luminance value may be triggered, if the first luminance value is less than or equal to the first luminance threshold, it indicates that the first reference image is under-exposed, and when the first luminance value is less than or equal to the first luminance threshold, the light supplementing device 102 is turned on to supplement light.
Optionally, in some embodiments, the controller 104 is further configured to identify an underexposed area from the first reference image, determine a first image brightness value of the underexposed area, determine a second image brightness value of other areas in the first reference image, and use a brightness average value of the first image brightness value and the second image brightness value as the first brightness value, so that brightness analysis processing can be performed on the first reference image by using the controller to determine the underexposed area in the first reference image, and then perform light supplementing processing on a surface of a scanned medium by using a light supplementing device, so that a scanned image acquired again after the light supplementing processing can meet a brightness requirement of scanning identification, so as to ensure light uniformity of a scanned image captured by the image capturing device, and assist in improving a scanning identification effect on the scanned image.
In the embodiment of the disclosure, when an underexposed area is identified in a first reference image by using the controller 104, the first reference image captured by the image capturing device 103 may be decomposed to obtain a plurality of image blocks after decomposition (for example, 81 image blocks, the number of the image blocks may be adaptively adjusted according to the hardware configuration requirement of the scanning device, which is not limited, and the image signal processor is used to obtain the brightness values corresponding to each image block, analyze the brightness values of each image block, determine the area where a part of the image blocks whose brightness values are smaller than the set value is located as the underexposed area, and use the brightness value of the underexposed area as the first image brightness value, and use the brightness values of other areas in the first reference image as the second image brightness value.
After determining the first image brightness value of the underexposed area and the second image brightness values of other areas in the first reference image, average value processing can be performed on the first image brightness value and the second image brightness value, the average value of the first image brightness value and the second image brightness value is used as the first brightness value, then the first brightness value can be judged and detected according to the first brightness threshold, and when the first brightness value is smaller than or equal to the first brightness threshold, the light supplementing device 102 is started to supplement light.
Optionally, in some embodiments, the controller 104 is further configured to determine a plurality of image areas corresponding to the scanned image, and a plurality of brightness distribution values corresponding to the plurality of image areas respectively, if a peak brightness distribution value exists among the plurality of brightness distribution values, determine that the scanned image has a light spot, and if no peak brightness distribution value exists among the plurality of brightness distribution values, determine that the scanned image does not have a light spot, thereby effectively determining the overall brightness distribution value of the scanned image, and determine the peak brightness distribution value in combination with the overall brightness distribution value, so as to determine whether the scanned image has a light spot, so that the method for performing light spot detection on the scanned image can be effectively adapted to the characteristics of the light spot of the image, effectively improve the detection efficiency of performing light spot detection on the scanned image, effectively ensure the accuracy of light spot detection, thereby avoiding the light spot from blocking the identification of the scanned image, and greatly assist in improving the scanning identification success rate of the scanning device.
The peak brightness distribution value refers to a peak value of brightness values in the brightness distribution values, and the peak brightness distribution value can be used for judging whether light spots exist in the scanned image or not and positioning the positions of the light spots.
That is, in the embodiment of the disclosure, after the controller 104 identifies the underexposed area from the first reference image and the light compensating device 102 is turned on to compensate light, the controller 104 may also be used to detect whether the scanned image has a light spot.
In the embodiment of the disclosure, when the controller 104 is used to detect whether the scanned image has a light spot, the scanned image may be decomposed to obtain a plurality of image blocks corresponding to the scanned image, the image signal processor is used to extract the brightness values of the image blocks, respectively, the plurality of brightness values corresponding to the image blocks may be a plurality of image areas corresponding to the scanned image and brightness distribution values corresponding to the image areas, and then the brightness distribution values of the image areas may be analyzed to detect whether the brightness distribution values have a peak brightness distribution value, and if the brightness distribution values have a peak brightness distribution value, the scanned image is determined to have the light spot, and if the brightness distribution values do not have the peak brightness distribution value, the scanned image is determined to have no light spot.
In the embodiment of the disclosure, when the luminance distribution values of the plurality of image areas are analyzed and processed, the analysis and processing of the luminance distribution values can be implemented by using a reflective light spot detection algorithm, for example, as shown in fig. 2, fig. 2 is a schematic diagram of a determination flow of the reflective detection algorithm provided in the embodiment of the disclosure, the luminance distribution values of the plurality of image areas may be stored in the form of a luminance distribution value matrix, a two-dimensional array of the stored luminance distribution values is input into the reflective detection algorithm, if an output result of the algorithm can be obtained, it is indicated that a scanned image has a light spot, and if an output result of the algorithm is not obtained, it is indicated that the scanned image does not have a peak luminance distribution value.
Optionally, in some embodiments, the controller 104 is further configured to turn off the light compensating device 102 when the scanned image has a light spot, so that the light spot can be eliminated by turning off the light compensating device, and shielding of an area where a part of characters in the scanned image are located is avoided, so that an influence of the light spot generated by the light compensating device on the scanned image on a scanning recognition result can be avoided, the comprehensiveness of recognition scanning of the scanned image is ensured, and the scanning recognition effect is assisted to be improved.
In the embodiment of the present disclosure, after detecting whether there is a light spot in the scanned image according to the peak brightness distribution value, if it is determined that the scanned image has a light spot if there is a peak brightness distribution value among the plurality of brightness distribution values, the controller 104 may be used to control the light filling device 102 to be turned off.
Optionally, in some embodiments, the controller 104 is further configured to control the image capturing device 103 to capture a first target image based on ambient light after the light filling device 102 is turned off, and perform scan identification according to the first target image, so that after detecting a light spot in a scanned image, the light filling device is turned off to eliminate the light spot, and then a frame of image is captured again based on ambient light, and the captured frame of image can be referred to as the first target image, so as to perform scan identification by using the first target image, ensure that no image light spot can be carried in the first target image, and when performing scan identification based on the first target image, ensure that the scanning device performs continuous execution of a scanning task, avoid interruption of the scanning task, and effectively improve the success rate of scan identification of the scanning device.
In the embodiment of the present disclosure, after determining that the scanned image has a light spot and turning off the light compensating device 102, the controller 104 may be used to control the image capturing device 103 to capture an image of the scanned medium based on ambient light as a first target image, and perform scan recognition according to the first target image.
In the embodiment of the disclosure, when the scanning recognition is performed according to the first target image, the text content can be extracted from the first target image by utilizing an optical character recognition (Optical Character Recognition, OCR) technology.
Optionally, in some embodiments, the controller 104 is further configured to detect the scanned image to obtain a second brightness value when the scanned image does not have a light spot, and perform a second control operation on the light compensating device 102 when the second brightness value is greater than or equal to a second brightness threshold, where the first control operation and the second control operation are different, so that after detecting that the scanned image does not have a light spot, the scanned image may be further detected according to the second brightness value, whether there is overexposure in the scanned image is detected, and the light compensating device is adaptively adjusted by the second control operation, so as to realize adjustment of brightness of the scanned image, avoid poor recognition effect caused by overhigh brightness value of the scanned image, and assist in improving the scanning effect of the scanned device.
Wherein the brightness detection is performed on the scanned image, resulting in a value describing the brightness condition of the scanned image, which may be referred to as a second brightness value.
The second brightness threshold may be an image brightness threshold preset for the second brightness value, which is used for determining that the scanned image has an overexposure condition, and the second brightness threshold may be used for detecting whether the scanned image has an overexposure condition, which is not limited.
The second control operation is different from the first control operation, and may be some control operations performed on the light compensating device 102 to reduce the effect of overexposure when the second brightness value is greater than or equal to the second brightness threshold, for example, the second control operation may be to adjust the light compensating brightness of the light compensating device 102, which is not limited.
After determining that the scanned image does not have the light spot, the controller 104 may be used to detect the scanned image, the image signal processor may be used to extract a second brightness value of the scanned image, then the second brightness value of the scanned image may be checked according to a second brightness threshold, if the second brightness value is greater than or equal to the second brightness threshold, it indicates that the scanned image has an overexposure condition, and when the second brightness value is greater than or equal to the second brightness threshold, the light supplementing device 102 is subjected to a second control operation.
Optionally, in some embodiments, the controller 104 is further configured to identify an overexposed area from the scanned image, determine a third image brightness value of the overexposed area, determine a fourth image brightness value of other areas in the scanned image, and use a brightness average value of the third image brightness value and the fourth image brightness value as the second brightness value, thereby effectively identifying the overexposed area in the scanned image, and determining the second brightness value of the scanned image, so that the light supplementing brightness of the light supplementing device can be adjusted according to the second brightness value, avoiding influencing the identification effect of the scanned image due to overexposure, and effectively assisting in improving the scanning identification effect of the scanned device.
The brightness detection is performed on the scanned image to obtain a value describing the brightness condition of the overexposed area in the scanned image, which may be referred to as a third image brightness value, and a value describing the brightness condition of other areas except the overexposed area in the scanned image may be referred to as a fourth image brightness value, where the average value of the third image brightness value and the fourth image brightness value may be used as a second brightness value describing the brightness condition of the scanned image.
In the embodiment of the disclosure, when the controller 104 is used to perform overexposure recognition on the scanned image, the scanned image may be decomposed to obtain a plurality of image blocks corresponding to the scanned image, the image signal processor is used to extract the brightness values of the plurality of image blocks, determine the area where the partial image block with the brightness value greater than the set value is located as an overexposure area, and use the brightness value of the corresponding image block as the third image brightness value of the overexposure area, and use the brightness value of other image blocks in the scanned image as the fourth image brightness value of other areas in the scanned image.
In the embodiment of the disclosure, after determining the third image brightness value of the over-exposure area and the fourth image brightness value of the other area in the scanned image, the third image brightness value and the fourth image brightness value may be subjected to an average value taking process, and a brightness average value of the third image brightness value and the fourth image brightness value is taken as the second brightness value.
Optionally, in some embodiments, the controller 104 is further configured to determine an initial luminance value corresponding to the scanned image when the second luminance value is greater than or equal to the second luminance threshold, determine a luminance compensation value for the light compensating device 102 according to the initial luminance value in combination with a preset rule, and adjust a current light compensating luminance of the light compensating device 102 according to the luminance compensation value to obtain a target light compensating luminance, so as to control the light compensating device 102 to perform light compensating based on the target light compensating luminance, thereby determining the light compensating luminance value for the light compensating device, realizing self-adaptive adjustment of the light compensating luminance of the light compensating device in combination with the luminance condition of the scanned image, so that the image capturing device can capture the scanned image with better image quality more quickly, improving the scanning recognition efficiency, assisting in improving the scanning recognition effect on the scanned image, avoiding the influence of overexposure on the scanning recognition success rate of the scanned image by the scanning device, and improving the scanning recognition effect of the scanning device to a greater extent.
The initial brightness value may be used to describe brightness of the scanned image captured by the image capturing device 103 when the brightness of the light compensating device 102 is not adjusted.
The brightness compensation value refers to the amount of change of the brightness value that needs to be adjusted when the brightness of the light compensating device 102 is adjusted, and the brightness value obtained after the current brightness of the light compensating device 102 is adjusted according to the brightness compensation value is the target brightness.
The preset rule may be a calculation rule for calculating a brightness compensation value setting of the light compensating device 102, and the preset rule may be a compensation value calculation algorithm.
After the second brightness value of the scanned image is determined, the second brightness value of the scanned image may be triggered to be checked according to the second brightness threshold, and when the second brightness value is greater than or equal to the second brightness threshold, an initial brightness value corresponding to the scanned image is determined.
In the embodiment of the disclosure, when determining the initial brightness value corresponding to the scanned image, the image signal processor may be used to extract the initial brightness value corresponding to the scanned image, and determine the brightness compensation value for the light compensating device 102 according to the initial brightness value in combination with a preset rule, and may determine the brightness compensation value for the light compensating device 102 by using a brightness compensation value calculation algorithm.
For example, as shown in fig. 3, fig. 3 is a schematic flow chart of a brightness compensation value calculation algorithm according to an embodiment of the present disclosure, a target image brightness value of a scanned image may be preset, where the target image brightness value is a brightness value of a scanned image under an ideal condition, and a ratio of a difference value between an initial brightness value of another scanned image and the target image brightness value of the algorithm is equal to a ratio of the brightness compensation value and a default brightness compensation value of the light compensating device 102, so that the brightness compensation value for the light compensating device 102 may be calculated.
After the brightness compensation value for the light compensating device 102 is determined according to the initial brightness value and the preset rule, the current light compensating brightness of the light compensating device 102 may be adjusted according to the brightness compensation value to obtain the target light compensating brightness, and then the light compensating device 102 may be controlled to perform light compensating based on the target light compensating brightness.
Optionally, in some embodiments, the controller 104 is further configured to determine the labeling brightness value, determine the compensation coefficient according to the labeling brightness value and the initial brightness value, and process the initial brightness value according to the compensation coefficient to obtain the brightness compensation value, where the compensation coefficient may be obtained by calibrating the target image brightness value of the image with standard quality in advance, so that accuracy of compensation processing can be effectively improved, efficiency of compensation processing is ensured, the compensation coefficient can be timely obtained, time delay brought into scan identification is avoided, and capture of a scanned image by the scan device can be assisted by using a suitable light-compensating brightness, so that scan identification effect of the scan device can be effectively assisted.
The labeling brightness value can be set according to an ideal brightness value of the scanned image, and the ideal brightness value can ensure the brightness effect and the image quality of the scanned image when the scanned image is scanned and identified, so that the better scanning and identifying effect is ensured to be obtained.
The compensation coefficient may be calibrated by combining a target image brightness value of the standard quality image in advance, and is used for processing the initial brightness value to obtain a brightness compensation value.
In the embodiment of the disclosure, when determining the brightness compensation value for the light compensating device 102, the compensation coefficient may be determined according to the labeling brightness value and the initial brightness value, the compensation coefficient may be determined by using the brightness compensation value algorithm, then the initial brightness value is processed according to the compensation coefficient to obtain the brightness compensation value, and then the brightness compensating device 102 may be adjusted according to the brightness value to achieve a better scan recognition effect.
Optionally, in some embodiments, the controller 104 is further configured to, after controlling the light compensating device 102 to perform light compensation based on the target light compensating brightness, control the image capturing device 103 to capture a second target image based on the target light compensating brightness, and perform scan identification according to the second target image, so that overexposure in the scanned image can be eliminated by adjusting the light compensating brightness of the light compensating device, a decrease in scan identification rate caused by loss of image details of scanning of the scanned image due to overexposure can be avoided, and a scan identification effect of the scanning device is effectively improved.
In the embodiment of the disclosure, after controlling the light filling device 102 to perform light filling based on the target light filling level, the image capturing device 103 may be controlled to capture a frame image of the scanned medium as the second target image based on the target light filling level, and perform scan recognition according to the second target image.
In the embodiment of the disclosure, when the scanning recognition is performed according to the second target image, the text content contained in the second target image may be extracted by using an optical character recognition technology.
Optionally, in some embodiments, the controller 104 is further configured to directly perform scan identification according to the scan image when the scan image does not have a light spot and the second brightness value is smaller than the second brightness threshold, so that scan identification can be directly performed on the scan image without a light spot and overexposure, continuity of scan identification is ensured, and the self-adaptive adjustment control light supplementing effect of the light supplementing device is achieved, meanwhile, scan identification experience of a user can be effectively improved, and the scan identification effect is assisted to be improved.
In the embodiment of the disclosure, in the working flow of the scanning device 10, the spot detection may be performed on the scanned image first, and then the second brightness is checked according to the second brightness threshold, so as to detect whether the scanned image has overexposure, and if the scanned image does not have the spot, and if the second brightness value is smaller than the second brightness threshold, the scanning identification is directly performed according to the scanned image.
For example, as shown in fig. 4, fig. 4 is a schematic diagram of a scanning identification flow in the embodiment of the disclosure, when the scanning identification work flow of the scanning device 10 is just started, the light compensating device 102 may be turned on, the image capturing device 103 is controlled to capture a scanned image for spot detection, if a spot exists in the scanned image, the light compensating device 102 is turned off, the image capturing device 103 is controlled to capture a first target image based on ambient light for continuous scanning identification, if no spot exists in the scanned image, the overexposure detection of the scanned image is performed, a brightness compensation value for the light compensating device 102 is calculated, the light compensating brightness of the light compensating device 102 is adjusted according to the brightness compensation value of the light compensating device 102, the light compensating brightness of the light compensating device 102 is adjusted to a target light compensating brightness, the light compensating device 102 is controlled to perform light compensating based on the target light compensating brightness, then the image capturing device 103 is controlled to capture a second target image based on the target light compensating brightness, and the scanning identification is performed according to the second target image.
Fig. 5 is a schematic diagram according to a second embodiment of the present disclosure.
As shown in fig. 5, the scan control method includes:
it should be noted that, the main execution body of the scan control method in this embodiment may be the scan device in the foregoing embodiment, and the device may be implemented by software and/or hardware, and the device may specifically be, for example, a scan pen or a stylus pen, which is not limited thereto.
S501: when the light supplementing device is started, the light supplementing device is controlled to supplement light.
S502: and capturing a scanning image, wherein the scanning image is obtained based on the light supplementing capturing by the light supplementing device.
S503: it is detected whether the scanned image has a flare.
S504: when the scanned image has a light spot, a first control operation is performed on the light supplementing device.
The descriptions of S501-S504 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
In this embodiment, when the light supplementing device is turned on, the light supplementing device is controlled to supplement light, and the scanning image is captured, wherein the scanning image is captured based on the light supplemented by the light supplementing device, whether the scanning image has light spots or not is detected, when the scanning image has light spots, the first control operation is performed on the light supplementing device, whether the light spots exist in the scanning image can be effectively identified, when the light spots exist in the scanning image, the corresponding control operation can be adopted, so that the influence of the light spots in the scanning image on scanning identification is avoided, the scanning identification success rate of the scanning device can be effectively assisted and improved, and the scanning identification effect of the scanning device is improved.
Fig. 6 is a schematic diagram according to a third embodiment of the present disclosure.
As shown in fig. 6, the scan control method includes:
s601: a first reference image is captured based on ambient light.
The description of S601 may be specifically referred to the description of the above embodiments, and will not be repeated here.
S602: the first reference image is detected to obtain a first luminance value.
Optionally, in some embodiments, when the first reference image is detected to obtain the first luminance value, an underexposed area is identified from the first reference image, a first image luminance value of the underexposed area is determined, a second image luminance value of other areas in the first reference image is determined, and a luminance average value of the first image luminance value and the second image luminance value is used as the first luminance value, so that luminance analysis processing can be performed on the first reference image by using the controller to determine the underexposed area in the first reference image, and then light supplementing processing can be performed on the surface of the scanned medium by using the light supplementing device, so that the scanned image acquired again after the light supplementing processing can meet the luminance requirement of scanning identification, so that the light uniformity of the scanned image captured by the image capturing device can be ensured, and the scanning identification effect on the scanned image is assisted to be improved.
S603: and when the first brightness value is smaller than or equal to the first brightness threshold value, starting the light supplementing device.
In this embodiment, by capturing the first reference image based on the ambient light, detecting the first reference image to obtain the first brightness value, and starting the light supplementing device when the first brightness value is less than or equal to the first brightness threshold value, it is possible to determine whether there is an underexposure condition caused by insufficient ambient light based on the first reference image when the scanning device scans, and trigger to start the light supplementing device to supplement light when there is an underexposure condition, so as to improve the control flexibility of the light supplementing device, adapt to the personalized requirements of the actual scanning and identifying scene, effectively avoid the reduction of the scanning and identifying rate caused by excessively dark ambient light, and improve the scanning and identifying effect.
S604: when the light supplementing device is started, the light supplementing device is controlled to supplement light.
S605: and capturing a scanning image, wherein the scanning image is obtained based on the light supplementing capturing by the light supplementing device.
S606: a plurality of image areas corresponding to the scanned image and a plurality of luminance distribution values corresponding to the plurality of image areas, respectively, are determined.
S607: if there is a peak luminance distribution value among the plurality of luminance distribution values, it is determined that the scanned image has a flare.
S608: if there is no peak luminance distribution value among the plurality of luminance distribution values, it is determined that the scanned image has no flare.
The descriptions of S603-S608 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
In this embodiment, by determining a plurality of image areas corresponding to the scanned image and a plurality of luminance distribution values corresponding to the plurality of image areas respectively, if a peak luminance distribution value is included in the plurality of luminance distribution values, it is determined that the scanned image has a light spot, and if no peak luminance distribution value is included in the plurality of luminance distribution values, it is determined that the scanned image does not have a light spot, so that the overall luminance distribution value of the scanned image can be effectively determined, and the overall luminance distribution value is combined to determine the peak luminance distribution value, so as to determine whether the scanned image has a light spot, so that the method for detecting the light spot of the scanned image can be effectively adapted to the characteristics of the light spot of the image, the detection efficiency for detecting the light spot of the scanned image is effectively improved, the accuracy of the light spot detection is effectively ensured, and therefore, the shielding of the light spot on the scanned image can be avoided, and the scanning recognition success rate of the scanning device is improved to a greater extent.
S609: and when the scanned image has light spots, the light supplementing device is turned off.
Because when the scanning image has the light spot, the light supplementing device is closed, the light spot can be eliminated by closing the light supplementing device, the shielding of the area where part of characters in the scanning image are located is avoided, the influence of the light spot generated by the light supplementing device on the scanning image on the scanning identification result can be avoided, the comprehensiveness of the identification scanning of the scanning image is ensured, and the scanning identification effect is assisted to be improved.
S610: after the light supplementing device is turned off, a first target image is captured based on ambient light.
S611: and carrying out scanning identification according to the first target image.
The descriptions of S609 to S611 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
In this embodiment, after the light compensating device is turned off, the first target image is captured based on ambient light, and scan identification is performed according to the first target image, so that after a light spot in a scanned image is detected, the light compensating device is turned off to eliminate the light spot, and then a frame of image is captured again based on ambient light, and the captured frame of image can be called the first target image, so that scan identification is performed by using the first target image, so that no image light spot can be carried in the first target image, and when scan identification is performed based on the first target image, continuous execution of a scanning task by the scanning device can be ensured, interruption of the scanning task is avoided, and the success rate of scan identification by the scanning device is effectively improved.
In this embodiment, the first reference image is captured based on ambient light, the first reference image is detected to obtain a first luminance value, and when the first luminance value is less than or equal to a first luminance threshold value, the light supplementing device is turned on, so that when the scanning device scans, whether underexposure conditions caused by insufficient ambient light exist or not can be judged based on the first reference image, and when underexposure conditions exist, the light supplementing device is triggered to conduct light supplementing, the flexibility of control of the light supplementing device is improved, the light supplementing device is adapted to the personalized requirements of actual scanning recognition scenes, the reduction of scanning recognition rate caused by over-darkness of the ambient light is effectively avoided, the scanning recognition effect is improved, a plurality of image areas corresponding to the scanning image and a plurality of luminance distribution values corresponding to the plurality of image areas are determined, if peak luminance distribution values are not included in the plurality of luminance distribution values, the scanning image is determined to have light spots, the whole luminance distribution values of the scanning image are effectively determined, and the whole luminance distribution values of the scanning image are combined, and the peak luminance distribution values are determined, and if the scanning image is not provided with peak luminance distribution values, the light spots are combined, the scanning image is accurately determined, the light spot is accurately, the scanning image is detected, and the light spot is accurately detected, and the light spot is prevented from being generated when the scanning device is scanned, due to the light spot is more than the light spot, and the light spot is effectively has the light-blocking effect, and the light is effectively, and the light-blocking device is effectively detected, and the light-blocking device is effectively and the light-scanned, the scanning device has the advantages that the comprehensiveness of the recognition scanning of the scanning image is guaranteed, the scanning recognition effect is assisted and improved, the first target image is captured based on ambient light after the light supplementing device is closed, and the scanning recognition is carried out according to the first target image, so that after light spots in the scanning image are detected, the light supplementing device is closed to eliminate the light spots, then a frame of image is captured again based on the ambient light, the recaptured frame of image can be called as the first target image, the first target image is adopted for scanning recognition, the first target image is guaranteed to be free from carrying image light spots, when the scanning recognition is carried out based on the first target image, the continuous execution of the scanning task of the scanning device can be guaranteed, the interruption of the scanning task is avoided, and the scanning recognition success rate of the scanning device is effectively improved.
Fig. 7 is a schematic diagram according to a fourth embodiment of the present disclosure.
As shown in fig. 7, the scan control method includes:
s701: when the light supplementing device is started, the light supplementing device is controlled to supplement light.
S702: and capturing a scanning image, wherein the scanning image is obtained based on the light supplementing capturing by the light supplementing device.
S703: it is detected whether the scanned image has a flare.
The descriptions of S701-S703 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
S704: and detecting the scanning image to obtain a second brightness value when the scanning image does not have the light spot.
Optionally, in some embodiments, the overexposure area may be identified from the scanned image, the third image brightness value of the overexposure area may be determined, the fourth image brightness value of the other area in the scanned image may be determined, and the brightness average value of the third image brightness value and the fourth image brightness value may be used as the second brightness value, thereby effectively identifying the overexposure area in the scanned image, and determining the second brightness value of the scanned image, so that the light compensation brightness of the light compensation device may be adjusted according to the second brightness value, so that the effect of the overexposure on the identification effect of the scanned image is avoided, and the scanning identification effect of the scanned device is effectively assisted.
S705: and when the second brightness value is greater than or equal to the second brightness threshold value, performing a second control operation on the light supplementing device, wherein the first control operation and the second control operation are different.
The descriptions of S704-S705 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
In this embodiment, when the scanned image does not have a light spot, the scanned image is detected to obtain a second brightness value, and when the second brightness value is greater than or equal to a second brightness threshold value, a second control operation is performed on the light supplementing device, where the first control operation and the second control operation are different, so that after the scanned image is detected to have no light spot, the scanned image can be further detected according to the second brightness value, whether overexposure exists in the scanned image is detected to determine, and the second control operation is performed on self-adaptive light supplementing brightness adjustment of the light supplementing device, so that brightness of the scanned image is adjusted, poor recognition effect caused by overhigh brightness value of the scanned image is avoided, and scanning effect of the scanning device is assisted to be improved.
In this embodiment, when the light supplementing device is turned on, the light supplementing device is controlled to supplement light, and the scanned image is captured, wherein the scanned image is captured based on the light supplemented by the light supplementing device, whether the scanned image has a light spot is detected, when the scanned image does not have the light spot, the scanned image is detected to obtain a second brightness value, and when the second brightness value is greater than or equal to a second brightness threshold value, a second control operation is performed on the light supplementing device, wherein the first control operation and the second control operation are different, so that after the scanned image is detected to not have the light spot, the scanned image can be further detected according to the second brightness value, whether the scanned image has the overexposure light is detected to judge, the poor recognition effect caused by the overhigh brightness value of the scanned image is avoided, and the scanning effect of the scanned image is assisted to be improved.
Fig. 8 is a schematic diagram according to a fifth embodiment of the present disclosure.
As shown in fig. 8, the scan control method includes:
s801: when the light supplementing device is started, the light supplementing device is controlled to supplement light.
S802: and capturing a scanning image, wherein the scanning image is obtained based on the light supplementing capturing by the light supplementing device.
S803: it is detected whether the scanned image has a flare.
S804: and detecting the scanning image to obtain a second brightness value when the scanning image does not have the light spot.
S805: when the second luminance value is greater than or equal to the second luminance threshold value, an initial luminance value corresponding to the scanned image is determined.
S806: and determining a brightness compensation value for the light supplementing device according to the initial brightness value and a preset rule.
The descriptions of S801 to S806 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
Optionally, in some embodiments, when the luminance compensation value for the light compensating device is determined according to the initial luminance value and a preset rule, the labeling luminance value may be determined, the compensation coefficient may be determined according to the labeling luminance value and the initial luminance value, and the initial luminance value may be processed according to the compensation coefficient to obtain the luminance compensation value.
S807: and adjusting the current light supplementing brightness of the light supplementing device according to the brightness compensation value to obtain the target light supplementing brightness.
S808: and controlling the light supplementing device to supplement light based on the target light supplementing brightness.
The descriptions of S807 to S808 may be specifically referred to the descriptions of the above embodiments, and are not repeated herein.
In this embodiment, when the second luminance value is greater than or equal to the second luminance threshold, an initial luminance value corresponding to the scanned image is determined, a luminance compensation value for the light compensating device is determined according to the initial luminance value in combination with a preset rule, the current light compensating luminance of the light compensating device is adjusted according to the luminance compensation value to obtain a target light compensating luminance, the light compensating device is controlled to perform light compensating based on the target light compensating luminance, so that the light compensating luminance value can be determined for the light compensating device, the light compensating luminance of the light compensating device can be adaptively adjusted in combination with the luminance condition of the scanned image, so that the image capturing device can capture the scanned image with better image quality more quickly, the scanning recognition efficiency is improved, the scanning recognition effect on the scanned image is assisted to be improved, the influence of overexposure on the scanning recognition success rate of the scanning device is avoided, and the scanning recognition effect of the scanning device is improved to a greater extent.
S809: after controlling the light supplementing device to supplement light based on the target light supplementing brightness, capturing a second target image based on the target light supplementing brightness.
S810: and carrying out scanning identification according to the second target image.
The descriptions of S809-S810 can be specifically referred to the descriptions of the above embodiments, and are not repeated here.
In this embodiment, after the light supplementing device is controlled to supplement light based on the target light supplementing brightness, the image capturing device is controlled to capture the second target image based on the target light supplementing brightness, and scan identification is performed according to the second target image, so that overexposure in the scanned image can be eliminated by adjusting the light supplementing brightness of the light supplementing device, the decrease of the scan identification rate caused by the loss of image details of the scanned image due to overexposure can be avoided, and the scan identification effect of the scanning device is effectively improved.
S811: and when the scanning image does not have the light spot and the second brightness value is smaller than the second brightness threshold value, directly performing scanning identification according to the scanning image.
When the scanning image does not have light spots, and the second brightness value is smaller than the second brightness threshold value, the scanning identification is directly carried out according to the scanning image, so that the scanning image which does not have light spots and is subjected to overexposure can be directly scanned and identified, continuity of scanning identification is guaranteed, the light supplementing effect of the self-adaptive adjustment control light supplementing device is achieved, meanwhile, the scanning identification experience of a user can be effectively improved, and the scanning identification effect is assisted to be improved.
The description of S811 may be specifically referred to the description of the above embodiments, and will not be repeated herein.
In this embodiment, when the second luminance value is greater than or equal to the second luminance threshold value, an initial luminance value corresponding to the scanned image is determined, a luminance compensation value for the light compensating device is determined according to the initial luminance value and a preset rule, the current light compensating luminance of the light compensating device is adjusted according to the luminance compensation value to obtain a target light compensating luminance, the light compensating device is controlled to perform light compensating based on the target light compensating luminance, so that the light compensating luminance value can be determined for the light compensating device, the light compensating luminance of the light compensating device can be adaptively adjusted according to the luminance condition of the scanned image, the scanning image with better image quality can be captured by the image capturing device more quickly, the scanning recognition efficiency is improved, the scanning recognition effect on the scanned image is assisted to be improved, the scanning recognition success rate of the scanning device is prevented from being influenced by overexposure, the scanning recognition effect of the scanning device is improved to a greater extent, after the light compensating device is controlled to perform light compensating based on the target light compensating luminance, the second target light compensating luminance is controlled to capture the second target image based on the second target light compensating luminance, and the light compensating device is scanned and recognized according to the second target image, the light compensating luminance can be adjusted to eliminate overexposure in the scanning image, the scanning device can be adaptively adjusted to the light compensating luminance condition, the scanning image can be recognized by the light spot can be prevented from being directly recognized when the scanning device is controlled to have the scanning recognition effect is not to have the scanning recognition effect, and the scanning recognition effect is improved when the scanning device is not directly has the scanning recognition effect is improved to have the scanning recognition effect, and the scanning recognition effect is improved to have the scanning recognition effect to be improved to the scanning recognition effect to the scanning device is improved, and the scanning identification effect is improved in an auxiliary way.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, such as a scan control method. For example, in some embodiments, the scan control method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the scan control method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the scan control method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (22)

1. A scanning device, comprising:
a housing;
a light supplementing device, a camera device and a controller are arranged in the shell, and the controller is respectively and electrically connected with the light supplementing device and the camera device;
the light supplementing device is used for supplementing light when the light supplementing device is started;
the camera device is used for capturing and obtaining a scanning image based on the light supplement by the light supplement device;
the controller is used for detecting whether the scanning image has a light spot or not, and performing a first control operation on the light supplementing device when the scanning image has the light spot, wherein the first control operation comprises a closing operation on the light supplementing device;
The controller is further configured to detect the scanned image to obtain a second brightness value when the scanned image does not have the light spot, and perform a second control operation on the light supplementing device when the second brightness value is greater than or equal to a second brightness threshold, where the first control operation and the second control operation are different;
the controller is further configured to identify an overexposed region from the scanned image, determine a third image luminance value of the overexposed region, determine a fourth image luminance value of other regions in the scanned image, and use a luminance average value of the third image luminance value and the fourth image luminance value as the second luminance value.
2. The scanning device of claim 1, wherein,
the camera device is further used for capturing a first reference image based on ambient light;
the controller is further configured to detect the first reference image to obtain a first luminance value, and turn on the light compensating device when the first luminance value is less than or equal to a first luminance threshold.
3. The scanning device of claim 1, wherein,
the controller is further configured to close the light supplementing device when the scanned image has the light spot.
4. A scanning device according to claim 3, wherein,
and the controller is also used for controlling the camera device to capture a first target image based on the ambient light after the light supplementing device is closed, and carrying out scanning identification according to the first target image.
5. The scanning device of claim 1, wherein,
the controller is further configured to determine an initial luminance value corresponding to the scanned image when the second luminance value is greater than or equal to a second luminance threshold, determine a luminance compensation value for the light compensating device according to the initial luminance value in combination with a preset rule, and adjust a current light compensating luminance of the light compensating device according to the luminance compensation value to obtain a target light compensating luminance, so as to control the light compensating device to perform light compensating based on the target light compensating luminance.
6. The scanning device of claim 5, wherein,
the controller is further configured to control the image capturing device to capture a second target image based on the target light-compensating brightness after controlling the light-compensating device to compensate light based on the target light-compensating brightness, and perform scanning identification according to the second target image.
7. The scanning device of claim 1, wherein,
And the controller is also used for directly carrying out scanning identification according to the scanning image when the scanning image does not have the light spot and the second brightness value is smaller than the second brightness threshold value.
8. The scanning device of claim 1, wherein,
the controller is configured to determine a plurality of image areas corresponding to the scanned image, and a plurality of luminance distribution values corresponding to the plurality of image areas, respectively, determine that the scanned image has the flare if there is a peak luminance distribution value among the plurality of luminance distribution values, and determine that the scanned image does not have the flare if there is no peak luminance distribution value among the plurality of luminance distribution values.
9. The scanning device of claim 2, wherein,
the controller is further configured to identify an underexposed area from the first reference image, determine a first image luminance value of the underexposed area, determine a second image luminance value of other areas in the first reference image, and take a luminance average of the first image luminance value and the second image luminance value as the first luminance value.
10. The scanning device of claim 5, wherein,
The controller is further configured to determine a labeling luminance value, determine a compensation coefficient according to the labeling luminance value and the initial luminance value, and process the initial luminance value according to the compensation coefficient to obtain the luminance compensation value.
11. A scan control method comprising:
when the light supplementing device is started, controlling the light supplementing device to supplement light;
capturing a scanning image, wherein the scanning image is captured based on the light supplement by the light supplement device;
detecting whether the scanned image has light spots or not;
when the scanning image has the light spot, performing a first control operation on the light supplementing device, wherein the first control operation comprises a closing operation on the light supplementing device;
detecting the scanning image to obtain a second brightness value when the scanning image does not have the light spot;
when the second brightness value is greater than or equal to a second brightness threshold value, performing a second control operation on the light supplementing device, wherein the first control operation and the second control operation are different;
wherein said detecting the scanned image to obtain a second luminance value comprises:
identifying an overexposed region from the scanned image;
Determining a third image brightness value of the overexposed region and determining a fourth image brightness value of other regions in the scanned image;
and taking the brightness average value of the third image brightness value and the fourth image brightness value as the second brightness value.
12. The method of claim 11, further comprising, prior to said controlling the light filling device to fill light when the light filling device is turned on:
capturing a first reference image based on ambient light;
detecting the first reference image to obtain a first brightness value;
and when the first brightness value is smaller than or equal to a first brightness threshold value, starting the light supplementing device.
13. The method of claim 11, wherein the performing a first control operation on the light supplementing device when the scanned image has the light spot comprises:
and when the scanning image has the light spot, closing the light supplementing device.
14. The method of claim 13, further comprising:
after the light supplementing device is turned off, capturing a first target image based on ambient light;
and carrying out scanning identification according to the first target image.
15. The method of claim 11, wherein the performing a second control operation on the light compensating device when the second luminance value is greater than or equal to a second luminance value, the first control operation and the second control operation being different, comprises:
Determining an initial luminance value corresponding to the scanned image when the second luminance value is greater than or equal to a second luminance threshold;
determining a brightness compensation value for the light supplementing device according to the initial brightness value and a preset rule;
adjusting the current light supplementing brightness of the light supplementing device according to the brightness compensation value to obtain target light supplementing brightness;
and controlling the light supplementing device to supplement light based on the target light supplementing brightness.
16. The method of claim 15, further comprising:
after controlling the light supplementing device to supplement light based on the target light supplementing brightness, capturing a second target image based on the target light supplementing brightness;
and carrying out scanning identification according to the second target image.
17. The method of claim 11, further comprising:
and when the scanning image does not have the light spot and the second brightness value is smaller than the second brightness threshold value, scanning and identifying are directly carried out according to the scanning image.
18. The method of claim 11, wherein the detecting whether the scanned image has a spot comprises:
determining a plurality of image areas corresponding to the scanned image and a plurality of brightness distribution values corresponding to the image areas respectively;
Determining that the scanned image has the light spot if there is a peak luminance distribution value among the plurality of luminance distribution values;
if the peak luminance distribution value is not present among the plurality of luminance distribution values, it is determined that the scanned image does not have the flare.
19. The method of claim 12, wherein the detecting the first reference image to obtain a first luminance value comprises:
identifying an underexposed region from the first reference image;
determining a first image brightness value of the underexposed area and determining a second image brightness value of other areas in the first reference image;
and taking the brightness average value of the first image brightness value and the second image brightness value as the first brightness value.
20. The method of claim 15, wherein the determining a brightness compensation value for the light filling device according to the initial brightness value in combination with a preset rule comprises:
determining a labeling brightness value;
determining a compensation coefficient according to the marked brightness value and the initial brightness value; and
and processing the initial brightness value according to the compensation coefficient to obtain the brightness compensation value.
21. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 11-20.
22. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 11-20.
CN202111290377.1A 2021-11-02 2021-11-02 Scanning device, scanning control method, electronic apparatus, and storage medium Active CN114205482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111290377.1A CN114205482B (en) 2021-11-02 2021-11-02 Scanning device, scanning control method, electronic apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111290377.1A CN114205482B (en) 2021-11-02 2021-11-02 Scanning device, scanning control method, electronic apparatus, and storage medium

Publications (2)

Publication Number Publication Date
CN114205482A CN114205482A (en) 2022-03-18
CN114205482B true CN114205482B (en) 2024-01-05

Family

ID=80646719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111290377.1A Active CN114205482B (en) 2021-11-02 2021-11-02 Scanning device, scanning control method, electronic apparatus, and storage medium

Country Status (1)

Country Link
CN (1) CN114205482B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6694051B1 (en) * 1998-06-24 2004-02-17 Canon Kabushiki Kaisha Image processing method, image processing apparatus and recording medium
CN103248829A (en) * 2013-04-24 2013-08-14 深圳市金立通信设备有限公司 Method for adjusting flashlight during photographing and photographing device
CN104834884A (en) * 2015-04-28 2015-08-12 新石器龙码(北京)科技有限公司 Barcode scanning device and method
CN105654633A (en) * 2015-12-30 2016-06-08 福建联迪商用设备有限公司 POS code scanning payment method, system and device
CN105827889A (en) * 2016-03-31 2016-08-03 广州视睿电子科技有限公司 Light supplement control apparatus and method of photographing type scanner, and photographing type scanner
CN106464755A (en) * 2015-02-28 2017-02-22 华为技术有限公司 Method for automatically adjusting camera and electronic device
CN107844730A (en) * 2017-11-07 2018-03-27 维沃移动通信有限公司 A kind of graphic code scan method and mobile terminal
KR20180073189A (en) * 2016-12-22 2018-07-02 오스템임플란트 주식회사 Image Data Processing Method OF Oral Cavity, And Intraoral Scanner
CN108763999A (en) * 2018-04-17 2018-11-06 维沃移动通信有限公司 Barcode recognition method and terminal device
CN109165539A (en) * 2018-08-14 2019-01-08 奇酷互联网络科技(深圳)有限公司 Barcode scanning light compensation method and device
CN109214229A (en) * 2017-06-30 2019-01-15 杭州海康威视数字技术股份有限公司 A kind of bar code scanning method, device and electronic equipment
CN111366104A (en) * 2020-03-26 2020-07-03 深圳市菲森科技有限公司 Scanning method and device with automatic brightness adjusting function and electronic equipment
CN112183128A (en) * 2019-07-13 2021-01-05 迅镭智能(广州)科技有限公司 Adaptive dimming scanning gun, control method and device thereof and storage medium
CN112257729A (en) * 2020-11-13 2021-01-22 腾讯科技(深圳)有限公司 Image recognition method, device, equipment and storage medium
CN113051823A (en) * 2021-03-25 2021-06-29 深圳市优博讯科技股份有限公司 Method and system for adjusting light supplement lamp of scanning head
CN113065374A (en) * 2021-04-01 2021-07-02 支付宝(杭州)信息技术有限公司 Two-dimensional code identification method, device and equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6749120B2 (en) * 2000-12-11 2004-06-15 Cpo Technologies Corp. Method and apparatus for scanning electronic barcodes
US7725022B2 (en) * 2006-08-22 2010-05-25 Qualcomm Incorporated Dynamic automatic exposure compensation for image capture devices
US10922846B2 (en) * 2017-08-29 2021-02-16 Guangdong Virtual Reality Technology Co., Ltd. Method, device and system for identifying light spot

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6694051B1 (en) * 1998-06-24 2004-02-17 Canon Kabushiki Kaisha Image processing method, image processing apparatus and recording medium
CN103248829A (en) * 2013-04-24 2013-08-14 深圳市金立通信设备有限公司 Method for adjusting flashlight during photographing and photographing device
CN106464755A (en) * 2015-02-28 2017-02-22 华为技术有限公司 Method for automatically adjusting camera and electronic device
CN104834884A (en) * 2015-04-28 2015-08-12 新石器龙码(北京)科技有限公司 Barcode scanning device and method
CN105654633A (en) * 2015-12-30 2016-06-08 福建联迪商用设备有限公司 POS code scanning payment method, system and device
CN105827889A (en) * 2016-03-31 2016-08-03 广州视睿电子科技有限公司 Light supplement control apparatus and method of photographing type scanner, and photographing type scanner
KR20180073189A (en) * 2016-12-22 2018-07-02 오스템임플란트 주식회사 Image Data Processing Method OF Oral Cavity, And Intraoral Scanner
CN109214229A (en) * 2017-06-30 2019-01-15 杭州海康威视数字技术股份有限公司 A kind of bar code scanning method, device and electronic equipment
CN107844730A (en) * 2017-11-07 2018-03-27 维沃移动通信有限公司 A kind of graphic code scan method and mobile terminal
CN108763999A (en) * 2018-04-17 2018-11-06 维沃移动通信有限公司 Barcode recognition method and terminal device
CN109165539A (en) * 2018-08-14 2019-01-08 奇酷互联网络科技(深圳)有限公司 Barcode scanning light compensation method and device
CN112183128A (en) * 2019-07-13 2021-01-05 迅镭智能(广州)科技有限公司 Adaptive dimming scanning gun, control method and device thereof and storage medium
CN111366104A (en) * 2020-03-26 2020-07-03 深圳市菲森科技有限公司 Scanning method and device with automatic brightness adjusting function and electronic equipment
CN112257729A (en) * 2020-11-13 2021-01-22 腾讯科技(深圳)有限公司 Image recognition method, device, equipment and storage medium
CN113051823A (en) * 2021-03-25 2021-06-29 深圳市优博讯科技股份有限公司 Method and system for adjusting light supplement lamp of scanning head
CN113065374A (en) * 2021-04-01 2021-07-02 支付宝(杭州)信息技术有限公司 Two-dimensional code identification method, device and equipment

Also Published As

Publication number Publication date
CN114205482A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
US11410277B2 (en) Method and device for blurring image background, storage medium and electronic apparatus
WO2018228310A1 (en) Image processing method and apparatus, and terminal
CN113177472B (en) Dynamic gesture recognition method, device, equipment and storage medium
JP7301092B2 (en) Image recognition method, apparatus, electronic device, computer storage medium, and program
CN109167893B (en) Shot image processing method and device, storage medium and mobile terminal
CN112561879B (en) Ambiguity evaluation model training method, image ambiguity evaluation method and image ambiguity evaluation device
CN113034354A (en) Image processing method and device, electronic equipment and scale storage medium
US10346953B2 (en) Flash and non-flash images in flash artifact removal
CN116403083A (en) Image processing method and device, electronic equipment and storage medium
WO2019011110A1 (en) Human face region processing method and apparatus in backlight scene
CN114037087B (en) Model training method and device, depth prediction method and device, equipment and medium
CN113177451B (en) Training method and device for image processing model, electronic equipment and storage medium
CN114205482B (en) Scanning device, scanning control method, electronic apparatus, and storage medium
CN110933304B (en) Method and device for determining to-be-blurred region, storage medium and terminal equipment
CN110636222B (en) Photographing control method and device, terminal equipment and storage medium
WO2023231479A1 (en) Pupil detection method and apparatus, and storage medium and electronic device
CN114255177B (en) Exposure control method, device, equipment and storage medium in imaging
JP2017162179A (en) Information processing apparatus, information processing method, and program
CN112288697B (en) Method, apparatus, electronic device and readable storage medium for quantifying degree of abnormality
JP2011029710A (en) Image processor, image processing program, and imaging apparatus
CN109040604B (en) Shot image processing method and device, storage medium and mobile terminal
CN113705620B (en) Training method and device for image display model, electronic equipment and storage medium
CN113379813B (en) Training method and device of depth estimation model, electronic equipment and storage medium
CN114219744B (en) Image generation method, device, equipment and storage medium
CN113612931B (en) Method, device and equipment for controlling flash lamp based on cloud mobile phone and storage medium

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
GR01 Patent grant
GR01 Patent grant