Method, device, electronic device and storage medium for generating editable flow chart

By identifying text information and graphic box information in the flowchart and generating data files based on coordinate matching, the problem of the existing technology being unable to identify and edit flowcharts is solved, and efficient identification and online editing of flowcharts are realized.

CN113112567BActive Publication Date: 2025-02-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110415595.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-16
Publication Date
2025-02-18
Estimated Expiration
2041-04-16

AI Technical Summary

Technical Problem

The existing OCR technology does not recognize the flowchart and converts the picture of the flowchart into a flowchart editable by general software is not implemented.

Method used

By obtaining the flowchart picture, text information and graphic box information are identified separately, matched according to the text coordinates and graphic box coordinates, a data file is generated, and loaded into the application to generate an editable flow chart.

Benefits of technology

Improve the accuracy of flowchart recognition, converting flowchart pictures into online editable flowcharts, allowing users to select applications to edit flowcharts online according to their habits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113112567B_ABST
    Figure CN113112567B_ABST
Patent Text Reader

Abstract

The present invention provides a method for generating an editable flowchart, comprising obtaining a flowchart image; respectively identifying text information and graphic frame information in the flowchart image, wherein the text information includes text content and text coordinates, and the graphic frame information includes 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 to enable the application to generate an editable flowchart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a method for generating an editable flowchart and a system for generating an editable flowchart. Background Art

[0002] With the rapid development of computer and Internet technologies, Optical Character Recognition (OCR) technology has begun to be widely used to convert paper documents into electronic documents.

[0003] OCR technology refers to the process in which an electronic device (such as a scanner or digital camera) examines characters printed on paper, determines their shape by detecting dark and light patterns, and then uses character recognition methods to translate the shape into computer text.

[0004] However, existing OCR technologies are all based on OCR recognition in specific scenarios, such as bank card information recognition, ID card information recognition, bill recognition, etc. There is no method for recognizing a flowchart and converting the flowchart image into a flowchart that can be edited by general software. Summary of the invention

[0005] In view of this, the present disclosure provides a method and system for generating an editable flowchart.

[0006] One aspect of the present disclosure provides a method for generating an editable flowchart, comprising obtaining a flowchart image; respectively identifying text information and graphic frame information in the flowchart image, wherein the text information includes text content and text coordinates, and the graphic frame information includes 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 to enable the application to generate an editable flowchart.

[0007] Optionally, matching the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates includes: if the text content and the graphic frame content do not match, adjusting the text coordinates and / or the graphic frame coordinates.

[0008] Optionally, separately identifying the text information and graphic frame information in the flowchart image further includes: segmenting the flowchart image into a text information image and a graphic frame information image; identifying the text information image and generating the text information; identifying and generating the graphic frame information.

[0009] Optionally, the flowchart image is divided into a text information image and a graphic frame information image, including: gridding the flowchart image with a preset size; judging the category to which the grid belongs according to the number of pixels in each grid in turn; when the number of pixels is greater than a preset threshold, it is the text information grid; when the number of pixels is less than the preset threshold, it is the graphic frame information grid; combining the text information grids to form a text information image, and combining the graphic frame information grids to form a graphic frame information image.

[0010] Optionally, identifying the text information picture and generating the text information includes: preprocessing the text information picture and generating text coordinates; identifying and generating the text content.

[0011] Optionally, identifying the graphic frame information picture and generating the graphic frame information includes: preprocessing the graphic frame information picture and generating graphic frame coordinates; identifying and generating the graphic frame content.

[0012] Optionally, identifying the graphic frame and generating the text content includes: establishing a graphic frame template; establishing a graphic frame recognition model; identifying the graphic frame and generating the graphic frame content.

[0013] Optionally, loading the data file into the application includes: compiling the data file into an application file corresponding to the application; and loading the application file into the application.

[0014] Optionally, the method for generating an editable flowchart further includes, after obtaining the flowchart image, binarizing and denoising the flowchart image.

[0015] Another aspect of the present disclosure provides a system for generating an editable flowchart, including an image acquisition module for acquiring a flowchart image; an image recognition module for respectively identifying text information and graphic frame information in the flowchart image, wherein the text information includes text content and text coordinates, and the graphic frame information includes graphic frame content and graphic frame coordinates; a position matching module 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 a file conversion module for loading the data file into an application to enable the application to generate an editable flowchart.

