CN111461205A - Image processing method, image processing device, electronic equipment and computer readable storage medium - Google Patents

Image processing method, image processing device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111461205A
CN111461205A CN202010239574.XA CN202010239574A CN111461205A CN 111461205 A CN111461205 A CN 111461205A CN 202010239574 A CN202010239574 A CN 202010239574A CN 111461205 A CN111461205 A CN 111461205A
Authority
CN
China
Prior art keywords
image
information
identification
slice
processed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010239574.XA
Other languages
Chinese (zh)
Inventor
吕匡
宋杰琴
章�露�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rajax Network Technology Co Ltd
Original Assignee
Rajax Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rajax Network Technology Co Ltd filed Critical Rajax Network Technology Co Ltd
Priority to CN202010239574.XA priority Critical patent/CN111461205A/en
Publication of CN111461205A publication Critical patent/CN111461205A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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

Landscapes

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

Abstract

The embodiment of the invention discloses an image processing method, an image processing device, electronic equipment and a computer readable storage medium, wherein the image type of a standard image is determined according to the standard image corresponding to an image to be processed, the standard image is processed according to an image segmentation template corresponding to the image type, at least one image slice is obtained, information identification is carried out on one or more image slices to obtain corresponding identification information, and the identification information of the image slices is displayed in a corresponding information frame.

Description

