Method and system for quickly identifying original point of image scanning

By constructing and comparing standard and real-time feature data sets of image scanning origins and calculating cosine similarity, the problem of false detection in the existing technology is solved and higher positioning accuracy and scanning accuracy are achieved.

CN118694853APending Publication Date: 2024-09-24北京高德品创科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310288576.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Image scanning devices in the prior art are prone to misdetection when positioning the scanning origin, resulting in errors in the scanning area, especially when the manuscript is close to the color gradient block in the fixed area.

Method used

By collecting images of the scanning origin positioning area, a standard feature data set is constructed and a standard image vector is generated. During the scanning process, a real-time feature data set and vector are constructed, and the cosine similarity between the real-time vector and the standard vector is calculated. If unsuccessful, Collect images again to ensure accurate positioning.

Benefits of technology

It improves the accuracy of identifying the origin of image scanning, reduces the occurrence of false detections, is not affected by the manuscript, and enhances scanning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694853A
    Figure CN118694853A
Patent Text Reader

Abstract

The invention is suitable for the technical field of image processing, and particularly relates to a method and a system for quickly identifying an image scanning origin, and the method comprises the steps: carrying out the image collection of a scanning origin positioning region, and obtaining a positioning image; the positioning image is preprocessed, and a standard feature data set is constructed; generating a standard image vector according to the standard feature data set; when image scanning is carried out, image acquisition is carried out to obtain a detection image, and the size of the detection image is consistent with the size of the scanning origin positioning area; constructing a real-time feature data set according to the detection image, and generating a real-time image vector; and calculating the cosine similarity between the real-time image vector and the standard image vector, judging whether the positioning is successful or not, and if the positioning is not successful, collecting the detection image again. According to the method, whether current positioning is successful or not is judged by comparing the vectors, the accuracy is far higher than that in the prior art when positioning is carried out through the method, and the method is not affected by manuscripts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method and system for quickly identifying an image scanning origin. Background Art

[0002] Before the image scanning component scans the manuscript, the scanning component must first find the starting position and then perform a scanning window origin position detection, so that the manuscript in the scanning window can be correctly scanned.

[0003] There are two types of solutions for image scanning devices in the prior art. One is to position by installing sensors, which will increase additional cost. The other is to create a characteristic image with large color level differences (such as different color level blocks, punchings, etc., collectively referred to as the scanning origin positioning area) in front of the correction bar or the scanning window origin.

[0004] The feature recognition method in the prior art makes judgments by detecting the color block images of fixed areas. This solution can only identify a specific scanning origin device, and the scanning component detects the scanning origin from the scanning window. If the manuscript is close to the color blocks of these fixed areas, there may be a phenomenon of incorrect detection when searching for the scanning origin, which will cause an error in the final scanning area. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a method for quickly identifying the origin of an image scan, aiming to solve the problem of false detection in the feature recognition method in the prior art.

[0006] The embodiment of the present invention is implemented as follows: a method for quickly identifying the origin of an image scan, the method comprising: Capturing images of the scanning origin positioning area to obtain a positioning image; Preprocess the positioning image and construct a standard feature data set; Generate a standard image vector based on a standard feature dataset; When performing image scanning, image acquisition is performed to obtain a detection image, and the size of the detection image is consistent with the size of the scanning origin positioning area; Build a real-time feature dataset based on the detected image and generate a real-time image vector; The cosine similarity between the real-time image vector and the standard image vector is calculated to determine whether the positioning is successful. If unsuccessful, the detection image is collected again.

[0007] Preferably, the step of preprocessing the positioning image to construct a standard feature data set specifically includes: Binarize the positioning image to obtain a binary image; Segment the binary image into a plurality of local images of preset sizes; The pixel values ​​in each local image are counted to construct a standard feature data set, in which pixels are divided into two categories.

[0008] Preferably, the step of generating a standard image vector according to a standard feature data set specifically includes: Read the number of each type of pixels in each local image to obtain multiple sets of feature values; Construct a blank vector according to the total number of partial images, where the number of elements of the blank vector is the same as the number of partial images; The blank vector is filled with the eigenvalues ​​as element values ​​to obtain a standard image vector.