[0016] Optionally, the system for generating an editable flowchart further includes: an image preprocessing module, configured to perform binarization and denoising on the flowchart image.

[0017] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of the above claims.

[0018] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0019] The present disclosure provides at least the following beneficial effects:

[0020] By respectively identifying the text information and graphic frame information in the flowchart image, the recognition accuracy can be improved. The relative position of the text content and the graphic frame content can be determined by the text coordinates and the graphic frame coordinates. By converting the flowchart image into a data file, the flowchart image can be converted into an online editable flowchart, and by compiling the data file into an application file corresponding to the application, the data file can be loaded into a general flowchart editing application such as Microsoft Visio, drawing tools, etc., so that the user can select the corresponding application to edit the flowchart online according to his own habits. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 An exemplary system architecture to which the method and apparatus for generating an editable flowchart disclosed in the present invention can be applied is schematically shown;

[0022] Figure 2 A flowchart of a method for generating an editable flowchart according to an embodiment of the present disclosure is schematically shown;

[0023] Figure 3 A flowchart of a method for identifying text information and graphic frame information in a flowchart image according to an embodiment of the present disclosure is schematically shown;

[0024] Figure 4A A flowchart schematically shows a method for identifying text information according to an embodiment of the present disclosure.

[0025] Figure 4B A flowchart schematically illustrates a flowchart of a method for identifying graphic frame information according to an embodiment of the present disclosure;

[0026] Figure 5A Schematically illustrates a situation where text coordinates and graphic frame coordinates do not match according to an embodiment of the present disclosure

[0027] Figure 5B Another situation where the coordinates of the text and the coordinates of the graphic frame do not match according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 6 A block diagram schematically shows an apparatus for generating an editable flowchart according to an embodiment of the present disclosure; and

[0029] Figure 7 A block diagram of an electronic device suitable for implementing an apparatus for generating an editable flowchart according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0031] like Figure 1 As shown, 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 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0032] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as picture shooting applications, picture processing applications, flowchart drawing applications, etc. (only examples).

[0033] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0034] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for the storage and transmission of images by users using the terminal devices 101, 102, and 103. The background management server may analyze the received flowchart images and feed back the processing results (such as application files generated according to the application used by the user) to the terminal device.

[0035] It should be noted that the method for generating an editable flowchart provided in the embodiment of the present disclosure can generally be performed by the server 105. Accordingly, the system for generating an editable flowchart provided in the embodiment of the present disclosure can generally be set in the server 105. The method for generating an editable flowchart in the embodiment of the present disclosure can also be performed by a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Correspondingly, the device for generating an editable flowchart provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Alternatively, the method for generating an editable flowchart provided in the embodiment of the present disclosure can also be performed by the terminal device 101, 102, or 103, or can also be performed by other terminal devices different from the terminal device 101, 102, or 103. Correspondingly, the apparatus for generating an editable flowchart provided in the embodiments of the present disclosure may also be disposed in the terminal device 101 , 102 , or 103 , or in other terminal devices different from the terminal device 101 , 102 , or 103 .

[0036] Figure 2 The following schematically shows a method for generating an editable flowchart according to an embodiment of the present disclosure. Figure 2 As shown, the method includes operations S210 to S240.

[0037] Operation S210: obtaining a flowchart image.

[0038] According to an embodiment of the present disclosure, the flowchart image may be a hand-drawn flowchart image or a screenshot of an electronic flowchart.

[0039] It can be understood that the embodiments of the present disclosure do not limit the type of flowchart images obtained. In addition to the hand-drawn flowchart images and screenshots of electronic flowcharts as exemplified above, other types of images can also be used. Those skilled in the art can make specific choices based on actual application scenarios.

[0040] According to an embodiment of the present disclosure, after obtaining the flowchart image, the flowchart image is also binarized and denoised. The purpose of binarizing the image is to convert the color image into a pixel matrix form represented by 0 and 1, remove unnecessary information of the flowchart image to be processed, and reduce the complexity of subsequent processing. The method of binarizing the flowchart image can be based on local threshold binarization, global threshold and other methods. The purpose of denoising the flowchart image is to remove the image background and eliminate the blur of the flowchart image caused by the instability of the sampling process. The method of denoising the flowchart image can be median filtering, mean filtering and other methods.

