Method for generating structured data and electronic device
Patent Information
- Application Number
- TW114106485
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-02-20
AI Technical Summary
Existing methods for reviewing and utilizing substance testing reports in PDF format are time-consuming and inefficient, requiring manual page-by-page inspection and re-entry of data for further analysis.
An electronic device and method for generating structured data by detecting table regions in graphic content carrier files, inverting and morphologically processing these regions to identify sub-image areas, and performing text recognition on each sub-area to generate accurate structured data.
Improves text recognition accuracy and efficiency by automating the conversion of graphic content into structured data, reducing manual effort and enhancing data application scope and usability.
Smart Images

Figure TWG2TA001073838_001 
Figure TWG2TA001073838_002 
Figure TWG2TA001073838_003
Abstract
Description
Technical Field
[0001] This invention relates to a mechanism for generating data, and more particularly to a method and electronic device for generating structured data. Prior Technology
[0002] Previously, when reviewing and using substance testing reports, since the files were all in PDF format, finding the test results for a specific element required manual review page by page, which was extremely time-consuming. If further analysis of the data in the test reports was needed on a computer or to recreate other reports, the data had to be manually entered into the computer, which not only consumed time and effort but also limited the scope and efficiency of the subsequent application of the data. Summary of the Invention
[0003] In view of this, the present invention provides a method and electronic device for generating structured data, which can be used to solve the above-mentioned technical problems.
[0004] This invention provides a method for generating structured data, executed by an electronic device, comprising: reading a graphic content carrier file and detecting a first table image region corresponding to a table in the graphic content carrier file, wherein the table includes a plurality of cells; inverting the first table image region into a second table image region; determining a first reference image by performing a first directional morphological operation on the second table image region, wherein the first reference image includes a plurality of first directional dividing lines; determining a second reference image by performing a second directional morphological operation on the second table image region, wherein the second reference image includes a plurality of second directional dividing lines; determining a plurality of sub-image regions corresponding to the plurality of cells in the first table image region based on the merged first reference image and the second reference image; and identifying text combinations in each of the sub-image regions, and generating specific structured data corresponding to the first table image region based on the text combinations corresponding to each of the sub-image regions.
[0005] This invention provides an electronic device for generating structured data, including a storage circuit and a processor. The storage circuit stores program code. The processor is coupled to the storage circuit and accesses the program code to execute: reading a graphic content carrier file and detecting a first table image region corresponding to a table in the graphic content carrier file, wherein the table includes a plurality of cells; inverting the first table image region into a second table image region; determining a first reference image by performing a first directional morphological operation on the second table image region, wherein the first reference image includes a plurality of first directional dividing lines; determining a second reference image by performing a second directional morphological operation on the second table image region, wherein the second reference image includes a plurality of second directional dividing lines; determining a plurality of sub-image regions corresponding to the plurality of cells in the first table image region based on the merged first reference image and the second reference image; and identifying text combinations in each of the sub-image regions, and generating specific structured data corresponding to the first table image region based on the text combinations corresponding to each of the sub-image regions. Simple Explanation of the Diagram
[0006] Figure 1 is a schematic diagram of an electronic device according to one embodiment of the present invention. Figure 2 is a flowchart illustrating a method for generating structured data according to one embodiment of the present invention. Figures 3A to 3F are application scenario diagrams illustrating the first embodiment of the present invention. Figures 4A to 4E are application scenario diagrams illustrating the second embodiment of the present invention. Implementation
[0007] Please refer to Figure 1, which is a schematic diagram of an electronic device according to one embodiment of the present invention. In different embodiments, the electronic device 100 may be implemented as various smart devices and / or computer devices, but is not limited thereto.
[0008] In Figure 1, the electronic device 100 includes a storage circuit 102 and a processor 104.
[0009] The storage circuit 102 may be any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, hard disk or other similar device or combination of these devices, and may be used to record multiple code or modules.
[0010] The processor 104 is coupled to the storage circuit 102 and may be a general-purpose processor, a special-purpose processor, a conventional processor, a digital signal processor, multiple microprocessors, one or more microprocessors incorporating a digital signal processor core, a controller, a microcontroller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), any other type of integrated circuit, a state machine, a processor based on an advanced RISC machine (ARM), and the like.
[0011] In an embodiment of the present invention, the processor 104 may access the modules and program code recorded in the storage circuit 102 to implement the method for generating structured data proposed in the present invention, the details of which are described below.
[0012] Please refer to Figure 2, which is a flowchart illustrating a method for generating structured data according to one embodiment of the present invention. The method of this embodiment can be executed by the electronic device 100 of Figure 1. The details of each step in Figure 2 are explained below with reference to the components shown in Figure 1.
[0013] First, in step S210, the processor 104 reads the graphic content carrier file and detects the first table image area in the graphic content carrier file that corresponds to the table.
[0014] In embodiments of the present invention, the graphic content carrying file is, for example, a file that records / includes / carries graphic content (e.g., image objects, video objects, etc.), such as a PDF file, a JPG file, a WORD file, etc.
[0015] For ease of understanding, a PDF file containing tables is used as an example of the file that carries the graphic content in the following description, but it is only used as an example and is not intended to limit the possible implementation of the present invention.
[0016] In one embodiment, the processor 104 may read the graphic content carrier file from various file storage sources (e.g., local databases and / or cloud databases).
[0017] In one embodiment, the processor 104 may, for example, perform a table object detection algorithm on the graphic content carrying file to determine a first table image region corresponding to a table in the graphic content carrying file.
[0018] In one embodiment, the table object detection algorithm may be implemented as a YOLO-based table detection algorithm. In this case, the table detection algorithm may analyze the graphic content carrier file and generate the coordinates of the table in the graphic content carrier file, wherein the coordinates can be used to extract a first table image region corresponding to the table from the graphic content carrier file for subsequent use.
[0019] For details of the YOLO-based table detection algorithm mentioned above, please refer to the paper "YOLOv8: A Novel Object Detection Algorithm with Enhanced Performance and Robustness", which will not be elaborated here.
[0020] In other embodiments, the above-mentioned table object detection algorithm can also be implemented based on algorithms / models such as Faster R-CNN, TableNet, Detectron2, DeepDeSRT (Deep Table Structure Recognition and Text Extraction), DocTR (Document Text Recognition), and CascadeTabNet, but is not limited to these.
[0021] For ease of understanding, the concepts of each step in Figure 2 will be explained below with the aid of Figures 3A to 3F, wherein Figures 3A to 3F are application scenario diagrams drawn according to the first embodiment of the present invention.
[0022] In Figure 3A, the processor 104 may, for example, detect the first table image region 310 from the considered graphic content carrying file after executing step S210.
[0023] It should be understood that although the first table image area 310 appears to be a simple table, it should actually be understood as an image area that includes the table.
[0024] In one embodiment, the processor 104 may, for example, obtain the first table image region 310 from the graphic content carrying file by taking a screenshot after detecting the coordinates of the first table image region 310 in the graphic content carrying file under consideration, but it is not limited to this.
[0025] As shown in Figure 3A, the table shown in the first table image area 310 includes multiple cells, and each cell may include a corresponding text combination.
[0026] However, if text recognition is performed directly on the entire first table image area 310 (for example, by inputting the entire first table image area 310 into an optical character recognition (OCR) model), the corresponding text recognition accuracy may be unsatisfactory.
[0027] However, through subsequent steps S220 to S250, the embodiments of the present invention can accurately identify the sub-image regions corresponding to each storage cell, thereby improving the accuracy of text recognition. Further explanation follows.
[0028] Specifically, in step S220, the processor 104 inverts the first table image region 310 into a second table image region.
[0029] In one embodiment, the processor 104 may determine, within the first table image region 310, a plurality of first pixels having a first color (e.g., black) and a plurality of second pixels having a second color (e.g., white). The processor 104 may then set the plurality of first pixels to have the second color and set the plurality of second pixels to have the first color to generate the second table image region.
[0030] For example, processor 104 may convert white pixels in the first table image area 310 to black pixels and vice versa to achieve step S220, but is not limited to this. In other embodiments, the first color and the second color may be determined according to the designer's needs and are not limited to the above-described forms.
[0031] In an embodiment of the present invention, FIG3B is, for example, a second table image region 320 obtained by inverting the first table image region 310 of FIG3A, but it is not limited thereto.
[0032] As can be seen from Figures 3A and 3B, the white pixels in Figure 3A are converted into black pixels in Figure 3B, and the black pixels in Figure 3A are converted into white pixels in Figure 3B, but this is not the only possibility.
[0033] In step S230, the processor 104 performs a first directional morphological operation on the second table image region 320 to determine a first reference image, wherein the first reference image includes a plurality of first directional dividing lines.
[0034] In one embodiment, the first directional morphological operation includes, for example, vertical erosion (e.g., inverting white text in the second table image area 320 to black) and vertical dilation (e.g., extending black blocks in the second table image area 320 vertically), wherein the vertical dilation coefficient is not greater than the reference column height.
[0035] In one embodiment, the reference column height is, for example, a preset minimum column height. This avoids the loss of features related to merged cells due to excessive vertical expansion.
[0036] In Figure 3C, the scenario shown includes, for example, a first reference image 330 obtained after the processor 104 performs step S230 on the second table image region 320, which includes a plurality of first direction dividing lines 331. In this embodiment, the plurality of first direction dividing lines 331 are, for example, row dividing lines, which may correspond to the row dividing lines of the table shown in the second table image region 320, but are not limited thereto.
[0037] In step S240, the processor 104 performs a second directional morphological operation on the second table image region 320 to determine a second reference image, wherein the second reference image includes a plurality of second directional dividing lines.
[0038] In one embodiment, the second directional morphological operation includes, for example, horizontal erosion (e.g., inverting white text in the second table image area 320 to black) and horizontal dilation (e.g., extending black blocks in the second table image area 320 to the left and right), wherein the horizontal dilation coefficient is not greater than the reference row height.
[0039] In one embodiment, the reference row height is, for example, a preset minimum row width. This avoids the loss of relevant features of merged cells due to excessive horizontal expansion.
[0040] In Figure 3D, the scenario shown includes, for example, a second reference diagram 340 obtained after the processor 104 performs step S240 on the second table image region 320, which includes a plurality of second direction separator lines 341. In this embodiment, the plurality of second direction separator lines 341 are, for example, column separator lines, which may correspond to the column separator lines of the table shown in the second table image region 320, but are not limited thereto.
[0041] In some embodiments, the execution order of steps S230 and S240 may be interchanged, or they may be executed simultaneously, but this is not a limitation.
[0042] Subsequently, in step S250, the processor 104 determines multiple sub-image regions corresponding to multiple cells in the first table image region 310 based on the merged first reference image 330 and second reference image 340.
[0043] In FIG3E, the processor 104 may, for example, combine the first reference figure 330 and the second reference figure 340 into a third reference figure 350, wherein the third reference figure includes a plurality of blocks (e.g., block 351) separated by the plurality of first direction separators 331 and the plurality of second direction separators 341.
[0044] Subsequently, the processor 104 can determine the plurality of sub-image regions corresponding to the plurality of cells in the first table image region 310 based on the individual coordinates of the plurality of blocks.
[0045] In one embodiment, the processor 104 may, for example, use the OpenCV findContour function to find the coordinates of the blocks corresponding to each cell in the third reference figure 350, but is not limited to this.
[0046] In FIG3F, the processor 104 may, for example, determine a sub-image region 361 corresponding to one of the storage cells in the first table image region 310 based on block 351 in FIG3E. Similarly, the processor 104 may, for example, determine the corresponding sub-image region in the first table image region 310 based on other blocks in FIG3E, the details of which will not be described further.
[0047] In step S260, the processor 104 identifies the text combinations in each sub-image region and generates specific structured data corresponding to the first table image region 310 based on the text combinations corresponding to each sub-image region.
[0048] Generally, structured data is information organized and stored in a fixed format, with a clear structure that facilitates retrieval and analysis. This type of data is typically represented in row-list tables, such as those in a database, or presented in tree or graph structures. Because its content is categorized according to predefined fields or labels, structured data is easy to store, manage, and process, suitable for direct computer manipulation, and can be retrieved using standard query languages (such as SQL). Its characteristics include a fixed data structure, strongly typed fields, and ease of data retrieval. It is often stored in relational databases or structured files (such as CSV and JSON). Its applications are wide-ranging, including corporate reports, government statistics, financial records, and feature set construction in machine learning. Compared to semi-structured data (such as JSON and XML) and unstructured data (such as images and audio), structured data is more efficient for statistical analysis and computation due to its high level of organization.
[0049] In one embodiment, the processor 104 may, for example, feed each sub-image region into a text recognition model, wherein the text recognition model can reflect each sub-image region and output the text combination corresponding to each sub-image region.
[0050] Taking the sub-image region 361 of Figure 3F as an example, the processor 104 may feed the sub-image region 361 into a text recognition model, and the text recognition model may output the text combination corresponding to the sub-image region 361 (e.g., "data item").
[0051] For another example, for other sub-image regions located below sub-image region 361, the processor 104 may, for example, perform text recognition based on similar concepts to obtain text combinations corresponding to these sub-image regions, such as "A01", "A02", ..., "A15", but may not be limited to this.
[0052] In embodiments of the present invention, the processor 104 may, for example, employ various models / algorithms capable of implementing OCR technology to implement the above-mentioned text recognition model.
[0053] In one embodiment, the processor 104 may, for example, use a convolutional recurrent neural network (CRNN) to implement the text recognition model.
[0054] In one embodiment, CRNN combines a convolutional neural network (CNN) and a long short-term memory network (LSTM), and uses Connection Temporal Classification (CTC) as the loss function to specifically handle variable-length sequence inputs. Its specific structure includes, for example, a CNN feature extraction layer, an LSTM sequence modeling layer, and a CTC decoding layer.
[0055] In one embodiment, a CNN is used to extract low- to high-level features from the input image, such as edges, strokes, and text outlines. These features are crucial for distinguishing different glyphs. The capabilities of CNNs are particularly important when processing multi-font text or handwritten text. The output of this layer is a sequence of feature maps, which serve as input to subsequent sequence models.
[0056] In one embodiment, a bidirectional LSTM (BiLSTM) can be used to implement the LSTM, for example. BiLSTM can model character sequences simultaneously from left to right and from right to left, capturing the contextual relationships between characters. This is particularly effective for processing dense data regions in text and for high-precision digit recognition.
[0057] In one embodiment, the last layer of the CRNN can use the CTC loss function for character sequence alignment. CTC can handle variable-length inputs and maps the probability distribution of the output to a character sequence. Its decoding mechanism can automatically handle the spacing between characters and the problem of repeated characters, achieving accurate alignment of the output text with the real characters.
[0058] As can be seen from the above, the method proposed in this embodiment of the invention can find the table image area corresponding to the table from the graphic content carrying file, determine the sub-image area corresponding to the storage cell, and then perform text recognition on each sub-image area to determine the corresponding text combination.
[0059] Compared to directly performing text recognition on the entire first table image area 310, the method of this embodiment can improve the accuracy of text recognition, thereby correspondingly improving the quality of the generated structured data.
[0060] In embodiments of the present invention, the electronic device 100 may provide, for example, a user interface for presenting specific structured data obtained by performing the method of FIG2 to a user for viewing and / or editing.
[0061] Please refer to Figures 4A to 4E, which are application scenario diagrams drawn according to the second embodiment of the present invention.
[0062] In the second embodiment, it is assumed that the first table image region detected by the processor 104 from the considered graphic content carrying file is the first table image region 420 in FIG4A.
[0063] In Figure 4A, the processor 104 may, for example, present specific structured data 410 corresponding to the first table image region 420 in the user interface 400.
[0064] Furthermore, the processor 104 can also display a first table image area 420 captured from the considered graphic content carrier file in the user interface 400, so that the user can interact with it.
[0065] In this embodiment of the invention, the specific structured data 410 includes, for example, multiple data items and item information corresponding to each data item.
[0066] In the scenario of Figure 4A, assuming that the table in the first table image area 420 records the detection results for different chemical substances, the names of these chemical substances can be understood as the data items mentioned above, and the relevant detection results can be understood as the corresponding item information, but are not limited to this.
[0067] In one embodiment, the user interface 400 allows the user to edit the content of each field in specific structured data 410 (e.g., adjust values / names, etc.), but it is not limited to this.
[0068] In one embodiment, in response to the determination that at least one first data item among the plurality of data items is selected and exported in the user interface 400, the processor 104 can aggregate the at least one first data item and the corresponding item information into a report and output the report.
[0069] In one embodiment, a user may select one or more data items of interest in the user interface 400 by means of verification (e.g., Cadmium, Lead, etc. in FIG4A). The processor 104 may regard the verified data items as the aforementioned first data items, and when the user triggers the export function in the user interface 400, it may aggregate these first data items into a report (e.g., a spreadsheet) and output it.
[0070] Therefore, users no longer need to re-examine and retype the content recorded in the graphic content carrier file; they can conveniently and efficiently generate reports of the data items of interest simply through the mechanism proposed in this embodiment of the invention. Furthermore, for cases where the names of the data items themselves are complex (such as the various chemical substance names in Figure 4A), the method of this embodiment of the invention can more effectively reduce the time and effort users spend visually inspecting the content in the graphic content carrier file.
[0071] In one embodiment, the user interface 400 may be provided with one or more candidate templates, wherein each candidate template may indicate at least one corresponding candidate data item.
[0072] In one embodiment, in response to determining that any of the candidate templates is selected, the processor 104 may determine the at least one candidate data item indicated by the selected candidate template as the at least one first data item selected. This increases the convenience and accuracy for the user in selecting data items.
[0073] Please refer to Figure 4B, which shows, for example, four candidate templates provided by the user interface 400, and each of these four candidate templates may individually indicate one or more corresponding candidate data items.
[0074] In the scenario shown in Figure 4C, the user can edit and / or create the required candidate templates through the user interface 400. For example, the user interface 400 on the left side of Figure 4C may display possible data items, and the user can select the candidate data item that the currently edited candidate template intends to indicate to create the candidate template accordingly.
[0075] In addition, the user interface 400 on the right side of Figure 4C can only display the data items selected by the user, so as to avoid increasing the difficulty for the user to identify due to too many data items.
[0076] In the scenario of Figure 4D, assuming that the user has completed the editing of a candidate template (whose name is, for example, "abcde"), the user interface 400 can display relevant information (such as the name of the candidate template and the candidate data items it indicates) for the user to confirm.
[0077] In the scenario of Figure 4E, assuming the user selects a candidate template 430 named "0625test", the processor 104 can, for example, filter out the corresponding data items from the specific structured data 410.
[0078] However, in the scenario shown, although the selected candidate template 430 indicates five candidate data items 431 to 435, since the specific structured data 410 only includes data items 441 and 442 corresponding to candidate data items 434 and 435 respectively, the processor 104 can filter out data items 441 and 442 from the specific structured data 410 and only display data items 441 and 442.
[0079] In addition, the processor 104 can also find the reference image area 450 corresponding to the selected data items 441 and 442 from the first table image area 420, and display them together in the user interface 400 for the user to refer to.
[0080] In summary, the method proposed in this embodiment of the invention can identify the table image region corresponding to the table in the graphic content carrying file, determine the sub-image region corresponding to the cell, and then perform text recognition on each sub-image region to determine the corresponding text combination. This achieves high text recognition accuracy, thereby correspondingly improving the quality of the generated structured data.
[0081] Furthermore, since the embodiments of the present invention can convert graphic content-bearing files such as PDF files into corresponding structured data, it can save a considerable amount of time and manpower, and improve the subsequent application scope and usage efficiency of the data.
[0082] Although the present invention has been disclosed above by way of embodiments, it is not intended to limit the present invention. Anyone skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
[0083] 100: Electronic devices 102: Storage Circuit 104: Processor S210, S220, S230, S240, S250, S260: Steps 310, 420: Image area of the first table 320: Second table image area 330: First Reference Figure 331: First direction separator line 340: Second Reference Figure 341: Second direction separator line 350: Third Reference Figure 351: Block 361: Sub-image region 400: User Interface 410: Specific Structured Data 430: Candidate Template 431~435: Candidate Data Items 441: Data Items 442: Data Items 450: Reference image area
Claims
1. A method for generating structured data, performed by an electronic device, comprising: The process involves: reading a graphic content carrier file and detecting a first table image region corresponding to a table in the graphic content carrier file, wherein the table includes multiple cells; inverting the first table image region into a second table image region; performing a first directional morphological operation on the second table image region to determine a first reference image, wherein the first reference image includes multiple first directional dividing lines; performing a second directional morphological operation on the second table image region to determine a second reference image, wherein the second reference image includes multiple second directional dividing lines; determining multiple sub-image regions corresponding to the multiple cells in the first table image region based on the merged first reference image and the second reference image; identifying text combinations in each of the sub-image regions and generating specific structured data corresponding to the first table image region based on the text combinations corresponding to each of the sub-image regions; and presenting the specific structured data and the first table image region in a user interface.
2. The method as described in claim 1, wherein detecting the first table image region corresponding to the table in the graphic content carrying file includes: The first table image region is determined in the graphic content carrier file by performing a table object detection algorithm on the graphic content carrier file.
3. The method as described in claim 1, wherein inverting the first table image region to the second table image region comprises: In the first table image area, a plurality of first pixels having a first color and a plurality of second pixels having a second color are determined; the plurality of first pixels are set to have the second color, and the plurality of second pixels are set to have the first color, so as to generate the second table image area.
4. The method as described in claim 1, wherein the first directional morphological operation includes vertical erosion and vertical dilation, wherein the vertical dilation coefficient is not greater than the reference column height.
5. The method as described in claim 1, wherein the second directional morphological operation includes horizontal erosion and horizontal dilation, wherein the horizontal dilation coefficient is not greater than the reference row width.
6. The method of claim 1, wherein determining the plurality of sub-image regions corresponding to the plurality of cells in the first table image region based on the merged first reference image and the second reference image comprises: The first reference image and the second reference image are combined into a third reference image, wherein the third reference image includes a plurality of blocks separated by the plurality of first direction dividing lines and the plurality of second direction dividing lines; and the plurality of sub-image regions corresponding to the plurality of cells are determined in the first table image region based on the individual coordinates of the plurality of blocks.
7. The method of claim 1, wherein identifying the text combinations in each of the sub-image regions comprises: Each of the sub-image regions is fed into a text recognition model, wherein the text recognition model responds to each of the sub-image regions and outputs the text combination corresponding to each of the sub-image regions.
8. The method as described in claim 1, wherein the specific structured data includes a plurality of data items and item information corresponding to each data item, and the method further includes: In response to the determination that at least one first data item among the plurality of data items is selected and exported in the user interface, the at least one first data item and the corresponding item information are compiled into a report and the report is output.
9. The method as described in claim 8, wherein the user interface is provided with candidate templates, the candidate templates indicating at least one corresponding candidate data item, and the method further includes: In response to the determination that the candidate template is selected, the at least one candidate data item indicated by the candidate template is determined as the at least one first data item to be selected.
10. An electronic device for generating structured data, comprising: Storage circuit, which stores program code; The processor, coupled to the storage circuitry and accessing the code, executes the following: reading a graphics content carrier file and detecting a first table image region corresponding to a table in the graphics content carrier file, wherein the table includes a plurality of cells; inverting the first table image region into a second table image region; determining a first reference image by performing a first directional morphological operation on the second table image region, wherein the first reference image includes a plurality of first directional dividing lines; determining a second reference image by performing a second directional morphological operation on the second table image region, wherein the second reference image includes a plurality of second directional dividing lines; determining a plurality of sub-image regions corresponding to the plurality of cells in the first table image region based on the merged first reference image and the second reference image; identifying text combinations in each of the sub-image regions and generating specific structured data corresponding to the first table image region based on the text combinations corresponding to each of the sub-image regions; and presenting the specific structured data and the first table image region in a user interface.
11. The electronic device of claim 10, wherein the processor is configured to: determine the first table image region in the graphic content carrier file by performing a table object detection algorithm on the graphic content carrier file.
12. The electronic device of claim 10, wherein the processor is configured to perform: determining, in the first table image region, a plurality of first pixels having a first color and a plurality of second pixels having a second color; setting the plurality of first pixels to have the second color and setting the plurality of second pixels to have the first color to generate the second table image region.
13. The electronic device of claim 10, wherein the first directional morphological operation includes vertical erosion and vertical expansion, wherein the vertical expansion coefficient is not greater than the reference column height.
14. The electronic device of claim 10, wherein the second directional morphological operation comprises horizontal erosion and horizontal expansion, wherein the horizontal expansion coefficient is not greater than the reference row width.
15. The electronic device of claim 10, wherein the processor is configured to: merge the first reference image and the second reference image into a third reference image, wherein the third reference image includes a plurality of blocks separated by the plurality of first direction separators and the plurality of second direction separators; and determine, based on the individual coordinates of the plurality of blocks, the plurality of sub-image regions corresponding to the plurality of cells in the first table image region.
16. The electronic device of claim 10, wherein the processor is configured to perform: feeding each of the sub-image regions into a character recognition model, wherein the character recognition model responds to each of the sub-image regions and outputs the character combination corresponding to each of the sub-image regions.
17. The electronic device of claim 10, wherein the specific structured data includes a plurality of data items and item information corresponding to each data item, and the processor is further configured to perform: in response to determining that at least one first data item among the plurality of data items is selected and exported in the user interface, to aggregate the at least one first data item and the corresponding item information into a report, and to output the report.
18. The electronic device of claim 17, wherein the user interface is provided with a candidate template indicating at least one corresponding candidate data item, and the processor is further configured to: in response to determining that the candidate template is selected, determine the at least one candidate data item indicated by the candidate template as the selected at least one first data item.