Scanning method and device and dictionary pen

The flash fill light is used to collect the image sequence when the dictionary pen's flash fill light is on and off, and spliced ​​into a clear scanned image, which solves the image blur problem caused by the brightness or reflection of the scanned medium, and realizes the detection of various materials. adaptation and reliability of scan results.

CN118865401APending Publication Date: 2024-10-29HEFEI IFLYTEK TOYCLOUD TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410992040.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-29

Smart Images

  • Figure CN118865401A_ABST
    Figure CN118865401A_ABST
Patent Text Reader

Abstract

The invention provides a scanning method and device and a dictionary pen, and the method comprises the steps: obtaining a first scanning image and a second scanning image, the first scanning image is obtained based on an image sequence collected when a strobe-frequency light supplement lamp is turned on, and the second scanning image is obtained based on an image sequence collected when the strobe-frequency light supplement lamp is turned off; the first scanning image and the second scanning image correspond to the same scanning action; and determining a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image. According to the method, the device and the dictionary pen provided by the invention, the first scanning image and the second scanning image are obtained in one-time scanning, so that clear scanning images can be obtained no matter facing a scanned medium without light-emitting and light-reflecting performance or facing a scanned medium with light-emitting or light-reflecting performance; therefore, the reliability of the scanning result is ensured, the available range of scanning and word fetching based on the dictionary pen is widened, and the user experience is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic products, and in particular to a scanning method, a scanning device and a dictionary pen. Background Art

[0002] The dictionary pen is a portable electronic learning tool that can replace the key input method of traditional electronic dictionaries with scanning, thereby achieving fast and accurate word retrieval / search.

[0003] Currently, when a dictionary pen is used to scan and retrieve words, a fill light at the tip of the dictionary pen is usually used to illuminate the scanned medium under the scanning window, and then a camera at the tip of the pen is used to capture an image of the illuminated scanned medium.

[0004] However, when the scanned medium itself has brightness or reflective properties, a light spot may appear on the scanned medium under the illumination of a fill light, causing the image acquired based on the above scanning word-capturing method to be blurred, thus affecting the word-capturing effect. Summary of the invention

[0005] The present invention provides a scanning method, a device and a dictionary pen, which are used to solve the defect in the related art that the material of the scanned medium causes blurring of the captured image, thereby affecting the scanning accuracy.

[0006] The present invention provides a scanning method, comprising: Acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; A scanning result corresponding to the scanning action is determined based on the first scanning image and the second scanning image.

[0007] According to a scanning method provided by the present invention, determining a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image includes: Performing text recognition on the first scanned image to obtain a first text; Performing text recognition on the second scanned image to obtain a second text; A scanning result corresponding to the scanning action is determined based on the first text and the second text.

[0008] According to a scanning method provided by the present invention, determining a scanning result corresponding to the scanning action based on the first text and the second text includes: displaying the first text and the second text; A text selection operation is received, and based on the text selection operation, a scan result corresponding to the scan action is selected from the first text and the second text.

[0009] According to a scanning method provided by the present invention, determining a scanning result corresponding to the scanning action based on the first text and the second text includes: Based on the length of the first text and the length of the second text, a scan result corresponding to the scan action is selected from the first text and the second text.

[0010] According to a scanning method provided by the present invention, determining a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image includes: Selecting a target scan image from the first scan image and the second scan image; Text recognition is performed on the target scanned image to obtain a scan result corresponding to the scanning action.

[0011] According to a scanning method provided by the present invention, the step of selecting a target scanning image from the first scanning image and the second scanning image comprises: displaying the first scanned image and the second scanned image; An image selection operation is received, and based on the image selection operation, a target scan image is selected from the first scan image and the second scan image.

[0012] According to a scanning method provided by the present invention, the step of selecting a target scanning image from the first scanning image and the second scanning image comprises: Based on the definition of the first scanned image and the definition of the second scanned image, a target scanned image is selected from the first scanned image and the second scanned image.

[0013] The present invention also provides a scanning device, comprising: A scanning unit, configured to acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; The recognition unit is used to determine a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned scanning methods is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the scanning method described above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned scanning methods.

