WO2020248497A1 - Picture scanning document processing method and apparatus, computer device, and storage medium - Google Patents

Picture scanning document processing method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2020248497A1
WO2020248497A1 PCT/CN2019/118237 CN2019118237W WO2020248497A1 WO 2020248497 A1 WO2020248497 A1 WO 2020248497A1 CN 2019118237 W CN2019118237 W CN 2019118237W WO 2020248497 A1 WO2020248497 A1 WO 2020248497A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
preset
scan
feature vector
identified
Prior art date
Application number
PCT/CN2019/118237
Other languages
French (fr)
Chinese (zh)
Inventor
孙强
陆凯杰
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020248497A1 publication Critical patent/WO2020248497A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10008Still image; Photographic image from scanner, fax or copier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • This application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for processing scanned images.
  • a paper document containing text, symbols, and graphics is scanned to generate a scanned image of the image, which is used as an electronic archive of the paper document.
  • Scanned documents are usually not convenient for users to edit and modify according to their needs. For example, the user cannot replace part of the text in the scanned document as a whole, or replace the graphics in the scanned document. This makes the scanned document only another non-editable form of the paper document under the computer system, which affects the user experience.
  • the embodiment of the present application proposes a method, device, computer equipment, and storage medium for processing scanned images, which aim to intelligently process scanned images to improve user experience.
  • this application provides a method for processing scanned images, which includes:
  • the region to be identified is identified to obtain a target object; a target combination template is obtained, and a target file is generated according to the target combination template and the plurality of target objects.
  • this application provides a device for processing scanned images, which includes:
  • the preprocessing unit is configured to preprocess the initial picture scan according to the preset image preprocessing method to generate a first picture scan; the segmentation unit is configured to perform the first picture scan according to the preset image segmentation method Segmentation to form a plurality of regions to be identified; an acquisition unit for acquiring the characteristic parameters of each region to be identified, and setting corresponding feature labels according to the characteristic parameters of each region to be identified; identification unit for Obtain an object recognition model corresponding to the feature tag, and recognize the area to be recognized according to the object recognition model to obtain a target object; a target file generating unit is used to obtain a target combination template, and according to the target combination A template and a plurality of the target objects generate a target file.
  • an embodiment of the present application also provides a computer device, which includes a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the A computer program to perform the following steps: preprocess the initial picture scan according to a preset image preprocessing method to generate a first picture scan; and divide the first picture scan according to the preset image segmentation method to Forming a plurality of regions to be identified; acquiring the characteristic parameters of each of the regions to be identified, and setting corresponding characteristic labels according to the characteristic parameters of each region to be identified; acquiring the object recognition model corresponding to the characteristic labels, The region to be recognized is recognized according to the object recognition model to obtain a target object; a target combination template is obtained, and a target file is generated according to the target combination template and the plurality of target objects.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps: Upon receiving the query instruction, it is determined whether the query range distance of the query instruction is greater than the preset threshold, wherein the query instruction includes the query location point and the query range distance; if the query range distance of the query instruction is not greater than the preset threshold, Then an expanded dictionary tree constructed in advance based on the Geohash algorithm is used to query the location points in the query domain and return the queried target location points; if the query range distance of the query instruction is greater than the preset threshold, the pre-order based on the Z curve is used The constructed R-tree queries the location points in the query domain and returns the queried target location points.
  • FIG. 1 is a schematic flowchart of a method for processing a scanned image according to an embodiment of the application
  • FIG. 2 is a schematic diagram of a sub-flow of a method for processing a scanned image according to an embodiment of the application
  • FIG. 3 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the application;
  • FIG. 4 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the application;
  • FIG. 5 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application;
  • FIG. 6 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application;
  • FIG. 7 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application.
  • FIG. 8 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application.
  • FIG. 9 is a schematic block diagram of a device for processing scanned images according to an embodiment of the application.
  • FIG. 10 is a schematic block diagram of a device for processing scanned images according to another embodiment of the application.
  • FIG. 11 is a schematic block diagram of a device for processing scanned images according to another embodiment of the application.
  • FIG. 12 is a schematic block diagram of a device for processing scanned images according to another embodiment of this application.
  • FIG. 13 is a schematic block diagram of a device for processing scanned images according to another embodiment of this application.
  • FIG. 14 is a schematic block diagram of a device for processing scanned images according to another embodiment of this application.
  • FIG. 15 is a schematic block diagram of a device for processing scanned images according to another embodiment of the application.
  • FIG. 16 is a schematic block diagram of a device for processing scanned images according to still another embodiment of the application.
  • FIG. 17 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • FIG. 1 is a schematic flowchart of a method for processing a scanned image according to an embodiment of the present application. As shown in FIG. 1, an embodiment of the present application proposes a method for processing a scanned image, which includes steps S110 to S140.
  • the initial image scan needs to be preprocessed by using a preset image preprocessing method to obtain the processed first image scan.
  • the scan of the initial picture is usually a color picture.
  • the scan of the picture may be grayscaled first, so as to convert the scan of the color picture into an initial gray. Degree image.
  • the image scan may have a distortion area due to the distortion of the scanning lens, causing the text, symbols or graphics in the distortion area to be deformed, which affects the scanning of the image. Accuracy of recognition.
  • the initial image scan can be subjected to distortion correction processing according to a preset distortion correction algorithm, and the obtained corrected image scan is used as the first image scan.
  • FIG. 2 is a schematic diagram of a sub-flow of a method for processing a scanned image according to an embodiment of the present application.
  • the step S110 includes substeps S1100 to S1102.
  • S1100 Perform grayscale processing on the scan of the initial picture to generate an initial grayscale image corresponding to the scan of the initial picture.
  • the color image can be converted into a grayscale image to facilitate the identification of the scan.
  • S1101 determine whether the initial gray image has a distortion area.
  • the resulting image will have distortion problems, and the degree of distortion is related to the lens’ process.
  • the degree of image distortion caused by lenses produced by different manufacturers is also Different.
  • a preset image distortion detection algorithm it can be determined whether the gray image has a distortion area, so that the gray image can be corrected by a distortion correction algorithm to improve the recognition accuracy of characters, symbols and graphics.
  • the preset image distortion detection algorithm may be: acquiring a plurality of sampling points of the initial gray image; calculating the correction value of each sampling point according to a preset distortion detection calculation formula; judging each sampling point Whether the difference between the point and the corresponding correction value is within a preset threshold range, if it is within the preset threshold range, it is confirmed that the grayscale image has a distortion area.
  • the initial gray image is subjected to distortion correction according to a preset distortion correction algorithm to generate the first image scan.
  • the preset distortion correction algorithm is: obtaining the coordinate value of each pixel point of the initial gray image, and calculating the target coordinate value of each pixel point coordinate value according to a preset distortion correction formula.
  • the preset distortion correction formula is:
  • (u, v) is the target coordinate value
  • (u', v') is the pixel coordinate value
  • k 1 , k 2 , and k 3 are distortion coefficients
  • r 2 u 2 +v 2 .
  • the scan of the first picture may have multiple text areas, symbol areas, and graphic areas.
  • the first picture is scanned
  • the files are processed according to the preset image segmentation method to generate multiple regions to be recognized.
  • the object feature vector of the scan of the first picture can be obtained according to the preset feature vector calculation method, and the feature vector of the scan of the first picture can be determined from the preset feature vector group by way of feature vector comparison.
  • the difference of the object feature vector is less than the first preset feature vector of the first preset threshold, and then the image segmentation template associated with the first preset feature vector is obtained, and then the first preset feature vector is analyzed according to the image segmentation template.
  • the scanned image is segmented to generate a plurality of regions to be identified.
  • Using the characteristic parameter as a characteristic label, each region to be identified is associated with the characteristic label.
  • FIG. 3 is a schematic diagram of a sub-flow of a method for processing scanned images according to another embodiment of the present application.
  • the step S120 includes sub-steps S1200 to S1202.
  • the feature vector comparison method is used to determine the segmentation template used to segment the scan of the first picture. Therefore, the first image scan is calculated according to the preset feature vector calculation method to generate the object feature vector of the first image scan.
  • the preset feature vector calculation method may be a principal component analysis algorithm, which calculates the object feature vector of the first image scan through the principal component analysis algorithm.
  • the preset feature vector group can be stored in advance, and each preset feature vector in the preset feature vector group and the corresponding image segmentation template can be associated, so as to obtain the data from the preset feature vector group. For a first preset feature vector whose difference value of the object feature vector is within a preset threshold value range, the first image scan is segmented by using an image segmentation template associated with the first preset feature vector.
  • the corresponding image segmentation template is determined by calculating the difference between the feature vector in the preset feature vector group and the feature vector of the object, and comparing it with the first preset threshold. Wherein, in this embodiment, if there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than the first preset threshold, obtain the first preset feature vector related to the first preset The image segmentation template of the joint.
  • S1202. Segment the scan of the first picture according to the image segmentation template to generate a plurality of regions to be identified.
  • the first image scan is segmented according to the image segmentation template to generate multiple regions to be recognized, so that different regions to be recognized can be subsequently recognized, and corresponding Recognition results.
  • the feature vector calculation method obtains the sub-object feature vector of each of the regions to be identified. If there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, the feature parameter associated with the second preset feature vector is acquired. Using the characteristic parameter as a characteristic label, each region to be identified is associated with the characteristic label.
  • FIG. 4 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application.
  • the step S130 includes sub-steps S1300 to S1302.
  • the feature vector of each region to be identified is obtained as a sub-object feature vector by using the preset feature vector calculation method, so as to determine the feature parameter corresponding to each region to be identified , And then determine the recognition model used for recognizing the region to be recognized according to the characteristic parameter.
  • the characteristic parameter may be a keyword. For example, if the scan of the first picture can be divided into three areas to be recognized, which are text to be recognized, graphics to be recognized, and symbols to be recognized.
  • the parameter is the keyword "text"; in the same way, for the area to be recognized by the figure, the corresponding keyword obtained is "graphic", and for the area to be recognized by the symbol, the corresponding keyword obtained is " symbol”.
  • the characteristic parameter is used as a characteristic label, and each region to be identified is associated with the characteristic label, so that the region to be identified can be identified through the characteristic label.
  • the objects contained in the initial image scan may include text, symbols, and graphics.
  • different recognition models are used for recognition. Wherein, if the feature tag is a text tag, a text recognition model is obtained; the region to be recognized is recognized according to the text recognition model to obtain a text recognition result. If the feature tag is a symbol tag, a symbol recognition model is obtained; the region to be recognized is recognized according to the symbol recognition model to obtain a symbol recognition result. If the feature tag is a graphic tag, a graphic recognition model is obtained; the area to be recognized is recognized according to the graphic recognition model to obtain a graphic recognition result.
  • FIG. 5 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application.
  • the step S140 includes sub-steps S1400 and S1401.
  • S1400 If the feature label is a text label, obtain a text recognition model. In the embodiment of the present application, if the feature label is a text label, that is, the content of the region to be recognized is text, then a text recognition model is obtained.
  • the text recognition result is obtained by recognizing the region to be recognized according to the text recognition model.
  • FIG. 6 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application.
  • the step S140 includes sub-steps S1402 and S1403.
  • a symbol tag obtains a symbol recognition model.
  • the feature label is a symbol label, that is, the content of the area to be identified is a symbol, then a symbol recognition model is obtained.
  • the symbol recognition result is obtained by recognizing the region to be recognized according to the symbol recognition model.
  • FIG. 7 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application.
  • the step S140 includes sub-steps S1404 and S1405.
  • S1404 If the feature tag is an image tag, obtain a graphic recognition model.
  • the feature label is a graphic label, that is, the content of the area to be recognized is a graphic, a graphic recognition model is obtained.
  • the pattern recognition result is obtained by recognizing the region to be recognized according to the pattern recognition model.
  • a user interface may be generated, and multiple preset combination templates may be displayed on the user interface to obtain the target combination template generated by the user selecting the multiple preset combination templates, and then The target file is generated according to the target combination template and the plurality of target objects.
  • FIG. 8 is a schematic diagram of a sub-flow of a method for processing a scanned image according to still another embodiment of the present application.
  • the step S140 includes sub-steps S1500 to S1502.
  • S1500 Generate a user interface, and display multiple preset combination templates on the user interface.
  • the system stores multiple preset combination templates. By generating a user interface and displaying the multiple preset combination templates on the user interface, it is convenient for the user to select.
  • the target file is generated by combining the target template and the plurality of target objects. For example, if the number of regions to be recognized in the initial image scan is 5, there are 3 text areas, 1 symbol area, and 1 graphic area, and there are 5 areas in the initial image scan It is a top-down layout.
  • the target combination template is a pattern of three left and two right, by displaying the corresponding text content in the three left columns of the target combination template, displaying the symbol content in the upper column on the right, and The lower column displays the graphic content, which can present a more beautiful layout than the scanned one.
  • the content of each column under the target combination template can be edited and modified, for example, the text column can be added, modified or deleted.
  • FIG. 9 is a schematic block diagram of an image scan processing apparatus 200 provided in an embodiment of the application.
  • the image scan processing device 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250.
  • the preprocessing unit 210 is configured to preprocess the initial picture scan according to a preset image preprocessing method to generate a first picture scan;
  • the segmentation unit 220 is configured to segment the first image scan according to a preset image segmentation method to form a plurality of regions to be identified, and set a feature label for each region to be identified;
  • the acquiring unit 230 is configured to acquire the characteristic parameters of each of the regions to be identified, and set a corresponding characteristic label according to the characteristic parameters of each of the regions to be identified;
  • the recognition unit 240 is configured to obtain an object recognition model corresponding to the feature tag, and recognize the area to be recognized according to the object recognition model to obtain a target object;
  • the target file generating unit 250 is configured to obtain a target combination template, and generate a target file according to the target combination template and multiple target objects.
  • FIG. 10 is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application.
  • the image scan processing device 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the preprocessing
  • the unit 210 includes a grayscale processing unit 2100, a judgment unit 2101, and a distortion correction unit 2102.
  • the gray-scale processing unit 2100 is configured to perform gray-scale processing on the scan of the initial picture to generate an initial gray image corresponding to the scan of the initial picture.
  • the determining unit 2101 is configured to determine whether the initial grayscale image has a distortion area according to a preset image distortion detection method.
  • the distortion correction unit 2102 is configured to perform distortion correction on the initial grayscale image according to a preset distortion correction algorithm to generate the first image scan if it is determined that the initial grayscale image has a distortion area.
  • FIG. 11 is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application.
  • the image scan processing device 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the segmentation unit 220 includes: an object feature vector obtaining unit 2200, an image segmentation template obtaining unit 2201, and a region to be recognized generating unit 2202.
  • the object feature vector obtaining unit 2200 is configured to obtain the object feature vector of the first image scan according to a preset feature vector calculation method.
  • the image segmentation template obtaining unit 2201 is configured to, if there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than the first preset threshold, obtain the first preset feature vector and the first preset feature vector The associated image segmentation template.
  • the to-be-recognized region generating unit 2202 is configured to segment the first image scan according to the image segmentation template to generate a plurality of the to-be-recognized regions.
  • FIG. 12 is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application.
  • the image scan processing device 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the acquisition unit 230 includes: a sub-object feature vector obtaining unit 2300, a feature parameter obtaining unit 2301, and an associating unit 2302.
  • the sub-object feature vector obtaining unit 2300 is configured to obtain the sub-object feature vector of each region to be identified according to the preset feature vector calculation method.
  • the feature parameter acquiring unit 2301 is configured to, if there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, to obtain the second preset feature vector The associated characteristic parameter.
  • the associating unit 2302 is configured to use the characteristic parameter as a characteristic label, and associate each of the regions to be identified with the characteristic label.
  • FIG. 13 is a schematic block diagram of an apparatus 200 for processing scanned images according to another embodiment of the application.
  • the image scan processing apparatus 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the identification unit 240 includes a character recognition model obtaining unit 2400 and a character recognition result obtaining unit 2401.
  • the character recognition model obtaining unit 2400 is configured to obtain a character recognition model if the feature label is a character label.
  • the character recognition result obtaining unit 2401 is configured to recognize the region to be recognized according to the character recognition model to obtain a character recognition result.
  • FIG. 14 is a schematic block diagram of a scanning image processing apparatus 200 provided by another embodiment of the application.
  • the image scan processing device 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the identification unit 240 includes a symbol recognition model acquisition unit 2402 and a symbol recognition result acquisition unit 2403.
  • the symbol recognition model acquisition unit 2402 is configured to acquire a symbol recognition model if the feature tag is a symbol tag.
  • the symbol recognition result obtaining unit 2403 is configured to recognize the region to be recognized according to the symbol recognition model to obtain a symbol recognition result.
  • FIG. 15 is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application.
  • the image scan processing device 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the identification unit 240 includes a graphic recognition model obtaining unit 2404 and a graphic recognition result obtaining unit 2405.
  • the graphic recognition model obtaining unit 2404 is configured to obtain a graphic recognition model if the feature tag is an image tag.
  • the graphic recognition result obtaining unit 2405 is configured to recognize the region to be recognized according to the graphic recognition model to obtain a graphic recognition result.
  • FIG. 16 is a schematic block diagram of an image scan processing apparatus 200 provided by still another embodiment of the application.
  • the image scan processing apparatus 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the target file
  • the generation unit 250 includes a user interface generation unit 2500, a target combination template acquisition unit 2501, and a combination unit 2502.
  • the user interface generating unit 2500 is configured to generate a user interface and display a plurality of preset combination templates on the user interface.
  • the target combination template obtaining unit 2501 is configured to obtain a target combination template generated by a user selecting a plurality of the preset combination templates.
  • the combining unit 2502 is configured to generate the target file according to the target combination template and multiple target objects.
  • the above-mentioned image scan processing device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 17.
  • FIG. 17 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer device 300 device may be a terminal.
  • the computer device 300 includes a processor 302, a memory, and a network interface 305 connected through a system bus 301, where the memory may include a non-volatile storage medium 303 and an internal memory 304.
  • the non-volatile storage medium 303 can store an operating system 3031 and a computer program 3032.
  • the computer program 3032 includes program instructions. When the program instructions are executed, the processor 302 can execute a method for processing scanned images.
  • the processor 302 is used to provide computing and control capabilities and support the operation of the entire computer device 300.
  • the internal memory 304 provides an environment for the running of the computer program 3032 in the non-volatile storage medium 303.
  • the processor 302 can execute a method for processing scanned images.
  • the network interface 305 is used for network communication, such as sending assigned tasks.
  • the processor 302 is configured to run a computer program 3032 stored in a memory, so as to implement the image scan processing method in the embodiment of the present application.
  • the processor 302 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • a storage medium may be a computer-readable storage medium.
  • the storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the scanning image processing method described in the above embodiments.
  • the storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk, and other media that can store program codes.
  • ROM Read-Only Memory
  • magnetic disk or an optical disk, and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Character Input (AREA)