Image processing method, image processing device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to an image processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
In order to ensure that the qualification of the social activity participants meets the requirements, certificate auditing is an indispensable step in the social activity. With the popularization of terminal devices, credential materials are often uploaded through the terminal devices for auditing. At present, the audit efficiency is low because the audit personnel usually carry out manual audit on the certificate image uploaded by the user.
Disclosure of Invention
In view of the above, embodiments of the present invention provide an image processing method, an image processing apparatus, an electronic device, and a computer-readable storage medium, so as to improve information checking efficiency.
In a first aspect, an embodiment of the present invention provides an image processing method, where the method includes:
preprocessing an image to be processed to obtain a standard image;
determining the image type of the image to be processed according to the standard image;
determining a corresponding image segmentation template according to the image type;
processing the standard image according to the image segmentation template to obtain at least one image slice;
performing information identification on one or more image slices to acquire corresponding identification information;
and displaying the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
Optionally, displaying the identification information of the image slice in a corresponding information frame includes:
and in response to the image slice being triggered, displaying the identification information of the image slice in a corresponding display frame.
Optionally, the method further includes:
in response to the information frame being triggered, causing the information frame to enter an editable state;
receiving identification information of the modified image slice;
and storing the identification information of the modified image slice in the information frame.
Optionally, the information frame is suspended above the corresponding image slice.
Optionally, performing information identification on one or more image slices, and acquiring corresponding identification information includes:
determining an image slice needing information identification according to the image segmentation template;
and carrying out information identification on the image slices needing information identification, and acquiring corresponding identification information.
Optionally, the information identification of the image slice needing information identification, and acquiring corresponding identification information includes:
and respectively inputting the image slices needing information identification to corresponding information identification models for information identification, and acquiring corresponding identification information.
Optionally, preprocessing the image to be processed, and acquiring the standard image includes:
identifying the image-text direction of an image to be processed, wherein the image-text direction comprises the character direction and/or the graphic direction of the image to be processed;
and preprocessing the image to be processed according to the image-text direction to obtain a standard image.
Optionally, identifying the image-text direction of the image to be processed includes:
and identifying the input direction identification model of the image to be processed, and determining the image-text direction of the image to be processed.
Optionally, determining the image type of the image to be processed according to the standard image includes:
acquiring image characteristics of the standard image;
and determining the image type of the image to be processed according to the image characteristics.
Optionally, determining the image type of the image to be processed according to the image feature includes:
comparing the image characteristics with the image characteristics of various pre-stored images in a similarity manner;
and determining the image type of the image to be processed according to the similarity comparison result.
Optionally, acquiring the image feature of the standard image includes:
and inputting the standard image into a category identification model for processing to obtain the image characteristics.
Optionally, processing the standard image according to the image segmentation template, and acquiring at least one image slice includes:
scaling the standard image to be consistent with the size of the image segmentation template;
and carrying out segmentation processing on the scaled standard image according to the image segmentation template to obtain at least one image slice.
In a second aspect, an embodiment of the present invention provides an image processing apparatus, including:
the preprocessing unit is configured to preprocess the image to be processed to acquire a standard image;
an image type determination unit configured to determine an image type of the image to be processed from the standard image;
a template determination unit configured to determine a corresponding image segmentation template according to the image type;
the processing unit is configured to process the standard image according to the image segmentation template to obtain at least one image slice;
the information identification unit is configured to perform information identification on one or more image slices and acquire corresponding identification information;
a display unit configured to display the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
Optionally, the display unit includes:
a display subunit configured to display the identification information of the image slice in a corresponding display frame in response to the image slice being triggered.
Optionally, the apparatus further comprises:
a state switching unit configured to cause the information frame to enter an editable state in response to the information frame being triggered;
an information receiving unit configured to receive identification information of the modified image slice;
an information holding unit configured to hold identification information of the modified image slice in the information frame.
Optionally, the information frame is suspended above the corresponding image slice.
Optionally, the information identifying unit includes:
an image slice determining subunit configured to determine an image slice requiring information identification according to the image segmentation template;
and the information identification subunit is configured to perform information identification on the image slice needing information identification, and acquire corresponding identification information.
Optionally, the information identification subunit includes:
and the information identification module is configured to input the image slices needing information identification into corresponding information identification models respectively for information identification, and acquire corresponding identification information.
Optionally, the preprocessing unit includes:
the direction identification subunit is configured to identify the image-text direction of the image to be processed, wherein the image-text direction comprises the image-text direction and/or the image direction of the image to be processed;
and the preprocessing subunit is configured to preprocess the image to be processed according to the image-text direction to obtain a standard image.
Optionally, the direction identifying subunit includes:
and the direction identification module is configured to identify the to-be-processed image input direction identification model and determine the image-text direction of the to-be-processed image.
Optionally, the image type determining unit includes:
an image feature acquisition subunit configured to acquire an image feature of the standard image;
an image type determination subunit configured to determine an image type of the image to be processed according to the image feature.
Optionally, the image category determining subunit includes:
the similarity comparison module is configured to compare the image characteristics with the image characteristics of pre-stored images of various types;
and the image type determining module is configured to determine the image type of the image to be processed according to the similarity comparison result.
Optionally, the image feature obtaining subunit includes:
an image feature acquisition module configured to input the standard image into a class recognition model for processing to acquire the image feature.
Optionally, the processing unit includes:
a scaling subunit configured to scale the standard image to coincide with a size of the image segmentation template;
and the segmentation processing subunit is configured to perform segmentation processing on the scaled standard image according to the image segmentation template to obtain at least one image slice.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer program instructions, where the one or more computer program instructions are executed by the processor to implement the method described above.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method as described above.
The method and the device for processing the image slice comprise the steps of determining the image type of a standard image according to the standard image corresponding to the image to be processed, processing the standard image according to an image segmentation template corresponding to the image type, obtaining at least one image slice, carrying out information identification on one or more image slices to obtain corresponding identification information, and displaying the identification information of the image slices in corresponding information frames.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of an image processing method of an embodiment of the present invention;
FIG. 2 is a schematic diagram of acquiring a standard image according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an image segmentation template according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an image slice of a to-be-processed image of an embodiment of the invention;
FIG. 5 is a diagram illustrating an identification information display method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another identification information display method according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an identification information editing method according to an embodiment of the present invention;
FIG. 8 is a process diagram of an image processing method of an embodiment of the invention;
FIG. 9 is a schematic diagram of an image processing apparatus of an embodiment of the present invention;
fig. 10 is a schematic diagram of an electronic device of an embodiment of the invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Fig. 1 is a flowchart of an image processing method of an embodiment of the present invention. As shown in fig. 1, the image processing method of the present embodiment includes the steps of:
and step S110, preprocessing the image to be processed to obtain a standard image. Optionally, the standard image is a forward standard image.
In an alternative implementation, step S110 includes: identifying the image-text direction of an image to be processed, and preprocessing the image to be processed according to the image-text direction to obtain a standard image. The image-text direction comprises a character direction and/or a graphic direction of the image to be processed.
Optionally, the image-text direction of the image to be processed is determined by identifying the input direction identification model of the image to be processed. Optionally, the direction recognition model is obtained by training through an image database. It should be understood that the direction recognition model may only recognize the direction of the text in the image to be processed, may only recognize the direction of the figure in the image to be processed (for example, the direction of the figure in the identity document, etc.), and may also recognize both the direction of the text in the image to be processed and the direction of the figure in the image to be processed, which is not limited by the embodiment.
Optionally, in this embodiment, the image is rotated, stretched, deformed, and cropped according to the image-text direction of the image to be processed, so as to obtain a standard image of the image to be processed.
FIG. 2 is a schematic diagram of acquiring a standard image according to an embodiment of the present invention. As shown in fig. 2, the image 21 to be processed is input to the direction identification model, the image-text direction of the image 21 to be processed is obtained, and the image 21 to be processed is rotated, stretched, deformed, cut and the like according to the image-text direction of the image 21 to be processed, so as to obtain a standard image 22.
According to the embodiment, the standard image with the characters and the graphics basically forward is obtained by preprocessing the image to be processed, and the accuracy and the efficiency of subsequent information identification can be improved.
And step S120, determining the image type of the image to be processed according to the standard image.
In various social activities at present, it is necessary to submit qualification certificates, such as identity certificates, unit business licenses, and the like, and since the formats, common characters, and the like of the similar certificates in the qualification certificates are basically the same, the image types of the images to be processed are firstly identified, and the effective information in the images is identified according to the image types, so that the efficiency of image information identification can be further improved.
In an optional implementation manner, step S120 may specifically be: the image type of the image to be processed is determined by acquiring the image characteristics of the standard image and the image characteristics of the standard image. The image characteristics of the image to be processed may include at least one item of basic information such as text information, layout information, and color/line/texture of the image. Optionally, the standard image is input into the type recognition model to be processed to obtain the image characteristics, the image characteristics corresponding to the image to be processed are compared with the image characteristics of the pre-stored images of various types, and the image type of the image to be processed is determined according to the comparison result of the similarity. Optionally, the class identification model is a convolutional neural network model.
In another optional implementation manner, step S120 may specifically be: and inputting the standard image into a type identification model to identify characters and/or formats, and determining the image type of the image to be processed. Optionally, the category identification model is obtained by training through a database of various images. It should be understood that the category identification model may identify only the text in the image to be processed, may identify only the layout in the image to be processed, and may identify both the text and the layout in the image to be processed, which is not limited in this embodiment. For example, if the category identification model identifies text information such as "name", "national identification number", "issuing authority", "resident identification card" from the standard image, it is determined that the corresponding image to be processed is an identification card image. For another example, if the type recognition model recognizes the format of the standard image as: the left side is a character area, the right side is an image area, and character information such as 'name', 'citizen identity card number' and the like is identified, so that the corresponding image to be processed is determined to be an identity document image.
Step S130, determining a corresponding image segmentation template according to the image type of the image to be processed. The image segmentation templates corresponding to the image types are acquired in advance.
FIG. 3 is a diagram of an image segmentation template according to an embodiment of the present invention. Taking the front image of the identity document image as an example, as shown in fig. 3, the image segmentation template 3 includes an image slice 31, an image slice 32, and an image slice 33. The image slice 31 is an area including basic information such as "name", "sex", "date of birth", "nationality", and "address". The image slice 32 is an area that includes a "certificate photo". The image slice 33 is an area including information such as "national identification number". It should be understood that the image segmentation template 3 is only an exemplary segmentation manner, and the image segmentation templates corresponding to various types of images may be determined according to application scenarios (e.g., information core, etc.), and the embodiment is not limited thereto.
And step S140, processing the standard image according to the image segmentation template to obtain at least one image slice. In an alternative implementation manner, the standard image is scaled to be consistent with the size of the image segmentation template, and the scaled standard image is segmented according to the image segmentation template to obtain at least one image slice. Since the standard image obtained after the preprocessing does not necessarily match the size of the image segmentation template of the category to which the standard image belongs, the standard image needs to be reduced or enlarged so as to be matched or approximately matched with the size of the image segmentation template, and therefore, the segmentation of the standard image can be basically matched with the image segmentation template.
Fig. 4 is a schematic illustration of an image slice of a to-be-processed image of an embodiment of the invention. As shown in fig. 4, taking the standard image 22 and the image segmentation template 3 as an example, the standard image 22 is segmented according to the image segmentation template 3 to obtain image slices 41-43.
Step S150, performing information identification on one or more image slices, and acquiring corresponding identification information.
In an optional implementation manner, an image slice requiring information identification is determined according to an image segmentation template, information identification is performed on the image slice requiring information identification, and corresponding identification information is acquired. Optionally, in the image segmentation template of this embodiment, the image slices that do not need information identification (or need information identification) are marked, or the image slices that do not need information identification and the image slices that need information identification are marked differently, so that the image slices that need information identification can be determined according to the image segmentation template. Assuming that the image to be processed is an identity document image and mainly recognizes characters in the image to be processed, as shown in fig. 4, since the image slice 42 does not include a character region, it is only necessary to perform character recognition on the image slice 41 and the image slice 42. Therefore, according to the embodiment, by dividing the image and only identifying the image slice which needs to be subjected to information identification, the computer resource required by the information identification can be reduced, and the information identification efficiency can be improved.
In another alternative implementation, the image slice that needs to be identified by the information may also be determined according to the type of the image to be processed, which is not limited by the embodiment.
In an optional implementation manner, the image slices requiring information identification are respectively input to the corresponding information identification models for information identification, and corresponding identification information is acquired. And the various information recognition models are obtained by pre-training through corresponding databases.
For an image to be processed, different areas may show different information, and therefore, in this embodiment, for image slices of different information, different information recognition models are used for recognition, so as to realize targeted recognition on each image slice, thereby improving the accuracy of information recognition.
In another alternative implementation, a Character Recognition algorithm, such as an OCR (Optical Character Recognition), may be applied to the text information in the image slice to perform Character Recognition on the image slice containing the text.
Taking the image slices shown in fig. 4 as an example, the main information text information in the image slice 41 and the image slice 43, and the main information in the image slice 42 is the portrait information, if the image slices 41-43 need to be subjected to information identification, the image slice 41 and the image slice 43 can be subjected to information identification by using the text type information identification model, and the image slice 42 can be subjected to information identification by using the portrait type information identification model, so that the accuracy of information identification can be improved.
According to the embodiment, the image type of the image to be processed is identified according to the image segmentation template of each type of predetermined image, and the standard image of the image to be processed is segmented according to the image segmentation template corresponding to the image type to obtain at least one image slice.
Step S160, displaying the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
In an optional implementation manner, after information identification is performed on each image slice, the obtained identification information is sent to the display screen, and the identification information of each image slice is displayed in the corresponding information frame.
Fig. 5 is a schematic diagram of an identification information display method according to an embodiment of the present invention. Taking the image slices 41-43 in fig. 4 as an example, it is assumed that only the text information in the image slices 41 and 42 is recognized, and the corresponding recognition result is sent to the display screen for displaying. As shown in fig. 5, after the identification information of the image slices 41 and 42 is acquired, the identification information of the image slice 41 is displayed in the information frame 51, and the identification information of the image slice 42 is displayed in the information frame 52.
Optionally, an information frame corresponding to one image slice is located around the information frame, so that a user can distinguish the image slice from the corresponding identification information. In an alternative implementation, as shown in FIG. 5, an information frame corresponding to an image slice is suspended above the image slice.
Fig. 6 is a schematic diagram of another identification information display method according to an embodiment of the present invention. In an alternative implementation, in response to an image slice being triggered, the identification information of the image slice is displayed in a corresponding display frame. That is, after the information identification of each image slice is completed, the user may trigger the image slice to be viewed (for example, if the information is checked at the computer terminal, the image slice to be viewed is clicked with a mouse), and in response to the image slice being triggered, the identification information of the image slice is displayed in the corresponding information frame. Therefore, the identification information of each image slice can be checked one by one, so that the situation that the image slices are matched with the identification information wrongly and the like due to the fact that the identification information of each image slice is displayed on the page is avoided.
As shown in fig. 6, in response to the image slice 41 being triggered, the identification information of the image slice 41 is displayed in the information frame 51. Optionally, the information frame 51 is suspended above the image slice 41. It should be understood that the information frame 51 may be displayed at any position of the screen, and the embodiment is not limited thereto.
In an alternative implementation manner, the information frame enters an editable state while displaying the identification information, so that the user can correct the content in the information frame at any time, and the information checking and correcting efficiency can be improved.
In another alternative implementation, the information box is caused to enter an editable state in response to the information box being triggered. That is to say, when the information frame is not triggered, the information frame is in a viewing state, so as to avoid that data is changed by mistake due to misoperation of a user. And when the information frame is triggered, the information frame is enabled to enter an editable state, the identification information of the modified image slice is received, and the identification information of the modified image slice is stored in the information frame. Optionally, after the modified identification information is stored, the information frame enters a viewing state.
Fig. 7 is a schematic diagram of an identification information editing method according to an embodiment of the present invention. As shown in fig. 7, in response to the information frame 51 being triggered, the information frame 51 is enabled to enter an editable state, so that the user can correct the modification of the identification information in the information frame, receive and store the modified identification information, and simultaneously enable the information frame to enter a viewing state.
The method comprises the steps of determining the image type of a standard image according to the standard image corresponding to an image to be processed, processing the standard image according to an image segmentation template corresponding to the image type, acquiring at least one image slice, performing information identification on one or more image slices to acquire corresponding identification information, and displaying the identification information of the image slices in a corresponding information frame.
Fig. 8 is a process diagram of an image processing method according to an embodiment of the present invention. As shown in fig. 8, the image processing method of the present embodiment has the following processing procedures:
in step S1, the image to be processed 81 is preprocessed to obtain the standard image 82. Optionally, step S1 may include: the image-text direction (text direction and/or graphic direction) of the image to be processed is identified, and the image to be processed is rotated, stretched, deformed, cut and the like according to the image-text direction, so that a standard image 82 is obtained. In step S2, the image type of the image to be processed is determined according to the standard image 82, the corresponding image segmentation template 84 is determined according to the image type of the image to be processed, and the standard image 82 is scaled to obtain the standard image 83. The standard image 83 and the image segmentation template 84 are substantially the same size. Optionally, the standard image 82 is input into a type recognition model for text and/or layout recognition to determine the image type of the image 81 to be processed. In step S3, the standard image 83 is subjected to image segmentation processing based on the image segmentation template 84, resulting in the standard image 85 including three image slices. In step S4, information recognition is performed on the image slice that needs information recognition. In step S5, in response to the image slice 861 being triggered, the identification information of the image slice 861 is displayed in the information frame 871 so that the user views the identification information of the image slice 861. In step S6, in response to the information box 871 being triggered, the information box 871 is caused to enter an editable state from the viewing state so that the user can make modifications to the content in the information box. In step S7, the modified information is received and saved and the information block 871 is caused to go into a viewing state from an editable state.
The method and the device determine the image type of the standard image according to the standard image corresponding to the image to be processed, process the standard image according to the image segmentation template corresponding to the image type, obtain at least one image slice, perform information identification on one or more image slices to obtain corresponding identification information, and send the identification information to the corresponding information frame for display. In addition, in the embodiment, after the image slice is triggered, the identification information of the image slice is displayed in the corresponding information frame, so that the information of the image slice can be independently checked, the situations that the image slice is wrongly matched with the identification information and the like due to the fact that the identification information of each image slice is displayed on the page are avoided, and the situation that data is wrongly changed due to misoperation of a user is avoided by enabling the information frame to enter the editable state from the checking state after the information frame is triggered.
Fig. 9 is a schematic diagram of an image processing apparatus of an embodiment of the present invention. As shown in fig. 9, the image processing apparatus 9 of the present embodiment includes a preprocessing unit 91, an image kind determining unit 92, a template determining unit 93, a processing unit 94, an information identifying unit 95, and a display unit 96.
The preprocessing unit 91 is configured to preprocess an image to be processed, acquiring a standard image. In an alternative implementation, the pre-processing unit 91 includes a direction identifying subunit 911 and a pre-processing subunit 912. The direction identifying subunit 911 is configured to identify a teletext direction of the image to be processed, which comprises a text direction and/or a graphics direction of the image to be processed. The preprocessing sub-unit 912 is configured to preprocess the image to be processed according to the image-text direction, and obtain a standard image. Optionally, the direction identifying subunit 911 includes a direction identifying module 9111. The direction recognition module 9111 is configured to recognize the to-be-processed image input direction recognition model, and determine the image-text direction of the to-be-processed image.
The image category determination unit 92 is configured to determine an image category of the image to be processed from the standard image. In an alternative implementation, the image category determining unit 92 includes an image feature acquiring sub-unit 921 and an image category determining sub-unit 922. The image feature acquiring subunit 921 is configured to acquire an image feature of the standard image. The image type determining subunit 922 is configured to determine an image type of the image to be processed according to the image feature. Optionally, the image category determining subunit 922 includes a similarity comparison module 9221 and an image category determining module 9222. The similarity comparison module 9221 is configured to perform similarity comparison between the image features and pre-stored image features of various images. The image type determining module 9222 is configured to determine the image type of the image to be processed according to the similarity comparison result. Optionally, the image feature acquiring subunit 921 includes an image feature acquiring module 9211. The image feature obtaining module 9211 is configured to process the standard image input category identification model to obtain the image feature.
The template determination unit 93 is configured to determine a corresponding image segmentation template according to the image type.
The processing unit 94 is configured to process the standard image according to the image segmentation template, obtaining at least one image slice. In an alternative implementation, the processing unit 94 includes a scaling sub-unit 941 and a segmentation processing sub-unit 942. The scaling subunit 941 is configured to scale the standard image to conform to the size of the image segmentation template. The segmentation processing sub-unit 942 is configured to perform segmentation processing on the scaled standard image according to the image segmentation template to obtain at least one image slice.
The information recognition unit 95 is configured to perform information recognition on one or more image slices, and acquire corresponding recognition information. In an alternative implementation, the information identifying unit 95 comprises an image slice determining subunit 951 and an information identifying subunit 952. Wherein the image slice determination subunit 951 is configured to determine image slices requiring information identification according to the image segmentation template. The information identification subunit 952 is configured to perform information identification on the image slice requiring information identification, and acquire corresponding identification information. Optionally, the information identification subunit 952 includes an information identification module 9521. The information identification module 9521 is configured to input the image slices requiring information identification to corresponding information identification models for information identification, and acquire corresponding identification information.
The display unit 96 is configured to display the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame. In an alternative implementation, the display unit 96 includes a display subunit 961. Wherein the display subunit 961 is configured to display the identification information of the image slice in the corresponding display frame in response to the image slice being triggered.
In an alternative implementation manner, the image processing apparatus 9 of the present embodiment further includes a state switching unit 97, an information receiving unit 98, and an information holding unit 99. The state switching unit 97 is configured to cause the information frame to enter an editable state in response to the information frame being triggered. Wherein the information receiving unit 98 is configured to receive identification information of the modified image slice. The information holding unit 99 is configured to hold the identification information of the modified image slice in the information frame. Optionally, the information frame is suspended above the corresponding image slice.
The method and the device for processing the image slice comprise the steps of determining the image type of a standard image according to the standard image corresponding to the image to be processed, processing the standard image according to an image segmentation template corresponding to the image type, obtaining at least one image slice, carrying out information identification on one or more image slices to obtain corresponding identification information, and displaying the identification information of the image slices in corresponding information frames.
Fig. 10 is a schematic diagram of an electronic device of an embodiment of the invention. In the present embodiment, the electronic device 10 includes a server, a terminal, and the like. As shown in fig. 10, the electronic device 10: at least one processor 101; and a memory 102 communicatively coupled to the at least one processor 101; and a communication component 103 communicatively coupled to the scanning device, the communication component 103 receiving and transmitting data under control of the processor 101; the memory 102 stores instructions executable by the at least one processor 101, and the instructions are executed by the at least one processor 101 to implement the image processing method.
Specifically, the electronic device includes: one or more processors 101 and a memory 102, with one processor 101 being illustrated in fig. 10. The processor 101 and the memory 102 may be connected by a bus or other means, and fig. 10 illustrates the connection by the bus as an example. Memory 102, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 101 executes various functional applications of the apparatus and data processing, i.e., implements the above-described image processing method, by executing nonvolatile software programs, instructions, and modules stored in the memory 102.
The memory 102 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 102 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 102 may optionally include memory located remotely from processor 101, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 102, which when executed by the one or more processors 101 perform the image processing method in any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
The method and the device for processing the image slice comprise the steps of determining the image type of a standard image according to the standard image corresponding to the image to be processed, processing the standard image according to an image segmentation template corresponding to the image type, obtaining at least one image slice, carrying out information identification on one or more image slices to obtain corresponding identification information, and displaying the identification information of the image slices in corresponding information frames.
Another embodiment of the invention is directed to a non-transitory storage medium storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiment of the invention discloses A1 and an image processing method, wherein the method comprises the following steps:
preprocessing an image to be processed to obtain a standard image;
determining the image type of the image to be processed according to the standard image;
determining a corresponding image segmentation template according to the image type;
processing the standard image according to the image segmentation template to obtain at least one image slice;
performing information identification on one or more image slices to acquire corresponding identification information;
and displaying the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
A2, the method of A1, wherein displaying the identification information of the image slices in corresponding information frames comprises:
and in response to the image slice being triggered, displaying the identification information of the image slice in a corresponding display frame.
A3, the method according to A1, wherein the method further comprises:
in response to the information frame being triggered, causing the information frame to enter an editable state;
receiving identification information of the modified image slice;
and storing the identification information of the modified image slice in the information frame.
A4, the method according to any one of A1-A3, wherein the information frame is suspended above the corresponding image slice.
A5, the method of a1, wherein the performing information recognition on one or more image slices, and the obtaining corresponding recognition information includes:
determining an image slice needing information identification according to the image segmentation template;
and carrying out information identification on the image slices needing information identification, and acquiring corresponding identification information.
A6, the method according to A5, wherein the information recognition of the image slices needing information recognition, and the acquiring of the corresponding recognition information includes:
and respectively inputting the image slices needing information identification to corresponding information identification models for information identification, and acquiring corresponding identification information.
A7, the method according to A1, wherein the preprocessing the image to be processed and the acquiring the standard image comprises:
identifying the image-text direction of an image to be processed, wherein the image-text direction comprises the character direction and/or the graphic direction of the image to be processed;
and preprocessing the image to be processed according to the image-text direction to obtain a standard image.
A8, the method according to a7, wherein the identifying the image-text direction of the image to be processed comprises:
and identifying the input direction identification model of the image to be processed, and determining the image-text direction of the image to be processed.
A9, the method according to A1, wherein the determining the image type of the image to be processed according to the standard image comprises:
acquiring image characteristics of the standard image;
and determining the image type of the image to be processed according to the image characteristics.
A10, the method according to A9, wherein the determining the image type of the image to be processed according to the image features comprises:
comparing the image characteristics with the image characteristics of various pre-stored images in a similarity manner;
and determining the image type of the image to be processed according to the similarity comparison result.
A11, the method of A9, wherein acquiring image features of the standard image comprises:
and inputting the standard image into a category identification model for processing to obtain the image characteristics.
A12, the method according to a1, wherein the processing the standard image according to the image segmentation template, and the obtaining at least one image slice comprises:
scaling the standard image to be consistent with the size of the image segmentation template;
and carrying out segmentation processing on the scaled standard image according to the image segmentation template to obtain at least one image slice.
The embodiment of the invention also discloses B1 and an image processing device, wherein the device comprises:
the preprocessing unit is configured to preprocess the image to be processed to acquire a standard image;
an image type determination unit configured to determine an image type of the image to be processed from the standard image;
a template determination unit configured to determine a corresponding image segmentation template according to the image type;
the processing unit is configured to process the standard image according to the image segmentation template to obtain at least one image slice;
the information identification unit is configured to perform information identification on one or more image slices and acquire corresponding identification information;
a display unit configured to display the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
B2, the device according to B1, wherein the display unit includes:
a display subunit configured to display the identification information of the image slice in a corresponding display frame in response to the image slice being triggered.
B3, the apparatus according to B1, wherein the apparatus further comprises:
a state switching unit configured to cause the information frame to enter an editable state in response to the information frame being triggered;
an information receiving unit configured to receive identification information of the modified image slice;
an information holding unit configured to hold identification information of the modified image slice in the information frame.
B4, the apparatus according to any one of B1-B3, wherein the information frame is suspended above the corresponding image slice.
B5, the device according to B1, wherein the information identification unit includes:
an image slice determining subunit configured to determine an image slice requiring information identification according to the image segmentation template;
and the information identification subunit is configured to perform information identification on the image slice needing information identification, and acquire corresponding identification information.
B6, the apparatus according to B5, wherein the information identification subunit includes:
and the information identification module is configured to input the image slices needing information identification into corresponding information identification models respectively for information identification, and acquire corresponding identification information.
B7, the apparatus according to B1, wherein the preprocessing unit comprises:
the direction identification subunit is configured to identify the image-text direction of the image to be processed, wherein the image-text direction comprises the image-text direction and/or the image direction of the image to be processed;
and the preprocessing subunit is configured to preprocess the image to be processed according to the image-text direction to obtain a standard image.
B8, the apparatus according to B7, wherein the direction-identifying subunit comprises:
and the direction identification module is configured to identify the to-be-processed image input direction identification model and determine the image-text direction of the to-be-processed image.
B9, the apparatus of B1, wherein the image category determining unit includes:
an image feature acquisition subunit configured to acquire an image feature of the standard image;
an image type determination subunit configured to determine an image type of the image to be processed according to the image feature.
B10, the apparatus of B9, wherein the image type determination subunit comprises:
the similarity comparison module is configured to compare the image characteristics with the image characteristics of pre-stored images of various types;
and the image type determining module is configured to determine the image type of the image to be processed according to the similarity comparison result.
B11, the device according to B9, wherein the image feature obtaining subunit comprises:
an image feature acquisition module configured to input the standard image into a class recognition model for processing to acquire the image feature.
B12, the device according to B1, wherein the processing unit includes:
a scaling subunit configured to scale the standard image to coincide with a size of the image segmentation template;
and the segmentation processing subunit is configured to perform segmentation processing on the scaled standard image according to the image segmentation template to obtain at least one image slice.
The embodiment of the invention also discloses C1, an electronic device, comprising a memory and a processor, wherein the memory is used for storing one or more computer program instructions, and the processor executes the one or more computer program instructions to realize the method according to any one of A1-A12.
The embodiment of the invention also discloses D1, a computer readable storage medium, wherein the computer program instructions are stored on the computer readable storage medium, and when the computer program instructions are executed by a processor, the computer program instructions realize the method according to any one of A1-A12.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An image processing method, characterized in that the method comprises:
preprocessing an image to be processed to obtain a standard image;
determining the image type of the image to be processed according to the standard image;
determining a corresponding image segmentation template according to the image type;
processing the standard image according to the image segmentation template to obtain at least one image slice;
performing information identification on one or more image slices to acquire corresponding identification information;
and displaying the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
2. The method of claim 1, wherein displaying the identification information of the image slices in corresponding information boxes comprises:
and in response to the image slice being triggered, displaying the identification information of the image slice in a corresponding display frame.
3. The method of claim 1, further comprising:
in response to the information frame being triggered, causing the information frame to enter an editable state;
receiving identification information of the modified image slice;
and storing the identification information of the modified image slice in the information frame.
4. The method of any of claims 1-3, wherein the information frame is suspended above the corresponding image slice.
5. The method of claim 1, wherein performing information recognition on one or more image slices, and wherein obtaining corresponding recognition information comprises:
determining an image slice needing information identification according to the image segmentation template;
and carrying out information identification on the image slices needing information identification, and acquiring corresponding identification information.
6. The method of claim 5, wherein the image slice requiring information identification is subjected to information identification, and acquiring corresponding identification information comprises:
and respectively inputting the image slices needing information identification to corresponding information identification models for information identification, and acquiring corresponding identification information.
7. The method of claim 1, wherein preprocessing the image to be processed and obtaining the standard image comprises:
identifying the image-text direction of an image to be processed, wherein the image-text direction comprises the character direction and/or the graphic direction of the image to be processed;
and preprocessing the image to be processed according to the image-text direction to obtain a standard image.
8. An image processing apparatus, characterized in that the apparatus comprises:
the preprocessing unit is configured to preprocess the image to be processed to acquire a standard image;
an image type determination unit configured to determine an image type of the image to be processed from the standard image;
a template determination unit configured to determine a corresponding image segmentation template according to the image type;
the processing unit is configured to process the standard image according to the image segmentation template to obtain at least one image slice;
the information identification unit is configured to perform information identification on one or more image slices and acquire corresponding identification information;
a display unit configured to display the identification information of the image slice in a corresponding information frame, wherein the information frame is an editable frame.
9. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-7.
10. A computer-readable storage medium on which computer program instructions are stored, which computer program instructions, when executed by a processor, are to implement a method according to any one of claims 1-7.
CN202010239574.XA 2020-03-30 2020-03-30 Image processing method, image processing device, electronic equipment and computer readable storage medium Pending CN111461205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010239574.XA CN111461205A (en) 2020-03-30 2020-03-30 Image processing method, image processing device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010239574.XA CN111461205A (en) 2020-03-30 2020-03-30 Image processing method, image processing device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111461205A true CN111461205A (en) 2020-07-28