[0017] The scanning method, device and dictionary pen provided by the present invention can obtain a first scanning image when the strobe fill light is on and a second scanning image when the strobe fill light is off in one scan, thereby being adaptable to scanned media of various materials, so that clear scanning images can be obtained regardless of whether the scanned media is not luminous and reflective or is luminous or reflective, thereby ensuring the reliability of the scanning results, broadening the available scope of scanning and word acquisition based on the dictionary pen, and optimizing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a schematic flow chart of the scanning method provided by the present invention.

[0020] Figure 2 It is a schematic diagram of the on / off timing of the strobe fill light provided by the present invention.

[0021] Figure 3 It is a structural schematic diagram of the dictionary pen provided by the present invention.

[0022] Figure 4 It is a schematic structural diagram of the scanning device provided by the present invention.

[0023] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Currently, when a dictionary pen is used to scan and retrieve words, a fill light at the tip of the dictionary pen is usually used to illuminate the scanned medium under the scanning window, and then a camera at the tip of the pen is used to capture an image of the illuminated scanned medium.

[0026] However, when the scanned medium itself has brightness or reflectivity

[0027] When the scanning medium is illuminated by the fill light, light spots may appear, which may cause the image acquired based on the above scanning word-capturing method to be blurred, thus affecting the word-capturing effect.

[0028] In view of the above problems, an embodiment of the present invention provides a scanning method to achieve scanning and word retrieval that can adapt to various scanned media. Figure 1 It is a schematic diagram of the flow of the scanning method provided by the present invention, such as Figure 1 As shown, the scanning method can be applied to a dictionary pen, a scanning pen, or other handheld reading devices with scanning query functions. The method includes: Step 110, obtaining a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence captured when the strobe fill light is on, and the second scanning image is obtained based on an image sequence captured when the strobe fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action.

[0029] Specifically, during the scanning process, the material of the scanned medium is usually unknown. For example, the material of the scanned medium may be matte paper with low gloss and a matte effect, or it may be glossy paper with a higher gloss, or it may be a screen that has its own brightness and can emit light. The embodiment of the present invention does not make specific limitations on this.

[0030] In actual operation, for different materials of scanned media, the image efficiency obtained will be different if the fill light is used to illuminate the scanned media before image acquisition. For example, if the matte paper with low gloss and matte effect is illuminated by the fill light before image acquisition, a clearer image can be acquired. However, if the glossy paper with high gloss and strong reflective properties, or the screen that can emit light, is illuminated by the fill light, there will be light spots on the glossy paper or screen, making it difficult to acquire a clear image.

[0031] In order to capture a clear image during the scanning process under the premise of unknown material of the scanned medium, a strobe fill light is used as a fill light during image acquisition in the embodiment of the present invention, and the image acquisition is performed in conjunction with the lighting and extinguishing of the strobe fill light. Here, the strobe fill light is a light source device that presents a certain frequency and regular changes according to a time period. The strobe fill light can control the switching frequency of the light source so that the light emitted flashes at a fixed time interval, thereby realizing periodic switching of the light.

[0032] During scanning, the strobe fill light can flash at a fixed frequency. For example, Figure 2 FIG. 1 is a schematic diagram of the on / off time of the strobe fill light provided by the present invention. Figure 2 As shown, the strobe fill light is on in the time intervals [t1, t2], [t3, t4], [t5, t6], [t7, t8], and [t9, t10], and each of the above time intervals is equal in length, that is, the time of each lighting is equal in length, which can be specifically expressed as t2-t1= t4-t3= t6-t5=t8-t7=t10-t9. The strobe fill light is off in the time intervals [t2, t3], [t4, t5], [t6, t7], and [t8, t9], and each of the above time intervals is equal in length, that is, the time of each off is equal in length, which can be specifically expressed as t3-t2= t5-t4= t7-t6=t9-t8.

[0033] While the stroboscopic fill light is flashing at a fixed frequency, that is, while the stroboscopic fill light is periodically lighting up and off, the camera is always in an image acquisition state. Thus, the camera can not only capture the image of the scanned medium during each time the stroboscopic fill light is on, but also capture the image of the scanned medium during each time the stroboscopic fill light is off.

[0034] It can be understood that since the stroboscopic fill light is turned on and off many times during the scanning process, the camera can respectively capture images of the scanned medium during the multiple times when the stroboscopic fill light is turned on, thereby obtaining multiple images captured when the stroboscopic fill light is turned on many times before and after, that is, obtaining an image sequence when the stroboscopic fill light is on; and the camera can respectively capture images of the scanned medium during the multiple times when the stroboscopic fill light is turned off, thereby obtaining multiple images captured when the stroboscopic fill light is turned off many times before and after, that is, obtaining an image sequence when the stroboscopic fill light is turned off.