[0009] Preferably, the step of calculating the cosine similarity between the real-time image vector and the standard image vector to determine whether the positioning is successful specifically includes: calculating the cosine similarity between the real-time image vector and the standard image vector, comparing the calculated cosine similarity with a preset value, if the cosine similarity is greater than the preset value, it is considered that the positioning has failed, if the cosine similarity is not greater than the preset value, it is considered that the positioning is successful.

[0010] Preferably, the standard feature data set divides pixels into two categories: black pixels and white pixels.

[0011] Preferably, when the detection image is collected again, the collection area is re-determined so that the detection images collected twice are different.

[0012] Another object of an embodiment of the present invention is to provide a system for quickly identifying an image scanning origin, characterized in that the system comprises: The first image acquisition module is used to acquire an image of the scanning origin positioning area to obtain a positioning image; The data set construction module is used to preprocess the positioning image and construct a standard feature data set; A standard vector generation module, used for generating a standard image vector according to a standard feature data set; The second image acquisition module is used to acquire images during image scanning to obtain a detection image, wherein the size of the detection image is consistent with the size of the scanning origin positioning area; A real-time vector generation module is used to construct a real-time feature data set based on the detected image and generate a real-time image vector; The positioning determination module is used to calculate the cosine similarity between the real-time image vector and the standard image vector to determine whether the positioning is successful. If unsuccessful, the detection image is collected again.

[0013] A method for quickly identifying the origin of an image scan provided by an embodiment of the present invention forms a standard feature data set by scanning a scanning positioning area, thereby generating a real-time image vector based on the collected image when performing image scanning, and judging whether the current positioning is successful by comparing the vectors. The positioning accuracy through the present invention is much higher than that of the prior art and will not be affected by the manuscript. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 A flowchart of a method for quickly identifying an image scanning origin provided by an embodiment of the present invention; Figure 2 An architectural diagram of a system for rapidly identifying an image scanning origin provided by an embodiment of the present invention. Implementation

[0015] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0016] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0017] like Figure 1 FIG. 1 is a flowchart of a method for quickly identifying an image scanning origin provided by an embodiment of the present invention, the method comprising: The image of the scanning origin positioning area is collected to obtain a positioning image.

[0018] In this step, the scanning origin positioning area refers to the starting position area described in the above figure, that is, the area with a black block on the white bar. The scanner component runs from the scanning window toward the correction bar and detects whether there is an area with such a black block. The image of the area is captured to obtain a positioning image.

[0019] Preprocess the positioning image and construct a standard feature dataset.

[0020] In this step, the positioning image is preprocessed and converted into a binary image, which is then separated into multiple local images. The pixels in the local images are classified into black and white categories, thereby obtaining multiple sets of feature data and constructing a standard feature data set.

[0021] Generate a standard image vector based on a standard feature dataset.

[0022] In this step, a standard image vector whose number of elements is equal to the number of local images is constructed using the feature data in the standard feature data set as elements.

[0023] When image scanning is performed, image acquisition is performed to obtain a detection image, and the size of the detection image is consistent with the size of the scanning origin positioning area.

[0024] In this step, when performing image scanning, image acquisition is performed. Similarly, the scanning origin positioning area is imaged to obtain a detection image. The size of the detection image needs to be consistent with the size of the scanning origin positioning area.

[0025] A real-time feature dataset is constructed based on the detected image, and a real-time image vector is generated.

[0026] In this step, the detection image is binarized and segmented in the same processing manner, and the number of black and white pixels contained therein is counted to obtain feature data to obtain a real-time image vector.

[0027] The cosine similarity between the real-time image vector and the standard image vector is calculated to determine whether the positioning is successful. If unsuccessful, the detection image is collected again.

[0028] In this step, the cosine similarity between the real-time image vector and the standard image vector is calculated, that is, the angle between the two is calculated. When the cosine similarity is higher than the preset value, it means that the angle between the two is large, which is considered a positioning failure. Otherwise, the positioning is successful.

[0029] In this embodiment, the technical solution can be summarized into two parts: 1. Sample data collection process The first step is to collect image data of the scanning origin positioning area; The second step is to model the image data. The modeling method is to cut the image. Assuming that the original image is 100*100 pixels, the image is binarized and divided into 100 10*10 pixel images. Then, for each 10*10 pixel image, the number of white and black is calculated as the feature value, and then the template data of the image feature is generated. The third step is to save the template data.