Family

ID=71683361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010239574.XA Pending CN111461205A (en) 2020-03-30 2020-03-30 Image processing method, image processing device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111461205A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576878A (en) * 2009-06-17 2009-11-11 董名垂 System and method for instantly translating web pages hooked by users
CN103400127A (en) * 2013-08-05 2013-11-20 苏州鼎富软件科技有限公司 Picture and text identifying method
CN106791115A (en) * 2016-12-26 2017-05-31 努比亚技术有限公司 A kind of information of mobile terminal clone method and mobile terminal
CN108038504A (en) * 2017-12-11 2018-05-15 深圳房讯通信息技术有限公司 A kind of method for parsing property ownership certificate photo content
CN109284756A (en) * 2018-08-01 2019-01-29 河海大学 A kind of terminal censorship method based on OCR technique
CN109492643A (en) * 2018-10-11 2019-03-19 平安科技(深圳)有限公司 Certificate recognition methods, device, computer equipment and storage medium based on OCR
CN110221739A (en) * 2019-05-17 2019-09-10 北京搜狗科技发展有限公司 A kind of data processing method, device and electronic equipment
CN110443250A (en) * 2019-07-31 2019-11-12 天津车之家数据信息技术有限公司 A kind of classification recognition methods of contract seal, device and calculate equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576878A (en) * 2009-06-17 2009-11-11 董名垂 System and method for instantly translating web pages hooked by users
CN103400127A (en) * 2013-08-05 2013-11-20 苏州鼎富软件科技有限公司 Picture and text identifying method
CN106791115A (en) * 2016-12-26 2017-05-31 努比亚技术有限公司 A kind of information of mobile terminal clone method and mobile terminal
CN108038504A (en) * 2017-12-11 2018-05-15 深圳房讯通信息技术有限公司 A kind of method for parsing property ownership certificate photo content
CN109284756A (en) * 2018-08-01 2019-01-29 河海大学 A kind of terminal censorship method based on OCR technique
CN109492643A (en) * 2018-10-11 2019-03-19 平安科技(深圳)有限公司 Certificate recognition methods, device, computer equipment and storage medium based on OCR
CN110221739A (en) * 2019-05-17 2019-09-10 北京搜狗科技发展有限公司 A kind of data processing method, device and electronic equipment
CN110443250A (en) * 2019-07-31 2019-11-12 天津车之家数据信息技术有限公司 A kind of classification recognition methods of contract seal, device and calculate equipment