[0041] It can be understood that the embodiments of the present disclosure do not limit the method for binarizing and denoising the flowchart image. In addition to the above-mentioned methods, other types of methods can also be used, and those skilled in the art can make specific selections based on actual application conditions.

[0042] In operation S220, text information and graphic frame information in the flowchart image are respectively identified, wherein the text information includes text content and text coordinates, and the graphic frame information includes graphic frame content and graphic frame coordinates.

[0043] Figure 3 A flowchart of a method for identifying text information and graphic frame information in a flowchart image according to an embodiment of the present disclosure is schematically shown;

[0044] The method includes S310 to S330

[0045] Operation S310, dividing the flowchart image into a text information image and a graphic frame information image;

[0046] The flowchart image is gridded with a preset size. The category of the grid is determined according to the number of pixels in each grid. When the number of pixels is greater than a preset threshold, it is the text information grid; when the number of pixels is less than the preset threshold, it is the graphic frame information grid. The text information grids are combined to form a text information image, and the graphic frame information grids are combined to form a graphic frame information image.

[0047] Operation S320, identifying the text information picture and generating the text information;

[0048] like Figure 4A As shown, through the embodiment of the present disclosure, processing the text information area includes: preprocessing the text information picture and generating text coordinates; identifying and generating text content.

[0049] Through the disclosed embodiments, the text information image is preprocessed and text coordinates are generated, including tilt correction and scale normalization of the text information area. For example, for a hand-drawn flowchart image, its characters have a certain degree of tilt when the photo is captured, and the size of the characters is also different during the writing process. After obtaining the text information area of ​​the handwritten flowchart, it is necessary to perform tilt correction and scale normalization on the text information area to reduce the recognition error caused by the tilt of the characters, unify the size of the characters, and improve the subsequent recognition efficiency.

[0050] Through the disclosed embodiment, the text information image is preprocessed and the text coordinates are generated, and the text is cut according to the horizontal projection and vertical projection of the text information image, and the text coordinates are determined. For example, the text information image is horizontally projected, the upper and lower limits of each line of text are found, and line cutting is performed. For each cut line, a vertical projection is performed to find the left and right boundaries of each character, and a single character is cut. The vertical coordinate of each paragraph of text content is determined by the horizontal projection of this paragraph of text content. The horizontal coordinate of this paragraph of text content is generated by merging the vertical projection coordinates of the left and right adjacent characters.

[0051] According to the embodiment of the present disclosure, character recognition is performed using a character recognition model, which may be a CNN model, a CRNN model, or an LSTM+CTC model.

[0052] It can be understood that the embodiments of the present disclosure do not limit the model of character recognition. In addition to the CNN model, CRNN model and LSTM+CTC model mentioned above, other types of models can also be used. Those skilled in the art can make specific choices based on actual application scenarios.

[0053] It can be understood that the text content of the embodiment of the present disclosure may include: text, text format, text size and other contents.

[0054] Operation S330: pre-processing the graphic frame information picture and generating graphic frame coordinates.

[0055] like Figure 4B As shown, through the embodiment of the present disclosure, processing the graphic frame area includes: preprocessing the graphic frame information picture and generating graphic frame coordinates; identifying and generating the graphic frame content.

[0056] According to the embodiment of the present disclosure, the graphic frame information picture is preprocessed and the graphic frame coordinates are generated, including correcting the graphic frame to an ideal geometric figure. For example, the irregular curve ab is adjusted to a regular line segment a′b′, and the coordinate positions of the line segment endpoints a′ and b′ are adjusted to coincide with the endpoints of the adjacent line segments to form a closed geometric figure.

[0057] According to the embodiment of the present disclosure, the graphic frame information picture is preprocessed, and further includes cutting the graphic frame into separate graphic frame units. The segmentation method may be to distinguish the flow line by the closed feature of the graphic frame; and to distinguish the separate graphic frame units by the connectivity of the graphic frame.