[0035] For the image sequence captured when the strobe fill light is on, the overlapping area of ​​every two adjacent frames in the image sequence can be deleted, and then every two adjacent frames of the image can be spliced, and the spliced ​​image is used as the first scanned image. Here, the first scanned image can be understood as a complete image scanned when the strobe fill light is on.

[0036] Similarly, for the image sequence captured when the strobe fill light is off, the overlapping area of ​​every two adjacent frames in the image sequence can be deleted, and then every two adjacent frames of the image can be spliced, and the spliced ​​image is used as the second scanned image. Here, the second scanned image can be understood as a complete image scanned when the strobe fill light is off. It should be noted that when the strobe frequency of the strobe fill light is high enough, the contents contained in the first scanned image and the second scanned image are almost the same.

[0037] Compared with the related art that only captures images under the illumination of a fill light, the embodiment of the present invention uses a stroboscopic fill light, and captures a first scan image under the illumination of the stroboscopic fill light and a second scan image with the stroboscopic fill light turned off in one scan. The scanning process does not add any additional operations for the user, but also obtains a second scan image captured when the fill light is turned off, which cannot be obtained in the related art.

[0038] Furthermore, it can be understood that the first scanned image and the second scanned image obtained in one scan can be adapted to the scanned medium without luminous and reflective properties, and the second scanned image can be adapted to the scanned medium with luminous or reflective properties. Therefore, when the material of the scanned medium is unknown, the first scanned image and the second scanned image are obtained at the same time, which can ensure that a clear scanned image can be collected regardless of the material of the scanned medium.

[0039] Step 120: Determine a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image.

[0040] Specifically, after obtaining the first scanned image and the second scanned image, the scan result corresponding to the above-mentioned scanning action can be determined based on the first scanned image and the second scanned image. For example, OCR (Optical Character Recognition) can be performed on the first scanned image and the second scanned image respectively to obtain the recognized text of the first scanned image and the recognized text of the second scanned image, and the two recognized texts can be used as the scan result together, or the two recognized texts can be displayed and the user can select the scan result from them; for another example, the clarity of the first scanned image and the second scanned image can be evaluated respectively, and then the clearest image can be selected from the first scanned image and the second scanned image as the scanned image adapted to the scanned medium, and the scanned image can be OCR-ed to obtain the scanned result.

[0041] The method provided by the embodiment of the present invention obtains a first scanning image when the strobe fill light is on and a second scanning image when the strobe fill light is off in one scan, thereby being adaptable to scanned media of various materials, so that clear scanning images can be obtained regardless of whether the scanned media is not luminous and reflective or is luminous or reflective, thereby ensuring the reliability of the scanning results, broadening the available scope of scanning and word retrieval based on the dictionary pen, and optimizing the user experience.

[0042] Based on the above embodiment, in step 120, determining the scanning result corresponding to the scanning action based on the first scanned image and the second scanned image includes: Performing text recognition on the first scanned image to obtain a first text; Performing text recognition on the second scanned image to obtain a second text; A scanning result corresponding to the scanning action is determined based on the first text and the second text.

[0043] Specifically, after obtaining the first scanned image and the second scanned image, text recognition (such as OCR recognition) can be performed on the first scanned image and the second scanned image respectively, thereby obtaining a text recognition result for the first scanned image, i.e., the first text, and obtaining a text recognition result for the second scanned image, i.e., the second text.

[0044] Here, the first text and the second text are the results of text recognition performed on the first scanned image and the second scanned image, respectively. In the case where the material of the scanned medium is unknown, both the first text and the second text may become the scan results corresponding to the scanning action. That is, after obtaining the first text and the second text, one of the two may be selected as the scan result corresponding to the scanning action, or both may be selected as the scan results corresponding to the scanning action, and the embodiment of the present invention does not specifically limit this.

[0045] For example, after obtaining the first text and the second text respectively, the first text and the second text can be displayed as scanning results. When displaying, the first text can be displayed first by default. If the user is not satisfied with the first text, the second text can be viewed by flipping through it. In addition, the user can also customize the display priority of the first text and the second text.

[0046] For another example, after obtaining the first text and the second text respectively, the first text and the second text can be respectively input into the translation model for translation, thereby obtaining the translated text of the first text and the translated text of the second text. The translated text of the first text and the translated text of the second text can both be used as the translation results after scanning and word acquisition.