Similar Documents

Publication Publication Date Title
US10140511B2 (en) Building classification and extraction models based on electronic forms
CN108256591B (en) Method and apparatus for outputting information
WO2020098250A1 (en) Character recognition method, server, and computer readable storage medium
US11367310B2 (en) Method and apparatus for identity verification, electronic device, computer program, and storage medium
CN110705405A (en) Target labeling method and device
US10140510B2 (en) Machine print, hand print, and signature discrimination
CN109409349B (en) Credit certificate authentication method, credit certificate authentication device, credit certificate authentication terminal and computer readable storage medium
CN111046879B (en) Certificate image classification method, device, computer equipment and readable storage medium
US10354166B2 (en) Reading test cards using a mobile device
CN112669515B (en) Bill image recognition method and device, electronic equipment and storage medium
CN111709414A (en) AR device, character recognition method and device thereof, and computer-readable storage medium
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
CN113239910B (en) Certificate identification method, device, equipment and storage medium
CN113034421A (en) Image detection method, device and storage medium
CN112597940B (en) Certificate image recognition method and device and storage medium
CN113888675A (en) Method, system, apparatus, and medium for generating a document image
CN113066223A (en) Automatic invoice verification method and device
US11244149B2 (en) Processing apparatus, processing method, and non-transitory storage medium
CN111461205A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US20230005301A1 (en) Control apparatus, control method, and non-transitory computer readable medium
CN111709404B (en) Machine room legacy identification method, system and equipment
CN114359931A (en) Express bill identification method and device, computer equipment and storage medium
US11462014B2 (en) Information processing apparatus and non-transitory computer readable medium
CN109902684B (en) Information acquisition method and device, equipment and storage medium
CN116188848A (en) Certificate classification verification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200728

RJ01 Rejection of invention patent application after publication