Abstract

Embodiments of the present application provide a picture scanning document processing method and apparatus, a computer device, and a storage medium. The picture scanning document processing method comprises: pre-processing an initial picture scanning document according to a preset image pre-processing method so as to generate a first picture scanning document; segmenting the first picture scanning document according to a preset image segmentation method to form a plurality of areas to be identified; obtaining a feature parameter of each of said areas and setting a corresponding feature tag according to the feature parameter of each of said areas; obtaining an object identification model corresponding to the feature tag and identifying said areas according to the object identification model so as to obtain target objects; and obtaining a target combination template and generating a target document according to the target combination template and the plurality of target objects.

Description

图片扫描件处理方法、装置、计算机设备及存储介质Image scanning processing method, device, computer equipment and storage medium
本申请要求于2019年06月12日提交中国专利局、申请号为201910505226.X、申请名称为“图片扫描件处理方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on June 12, 2019, the application number is 201910505226.X, and the application name is "Image Scanning Processing Method, Device, Computer Equipment and Storage Medium", all of which The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种图片扫描件处理方法、装置、计算机设备及存储介质。This application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for processing scanned images.
背景技术Background technique
现有技术中,对于包含有文字、符号以及图形的纸质文件进行扫描以生成图片扫描件,用于作为该纸质文件的电子存档资料。扫描件通常不便于用户根据其需要进行编辑和修改。譬如,用户无法对扫描件中的部分文字段落进行整体的替换,或者对扫描件中的图形进行替换。这就使得扫描件只能成为纸质文件在计算机系统下的另一不可编辑的表现形式,影响了用户的体验。In the prior art, a paper document containing text, symbols, and graphics is scanned to generate a scanned image of the image, which is used as an electronic archive of the paper document. Scanned documents are usually not convenient for users to edit and modify according to their needs. For example, the user cannot replace part of the text in the scanned document as a whole, or replace the graphics in the scanned document. This makes the scanned document only another non-editable form of the paper document under the computer system, which affects the user experience.
发明内容Summary of the invention
本申请实施例提出一种图片扫描件处理方法、装置、计算机设备及存储介质,旨在对图片扫描件进行智能化处理,以提升用户的体验。The embodiment of the present application proposes a method, device, computer equipment, and storage medium for processing scanned images, which aim to intelligently process scanned images to improve user experience.
第一方面,本申请提供一种图片扫描件处理方法,其包括:In the first aspect, this application provides a method for processing scanned images, which includes:
根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。Preprocess the initial picture scan according to a preset image preprocessing method to generate a first picture scan; divide the first picture scan according to a preset image segmentation method to form a plurality of regions to be recognized; obtain Each feature parameter of the region to be identified, and a corresponding feature label is set according to the feature parameter of each region to be identified; an object recognition model corresponding to the feature label is acquired, and the object recognition model The region to be identified is identified to obtain a target object; a target combination template is obtained, and a target file is generated according to the target combination template and the plurality of target objects.
第二方面,本申请提供一种图片扫描件处理装置,其包括:In a second aspect, this application provides a device for processing scanned images, which includes:
预处理单元,用于根据预设图像预处理方法对初始图片扫描件进行预处理, 以生成第一图片扫描件;分割单元,用于根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;获取单元,用于获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;识别单元,用于获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;目标文件生成单元,用于获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。The preprocessing unit is configured to preprocess the initial picture scan according to the preset image preprocessing method to generate a first picture scan; the segmentation unit is configured to perform the first picture scan according to the preset image segmentation method Segmentation to form a plurality of regions to be identified; an acquisition unit for acquiring the characteristic parameters of each region to be identified, and setting corresponding feature labels according to the characteristic parameters of each region to be identified; identification unit for Obtain an object recognition model corresponding to the feature tag, and recognize the area to be recognized according to the object recognition model to obtain a target object; a target file generating unit is used to obtain a target combination template, and according to the target combination A template and a plurality of the target objects generate a target file.
第三方面,本申请实施例还提供了一种计算机设备,其包括存储器以及与所述存储器相连的处理器;所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。In a third aspect, an embodiment of the present application also provides a computer device, which includes a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the A computer program to perform the following steps: preprocess the initial picture scan according to a preset image preprocessing method to generate a first picture scan; and divide the first picture scan according to the preset image segmentation method to Forming a plurality of regions to be identified; acquiring the characteristic parameters of each of the regions to be identified, and setting corresponding characteristic labels according to the characteristic parameters of each region to be identified; acquiring the object recognition model corresponding to the characteristic labels, The region to be recognized is recognized according to the object recognition model to obtain a target object; a target combination template is obtained, and a target file is generated according to the target combination template and the plurality of target objects.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器执行以下步骤:若接收到查询指令,判断所述查询指令的查询范围距离是否大于预设阈值,其中,所述查询指令包括查询位置点以及查询范围距离;若所述查询指令的查询范围距离不大于预设阈值,则采用基于Geohash算法预先构建的扩展字典树对查询域内的位置点进行查询并返回所查询到的目标位置点;若所述查询指令的查询范围距离大于预设阈值,则采用基于Z曲线序预先构建的R树对查询域内的位置点进行查询并返回所查询到的目标位置点。In a fourth aspect, the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps: Upon receiving the query instruction, it is determined whether the query range distance of the query instruction is greater than the preset threshold, wherein the query instruction includes the query location point and the query range distance; if the query range distance of the query instruction is not greater than the preset threshold, Then an expanded dictionary tree constructed in advance based on the Geohash algorithm is used to query the location points in the query domain and return the queried target location points; if the query range distance of the query instruction is greater than the preset threshold, the pre-order based on the Z curve is used The constructed R-tree queries the location points in the query domain and returns the queried target location points.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的图片扫描件处理方法的流程示意图;FIG. 1 is a schematic flowchart of a method for processing a scanned image according to an embodiment of the application;
图2为本申请实施例提供的图片扫描件处理方法的子流程示意图;2 is a schematic diagram of a sub-flow of a method for processing a scanned image according to an embodiment of the application;
图3为本申请另一实施例提供的图片扫描件处理方法的子流程示意图;3 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the application;
图4为本申请另一实施例提供的图片扫描件处理方法的子流程示意图;4 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the application;
图5为本申请又一实施例提供的图片扫描件处理方法的子流程示意图;FIG. 5 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application;
图6为本申请又一实施例提供的图片扫描件处理方法的子流程示意图;FIG. 6 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application;
图7为本申请又一实施例提供的图片扫描件处理方法的子流程示意图;FIG. 7 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application;
图8为本申请再一实施例提供的图片扫描件处理方法的子流程示意图;FIG. 8 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of this application;
图9为本申请实施例提供的图片扫描件处理装置的示意性框图;FIG. 9 is a schematic block diagram of a device for processing scanned images according to an embodiment of the application;
图10为本申请另一实施例提供的图片扫描件处理装置的示意性框图;FIG. 10 is a schematic block diagram of a device for processing scanned images according to another embodiment of the application;
图11为本申请又一实施例提供的图片扫描件处理装置的示意性框图;FIG. 11 is a schematic block diagram of a device for processing scanned images according to another embodiment of the application;
图12为本申请又一实施例提供的图片扫描件处理装置的示意性框图;FIG. 12 is a schematic block diagram of a device for processing scanned images according to another embodiment of this application;
图13为本申请又一实施例提供的图片扫描件处理装置的示意性框图;FIG. 13 is a schematic block diagram of a device for processing scanned images according to another embodiment of this application;
图14为本申请又一实施例提供的图片扫描件处理装置的示意性框图;FIG. 14 is a schematic block diagram of a device for processing scanned images according to another embodiment of this application;
图15为本申请又一实施例提供的图片扫描件处理装置的示意性框图;FIG. 15 is a schematic block diagram of a device for processing scanned images according to another embodiment of the application;
图16为本申请再一实施例提供的图片扫描件处理装置的示意性框图;FIG. 16 is a schematic block diagram of a device for processing scanned images according to still another embodiment of the application;
图17为本申请实施例提供的计算机设备的示意性框图。FIG. 17 is a schematic block diagram of a computer device provided by an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the terms "including" and "including" indicate the existence of the described features, wholes, steps, operations, elements and/or components, but do not exclude one or The existence or addition of multiple other features, wholes, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .
请参阅图1,图1是本申请实施例提供的图片扫描件处理方法的流程示意图。如图1所示,本申请实施例提出一种图片扫描件处理方法,包括步骤S110~S140。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a method for processing a scanned image according to an embodiment of the present application. As shown in FIG. 1, an embodiment of the present application proposes a method for processing a scanned image, which includes steps S110 to S140.
S110、根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件。S110. Preprocess the initial picture scan according to a preset image preprocessing method to generate a first picture scan.
在本申请实施例中,针对初始图片扫描件需采用预设的图像预处理方法进行预处理,以得到经过处理后的第一图片扫描件。具体地,初始图片扫描件通常为彩色图片,为了便于对图片扫描件进行识别,在本实施例中,可先对图片扫描件进行灰度处理,以便于将彩色的图片扫描件转化为初始灰度图像。而在初始图片扫描件的生成过程中,可能由于扫描镜头存在的畸变问题,而导致该图片扫描件存在畸变区域,造成了畸变区域中的文字、符号或者图形变形,影响了对图片扫描件进行识别的准确率。因此,还需通过预设图像畸变检测算法对初始图片扫描件进行畸变检测,以判断所述初始图片扫描件是否存在畸变区域。若所述初始图片扫描件存在畸变区域,则可根据预设畸变校正算法对所述初始图像扫描进行畸变校正处理,将得到的校正后的图片扫描件作为第一图片扫描件。In the embodiment of the present application, the initial image scan needs to be preprocessed by using a preset image preprocessing method to obtain the processed first image scan. Specifically, the scan of the initial picture is usually a color picture. In order to facilitate the identification of the scan of the picture, in this embodiment, the scan of the picture may be grayscaled first, so as to convert the scan of the color picture into an initial gray. Degree image. In the process of generating the original scanned image, the image scan may have a distortion area due to the distortion of the scanning lens, causing the text, symbols or graphics in the distortion area to be deformed, which affects the scanning of the image. Accuracy of recognition. Therefore, it is also necessary to perform distortion detection on the original image scan by using a preset image distortion detection algorithm to determine whether the original image scan has a distortion area. If the initial image scan has a distortion area, the initial image scan can be subjected to distortion correction processing according to a preset distortion correction algorithm, and the obtained corrected image scan is used as the first image scan.
请参阅图2,图2是本申请实施例提供的图片扫描件处理方法的子流程示意图。如图2所示,在某些实施例,例如本实施例中,所述步骤S110包括子步骤S1100~S1102。Please refer to FIG. 2, which is a schematic diagram of a sub-flow of a method for processing a scanned image according to an embodiment of the present application. As shown in FIG. 2, in some embodiments, such as this embodiment, the step S110 includes substeps S1100 to S1102.
S1100、对所述初始图片扫描件进行灰度处理,以生成与所述初始图片扫描件相对应的初始灰度图像。S1100: Perform grayscale processing on the scan of the initial picture to generate an initial grayscale image corresponding to the scan of the initial picture.
通过对所述初始图片扫描件进行灰度处理,可将彩色图像转化为灰度图像,以便于对该扫描件进行识别。By performing grayscale processing on the scan of the initial picture, the color image can be converted into a grayscale image to facilitate the identification of the scan.
S1101、根据预设图像畸变检测方法,判断所述初始灰度图像是否存在畸变区域。S1101, according to a preset image distortion detection method, determine whether the initial gray image has a distortion area.
在图片扫描件的形成中,因镜头本身的工艺存在瑕疵,会导致所形成的图片存在畸变问题,且畸变的程度跟镜头的工艺相关,不同厂家所生产的镜头其所导致的图像畸变程度也不一样。根据预设图像畸变检测算法,可判断所述灰 度图像是否存在畸变区域,以便于后续通过畸变校正算法对所述灰度图像进行畸变校正,以提高对文字、符号以及图形的识别准确率。其中,所述预设图像畸变检测算法可以为:获取所述初始灰度图像的多个采样点;根据预设畸变检测计算公式计算每一所述采样点的校正值;判断每一所述采样点与其相对应的所述校正值的差值是否在预设阈值范围内,若在预设阈值范围内则确认所述灰度图像存在畸变区域。In the formation of image scans, due to flaws in the lens’ process itself, the resulting image will have distortion problems, and the degree of distortion is related to the lens’ process. The degree of image distortion caused by lenses produced by different manufacturers is also Different. According to a preset image distortion detection algorithm, it can be determined whether the gray image has a distortion area, so that the gray image can be corrected by a distortion correction algorithm to improve the recognition accuracy of characters, symbols and graphics. Wherein, the preset image distortion detection algorithm may be: acquiring a plurality of sampling points of the initial gray image; calculating the correction value of each sampling point according to a preset distortion detection calculation formula; judging each sampling point Whether the difference between the point and the corresponding correction value is within a preset threshold range, if it is within the preset threshold range, it is confirmed that the grayscale image has a distortion area.
S1102、若所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。S1102, if the initial grayscale image has a distortion area, perform distortion correction on the initial grayscale image according to a preset distortion correction algorithm to generate the first picture scan.
在本申请实施例中,若判断结果为所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。其中,所述预设畸变校正算法为:获取所述初始灰度图像的每一像素点坐标值,根据预设畸变校正公式计算每一所述像素点坐标值的目标坐标值。譬如,对于径向畸变而言,预设畸变校正公式为:In the embodiment of the present application, if the judgment result is that the initial gray image has a distortion area, the initial gray image is subjected to distortion correction according to a preset distortion correction algorithm to generate the first image scan. Wherein, the preset distortion correction algorithm is: obtaining the coordinate value of each pixel point of the initial gray image, and calculating the target coordinate value of each pixel point coordinate value according to a preset distortion correction formula. For example, for radial distortion, the preset distortion correction formula is:
u'=u(1+k 1r 2+k 2r 4+k 3r 6)   (1) u'=u(1+k 1 r 2 + k 2 r 4 + k 3 r 6 ) (1)
v'=v(1+k 1r 2+k 2r 4+k 3r 6)   (2) v'=v(1+k 1 r 2 + k 2 r 4 + k 3 r 6 ) (2)
其中,(u,v)为目标坐标值,而(u',v')为像素点坐标值,k 1,k 2,k 3为畸变系数,而r 2=u 2+v 2Among them, (u, v) is the target coordinate value, and (u', v') is the pixel coordinate value, k 1 , k 2 , and k 3 are distortion coefficients, and r 2 =u 2 +v 2 .
S120、根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域。S120. Segment the scan of the first picture according to a preset image segmentation method to form multiple regions to be identified.
在本申请实施例中,所述第一图片扫描件可能存在多个文字区域、符号区域以及图形区域,为了便于对不同区域的内容进行识别,在本实施例中,对所述第一图片扫描件根据预设图像分割方法进行处理,以生成多个待识别区域。其中,可根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量,并通过特征向量比对的方式,从预设特征向量组中,确定与所述第一图片扫描件的对象特征向量的差值小于第一预设阈值的第一预设特征向量,进而获取与所述第一预设特征向量相关联的图像分割模板,然后根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。根据所述预设特征向量计算方法获取每一所述待识别区域的子对象特征向量。若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量, 获取与所述第二预设特征向量相关联的特征参数。以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联。In the embodiment of the present application, the scan of the first picture may have multiple text areas, symbol areas, and graphic areas. In order to facilitate the identification of the contents of different areas, in this embodiment, the first picture is scanned The files are processed according to the preset image segmentation method to generate multiple regions to be recognized. Wherein, the object feature vector of the scan of the first picture can be obtained according to the preset feature vector calculation method, and the feature vector of the scan of the first picture can be determined from the preset feature vector group by way of feature vector comparison. The difference of the object feature vector is less than the first preset feature vector of the first preset threshold, and then the image segmentation template associated with the first preset feature vector is obtained, and then the first preset feature vector is analyzed according to the image segmentation template. The scanned image is segmented to generate a plurality of regions to be identified. Obtain the sub-object feature vector of each region to be identified according to the preset feature vector calculation method. If there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, acquiring feature parameters associated with the second preset feature vector. Using the characteristic parameter as a characteristic label, each region to be identified is associated with the characteristic label.
请参阅图3,图3是本申请另一实施例提供的图片扫描件处理方法的子流程示意图。如图3所示,在某些实施例,例如本实施例中,所述步骤S120包括子步骤S1200~S1202。Please refer to FIG. 3, which is a schematic diagram of a sub-flow of a method for processing scanned images according to another embodiment of the present application. As shown in FIG. 3, in some embodiments, such as this embodiment, the step S120 includes sub-steps S1200 to S1202.
S1200、根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量。S1200. Obtain an object feature vector of the scan of the first picture according to a preset feature vector calculation method.
在本申请实施例中,通过特征向量比对的方式,用于确定对所述第一图片扫描件进行分割所采用的分割模板。因此,先通过根据预设特征向量计算方法对所述第一图片扫描件进行计算,生成该第一图片扫描件的对象特征向量。其中,所述预设特征向量计算方法可以为主成分分析算法,通过主成分分析算法计算所述第一图片扫描件的对象特征向量。其中,可通过预先存储有预设特征向量组,且对所述预设特征向量组中的每一预设特征向量与相应的图像分割模板进行关联,以便于在预设特征向量组中获取与所述对象特征向量的差值在预设阈值范围内的第一预设特征向量,利用与所述第一预设特征向量相关联的图像分割模板对第一图像扫描件进行分割。In this embodiment of the present application, the feature vector comparison method is used to determine the segmentation template used to segment the scan of the first picture. Therefore, the first image scan is calculated according to the preset feature vector calculation method to generate the object feature vector of the first image scan. Wherein, the preset feature vector calculation method may be a principal component analysis algorithm, which calculates the object feature vector of the first image scan through the principal component analysis algorithm. Wherein, the preset feature vector group can be stored in advance, and each preset feature vector in the preset feature vector group and the corresponding image segmentation template can be associated, so as to obtain the data from the preset feature vector group. For a first preset feature vector whose difference value of the object feature vector is within a preset threshold value range, the first image scan is segmented by using an image segmentation template associated with the first preset feature vector.
S1201、若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板。S1201. If there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than a first preset threshold, obtain an image segmentation template associated with the first preset feature vector.
通过计算预设特征向量组中的特征向量与所述对象特征向量的差值,并与第一预设阈值进行比对,来确定相应的图像分割模板。其中,在本实施例中,若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板。The corresponding image segmentation template is determined by calculating the difference between the feature vector in the preset feature vector group and the feature vector of the object, and comparing it with the first preset threshold. Wherein, in this embodiment, if there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than the first preset threshold, obtain the first preset feature vector related to the first preset The image segmentation template of the joint.
S1202、根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。S1202. Segment the scan of the first picture according to the image segmentation template to generate a plurality of regions to be identified.
在本申请实施例中,通过根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域,以便于后续对不同的待识别区域进行识别,生成相应的识别结果。In this embodiment of the present application, the first image scan is segmented according to the image segmentation template to generate multiple regions to be recognized, so that different regions to be recognized can be subsequently recognized, and corresponding Recognition results.
S130、获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签。S130. Obtain the characteristic parameter of each of the regions to be identified, and set a corresponding characteristic label according to the characteristic parameter of each region to be identified.
在本申请实施例中,所生成多个待识别区域可能存在多个文字区域、符号区域以及图形区域,为了便于对不同区域的内容进行识别,在本实施例中,还需根据所述预设特征向量计算方法获取每一所述待识别区域的子对象特征向量。若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量,获取与所述第二预设特征向量相关联的特征参数。以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联。In the embodiment of the present application, there may be multiple text areas, symbol areas, and graphic areas in the generated multiple to-be-recognized areas. In order to facilitate the recognition of the content of different areas, in this embodiment, it is also necessary to use the preset The feature vector calculation method obtains the sub-object feature vector of each of the regions to be identified. If there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, the feature parameter associated with the second preset feature vector is acquired. Using the characteristic parameter as a characteristic label, each region to be identified is associated with the characteristic label.
请参阅图4,图4是本申请另一实施例提供的图片扫描件处理方法的子流程示意图。如图4所示,在某些实施例,例如本实施例中,所述步骤S130包括子步骤S1300~S1302。Please refer to FIG. 4, which is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application. As shown in FIG. 4, in some embodiments, such as this embodiment, the step S130 includes sub-steps S1300 to S1302.
S1300、根据所述预设特征向量计算方法获取每一所述待识别区域的子对象特征向量。S1300. Obtain a sub-object feature vector of each region to be identified according to the preset feature vector calculation method.
在本申请实施例中,通过根据所述预设特征向量计算方法获取每一所述待识别区域的特征向量作为子对象特征向量,以便于确定与每一所述待识别区域相对应的特征参数,进而根据该特征参数确定用于对该待识别区域进行识别所采用的识别模型。In the embodiment of the present application, the feature vector of each region to be identified is obtained as a sub-object feature vector by using the preset feature vector calculation method, so as to determine the feature parameter corresponding to each region to be identified , And then determine the recognition model used for recognizing the region to be recognized according to the characteristic parameter.
S1301、若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量,获取与所述第二预设特征向量相关联的特征参数。S1301. If there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, obtain a feature parameter associated with the second preset feature vector.
在本申请实施例中,若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量,获取与所述第二预设特征向量相关联的特征参数。其中,所述特征参数可以为关键字,譬如,若所述第一图片扫描件可划分为三个待识别区域,分别为文字待识别区域、图形待识别区域以及符号待识别区域,对于文字待识别区域,经计算获得的子对象特征向量与预设特征向量组中的第二预设特征向量,其差值小于第二预设阈值,而与所述第二预设特征向量相关联的特征参数为关键字“文字”;同理,对于图形待识别区域而言,获取的与其相对应的关键字则为“图形”,对符号待识别区域,获取的与其相对应的关键字则为“符号”。In the embodiment of the present application, if there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than the second preset threshold, obtain the second preset feature vector related to the second preset feature vector The characteristic parameters of the joint. Wherein, the characteristic parameter may be a keyword. For example, if the scan of the first picture can be divided into three areas to be recognized, which are text to be recognized, graphics to be recognized, and symbols to be recognized. In the recognition area, the sub-object feature vector obtained by calculation and the second preset feature vector in the preset feature vector group, the difference between which is less than the second preset threshold, and the feature associated with the second preset feature vector The parameter is the keyword "text"; in the same way, for the area to be recognized by the figure, the corresponding keyword obtained is "graphic", and for the area to be recognized by the symbol, the corresponding keyword obtained is " symbol".
S1302、以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联。在本申请实施例中,以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联,以便于通过所述特征标签对所述待识别区域进行识别。S1302, using the characteristic parameter as a characteristic label, and associating each of the regions to be identified with the characteristic label. In the embodiment of the present application, the characteristic parameter is used as a characteristic label, and each region to be identified is associated with the characteristic label, so that the region to be identified can be identified through the characteristic label.
S140、获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象。在本申请实施例中,初始图片扫描件包含的对象可能有文字、符号以及图形。针对不同的对象,应用不同的识别模型进行识别。其中,若所述特征标签是文字标签,获取文字识别模型;根据所述文字识别模型对所述待识别区域进行识别,以获取文字识别结果。若所述特征标签是符号标签,获取符号识别模型;根据所述符号识别模型对所述待识别区域进行识别,以获取符号识别结果。若所述特征标签是图形标签,获取图形识别模型;根据所述图形识别模型对所述待识别区域进行识别,以获取图形识别结果。S140. Obtain an object recognition model corresponding to the feature tag, and recognize the area to be recognized according to the object recognition model to obtain a target object. In the embodiment of the present application, the objects contained in the initial image scan may include text, symbols, and graphics. For different objects, different recognition models are used for recognition. Wherein, if the feature tag is a text tag, a text recognition model is obtained; the region to be recognized is recognized according to the text recognition model to obtain a text recognition result. If the feature tag is a symbol tag, a symbol recognition model is obtained; the region to be recognized is recognized according to the symbol recognition model to obtain a symbol recognition result. If the feature tag is a graphic tag, a graphic recognition model is obtained; the area to be recognized is recognized according to the graphic recognition model to obtain a graphic recognition result.
请参阅图5,图5是本申请又一实施例提供的图片扫描件处理方法的子流程示意图。如图5所示,在某些实施例,例如本实施例中,所述步骤S140包括子步骤S1400和S1401。Please refer to FIG. 5. FIG. 5 is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application. As shown in FIG. 5, in some embodiments, such as this embodiment, the step S140 includes sub-steps S1400 and S1401.
S1400、若所述特征标签是文字标签,获取文字识别模型。在本申请实施例中,若所述特征标签是文字标签,即该待识别区域的内容是文字,则获取文字识别模型。S1400: If the feature label is a text label, obtain a text recognition model. In the embodiment of the present application, if the feature label is a text label, that is, the content of the region to be recognized is text, then a text recognition model is obtained.
S1401、根据所述文字识别模型对所述待识别区域进行识别,以获取文字识别结果。在本实施例中,通过根据所述文字识别模型对所述待识别区域进行识别,以获取文字识别结果。S1401. Recognize the region to be recognized according to the text recognition model to obtain a text recognition result. In this embodiment, the text recognition result is obtained by recognizing the region to be recognized according to the text recognition model.
在另一实施例中,请参阅图6,图6是本申请又一实施例提供的图片扫描件处理方法的子流程示意图。如图6所示,在某些实施例,例如本实施例中,所述步骤S140包括子步骤S1402和S1403。In another embodiment, please refer to FIG. 6, which is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application. As shown in FIG. 6, in some embodiments, such as this embodiment, the step S140 includes sub-steps S1402 and S1403.
S1402、若所述特征标签是符号标签,获取符号识别模型。在本申请实施例中,若所述特征标签是符号标签,即该待识别区域的内容是符号,则获取符号识别模型。S1402, if the feature tag is a symbol tag, obtain a symbol recognition model. In the embodiment of the present application, if the feature label is a symbol label, that is, the content of the area to be identified is a symbol, then a symbol recognition model is obtained.
S1403、根据所述符号识别模型对所述待识别区域进行识别,以获取符号识别结果。在本实施例中,通过根据所述符号识别模型对所述待识别区域进行识别,以获取符号识别结果。S1403. Recognize the region to be recognized according to the symbol recognition model to obtain a symbol recognition result. In this embodiment, the symbol recognition result is obtained by recognizing the region to be recognized according to the symbol recognition model.
请参阅图7,图7是本申请又一实施例提供的图片扫描件处理方法的子流程示意图。如图7所示,在某些实施例,例如本实施例中,所述步骤S140包括子步骤S1404和S1405。Please refer to FIG. 7, which is a schematic diagram of a sub-flow of a method for processing a scanned image according to another embodiment of the present application. As shown in FIG. 7, in some embodiments, such as this embodiment, the step S140 includes sub-steps S1404 and S1405.
S1404、若所述特征标签是图像标签,获取图形识别模型。在本申请实施例中,若所述特征标签是图形标签,即该待识别区域的内容是图形,则获取图形识别模型。S1404: If the feature tag is an image tag, obtain a graphic recognition model. In the embodiment of the present application, if the feature label is a graphic label, that is, the content of the area to be recognized is a graphic, a graphic recognition model is obtained.
S1405、根据所述图形识别模型对所述待识别区域进行识别,以获取图形识别结果。在本实施例中,通过根据所述图形识别模型对所述待识别区域进行识别,以获取图形识别结果。S1405. Recognize the region to be recognized according to the graphic recognition model to obtain a graphic recognition result. In this embodiment, the pattern recognition result is obtained by recognizing the region to be recognized according to the pattern recognition model.
S150、获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。在本申请实施例中,可通过生成一用户界面,并在所述用户界面上显示多个预设组合模板,获取用户对多个所述预设组合模板进行选择而生成的目标组合模板,然后根据所述目标组合模板和多个所述目标对象生成所述目标文件。S150. Obtain a target combination template, and generate a target file according to the target combination template and the multiple target objects. In the embodiment of the present application, a user interface may be generated, and multiple preset combination templates may be displayed on the user interface to obtain the target combination template generated by the user selecting the multiple preset combination templates, and then The target file is generated according to the target combination template and the plurality of target objects.
请参阅图8,图8是本申请再一实施例提供的图片扫描件处理方法的子流程示意图。如图8所示,在某些实施例,例如本实施例中,所述步骤S140包括子步骤S1500~S1502。Please refer to FIG. 8. FIG. 8 is a schematic diagram of a sub-flow of a method for processing a scanned image according to still another embodiment of the present application. As shown in FIG. 8, in some embodiments, such as this embodiment, the step S140 includes sub-steps S1500 to S1502.
S1500、生成一用户界面,并在所述用户界面上显示多个预设组合模板。在本实施例中,系统存储有多个预设的组合模板,通过生成一用户界面,并在所述用户界面上显示该多个预设组合模板,可便于用户进行选择。S1500. Generate a user interface, and display multiple preset combination templates on the user interface. In this embodiment, the system stores multiple preset combination templates. By generating a user interface and displaying the multiple preset combination templates on the user interface, it is convenient for the user to select.
S1501、获取用户对多个所述预设组合模板进行选择而生成的目标组合模板。通过获取用户对多个所述预设组合模板进行选择而生成的目标组合模板,以便于后续通过该目标组合模板对多个目标对象进行组合生成目标文件。S1501. Obtain a target combination template generated by a user selecting a plurality of the preset combination templates. By acquiring a target combination template generated by a user selecting a plurality of the preset combination templates, it is convenient to subsequently combine multiple target objects through the target combination template to generate a target file.
S1502、根据所述目标组合模板和多个所述目标对象生成所述目标文件。S1502. Generate the target file according to the target combination template and the multiple target objects.
通过根据所述目标组合模板和多个所述目标对象生成所述目标文件。譬如,若所述初始图片扫描件中存在的待识别区域的数目为5个,其中,存在3个文字区域,1个符号区域,1个图形区域,且所述初始图片扫描件的5个区域为自上而下的布局方式。通过获取目标组合模板,譬如该目标组合模板为左三右二的格局,通过在所述目标组合模板的左侧三栏中显示相应的文字内容,在右侧上栏显示符号内容,在右侧下栏显示图形内容,可呈现相比于扫描件更为美观的格局。此外,目标组合模板下的每一栏的内容,都是可进行编辑和修改的,例如,对文字栏可进行新增、修改或删除。The target file is generated by combining the target template and the plurality of target objects. For example, if the number of regions to be recognized in the initial image scan is 5, there are 3 text areas, 1 symbol area, and 1 graphic area, and there are 5 areas in the initial image scan It is a top-down layout. By obtaining a target combination template, for example, the target combination template is a pattern of three left and two right, by displaying the corresponding text content in the three left columns of the target combination template, displaying the symbol content in the upper column on the right, and The lower column displays the graphic content, which can present a more beautiful layout than the scanned one. In addition, the content of each column under the target combination template can be edited and modified, for example, the text column can be added, modified or deleted.
参见图9,其为本申请实施例提供的图片扫描件处理装置200的示意性框图。 如图9所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250。Refer to FIG. 9, which is a schematic block diagram of an image scan processing apparatus 200 provided in an embodiment of the application. As shown in FIG. 9, the image scan processing device 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250.
预处理单元210,用于根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;The preprocessing unit 210 is configured to preprocess the initial picture scan according to a preset image preprocessing method to generate a first picture scan;
分割单元220,用于根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域,并对每一所述待识别区域设置特征标签;The segmentation unit 220 is configured to segment the first image scan according to a preset image segmentation method to form a plurality of regions to be identified, and set a feature label for each region to be identified;
获取单元230,用于获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;The acquiring unit 230 is configured to acquire the characteristic parameters of each of the regions to be identified, and set a corresponding characteristic label according to the characteristic parameters of each of the regions to be identified;
识别单元240,用于获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;The recognition unit 240 is configured to obtain an object recognition model corresponding to the feature tag, and recognize the area to be recognized according to the object recognition model to obtain a target object;
目标文件生成单元250,用于获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。The target file generating unit 250 is configured to obtain a target combination template, and generate a target file according to the target combination template and multiple target objects.
参见图10,其为本申请另一实施例提供的图片扫描件处理装置200的示意性框图。如图10所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述预处理单元210包括灰度处理单元2100、判断单元2101以及畸变校正单元2102。Refer to FIG. 10, which is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application. As shown in FIG. 10, the image scan processing device 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the preprocessing The unit 210 includes a grayscale processing unit 2100, a judgment unit 2101, and a distortion correction unit 2102.
灰度处理单元2100,用于对所述初始图片扫描件进行灰度处理,以生成与所述初始图片扫描件相对应的初始灰度图像。The gray-scale processing unit 2100 is configured to perform gray-scale processing on the scan of the initial picture to generate an initial gray image corresponding to the scan of the initial picture.
判断单元2101,用于根据预设图像畸变检测方法,判断所述初始灰度图像是否存在畸变区域。The determining unit 2101 is configured to determine whether the initial grayscale image has a distortion area according to a preset image distortion detection method.
畸变校正单元2102,用于若判断所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。The distortion correction unit 2102 is configured to perform distortion correction on the initial grayscale image according to a preset distortion correction algorithm to generate the first image scan if it is determined that the initial grayscale image has a distortion area.
参见图11,其为本申请又一实施例提供的图片扫描件处理装置200的示意性框图。如图11所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述分割单元220包括:对象特征向量获取单元2200、图像分割模板获取单元2201、待识别区域生成单元2202。Refer to FIG. 11, which is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application. As shown in FIG. 11, the image scan processing device 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the segmentation unit 220 includes: an object feature vector obtaining unit 2200, an image segmentation template obtaining unit 2201, and a region to be recognized generating unit 2202.
对象特征向量获取单元2200,用于根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量。The object feature vector obtaining unit 2200 is configured to obtain the object feature vector of the first image scan according to a preset feature vector calculation method.
图像分割模板获取单元2201,用于若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板。The image segmentation template obtaining unit 2201 is configured to, if there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than the first preset threshold, obtain the first preset feature vector and the first preset feature vector The associated image segmentation template.
待识别区域生成单元2202,用于根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。The to-be-recognized region generating unit 2202 is configured to segment the first image scan according to the image segmentation template to generate a plurality of the to-be-recognized regions.
参见图12,其为本申请又一实施例提供的图片扫描件处理装置200的示意性框图。如图12所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述获取单元230包括:子对象特征向量获取单元2300、特征参数获取单元2301以及关联单元2302。Refer to FIG. 12, which is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application. As shown in FIG. 12, the image scan processing device 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the acquisition unit 230 includes: a sub-object feature vector obtaining unit 2300, a feature parameter obtaining unit 2301, and an associating unit 2302.
子对象特征向量获取单元2300,用于根据所述预设特征向量计算方法获取每一所述待识别区域的子对象特征向量。The sub-object feature vector obtaining unit 2300 is configured to obtain the sub-object feature vector of each region to be identified according to the preset feature vector calculation method.
特征参数获取单元2301,用于若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量,获取与所述第二预设特征向量相关联的特征参数。The feature parameter acquiring unit 2301 is configured to, if there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, to obtain the second preset feature vector The associated characteristic parameter.
关联单元2302,用于以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联。The associating unit 2302 is configured to use the characteristic parameter as a characteristic label, and associate each of the regions to be identified with the characteristic label.
参见图13,其为本申请又一实施例提供的图片扫描件处理装置200的示意性框图。如图13所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述识别单元240包括文字识别模型获取单元2400和文字识别结果获取单元2401。Refer to FIG. 13, which is a schematic block diagram of an apparatus 200 for processing scanned images according to another embodiment of the application. As shown in FIG. 13, the image scan processing apparatus 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the identification unit 240 includes a character recognition model obtaining unit 2400 and a character recognition result obtaining unit 2401.
文字识别模型获取单元2400,用于若所述特征标签是文字标签,获取文字识别模型。The character recognition model obtaining unit 2400 is configured to obtain a character recognition model if the feature label is a character label.
文字识别结果获取单元2401,用于根据所述文字识别模型对所述待识别区域进行识别,以获取文字识别结果。The character recognition result obtaining unit 2401 is configured to recognize the region to be recognized according to the character recognition model to obtain a character recognition result.
参见图14,其为本申请又一实施例提供的图片扫描件处理装置200的示意性框图。如图14所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述识别单元240包括符号识别模型获取单元2402和符号 识别结果获取单元2403。Refer to FIG. 14, which is a schematic block diagram of a scanning image processing apparatus 200 provided by another embodiment of the application. As shown in FIG. 14, the image scan processing device 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the identification unit 240 includes a symbol recognition model acquisition unit 2402 and a symbol recognition result acquisition unit 2403.
符号识别模型获取单元2402,用于若所述特征标签是符号标签,获取符号识别模型。The symbol recognition model acquisition unit 2402 is configured to acquire a symbol recognition model if the feature tag is a symbol tag.
符号识别结果获取单元2403,用于根据所述符号识别模型对所述待识别区域进行识别,以获取符号识别结果。The symbol recognition result obtaining unit 2403 is configured to recognize the region to be recognized according to the symbol recognition model to obtain a symbol recognition result.
参见图15,其为本申请又一实施例提供的图片扫描件处理装置200的示意性框图。如图15所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述识别单元240包括图形识别模型获取单元2404和图形识别结果获取单元2405。Refer to FIG. 15, which is a schematic block diagram of an image scan processing apparatus 200 provided by another embodiment of the application. As shown in FIG. 15, the image scan processing device 200 proposed in the embodiment of the present application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the identification unit 240 includes a graphic recognition model obtaining unit 2404 and a graphic recognition result obtaining unit 2405.
图形识别模型获取单元2404,用于若所述特征标签是图像标签,获取图形识别模型。The graphic recognition model obtaining unit 2404 is configured to obtain a graphic recognition model if the feature tag is an image tag.
图形识别结果获取单元2405,用于根据所述图形识别模型对所述待识别区域进行识别,以获取图形识别结果。The graphic recognition result obtaining unit 2405 is configured to recognize the region to be recognized according to the graphic recognition model to obtain a graphic recognition result.
参见图16,其为本申请再一实施例提供的图片扫描件处理装置200的示意性框图。如图16所示,本申请实施例提出的图片扫描件处理装置200,包括:预处理单元210、分割单元220、获取单元230、识别单元240以及目标文件生成单元250,其中,所述目标文件生成单元250包括用户界面生成单元2500、目标组合模板获取单元2501以及组合单元2502。Refer to FIG. 16, which is a schematic block diagram of an image scan processing apparatus 200 provided by still another embodiment of the application. As shown in FIG. 16, the image scan processing apparatus 200 proposed in this embodiment of the application includes: a preprocessing unit 210, a segmentation unit 220, an acquisition unit 230, an identification unit 240, and a target file generation unit 250, wherein the target file The generation unit 250 includes a user interface generation unit 2500, a target combination template acquisition unit 2501, and a combination unit 2502.
用户界面生成单元2500,用于生成一用户界面,并在所述用户界面上显示多个预设组合模板。The user interface generating unit 2500 is configured to generate a user interface and display a plurality of preset combination templates on the user interface.
目标组合模板获取单元2501,用于获取用户对多个所述预设组合模板进行选择而生成的目标组合模板。The target combination template obtaining unit 2501 is configured to obtain a target combination template generated by a user selecting a plurality of the preset combination templates.
组合单元2502,用于根据所述目标组合模板和多个所述目标对象生成所述目标文件。The combining unit 2502 is configured to generate the target file according to the target combination template and multiple target objects.
上述图片扫描件处理装置可以实现为一种计算机程序的形式,该计算机程序可以在如图17所示的计算机设备上运行。The above-mentioned image scan processing device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 17.
请参阅图17,图17是本申请实施例提供的计算机设备的示意性框图。该计算机设备300设备可以是终端。参阅图17,该计算机设备300包括通过系统总线301连接的处理器302、存储器和网络接口305,其中,存储器可以包括非易 失性存储介质303和内存储器304。该非易失性存储介质303可存储操作系统3031和计算机程序3032。该计算机程序3032包括程序指令,该程序指令被执行时,可使得处理器302执行一种图片扫描件处理方法。该处理器302用于提供计算和控制能力,支撑整个计算机设备300的运行。该内存储器304为非易失性存储介质303中的计算机程序3032的运行提供环境,该计算机程序3032被处理器302执行时,可使得处理器302执行一种图片扫描件处理方法。该网络接口305用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图17中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备300的限定,具体的计算机设备300可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Please refer to FIG. 17, which is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 300 device may be a terminal. Referring to FIG. 17, the computer device 300 includes a processor 302, a memory, and a network interface 305 connected through a system bus 301, where the memory may include a non-volatile storage medium 303 and an internal memory 304. The non-volatile storage medium 303 can store an operating system 3031 and a computer program 3032. The computer program 3032 includes program instructions. When the program instructions are executed, the processor 302 can execute a method for processing scanned images. The processor 302 is used to provide computing and control capabilities and support the operation of the entire computer device 300. The internal memory 304 provides an environment for the running of the computer program 3032 in the non-volatile storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a method for processing scanned images. The network interface 305 is used for network communication, such as sending assigned tasks. Those skilled in the art can understand that the structure shown in FIG. 17 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 300 to which the solution of the present application is applied. The specific computer device 300 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
其中,所述处理器302用于运行存储在存储器中的计算机程序3032,以实现本申请实施例的图片扫描件处理方法。Wherein, the processor 302 is configured to run a computer program 3032 stored in a memory, so as to implement the image scan processing method in the embodiment of the present application.
应当理解,在本申请实施例中,处理器302可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in the embodiment of the present application, the processor 302 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
在本申请的另一实施例中提供一种存储介质。该存储介质可以为计算机可读存储介质。该存储介质存储有计算机程序,该计算机程序被处理器执行时使处理器执行以上各实施例中所描述的图片扫描件处理方法的步骤。In another embodiment of the present application, a storage medium is provided. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the scanning image processing method described in the above embodiments.
该存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk, and other media that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种图片扫描件处理方法,包括:A method for processing scanned images, including:
    根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;Preprocess the initial scan of the image according to the preset image preprocessing method to generate the first scan of the image;
    根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;Segment the scan of the first picture according to a preset image segmentation method to form a plurality of regions to be identified;
    获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;Acquiring the characteristic parameter of each region to be identified, and setting a corresponding characteristic label according to the characteristic parameter of each region to be identified;
    获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;Obtaining an object recognition model corresponding to the feature tag, and recognizing the area to be recognized according to the object recognition model to obtain a target object;
    获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。A target combination template is acquired, and a target file is generated according to the target combination template and the plurality of target objects.
  2. 根据权利要求1所述的图片扫描件处理方法,其中,所述根据预设图像处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件包括:The method of processing a scanned image of claim 1, wherein the preprocessing of the scanned image of the initial image according to a preset image processing method to generate the scanned image of the first image comprises:
    对所述初始图片扫描件进行灰度处理,以生成与所述初始图片扫描件相对应的初始灰度图像;Performing grayscale processing on the scan of the initial picture to generate an initial grayscale image corresponding to the scan of the initial picture;
    根据预设图像畸变检测方法,判断所述初始灰度图像是否存在畸变区域;According to a preset image distortion detection method, determine whether the initial gray image has a distortion area;
    若判断所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。If it is determined that the initial gray-scale image has a distortion area, perform distortion correction on the initial gray-scale image according to a preset distortion correction algorithm to generate the first picture scan.
  3. 根据权利要求1所述的图片扫描件处理方法,其中,所述根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域包括:The method for processing a scanned image of a picture according to claim 1, wherein said segmenting the scanned first image according to a preset image segmentation method to form a plurality of regions to be identified comprises:
    根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量;Acquiring the object feature vector of the first image scan according to a preset feature vector calculation method;
    若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板;If there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than a first preset threshold, acquiring an image segmentation template associated with the first preset feature vector;
    根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。The first image scan is segmented according to the image segmentation template to generate a plurality of regions to be identified.
  4. 根据权利要求1所述的图片扫描件处理方法,其中,所述获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签包括:4. The image scan processing method according to claim 1, wherein said acquiring the characteristic parameters of each of the regions to be identified, and setting corresponding characteristic labels according to the characteristic parameters of each of the regions to be identified comprises:
    根据所述预设特征向量计算方法获取每一所述待识别区域的子对象特征向量;Acquiring the sub-object feature vector of each region to be identified according to the preset feature vector calculation method;
    若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量,获取与所述第二预设特征向量相关联的特征参数;If there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, acquiring feature parameters associated with the second preset feature vector;
    以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联。Using the characteristic parameter as a characteristic label, each region to be identified is associated with the characteristic label.
  5. 根据权利要求1所述的图片扫描件处理方法,其中,所述获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象,包括:4. The image scan processing method according to claim 1, wherein said obtaining an object recognition model corresponding to said feature tag, and recognizing said area to be recognized according to said object recognition model to obtain a target object, include:
    若所述特征标签是文字标签,获取文字识别模型;If the feature tag is a text tag, obtain a text recognition model;
    根据所述文字识别模型对所述待识别区域进行识别,以获取文字识别结果。The region to be recognized is recognized according to the text recognition model to obtain a text recognition result.
  6. 根据权利要求1所述的图片扫描件处理方法,其中,所述获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象,包括:4. The image scan processing method according to claim 1, wherein said obtaining an object recognition model corresponding to said feature tag, and recognizing said area to be recognized according to said object recognition model to obtain a target object, include:
    若所述特征标签是图像标签,获取图形识别模型;If the feature tag is an image tag, obtain a graphic recognition model;
    根据所述图形识别模型对所述待识别区域进行识别,以获取图形识别结果。The region to be recognized is recognized according to the graphic recognition model to obtain a graphic recognition result.
  7. 根据权利要求1所述的图片扫描件处理方法,其中,所述获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件,包括:The method for processing scanned images according to claim 1, wherein said acquiring a target combination template and generating a target file based on said target combination template and a plurality of said target objects comprises:
    生成一用户界面,并在所述用户界面上显示多个预设组合模板;Generating a user interface, and displaying multiple preset combination templates on the user interface;
    获取用户对多个所述预设组合模板进行选择而生成的目标组合模板;Acquiring a target combination template generated by a user selecting a plurality of the preset combination templates;
    根据所述目标组合模板和多个所述目标对象生成所述目标文件。The target file is generated according to the target combination template and the plurality of target objects.
  8. 一种图片扫描件处理装置,包括:A device for processing scanned images, including:
    预处理单元,用于根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;The preprocessing unit is configured to preprocess the initial picture scan according to the preset image preprocessing method to generate the first picture scan;
    分割单元,用于根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;A segmentation unit, configured to segment the scan of the first picture according to a preset image segmentation method to form multiple regions to be identified;
    获取单元,用于获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签The acquiring unit is used to acquire the characteristic parameters of each of the regions to be identified, and set corresponding characteristic labels according to the characteristic parameters of each of the regions to be identified
    识别单元,用于获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;A recognition unit, configured to obtain an object recognition model corresponding to the feature tag, and recognize the area to be recognized according to the object recognition model to obtain a target object;
    目标文件生成单元,用于获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。The target file generating unit is configured to obtain a target combination template, and generate a target file according to the target combination template and multiple target objects.
  9. 根据权利要求8所述的图片扫描件处理装置,其中,所述预处理单元包括:8. The image scan processing device according to claim 8, wherein the preprocessing unit comprises:
    灰度处理单元,用于对所述初始图片扫描件进行灰度处理,以生成与所述初始图片扫描件相对应的初始灰度图像;A grayscale processing unit, configured to perform grayscale processing on the scan of the initial picture to generate an initial grayscale image corresponding to the scan of the initial picture;
    判断单元,用于根据预设图像畸变检测方法,判断所述初始灰度图像是否存在畸变区域;A judging unit, configured to judge whether the initial gray image has a distortion area according to a preset image distortion detection method;
    畸变校正单元,用于若判断所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。The distortion correction unit is configured to perform distortion correction on the initial grayscale image according to a preset distortion correction algorithm to generate the first image scan if it is determined that the initial grayscale image has a distortion area.
  10. 根据权利要求8所述的图片扫描件处理装置,其中,所述分割单元包括:8. The image scan processing device according to claim 8, wherein the dividing unit comprises:
    对象特征向量获取单元,用于根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量;The object feature vector obtaining unit is configured to obtain the object feature vector of the scan of the first picture according to a preset feature vector calculation method;
    图像分割模板获取单元,用于若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板;The image segmentation template acquisition unit is configured to, if there is a first preset feature vector in the preset feature vector group whose difference with the feature vector of the object is less than a first preset threshold, to obtain the first preset feature vector related Joint image segmentation template;
    待识别区域生成单元,用于根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。The to-be-recognized region generating unit is configured to segment the scan of the first picture according to the image segmentation template to generate a plurality of the to-be-recognized regions.
  11. 一种计算机设备,包括存储器以及与所述存储器相连的处理器;所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:A computer device includes a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the computer program stored in the memory to perform the following steps:
    根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;Preprocess the initial scan of the image according to the preset image preprocessing method to generate the first scan of the image;
    根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;Segment the scan of the first picture according to a preset image segmentation method to form a plurality of regions to be identified;
    获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;Acquiring the characteristic parameter of each region to be identified, and setting a corresponding characteristic label according to the characteristic parameter of each region to be identified;
    获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;Obtaining an object recognition model corresponding to the feature tag, and recognizing the area to be recognized according to the object recognition model to obtain a target object;
    获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标 文件。A target combination template is obtained, and a target file is generated according to the target combination template and the plurality of target objects.
  12. 根据权利要求11所述的计算机设备,其中,所述根据预设图像处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件包括:11. The computer device according to claim 11, wherein said preprocessing the initial picture scan according to a preset image processing method to generate the first picture scan comprises:
    对所述初始图片扫描件进行灰度处理,以生成与所述初始图片扫描件相对应的初始灰度图像;Performing grayscale processing on the scan of the initial picture to generate an initial grayscale image corresponding to the scan of the initial picture;
    根据预设图像畸变检测方法,判断所述初始灰度图像是否存在畸变区域;According to a preset image distortion detection method, determine whether the initial gray image has a distortion area;
    若判断所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。If it is determined that the initial gray-scale image has a distortion area, perform distortion correction on the initial gray-scale image according to a preset distortion correction algorithm to generate the first picture scan.
  13. 根据权利要求11所述的计算机设备,其中,所述根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域包括:11. The computer device according to claim 11, wherein the segmenting the scan of the first picture according to a preset image segmentation method to form a plurality of regions to be identified comprises:
    根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量;Acquiring the object feature vector of the first image scan according to a preset feature vector calculation method;
    若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板;If there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than a first preset threshold, acquiring an image segmentation template associated with the first preset feature vector;
    根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。The first image scan is segmented according to the image segmentation template to generate a plurality of regions to be identified.
  14. 根据权利要求11所述的计算机设备,其中,所述获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签包括:11. The computer device according to claim 11, wherein said acquiring the characteristic parameters of each of the regions to be identified, and setting corresponding characteristic labels according to the characteristic parameters of each of the regions to be identified comprises:
    根据所述预设特征向量计算方法获取每一所述待识别区域的子对象特征向量;Acquiring the sub-object feature vector of each region to be identified according to the preset feature vector calculation method;
    若预设特征向量组中存在与所述子对象特征向量的差值小于第二预设阈值的第二预设特征向量,获取与所述第二预设特征向量相关联的特征参数;If there is a second preset feature vector in the preset feature vector group whose difference with the feature vector of the sub-object is less than a second preset threshold, acquiring feature parameters associated with the second preset feature vector;
    以所述特征参数作为特征标签,将每一所述待识别区域与所述特征标签相关联。Using the characteristic parameter as a characteristic label, each region to be identified is associated with the characteristic label.
  15. 根据权利要求11所述的计算机设备,其中,所述获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象,包括:11. The computer device according to claim 11, wherein said obtaining an object recognition model corresponding to said feature tag, and recognizing said region to be recognized according to said object recognition model to obtain a target object comprises:
    若所述特征标签是文字标签,获取文字识别模型;If the feature tag is a text tag, obtain a text recognition model;
    根据所述文字识别模型对所述待识别区域进行识别,以获取文字识别结果。The region to be recognized is recognized according to the text recognition model to obtain a text recognition result.
  16. 根据权利要求11所述的计算机设备,其中,所述获取与所述特征标签相 对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象,包括:11. The computer device according to claim 11, wherein said obtaining an object recognition model corresponding to said feature tag, and recognizing said region to be recognized according to said object recognition model to obtain a target object comprises:
    若所述特征标签是图像标签,获取图形识别模型;If the feature tag is an image tag, obtain a graphic recognition model;
    根据所述图形识别模型对所述待识别区域进行识别,以获取图形识别结果。The region to be recognized is recognized according to the graphic recognition model to obtain a graphic recognition result.
  17. 根据权利要求11所述的计算机设备,其中,所述获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件,包括:11. The computer device according to claim 11, wherein said acquiring a target combination template and generating a target file according to said target combination template and a plurality of said target objects comprises:
    生成一用户界面,并在所述用户界面上显示多个预设组合模板;Generating a user interface, and displaying multiple preset combination templates on the user interface;
    获取用户对多个所述预设组合模板进行选择而生成的目标组合模板;Acquiring a target combination template generated by a user selecting a plurality of the preset combination templates;
    根据所述目标组合模板和多个所述目标对象生成所述目标文件。The target file is generated according to the target combination template and the plurality of target objects.
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器执行以下步骤:A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor executes the following steps:
    根据预设图像预处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件;Preprocess the initial scan of the image according to the preset image preprocessing method to generate the first scan of the image;
    根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域;Segment the scan of the first picture according to a preset image segmentation method to form a plurality of regions to be identified;
    获取每一所述待识别区域的特征参数,并根据每一所述待识别区域的特征参数设置对应的特征标签;Acquiring the characteristic parameter of each region to be identified, and setting a corresponding characteristic label according to the characteristic parameter of each region to be identified;
    获取与所述特征标签相对应的对象识别模型,根据所述对象识别模型对所述待识别区域进行识别,以获取目标对象;Obtaining an object recognition model corresponding to the feature tag, and recognizing the area to be recognized according to the object recognition model to obtain a target object;
    获取目标组合模板,根据所述目标组合模板和多个所述目标对象生成目标文件。A target combination template is acquired, and a target file is generated according to the target combination template and the plurality of target objects.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述根据预设图像处理方法对初始图片扫描件进行预处理,以生成第一图片扫描件的步骤包括:18. The computer-readable storage medium according to claim 18, wherein the step of preprocessing the initial picture scan according to a preset image processing method to generate the first picture scan comprises:
    对所述初始图片扫描件进行灰度处理,以生成与所述初始图片扫描件相对应的初始灰度图像;Performing grayscale processing on the scan of the initial picture to generate an initial grayscale image corresponding to the scan of the initial picture;
    根据预设图像畸变检测方法,判断所述初始灰度图像是否存在畸变区域;According to a preset image distortion detection method, determine whether the initial gray image has a distortion area;
    若判断所述初始灰度图像存在畸变区域,根据预设畸变校正算法对所述初始灰度图像进行畸变校正以生成所述第一图片扫描件。If it is determined that the initial gray-scale image has a distortion area, perform distortion correction on the initial gray-scale image according to a preset distortion correction algorithm to generate the first picture scan.
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述根据预设图像分割方法对所述第一图片扫描件进行分割,以形成多个待识别区域的步骤包括:18. The computer-readable storage medium of claim 18, wherein the step of segmenting the scan of the first picture according to a preset image segmentation method to form a plurality of regions to be identified comprises:
    根据预设特征向量计算方法获取所述第一图片扫描件的对象特征向量;Acquiring the object feature vector of the first image scan according to a preset feature vector calculation method;
    若预设特征向量组中存在与所述对象特征向量的差值小于第一预设阈值的第一预设特征向量,获取与所述第一预设特征向量相关联的图像分割模板;If there is a first preset feature vector in the preset feature vector group whose difference with the object feature vector is less than a first preset threshold, acquiring an image segmentation template associated with the first preset feature vector;
    根据所述图像分割模板对所述第一图片扫描件进行分割,以生成多个所述待识别区域。The first image scan is segmented according to the image segmentation template to generate a plurality of regions to be identified.