[0047] Based on any of the above embodiments, in step 120, determining a scan result corresponding to the scan action based on the first text and the second text includes: displaying the first text and the second text; A text selection operation is received, and based on the text selection operation, a scan result corresponding to the scan action is selected from the first text and the second text.

[0048] Specifically, when the material of the scanned medium is unknown, it can be determined that one of the first text and the second text is more suitable as a scan result than the other. At this time, in order to facilitate the determination of the final scan result from the first text and the second text, thereby providing an accurate scan result for operations such as translation or interpretation after scanning, the first text and the second text can be displayed.

[0049] Therefore, after completing the scanning action, the user can view the scanned first text and the second text through the display screen. Therefore, the user can select a text from the first text and the second text as the scanning result, and accordingly, the dictionary pen can receive the text selection operation. The text selection operation here can be the user clicking or long pressing the control corresponding to the first text or the second text through the dictionary pen screen, or the user selecting the first text or the second text by operating the dictionary pen body button, or the user selecting the first text or the second text in the form of a voice command, and the embodiment of the present invention does not specifically limit this.

[0050] After receiving the text selection operation, a response may be made to the text selection operation. Specifically, under the instruction of the text selection operation, the text selected by the text selection operation may be determined from the first text and the second text as a scanning result corresponding to the scanning action.

[0051] In the method provided by the embodiment of the present invention, the user selects the scanning result corresponding to the scanning action from the first text and the second text, thereby ensuring the accuracy and reliability of scanning and word acquisition under the premise that the dictionary pen is unknown to the material of the scanned medium.

[0052] Based on any of the above embodiments, in step 120, determining a scan result corresponding to the scan action based on the first text and the second text includes: Based on the length of the first text and the length of the second text, a scan result corresponding to the scan action is selected from the first text and the second text.

[0053] Specifically, when the material of the scanned medium is unknown, it can be determined that one of the first text and the second text is more suitable as a scan result than the other. At this time, in order to determine the final scan result from the first text and the second text, the length of the first text and the second text can be counted respectively, and the final scan result can be selected from the first text and the second text according to the length of the first text and the length of the second text.

[0054] Furthermore, the text length here specifically refers to the character length of the text, which can also be understood as the number of characters in the text.

[0055] It is understandable that, assuming that the scanned medium does not have luminous and reflective properties, when the strobe light is off, the ambient light may be too dark, causing the characters in the captured image to be close to the image background color and unable to be recognized in text recognition. In this case, the first scanned image captured when the strobe light is on is clearer than the second scanned image captured when the strobe light is off. When performing text recognition on the first scanned image, characters that cannot be recognized in the second scanned image due to the close color of the characters and the background may also be recognized. Therefore, the length of the first text obtained by text recognition may be greater than the length of the second text.

[0056] Assuming that the scanned medium has luminous or reflective properties, when the strobe light is on, the scanned medium may reflect light spots, resulting in light spots and blurring in the first scanned image. In this case, the second scanned image captured when the strobe light is off is clearer than the first scanned image captured when the strobe light is on. When performing text recognition on the second scanned image, characters that cannot be recognized in the first scanned image due to the light spots may be recognized. Therefore, the length of the second text obtained by text recognition may be greater than the length of the first text.

[0057] Based on this, after obtaining the first text and the second text, the length of the first text and the length of the second text can be compared. The text with a longer length is obtained by text recognition of a scanning image that is clearer and more suitable for the material of the scanned medium. Therefore, the text with a longer length can be directly used as the scanning result corresponding to the scanning action.

[0058] In the method provided in an embodiment of the present invention, the scanning results of the scanning action are selected from the first text and the second text directly based on the lengths of the first text and the second text, so that when the dictionary pen is unknown to the material of the scanned medium, the accuracy and reliability of the scanning word can be guaranteed without user operation.

[0059] Based on any of the above embodiments, in step 120, determining a scan result corresponding to the scan action based on the first scan image and the second scan image includes: Selecting a target scan image from the first scan image and the second scan image; Text recognition is performed on the target scanned image to obtain a scan result corresponding to the scanning action.

[0060] Specifically, after obtaining the first scan image and the second scan image, a scan image that is more suitable for the material of the scanned medium can be selected from the first scan image and the second scan image, that is, a scan image with a better scanning effect can be selected from the first scan image and the second scan image as a target scan image. Here, the target scan image is one of the first scan image and the second scan image.