[0058] According to an embodiment of the present disclosure, the generated graphic frame coordinates are the coordinates of the positions of the graphic frame pixels.

[0059] According to an embodiment of the present disclosure, the graphic frame recognition includes: establishing a graphic frame template, establishing a graphic frame recognition model, and recognizing a graphic frame to be detected.

[0060] According to an embodiment of the present disclosure, establishing a graphic frame template includes establishing a graphic frame template based on at least one set of test graphic frames. Figure 7 As shown, it contains all the basic graphic frames required for drawing a flowchart. For example, all the basic graphic frames drawn by 10 people are collected to obtain 10 groups of test graphic frames, each group of test graphic frames contains all the basic graphic frames required for drawing a flowchart, forming a graphic frame template.

[0061] According to an embodiment of the present disclosure, a graphic frame matching model based on a deep neural network is established, and a graphic frame template is input into the deep neural network graphic frame matching model for training and evaluation.

[0062] According to the embodiment of the present disclosure, identifying 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.

[0063] It can be understood that the graphic frame content of the embodiment of the present disclosure may include: graphic category, graphic size and other content.

[0064] S130 matches the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file;

[0065] According to the embodiment of the present disclosure, the text content and the graphic frame content are matched according to the text coordinates and the graphic frame coordinates to generate a data file. If the text coordinates and the graphic frame coordinates do not match, the text coordinates and / or the graphic frame coordinates are adjusted. For example, Figure 5A As shown, when the ordinate of the text coordinate coincides with the ordinate of the graphic frame, the ordinate of the text can be adjusted to reduce the height of the text so that all coordinates of the text are within the coordinates of the graphic frame. Figure 5B It is schematically shown that when a part of the horizontal coordinate set of the text content is larger than the vertical coordinate set of the graphic frame, the horizontal coordinate on the right side of the graphic frame is adjusted to increase the graphic frame area so that all the coordinates of the text are inside the graphic frame coordinates.

[0066] S140 loads the data file into the application program so that the application program generates an editable flow chart.

[0067] In the embodiment of the present disclosure, the application may be an application such as Microsoft Visio, a drawing tool, etc. that can edit flowcharts online.

[0068] In the embodiment of the present disclosure, the data file needs to be compiled into an application file corresponding to the application, and the application file needs to be loaded into the application.

[0069] The conversion method provided by the embodiment of the present disclosure is to identify text content and graphic box content, and in combination with position coordinates, it can correctly identify hand-drawn flowcharts in daily meetings and flowcharts in file screenshots, and convert them into electronic flowcharts that can be edited by general software, making people's daily lives more convenient and quick.

[0070] Figure 6 A block diagram of a system for generating an editable flowchart according to an embodiment of the present disclosure is schematically shown.

[0071] like Figure 6 As shown, the system 600 includes a picture acquisition module 610 , a picture preprocessing module 620 , a picture recognition module 630 , a position matching module 840 and a file conversion module 650 .

[0072] Image acquisition module 610: used to acquire flowchart images.

[0073] The image preprocessing module 620 is used to perform binarization and denoising on the flowchart image.

[0074] Image recognition module 630: used to respectively recognize text information and graphic frame information in the flowchart image, wherein the text information includes text content and text coordinates, and the graphic frame information includes graphic frame content and graphic frame coordinates;

[0075] Position matching module 640: used to match the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file;

[0076] File conversion module 650: used for loading the data file into an application program so as to enable the application program to generate an editable flow chart.

[0077] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0078] For example, any of the image acquisition module 610, the image preprocessing module 620, the image recognition module 630, the location matching module 640, and the file conversion module 650 can be combined in one module / unit / subunit for implementation, or any of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the image acquisition module 610, the image preprocessing module 620, the image recognition module 630, the position matching module 640 and the file conversion module 650 can 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the image acquisition module 610, the image preprocessing module 620, the image recognition module 630, the position matching module 640 and the file conversion module 650 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.

[0079] It should be noted that the part of generating an editable flowchart in the embodiment of the present disclosure corresponds to the part of generating an editable flowchart in the embodiment of the present disclosure. The description of the device part of generating an editable flowchart specifically refers to the method part of generating an editable flowchart, which will not be repeated here.