PCT/CN2019/118237 2019-06-12 2019-11-14 Picture scanning document processing method and apparatus, computer device, and storage medium WO2020248497A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910505226.X 2019-06-12
CN201910505226.XA CN110390260B (en) 2019-06-12 2019-06-12 Picture scanning piece processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020248497A1 true WO2020248497A1 (en) 2020-12-17

Family

ID=68285517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118237 WO2020248497A1 (en) 2019-06-12 2019-11-14 Picture scanning document processing method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN110390260B (en)
WO (1) WO2020248497A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469165A (en) * 2021-07-06 2021-10-01 安徽淘云科技股份有限公司 Scanning identification method, storage medium, electronic device and scanning device
CN113486828A (en) * 2021-07-13 2021-10-08 杭州睿胜软件有限公司 Image processing method, device, equipment and storage medium
CN115983199A (en) * 2023-03-16 2023-04-18 山东天成书业有限公司 Mobile digital publishing system and method

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110390260B (en) * 2019-06-12 2024-03-22 平安科技(深圳)有限公司 Picture scanning piece processing method and device, computer equipment and storage medium
CN111079528A (en) * 2019-11-07 2020-04-28 国网辽宁省电力有限公司电力科学研究院 Primitive drawing checking method and system based on deep learning
CN111192340A (en) * 2019-12-24 2020-05-22 武汉嘉铭激光股份有限公司 Method for automatically generating laser marking template file based on image recognition
CN111238388B (en) * 2020-01-08 2021-11-16 安徽逻根农业科技有限公司 High-altitude support form monitoring device and method
CN112633251A (en) * 2021-01-07 2021-04-09 南方电网深圳数字电网研究院有限公司 Text recognition-based target document acquisition method and device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488983A (en) * 2013-09-13 2014-01-01 复旦大学 Business card OCR data correction method and system based on knowledge base
CN107945194A (en) * 2017-10-31 2018-04-20 四川长虹电器股份有限公司 Bill dividing method based on OpenCV technologies
US20180205833A1 (en) * 2017-01-18 2018-07-19 Kyocera Document Solutions Inc. Image processing apparatus
CN109284756A (en) * 2018-08-01 2019-01-29 河海大学 A kind of terminal censorship method based on OCR technique
CN110390260A (en) * 2019-06-12 2019-10-29 平安科技(深圳)有限公司 Picture scanning part processing method, device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19855885A1 (en) * 1997-12-04 1999-08-05 Fuji Photo Film Co Ltd Image processing method for digital photographic copier providing photographic prints
CN106874906B (en) * 2017-01-17 2023-02-28 腾讯科技(上海)有限公司 Image binarization method and device and terminal
EP3704669A4 (en) * 2017-11-02 2020-12-30 Shanghai United Imaging Healthcare Co., Ltd. Systems and methods for generating semantic information for scanning image
CN109492643B (en) * 2018-10-11 2023-12-19 平安科技(深圳)有限公司 Certificate identification method and device based on OCR, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488983A (en) * 2013-09-13 2014-01-01 复旦大学 Business card OCR data correction method and system based on knowledge base
US20180205833A1 (en) * 2017-01-18 2018-07-19 Kyocera Document Solutions Inc. Image processing apparatus
CN107945194A (en) * 2017-10-31 2018-04-20 四川长虹电器股份有限公司 Bill dividing method based on OpenCV technologies
CN109284756A (en) * 2018-08-01 2019-01-29 河海大学 A kind of terminal censorship method based on OCR technique
CN110390260A (en) * 2019-06-12 2019-10-29 平安科技(深圳)有限公司 Picture scanning part processing method, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469165A (en) * 2021-07-06 2021-10-01 安徽淘云科技股份有限公司 Scanning identification method, storage medium, electronic device and scanning device
CN113486828A (en) * 2021-07-13 2021-10-08 杭州睿胜软件有限公司 Image processing method, device, equipment and storage medium
CN113486828B (en) * 2021-07-13 2024-04-30 杭州睿胜软件有限公司 Image processing method, device, equipment and storage medium
CN115983199A (en) * 2023-03-16 2023-04-18 山东天成书业有限公司 Mobile digital publishing system and method