[0061] Here, the target scan image may be determined by the user selecting it from the first scan image and the second scan image, or may be selected based on the clarity of the first scan image and the clarity of the second scan image, and the embodiment of the present invention does not specifically limit this.

[0062] After the target scan image is determined, text recognition (such as OCR recognition) can be performed on the target scan image, and the result obtained by the text recognition is used as the scan result corresponding to the scanning action.

[0063] Based on any of the above embodiments, in step 120, selecting a target scan image from the first scan image and the second scan image includes: displaying the first scanned image and the second scanned image; An image selection operation is received, and based on the image selection operation, a target scan image is selected from the first scan image and the second scan image.

[0064] Specifically, when the material of the scanned medium is unknown, it can be determined that one of the first scanned image and the second scanned image can more clearly reflect the content on the scanned medium than the other. At this time, in order to facilitate determining the target scanning result from the first scanned image and the second scanned image, the first scanned image and the second scanned image can be displayed.

[0065] Therefore, after completing the scanning action, the user can view the first scanned image and the second scanned image obtained by scanning through the display screen. Therefore, the user can select a scanned image from the first scanned image and the second scanned image as the target scanned image, and accordingly, the dictionary pen can receive the image selection operation. The image selection operation here can be that the user clicks or long presses the control corresponding to the first scanned image or the second scanned image through the dictionary pen screen, or the user selects the first scanned image or the second scanned image by operating the dictionary pen body button, or the user selects the first scanned image or the second scanned image in the form of a voice command, and the embodiment of the present invention does not specifically limit this.

[0066] After receiving the image selection operation, a response may be made to the image selection operation. Specifically, under the instruction of the image selection operation, a scanned image selected by the image selection operation may be determined from the first scanned image and the second scanned image as a target scanned image.

[0067] In the method provided by the embodiment of the present invention, the user selects the target scan image from the first scan image and the second scan image, thereby ensuring the accuracy and reliability of scanning and word retrieval under the premise that the dictionary pen does not know the material of the scanned medium.

[0068] Based on any of the above embodiments, in step 120, selecting a target scan image from the first scan image and the second scan image includes: Based on the definition of the first scanned image and the definition of the second scanned image, a target scanned image is selected from the first scanned image and the second scanned image.

[0069] Specifically, when the material of the scanned medium is unknown, it can be determined that one of the first scanned image and the second scanned image can more clearly reflect the content on the scanned medium than the other. At this time, in order to facilitate the determination of the target scan result from the first scanned image and the second scanned image, the clarity of the first scanned image and the second scanned image can be calculated respectively, and by comparing the clarity of the two, the target scanned image can be determined from the first scanned image and the second scanned image.

[0070] Here, the calculation of the clarity of the scanned image can be achieved by calculating the variance of the pixel values ​​in the scanned image. For example, the larger the variance value, the clearer the scanned image is. Alternatively, the clarity of the scanned image can be evaluated by calculating the sum of the squares of the grayscale differences between adjacent pixels in the scanned image. Alternatively, the clarity of the scanned image can be evaluated by calculating the gradient of the scanned image in the horizontal and vertical directions. The embodiments of the present invention do not specifically limit this.

[0071] It can be understood that the scanned image with higher definition between the first scanned image and the second scanned image is the scanned image obtained in a scanning mode that is more suitable for the material of the scanned medium. Therefore, the definition of the first scanned image and the definition of the second scanned image can be compared, and the scanned image with higher definition is used as the target scanned image.

[0072] Based on any of the above embodiments, Figure 3 Schematic diagram of the structure of the dictionary pen provided by the present invention. Figure 3 As shown, the dictionary pen includes a dictionary pen body 300, a processor 310 disposed inside the dictionary pen body 300, and a camera 320 and a strobe fill light 330 disposed on the surface of the dictionary pen body 300; The camera 320 is used to collect image sequences when the strobe fill light 330 is on and off respectively; The processor 310 is used to determine a first scanning image based on an image sequence captured when the stroboscopic fill light 330 is on, determine a second scanning image based on an image sequence captured when the stroboscopic fill light 330 is off, and determine a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image.

