CN113112567A - Method and device for generating editable flow chart, electronic equipment and storage medium - Google Patents
Method and device for generating editable flow chart, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113112567A CN113112567A CN202110415595.7A CN202110415595A CN113112567A CN 113112567 A CN113112567 A CN 113112567A CN 202110415595 A CN202110415595 A CN 202110415595A CN 113112567 A CN113112567 A CN 113112567A
- Authority
- CN
- China
- Prior art keywords
- picture
- graphic frame
- text
- flow chart
- information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000012545 processing Methods 0.000 claims description 21
- 238000007781 pre-processing Methods 0.000 claims description 15
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000015654 memory Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 238000012015 optical character recognition Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000012360 testing method Methods 0.000 description 3
- 102100032202 Cornulin Human genes 0.000 description 2
- 101000920981 Homo sapiens Cornulin Proteins 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
- G06V30/41—Analysis of document content
- G06V30/413—Classification of content, e.g. text, photographs or tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a method for generating an editable flow chart, which comprises the steps of obtaining a flow chart picture; respectively identifying text information and graphic frame information in the flow chart picture, wherein the text information comprises text content and text coordinates, and the graphic frame information comprises graphic frame content and graphic frame coordinates; matching the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file; and loading the data file into an application program to enable the application program to generate an editable flow chart.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and a system for generating an editable flowchart.
Background
With the rapid development of computer and internet technologies, Optical Character Recognition (OCR) technology is beginning to be widely applied to converting paper documents into electronic version documents.
OCR technology refers to a process in which an electronic device (e.g., a scanner or a digital camera) examines a character printed on paper, determines its shape by detecting dark and light patterns, and then translates the shape into a computer word using a character recognition method.
However, the existing OCR technology is based on OCR recognition of a specific scene, such as information recognition of a bank card, information recognition of an identification card, bill recognition, and the like. There is no conversion method to identify the flow chart and convert the picture of the flow chart into a flow chart editable by general software.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method and system for generating an editable flowchart.
One aspect of the present disclosure provides a method of generating an editable flowchart, comprising obtaining a flowchart picture; respectively identifying text information and graphic frame information in the flow chart picture, wherein the text information comprises text content and text coordinates, and the graphic frame information comprises graphic frame content and graphic frame coordinates; matching text content and graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file; and loading the data file into an application program to enable the application program to generate an editable flow chart.
Optionally, matching the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates includes: and if the text content and the graphic frame content are not matched, adjusting the text coordinate and/or the graphic frame coordinate.
Optionally, the identifying text information and graphic frame information in the flowchart picture respectively further includes: dividing the flow chart picture into a text information picture and a graphic frame information picture; recognizing the text information picture to generate the text information; and identifying and generating the graphic frame information.
Optionally, the dividing the flowchart picture into a text information picture and a graphic frame information picture includes: gridding the flow chart picture by a preset size; judging the category of each grid according to the number of pixels in each grid in sequence; when the number of the pixels is larger than a preset threshold value, the pixels are the text information grids; when the number of the pixels is smaller than a preset threshold value, the picture frame information grid is determined; the combined text information grid forms a text information picture, and the combined graphic frame information grid forms a graphic frame information picture.
Optionally, recognizing the text information picture, and generating the text information, includes: preprocessing the text information picture and generating a text coordinate; the textual content is identified and generated.
Optionally, recognizing the picture of the graphic frame information, and generating the graphic frame information includes: preprocessing the graph frame information picture and generating a graph frame coordinate; and identifying and generating the graphic frame content.
Optionally, recognizing a graphic box, and generating the text content, includes: establishing a graph frame template; establishing a graphic frame identification model; and identifying the graphic frame and generating the graphic frame content.
Optionally, loading the data file into the application program includes: compiling the data file into an application program file corresponding to the application program; and loading the application program file into the application program.
Optionally, the method for generating an editable flowchart further includes, after acquiring the flowchart picture, further including: and carrying out binarization and denoising processing on the flow chart picture.
Another aspect of the present disclosure provides a system for generating an editable flowchart, including a picture taking module for taking a picture of a flowchart; the image identification module is used for respectively identifying text information and graphic frame information in the flow chart image, wherein the text information comprises text content and text coordinates, and the graphic frame information comprises graphic frame content and graphic frame coordinates; the position matching module is used for matching the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file; and the file conversion module is used for loading the data file into an application program so as to enable the application program to generate an editable flow chart.
Optionally, the system for generating an editable flowchart further includes: and the image preprocessing module is used for carrying out binarization and denoising processing on the flow chart image.
Another aspect of the present disclosure provides an electronic device including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to perform a method according to any preceding claim.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
The beneficial effects that this disclosure provides have at least:
by respectively identifying the text information and the graphic frame information in the flow chart picture, the identification accuracy can be improved. The relative positions of the text content and the graphic frame content can be determined through the text coordinates and the graphic frame coordinates. The flow chart picture can be converted into the flow chart which can be edited online by converting the flow chart picture into the data file, and the data file can be compiled into the application program file corresponding to the application program, so that the data file can be loaded to the general flow chart editing application program such as Microsoft Visio, drawing tools and the like, and the application object can select the corresponding application program to edit the flow chart online according to own habits.
Drawings
FIG. 1 schematically illustrates an exemplary system architecture to which the disclosed methods and apparatus for generating an editable flow chart may be applied;
FIG. 2 schematically illustrates a flow diagram of a method of generating an editable flow diagram according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of identifying textual information and graphical box information in a flow chart picture according to an embodiment of the disclosure;
FIG. 4A schematically illustrates a flow chart of a method of recognizing textual information according to an embodiment of the disclosure
FIG. 4B schematically illustrates a flow chart of a method of identifying graphical box information in accordance with an embodiment of the present disclosure;
FIG. 5A schematically illustrates a case where text coordinates do not match graphics box coordinates according to an embodiment of the disclosure
FIG. 5B schematically illustrates another case where the text coordinates do not match the graphics box coordinates, in accordance with an embodiment of the disclosure;
FIG. 6 schematically illustrates a block diagram of an apparatus for generating an editable flow chart according to an embodiment of the disclosure; and
fig. 7 schematically illustrates a block diagram of an electronic device suitable for implementing an apparatus for generating an editable flow chart according to an embodiment of the disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a picture taking application, a picture processing application, a flowchart drawing application, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for users to store and transmit pictures using the terminal devices 101, 102, 103. The backend management server may analyze the received flowchart picture, and feed back a processing result (e.g., a corresponding application file generated according to an application used by a user) to the terminal device.
It should be noted that the method for generating an editable flowchart provided by the embodiment of the disclosure may be generally executed by the server 105. Accordingly, the system for generating an editable flowchart provided by the embodiment of the disclosure may be generally disposed in the server 105. The method for generating the editable flowchart according to the embodiment of the disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the apparatus for generating an editable flowchart provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the method for generating the editable flowchart provided by the embodiment of the disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Accordingly, the apparatus for generating an editable flowchart provided in the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
Fig. 2 schematically illustrates a method of generating an editable flowchart according to an embodiment of the disclosure, as shown in fig. 2, the method includes operations S210 to S240.
In operation S210, a flowchart picture is acquired.
According to the embodiment of the disclosure, the flowchart picture may be a hand-drawn flowchart picture, or may be a screenshot of an electronic flowchart.
It can be understood that the type of the acquired flowchart image is not limited in the embodiments of the present disclosure, and other types of images besides the exemplary hand-drawn flowchart image and the screenshot of the electronic flowchart image may also be used, and those skilled in the art may specifically select the type according to the actual application.
According to the embodiment of the disclosure, after the flow chart picture is obtained, binarization and denoising processing are also carried out on the flow chart picture. The binarization processing of the image is to convert the color picture into a pixel matrix form with 0 and 1, remove unnecessary information of the flow chart picture needing processing and reduce the complexity of subsequent processing. The method for binarizing the flow chart picture can be based on local threshold binarization, global threshold and other methods. The denoising processing is carried out on the flow chart picture to remove the image background and eliminate the flow chart picture blur caused by the instability of the sampling process. The method for denoising the flow chart picture can be median filtering, mean filtering and the like.
It can be understood that the method for performing binarization and denoising on the flowchart image in the embodiment of the present disclosure is not limited, and other types of methods may be used besides the above-mentioned exemplary method, and those skilled in the art may specifically select the method according to the actual application situation.
In operation S220, text information and graphic frame information in the flowchart picture are respectively identified, where the text information includes text content and text coordinates, and the graphic frame information includes graphic frame content and graphic frame coordinates.
FIG. 3 schematically illustrates a flow chart of a method of identifying textual information and graphical box information in a flow chart picture according to an embodiment of the disclosure;
the method includes S310 to S330
Operation S310, dividing the flowchart picture into a text information picture and a graphic frame information picture;
and gridding the flow chart picture by a preset size. Sequentially judging the type of the grid according to the number of pixels in each grid, and when the number of pixels is larger than a preset threshold value, determining the type of the grid as the text information grid; and when the number of the pixels is smaller than a preset threshold value, the picture frame information grid is obtained. The combined text information grid forms a text information picture, and the combined graphic frame information grid forms a graphic frame information picture.
Operation S320, identifying a text information picture, and generating the text information;
as shown in fig. 4A, processing a text information area by an embodiment of the present disclosure includes: preprocessing the text information picture and generating a text coordinate; the textual content is identified and generated.
Through the embodiment of the disclosure, the text information picture is preprocessed to generate the text coordinate, and the preprocessing comprises the steps of correcting the inclination of the text information area and normalizing the scale. For example, for hand-drawn flow chart pictures, the characters are inclined to some extent when the pictures are taken, and the sizes of the characters are different during the writing process. After the text information area of the handwritten flow chart is obtained, inclination correction and scale normalization processing are required to be carried out on the text information area, so that the recognition error caused by character inclination is reduced, the size of the character is unified, and the subsequent recognition efficiency is improved.
According to the embodiment of the disclosure, the text information picture is preprocessed to generate the text coordinates, the text is cut according to the horizontal projection and the vertical projection of the text information picture, and the text coordinates are determined. For example, a text message picture is horizontally projected, an upper limit and a lower limit of each line of characters are found, and line segmentation is performed. And performing vertical projection on each cut line, finding the left and right boundaries of each character, and cutting the single character. The ordinate of each piece of text content is determined by the horizontal projection of the piece of text content. And generating the abscissa of the text content by combining the vertical projection coordinates of the left and right adjacent characters.
Through the embodiment of the disclosure, character recognition is performed by using a character recognition model. The character recognition models may be a CNN model, a CRNN model, and an LSTM + CTC model.
It is understood that the character recognition model in the embodiments of the present disclosure is not limited, and other types of models besides the CNN model, CRNN model and LSTM + CTC model mentioned above may be used, and those skilled in the art may specifically select the models according to the actual application.
It is understood that the text content of the embodiments of the present disclosure may include: text, text format, text size, etc.
In operation S330, the picture frame information picture is preprocessed and picture frame coordinates are generated.
As shown in fig. 4B, the processing of the graphic frame area by the embodiment of the present disclosure includes: preprocessing the graph frame information picture and generating a graph frame coordinate; and identifying and generating the graphic frame content.
According to an embodiment of the present disclosure, the graphics frame information picture is preprocessed and graphics frame coordinates are generated, including rectifying the graphics frame into an ideal geometric figure. For example, the irregular curve ab is adjusted to be a regular line segment a 'b', and the coordinate positions of the end points a 'and b' of the line segment are adjusted to be coincident with the end points of the adjacent line segment, so that a closed geometric figure is formed.
The preprocessing of the graphic frame information picture according to the embodiment of the present disclosure further includes cutting the graphic frame into individual graphic frame units. The segmentation method can be that a flow line is distinguished through the closeness characteristic of the graphic frame; and distinguishing the individual graphic frame units through the connectivity of the graphic frames.
According to an embodiment of the present disclosure, generating the graphics frame coordinates is a location coordinate where the graphics frame pixels are located.
According to an embodiment of the present disclosure, the graphic frame recognition includes: and establishing a graphic frame template, establishing a graphic frame identification model, and identifying the graphic frame to be detected.
According to an embodiment of the present disclosure, creating a graphic frame template includes creating a graphic frame template based on at least one set of test graphic frames. Each set of graphics boxes is shown in FIG. 7, and contains all the basic graphics boxes required to draw the flowchart. For example, 10 basic graphic frames drawn by persons are collected to obtain 10 groups of test graphic frames, and each group of test graphic frames contains all the basic graphic frames required for drawing the flow chart, and forms a graphic frame template.
According to the embodiment of the disclosure, a deep neural network-based graphic frame matching model is established, and a graphic frame template is input into the deep neural network graphic frame matching model for training and evaluation.
According to the embodiment of the disclosure, the identification of the graphic frame is to determine the category of the graphic frame according to the similarity between the graphic frame and each graphic frame in the graphic frame template.
It is understood that the graphic frame content of the disclosed embodiments may include: graphics category, graphics size, etc.
S130, matching the text content and the graphic frame content according to the text coordinate and the graphic frame coordinate to generate a data file;
according to the embodiment of the disclosure, the text content and the graphic frame content are matched according to the text coordinate and the graphic frame coordinate to generate the data file. And if the text coordinate and the graphic frame coordinate are not matched, adjusting the text coordinate and/or the graphic frame coordinate. For example, as shown in fig. 5A, when the text coordinate ordinate coincides with the graphic box ordinate, the text ordinate may be adjusted to reduce the height of the text so that all the coordinates of the text are inside the graphic box coordinate. Fig. 5B schematically shows that when a part of the set of abscissa of the text content is larger than the set of ordinate of the graphic frame, the abscissa on the right side of the graphic frame is adjusted to increase the area of the graphic frame so that all the coordinates of the text are inside the coordinates of the graphic frame.
S140 loads the data file into the application program, so that the application program generates an editable flowchart.
In the embodiment of the present disclosure, the application program may be Microsoft Visio, drawing tool, or other application program capable of editing the flowchart online.
In the embodiment of the present disclosure, the data file needs to be compiled into an application file corresponding to the application program, and the application file is loaded into the application program.
The conversion method provided by the embodiment of the disclosure is to identify the text content and the graphic frame content, correctly identify the flow chart in the hand-drawn flow chart and the file screenshot in the daily meeting by combining the position coordinates, and convert the flow chart into the electronic version flow chart which can be edited by general software, so that the daily life of people is more convenient and faster.
FIG. 6 schematically shows a block diagram of a system for generating an editable flow chart according to an embodiment of the disclosure.
As shown in fig. 6, the system 600 includes a picture taking module 610, a picture preprocessing module 620, a picture identifying module 630, a location matching module 840, and a file conversion module 650.
The picture acquisition module 610: for obtaining a flow chart picture.
The picture preprocessing module 620: the image processing device is used for carrying out binarization and denoising processing on the flow chart image.
The picture recognition module 630: the image processing device is used for respectively identifying text information and graphic frame information in the flow chart image, wherein the text information comprises text content and text coordinates, and the graphic frame information comprises graphic frame content and graphic frame coordinates;
the location matching module 640: the system is used for matching text content and graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file;
the file conversion module 650: and the data file is loaded into an application program, so that the application program generates an editable flow chart.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the picture taking module 610, the picture preprocessing module 620, the picture identifying module 630, the location matching module 640, and the file converting module 650 may be combined in one module/unit/sub-unit to be implemented, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the picture taking module 610, the picture preprocessing module 620, the picture identifying module 630, the location matching module 640, and the file converting module 650 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or an appropriate combination of any of them. Alternatively, at least one of the picture taking module 610, the picture preprocessing module 620, the picture identifying module 630, the location matching module 640, and the file converting module 650 may be at least partially implemented as a computer program module that, when executed, may perform corresponding functions.
It should be noted that the editable flowchart generation part in the embodiment of the present disclosure corresponds to the editable flowchart generation part in the embodiment of the present disclosure, and the description of the apparatus part for generating the editable flowchart specifically refers to the method part for generating the editable flowchart, and is not described herein again.
Fig. 7 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the system 700 are stored. The processor 701, the ROM702, and the RAM 603 are connected to each other via a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is noted that the programs may also be stored in one or more memories other than the ROM702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The system 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM702 and/or the RAM 703 and/or one or more memories other than the ROM702 and the RAM 703 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (13)
1. A method of generating an editable flow chart, comprising:
acquiring a flow chart picture;
respectively identifying text information and graphic frame information in the flow chart picture, wherein the text information comprises text content and text coordinates, and the graphic frame information comprises graphic frame content and graphic frame coordinates;
matching text content and graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file;
and loading the data file into an application program to enable the application program to generate an editable flow chart.
2. The method of claim 1, wherein matching textual content and graphical box content according to the textual coordinates and graphical box coordinates comprises:
and if the text content and the graphic frame content are not matched, adjusting the text coordinate and/or the graphic frame coordinate.
3. The method of claim 1, wherein the step of identifying text information and graphic frame information in the flowchart picture respectively further comprises:
dividing the flow chart picture into a text information picture and a graphic frame information picture;
recognizing the text information picture to generate the text information;
and identifying the picture of the graphic frame information to generate the graphic frame information.
4. The method of claim 3, wherein the step of dividing the flow chart picture into a text information picture and a graphic frame information picture comprises:
gridding the flow chart picture by a preset size;
judging the category of each grid according to the number of pixels in each grid in sequence;
when the number of the pixels is larger than a preset threshold value, the pixels are the text information grids;
when the number of the pixels is smaller than a preset threshold value, the picture frame information grid is determined;
the combined text information grid forms a text information picture, and the combined graphic frame information grid forms a graphic frame information picture.
5. The method of claim 3, wherein identifying the picture of textual information and generating the textual information comprises:
preprocessing the text information picture and generating a text coordinate;
the textual content is identified and generated.
6. The method of claim 3, wherein the identifying the picture of the graphic frame information and generating the graphic frame information comprises:
preprocessing the graph frame information picture and generating a graph frame coordinate;
and identifying and generating the graphic frame content.
7. The method for generating an editable flow chart, wherein the identifying a graphic frame and generating the text content includes:
establishing a graph frame template;
establishing a graphic frame identification model;
and identifying the graphic frame and generating the graphic frame content.
8. The method for generating an editable flowchart according to claim 1, wherein the loading the data file into an application program includes:
compiling the data file into an application program file corresponding to the application program;
and loading the application program file into the application program.
9. The method for generating an editable flowchart according to claim 1, further comprising, after the acquiring the flowchart picture:
and carrying out binarization and denoising processing on the flow chart picture.
10. A system for generating an editable flow chart, comprising
The picture acquisition module: acquiring a flow chart picture;
the picture identification module: respectively identifying text information and graphic frame information in the flow chart picture, wherein the text information comprises text content and text coordinates, and the graphic frame information comprises graphic frame content and graphic frame coordinates;
a position matching module: matching text content and graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file;
the file conversion module: and loading the data file into an application program to enable the application program to generate an editable flow chart.
11. The system for generating an editable flow chart according to claim 10, further comprising:
a preprocessing module: and the image processing device is used for carrying out binarization and denoising processing on the flow chart image.
12. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-9.
13. A computer readable medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110415595.7A CN113112567A (en) | 2021-04-16 | 2021-04-16 | Method and device for generating editable flow chart, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110415595.7A CN113112567A (en) | 2021-04-16 | 2021-04-16 | Method and device for generating editable flow chart, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113112567A true CN113112567A (en) | 2021-07-13 |
Family
ID=76718718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110415595.7A Pending CN113112567A (en) | 2021-04-16 | 2021-04-16 | Method and device for generating editable flow chart, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113112567A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114281041A (en) * | 2021-12-23 | 2022-04-05 | 浙江中控技术股份有限公司 | Flow chart creation method, model training method, device, equipment and medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109635627A (en) * | 2018-10-23 | 2019-04-16 | 中国平安财产保险股份有限公司 | Pictorial information extracting method, device, computer equipment and storage medium |
CN109801347A (en) * | 2019-01-25 | 2019-05-24 | 北京字节跳动网络技术有限公司 | A kind of generation method, device, equipment and the medium of editable image template |
CN109961008A (en) * | 2019-02-13 | 2019-07-02 | 平安科技(深圳)有限公司 | Form analysis method, medium and computer equipment based on text location identification |
CN110147774A (en) * | 2019-05-23 | 2019-08-20 | 阳光保险集团股份有限公司 | Sheet format picture printed page analysis method and computer storage medium |
CN110334585A (en) * | 2019-05-22 | 2019-10-15 | 平安科技(深圳)有限公司 | Table recognition method, apparatus, computer equipment and storage medium |
CN110674624A (en) * | 2019-06-18 | 2020-01-10 | 北京无限光场科技有限公司 | Method and system for editing image and text |
CN111985306A (en) * | 2020-07-06 | 2020-11-24 | 北京欧应信息技术有限公司 | OCR (optical character recognition) and information extraction method applied to documents in medical field |
CN112395834A (en) * | 2020-11-19 | 2021-02-23 | 平安普惠企业管理有限公司 | Brain graph generation method, device and equipment based on picture input and storage medium |
-
2021
- 2021-04-16 CN CN202110415595.7A patent/CN113112567A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109635627A (en) * | 2018-10-23 | 2019-04-16 | 中国平安财产保险股份有限公司 | Pictorial information extracting method, device, computer equipment and storage medium |
CN109801347A (en) * | 2019-01-25 | 2019-05-24 | 北京字节跳动网络技术有限公司 | A kind of generation method, device, equipment and the medium of editable image template |
CN109961008A (en) * | 2019-02-13 | 2019-07-02 | 平安科技(深圳)有限公司 | Form analysis method, medium and computer equipment based on text location identification |
CN110334585A (en) * | 2019-05-22 | 2019-10-15 | 平安科技(深圳)有限公司 | Table recognition method, apparatus, computer equipment and storage medium |
CN110147774A (en) * | 2019-05-23 | 2019-08-20 | 阳光保险集团股份有限公司 | Sheet format picture printed page analysis method and computer storage medium |
CN110674624A (en) * | 2019-06-18 | 2020-01-10 | 北京无限光场科技有限公司 | Method and system for editing image and text |
CN111985306A (en) * | 2020-07-06 | 2020-11-24 | 北京欧应信息技术有限公司 | OCR (optical character recognition) and information extraction method applied to documents in medical field |
CN112395834A (en) * | 2020-11-19 | 2021-02-23 | 平安普惠企业管理有限公司 | Brain graph generation method, device and equipment based on picture input and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114281041A (en) * | 2021-12-23 | 2022-04-05 | 浙江中控技术股份有限公司 | Flow chart creation method, model training method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109948507B (en) | Method and device for detecting table | |
US10943105B2 (en) | Document field detection and parsing | |
CN110659647B (en) | Seal image identification method and device, intelligent invoice identification equipment and storage medium | |
WO2018010657A1 (en) | Structured text detection method and system, and computing device | |
CN109241861B (en) | Mathematical formula identification method, device, equipment and storage medium | |
US9959475B2 (en) | Table data recovering in case of image distortion | |
CN112949455B (en) | Value-added tax invoice recognition system and method | |
CA3052248C (en) | Detecting orientation of textual documents on a live camera feed | |
CN112101386B (en) | Text detection method, device, computer equipment and storage medium | |
CN110598566A (en) | Image processing method, device, terminal and computer readable storage medium | |
CN114004984B (en) | High-voltage cable accessory process library drawing comparison method and system | |
US11961094B2 (en) | Fraud detection via automated handwriting clustering | |
CN113591746B (en) | Document table structure detection method and device | |
CN111368632A (en) | Signature identification method and device | |
US20160125253A1 (en) | Method and apparatus for image matching | |
CN111738252A (en) | Method and device for detecting text lines in image and computer system | |
CN111062262A (en) | Invoice recognition method and invoice recognition device | |
CN113537184A (en) | OCR (optical character recognition) model training method and device, computer equipment and storage medium | |
CN116597466A (en) | Engineering drawing text detection and recognition method and system based on improved YOLOv5s | |
JP7364639B2 (en) | Processing of digitized writing | |
CN114782957A (en) | Method, device, electronic equipment and medium for determining text information in stamp image | |
CN113538291A (en) | Card image tilt correction method and device, computer equipment and storage medium | |
CN113112567A (en) | Method and device for generating editable flow chart, electronic equipment and storage medium | |
CN111199240A (en) | Training method of bank card identification model, and bank card identification method and device | |
EP4105896A2 (en) | Method, apparatus and platform of generating document, electronic device, storage medium and program product |
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 |