[0030] 2. Scan origin positioning detection The first step is to collect an image of the size of the scanning origin positioning area each time; The second step is to use the modeling method of the sample image to model the image and obtain the template data of the scanned image; The third step is to calculate the cosine similarity between the template data and the template data of the sample image; The fourth step is to determine whether the cosine similarity value is greater than a threshold value, and then the scanning origin positioning detection is considered successful, otherwise continue to repeat the first step.

[0031] like Figure 2 As shown, a system for quickly identifying the origin of image scanning provided by an embodiment of the present invention includes: The first image acquisition module is used to acquire an image of the scanning origin positioning area to obtain a positioning image; The data set construction module is used to preprocess the positioning image and construct a standard feature data set; A standard vector generation module, used for generating a standard image vector according to a standard feature data set; The second image acquisition module is used to acquire images during image scanning to obtain a detection image, wherein the size of the detection image is consistent with the size of the scanning origin positioning area; A real-time vector generation module is used to construct a real-time feature data set based on the detected image and generate a real-time image vector; The positioning determination module is used to calculate the cosine similarity between the real-time image vector and the standard image vector to determine whether the positioning is successful. If unsuccessful, the detection image is collected again.

[0032] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0033] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0034] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0035] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0036] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for quickly identifying the origin of image scanning, characterized in that: The method comprises: Capturing images of the scanning origin positioning area to obtain a positioning image; Preprocess the positioning image and construct a standard feature data set; Generate a standard image vector based on a standard feature dataset; When performing image scanning, image acquisition is performed to obtain a detection image, and the size of the detection image is consistent with the size of the scanning origin positioning area; Build a real-time feature dataset based on the detected image and generate a real-time image vector; The cosine similarity between the real-time image vector and the standard image vector is calculated to determine whether the positioning is successful. If unsuccessful, the detection image is collected again.

2. The method for quickly identifying the origin of image scanning according to claim 1, characterized in that: The steps of preprocessing the positioning image and constructing a standard feature data set include: Binarize the positioning image to obtain a binary image; Segment the binary image into a plurality of local images of preset sizes; The pixel values ​​in each local image are counted to construct a standard feature data set, in which pixels are divided into two categories.

3. The method for quickly identifying the origin of image scanning according to claim 2, characterized in that: The step of generating a standard image vector according to the standard feature data set specifically includes: Read the number of each type of pixels in each local image to obtain multiple sets of feature values; Construct a blank vector according to the total number of partial images, where the number of elements of the blank vector is the same as the number of partial images; The blank vector is filled with the eigenvalues ​​as element values ​​to obtain a standard image vector.

4. The method for quickly identifying the origin of image scanning according to claim 1, characterized in that: The step of calculating the cosine similarity between the real-time image vector and the standard image vector to determine whether the positioning is successful specifically includes: calculating the cosine similarity between the real-time image vector and the standard image vector, comparing the calculated cosine similarity with a preset value, if the cosine similarity is greater than the preset value, it is considered that the positioning failed, if the cosine similarity is not greater than the preset value, it is considered that the positioning is successful.

5. The method for quickly identifying the origin of image scanning according to claim 2, characterized in that: The standard feature data set divides pixels into two categories: black pixels and white pixels.

6. The method for quickly identifying the origin of image scanning according to claim 1, characterized in that: When the detection image is collected again, the collection area is re-determined so that the detection images collected twice are different.

7. A rapid identification system for image scanning origin, characterized in that: The system comprises: The first image acquisition module is used to acquire an image of the scanning origin positioning area to obtain a positioning image; The data set construction module is used to preprocess the positioning image and construct a standard feature data set; A standard vector generation module, used for generating a standard image vector according to a standard feature data set; The second image acquisition module is used to acquire images during image scanning to obtain a detection image, wherein the size of the detection image is consistent with the size of the scanning origin positioning area; A real-time vector generation module is used to construct a real-time feature data set based on the detected image and generate a real-time image vector; The positioning determination module is used to calculate the cosine similarity between the real-time image vector and the standard image vector to determine whether the positioning is successful. If unsuccessful, the detection image is collected again.