[0073] Specifically, a scanning module is provided at the tip of the dictionary pen body 300, and the scanning module includes a camera 320 for image acquisition and a strobe fill light 330 for filling light for the scanned medium. The strobe fill light 330 is a light source device that presents a certain frequency and changes regularly according to a time period. The strobe fill light 330 can control the switching frequency of the light source so that the emitted light flashes at a fixed time interval, thereby realizing periodic switching of the light.

[0074] During the scanning process, the stroboscopic fill light 330 can flash at a fixed frequency. While the stroboscopic fill light 330 is periodically turned on and off, the camera 320 is always in an image acquisition state, so that the camera 320 can not only acquire the image of the scanned medium during each time when the stroboscopic fill light 330 is on, but also acquire the image of the scanned medium during each time when the stroboscopic fill light 330 is off.

[0075] In addition, a processor 310 is also provided inside the dictionary pen body 300. The processor 310 is connected to the camera 320, and the camera 320 can transmit the image sequence collected when the stroboscopic fill light 330 is on to the processor 310. After receiving the image sequence collected when the stroboscopic fill light 330 is on, the processor 310 can obtain a first scan image based on the image sequence. In addition, the camera 320 can transmit the image sequence collected when the stroboscopic fill light 330 is off to the processor 310. After receiving the image sequence collected when the stroboscopic fill light 330 is off, the processor 310 can obtain a second scan image based on the image sequence.

[0076] Compared with the related art that only captures images under the illumination of a fill light, the embodiment of the present invention uses a stroboscopic fill light 330, and captures a first scan image under the illumination of the stroboscopic fill light 330 and a second scan image with the stroboscopic fill light 330 turned off in one scan. The scanning process does not add any additional operations to the user, but also obtains a second scan image captured when the fill light is turned off, which cannot be obtained in the related art.

[0077] Furthermore, it can be understood that the first scanned image and the second scanned image obtained in one scan can be adapted to the scanned medium without luminous and reflective properties, and the second scanned image can be adapted to the scanned medium with luminous or reflective properties. Therefore, when the material of the scanned medium is unknown, the first scanned image and the second scanned image are obtained at the same time, which can ensure that a clear scanned image can be collected regardless of the material of the scanned medium.

[0078] After acquiring the first scanned image and the second scanned image, the processor 310 can determine the scan result corresponding to the above-mentioned scanning action based on the first scanned image and the second scanned image. For example, the first scanned image and the second scanned image can be subjected to OCR respectively to obtain the recognition text of the first scanned image and the recognition text of the second scanned image, and the two recognition texts can be used as the scan result together, or the two recognition texts can be displayed and the user can select the scan result from them; for another example, the clarity of the first scanned image and the second scanned image can be evaluated respectively, and then the clearest image can be selected from the first scanned image and the second scanned image as the scanned image adapted to the scanned medium, and the scanned image can be subjected to OCR to obtain the scanned result.

[0079] The dictionary pen provided by the embodiment of the present invention can obtain a first scanning image when the strobe fill light is on and a second scanning image when the strobe fill light is off in one scan, thereby being able to adapt to scanned media of various materials, so that no matter whether it is facing a scanned medium that does not have luminous and reflective properties or a scanned medium that has luminous or reflective properties, a clear scanning image can be obtained, thereby ensuring the reliability of the scanning results, broadening the available scope of scanning and word retrieval based on the dictionary pen, and optimizing the user experience.

[0080] The scanning device provided by the present invention is described below. The scanning device described below and the scanning method described above can be referred to each other.

[0081] Figure 4 Schematic diagram of the structure of the scanning device provided by the present invention. Figure 4 As shown, the device comprises: A scanning unit 410 is used to obtain a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the strobe fill light is on, and the second scanning image is obtained based on an image sequence acquired when the strobe fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; The identification unit 420 is used to determine a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image.

[0082] The scanning device provided by the embodiment of the present invention obtains a first scanning image when the stroboscopic fill light is on and a second scanning image when the stroboscopic fill light is off in one scan, thereby being adaptable to scanned media of various materials, so that no matter whether it is facing a scanned medium that does not have luminous and reflective properties or a scanned medium that has luminous or reflective properties, a clear scanning image can be obtained, thereby ensuring the reliability of the scanning results, broadening the available scope of scanning and word retrieval based on the dictionary pen, and optimizing the user experience.

[0083] Based on any of the above embodiments, the identification unit is specifically used for: Performing text recognition on the first scanned image to obtain a first text; Performing text recognition on the second scanned image to obtain a second text; A scanning result corresponding to the scanning action is determined based on the first text and the second text.