Also Published As

Publication number Publication date
CN110390260A (en) 2019-10-29
CN110390260B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
WO2020248497A1 (en) Picture scanning document processing method and apparatus, computer device, and storage medium
JP3308032B2 (en) Skew correction method, skew angle detection method, skew correction device, and skew angle detection device
US8000529B2 (en) System and method for creating an editable template from a document image
US8655107B2 (en) Signal processing apparatus, signal processing method, computer-readable medium and computer data signal
CN109409398B (en) Image processing apparatus, image processing method, and storage medium
JP5713790B2 (en) Image processing apparatus, image processing method, and program
JP7013182B2 (en) Information processing equipment, information processing methods and programs
EP1091320A2 (en) Processing multiple digital images
US6356655B1 (en) Apparatus and method of bitmap image processing, storage medium storing an image processing program
CN109948549B (en) OCR data generation method and device, computer equipment and storage medium
JP2001043376A (en) Image extraction method and device and storage medium
US20210133476A1 (en) Neural Network-based Optical Character Recognition
JP2008171411A (en) Method and apparatus for dynamic connector analysis
CN109697414B (en) Text positioning method and device
JP2012203458A (en) Image processor and program
JP2001101426A (en) Digital image processing method
US20190197133A1 (en) Shape-based graphics search
US11080464B2 (en) Correction techniques of overlapping digital glyphs
JP2012199901A (en) Document modification detecting method by character comparison using character shape feature
CN108182457B (en) Method and apparatus for generating information
JPH09293082A (en) Device for retrieving picture and its method
CN111368632A (en) Signature identification method and device
CN111310634B (en) Certificate type recognition template generation method, certificate recognition method and device
US20220270232A1 (en) Apparatus for adjusting parameter related to defect detection for image processing for image processing, method for information processing, and program
US20030174907A1 (en) Document image processing apparatus for processing line portions manually input to document image, method therefor, and computer readable recording medium recorded with document image processing program therefor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19932986

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19932986

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19932986

Country of ref document: EP

Kind code of ref document: A1