[0080] Figure 7 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0081] like Figure 7 As shown, the 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 part 708 to 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 a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0082] In RAM 703, various programs and data required for the operation of system 700 are stored. Processor 701, ROM 702 and RAM 603 are connected to each other through bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0083] According to an embodiment of the present disclosure, the system 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The system 700 may further include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. 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, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0084] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0085] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0086] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0087] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0088] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0089] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0090] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for generating an editable flowchart, characterized in that: include: Get the flowchart image; Respectively identifying text information and graphic frame information in the flowchart image, wherein the text information includes text content and text coordinates, and the graphic frame information includes 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; Loading the data file into an application program so that the application program generates an editable flow chart; The step of respectively identifying the text information and the graphic frame information in the flowchart picture includes: Split the flowchart image into a text information image and a graphic frame information image; Recognize the text information picture and generate the text information; Identify the graphic frame information picture and generate the graphic frame information; The step of identifying the text information picture and generating the text information includes: Preprocess the text information image and generate text coordinates; Recognizing and generating the text content; The preprocessing of the text information picture and generating text coordinates includes: Correct the tilt of the text information area and normalize the scale; Cut the text according to the horizontal projection and vertical projection of the text information image to determine the text coordinates; The identifying the graphic frame information picture and generating the graphic frame information includes: Preprocess the graphic frame information image and generate graphic frame coordinates; Identify and generate the graphic frame content; The identifying graphic frame and generating the text content include: Create a graphic frame template; Establish a graphic frame recognition model; The graphic frame is identified, and content of the graphic frame is generated.

2. A method for generating an editable flowchart according to claim 1, characterized in that: The matching of the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates includes: If the text content and the graphic frame content do not match, the text coordinates and / or the graphic frame coordinates are adjusted.

3. A method for generating an editable flowchart according to claim 1, characterized in that: Split the flowchart image into text information image and graphic frame information image, including: Gridding the flowchart image into a preset size; Determine the category to which each grid belongs based on the number of pixels in each grid; When the number of pixels is greater than a preset threshold, it is the text information grid; When the number of pixels is less than a preset threshold, it is the graphic frame information grid; The text information grids are combined to form a text information picture, and the graphic frame information grids are combined to form a graphic frame information picture.

4. A method for generating an editable flowchart according to claim 1, characterized in that: The step of loading the data file into the application comprises: Compiling the data file into an application file corresponding to the application; Load the application file into your application.

5. The method for generating an editable flowchart according to claim 1, characterized in that: After obtaining the flowchart picture, the method further includes: The flowchart image is binarized and denoised.

6. A system for generating an editable flowchart, comprising: Image acquisition module: obtain flow chart images; Image recognition module: recognizes the text information and graphic frame information in the flowchart image respectively, wherein: The text information includes text content and text coordinates, and the graphic frame information includes graphic frame content and graphic frame coordinates; Position matching module: matching the text content and the graphic frame content according to the text coordinates and the graphic frame coordinates to generate a data file; File conversion module: loading the data file into the application so that the application generates an editable flow chart; The step of respectively identifying the text information and the graphic frame information in the flowchart picture includes: Split the flowchart image into a text information image and a graphic frame information image; Recognize the text information picture and generate the text information; Identify the graphic frame information picture and generate the graphic frame information; The step of identifying the text information picture and generating the text information includes: Preprocess the text information image and generate text coordinates; Recognizing and generating the text content; The preprocessing of the text information picture and generating text coordinates includes: Correct the tilt of the text information area and normalize the scale; Cut the text according to the horizontal projection and vertical projection of the text information image to determine the text coordinates; The identifying the graphic frame information picture and generating the graphic frame information includes: Preprocess the graphic frame information image and generate graphic frame coordinates; Identify and generate the graphic frame content; The identifying graphic frame and generating the text content include: Create a graphic frame template; Establish a graphic frame recognition model; The graphic frame is identified, and content of the graphic frame is generated.

7. The system for generating an editable flowchart according to claim 6, further comprising: Preprocessing module: used for binarizing and denoising the flowchart image.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 5.

9. A computer-readable medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Generation method and device of editable image template, equipment and medium

    CN109801347A

  • Table recognition method and device, computer device and storage medium

    CN110334585A