[0084] Based on any of the above embodiments, the identification unit is specifically used for: displaying the first text and the second text; A text selection operation is received, and based on the text selection operation, a scan result corresponding to the scan action is selected from the first text and the second text.

[0085] Based on any of the above embodiments, the identification unit is specifically used for: Based on the length of the first text and the length of the second text, a scan result corresponding to the scan action is selected from the first text and the second text.

[0086] Based on any of the above embodiments, the identification unit is specifically used for: Selecting a target scan image from the first scan image and the second scan image; Text recognition is performed on the target scanned image to obtain a scan result corresponding to the scanning action.

[0087] Based on any of the above embodiments, the identification unit is specifically used for: displaying the first scanned image and the second scanned image; An image selection operation is received, and based on the image selection operation, a target scan image is selected from the first scan image and the second scan image.

[0088] Based on any of the above embodiments, the identification unit is specifically used for: Based on the definition of the first scanned image and the definition of the second scanned image, a target scanned image is selected from the first scanned image and the second scanned image.

[0089] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the scanning method, which includes: Acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; A scanning result corresponding to the scanning action is determined based on the first scanning image and the second scanning image.

[0090] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0091] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the scanning method provided by the above methods, the method comprising: Acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; A scanning result corresponding to the scanning action is determined based on the first scanning image and the second scanning image.

[0092] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the scanning method provided by the above methods is implemented, and the method includes: Acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; A scanning result corresponding to the scanning action is determined based on the first scanning image and the second scanning image.

[0093] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A scanning method, characterized in that: include: Acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; A scanning result corresponding to the scanning action is determined based on the first scanning image and the second scanning image.

2. The scanning method according to claim 1, characterized in that: The determining, based on the first scanned image and the second scanned image, a scan result corresponding to the scan action includes: Performing text recognition on the first scanned image to obtain a first text; Performing text recognition on the second scanned image to obtain a second text; A scanning result corresponding to the scanning action is determined based on the first text and the second text.

3. The scanning method according to claim 2, characterized in that: The determining, based on the first text and the second text, a scanning result corresponding to the scanning action includes: displaying the first text and the second text; A text selection operation is received, and based on the text selection operation, a scan result corresponding to the scan action is selected from the first text and the second text.

4. The scanning method according to claim 2, characterized in that: The determining, based on the first text and the second text, a scanning result corresponding to the scanning action includes: Based on the length of the first text and the length of the second text, a scan result corresponding to the scan action is selected from the first text and the second text.

5. The scanning method according to claim 1, characterized in that: The determining, based on the first scanned image and the second scanned image, a scan result corresponding to the scan action includes: Selecting a target scan image from the first scan image and the second scan image; Text recognition is performed on the target scanned image to obtain a scan result corresponding to the scanning action.

6. The scanning method according to claim 5, characterized in that: The selecting a target scan image from the first scan image and the second scan image comprises: displaying the first scanned image and the second scanned image; An image selection operation is received, and based on the image selection operation, a target scan image is selected from the first scan image and the second scan image.

7. The scanning method according to claim 5, characterized in that: The selecting a target scan image from the first scan image and the second scan image comprises: Based on the definition of the first scanned image and the definition of the second scanned image, a target scanned image is selected from the first scanned image and the second scanned image.

8. A scanning device, characterized in that: include: A scanning unit, configured to acquire a first scanning image and a second scanning image, wherein the first scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is on, and the second scanning image is obtained based on an image sequence acquired when the stroboscopic fill light is off, and the first scanning image and the second scanning image correspond to the same scanning action; The recognition unit is used to determine a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image.

9. A dictionary pen, characterized in that: It includes a dictionary pen body, a processor arranged inside the dictionary pen body, and a camera and a flash fill light arranged on the surface of the dictionary pen body; The camera is used to collect image sequences when the strobe fill light is on and off respectively; The processor is used to determine a first scanning image based on an image sequence captured when the stroboscopic fill light is on, determine a second scanning image based on an image sequence captured when the stroboscopic fill light is off, and determine a scanning result corresponding to the scanning action based on the first scanning image and the second scanning image.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the scanning method according to any one of claims 1 to 7 is implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the scanning method according to any one of claims 1 to 7 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the scanning method according to any one of claims 1 to 7 is implemented.