Method for extracting curve data from a curve graph on a web side

By constructing an image coordinate system on the web, performing grayscale and binarization processing, and combining thinning algorithms to extract the curve skeleton and calculate the curve width, the accuracy and efficiency problems of complex curve graphic data extraction in existing technologies are solved, achieving efficient curve data reconstruction and analysis.

CN119722725BActive Publication Date: 2026-05-29CHINA ELECTRONIC TECH GRP CORP NO 38 RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA ELECTRONIC TECH GRP CORP NO 38 RES INST
Filing Date
2024-12-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately extract curve data from complex graphs, especially when dealing with grids, steep curve slopes, diverse background colors, or multiple intersecting curves. Existing methods are cumbersome and inaccurate, making it difficult to achieve effective data utilization and analysis.

Method used

On the web, an image xy coordinate system is constructed, grayscale and binarization preprocessing is performed, a thinning algorithm is used to extract the curve skeleton and mark the endpoints and intersections, the curve is broken up, the curve width is calculated and merged, and the original data is calculated by combining the maximum values ​​of the x-axis and y-axis and the set of coordinate points.

Benefits of technology

It achieves accurate reconstruction and data extraction of complex curves, improves processing efficiency, removes irrelevant noise and interference elements, and ensures the accuracy and efficiency of curve recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722725B_ABST
    Figure CN119722725B_ABST
Patent Text Reader

Abstract

The application provides a method for extracting curve data from a curve graph on a web side, and relates to the technical field of curve data extraction.The application can realize reconstruction and sampling of complex curves containing various background colors, grids, large curve slopes and multiple curve intersections on the web side, obtain coordinate information of the pictures, and thus realize separate extraction of data of the multiple curves in the pictures and application of the data.Meanwhile, the application introduces an advanced image preprocessing mechanism, realizes efficient compression of image information and highlighting of key features by carrying out gray scale and binary operations on the input image, adopts a unique gray scale conversion algorithm and an adaptive binary strategy, can dynamically adjust parameters according to specific characteristics of the image, and ensures that core features of the curve are retained while irrelevant noise and interference elements are removed to the maximum extent.The preprocessing method not only improves the efficiency of subsequent processing steps, but also lays a solid foundation for accurate curve recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of curve data extraction technology, and more specifically to a method for extracting curve data from curve graphs on a web platform. Background Technology

[0002] Automatically identifying and extracting curve data from graphs has significant application value in the field of graphics processing. For example, in the design of radio frequency front-ends, there is a great deal of data analysis and application involving curve graphs, such as extracting raw data like vibration load spectra and temperature cycling records from various complex graphs.

[0003] Existing curve recognition methods include boundary recognition algorithms and traditional machine recognition, with traditional machine recognition methods encompassing operations such as extracting key points of the curve. However, these methods all have numerous drawbacks. For example, they are extremely cumbersome in terms of interaction, requiring significant manpower and time. Their accuracy is also unsatisfactory, failing to meet the requirements for precise recognition. Especially when dealing with complex curve graphics, such as those with grids, steep curve slopes, diverse background colors, or multiple intersecting curves, these methods are almost ineffective. Taking boundary recognition algorithms as an example, when processing curve graphics with grids, the grid lines easily interfere with the accurate judgment of curve boundaries, leading to recognition errors. Traditional machine recognition methods for extracting key points of curves often fail to accurately distinguish the key points of each curve when multiple curves intersect, making it difficult to extract data from a single curve. These problems make the extraction of raw curve graphics data extremely difficult, severely restricting the effective utilization and further analysis of curve graphics data, and greatly hindering the improvement of efficiency in related work.

[0004] As can be seen from the above description, existing curve recognition and extraction methods are unable to accurately extract curve data from relatively complex curve graphs. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] To address the shortcomings of existing technologies, this invention provides a method for extracting curve data from curve graphs on a web platform, solving the technical problem that existing curve recognition and extraction methods struggle to accurately extract curve data from complex curve graphs.

[0007] (II) Technical Solution

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] This invention provides a method for extracting curve data from curve graphs on a web platform, comprising:

[0010] Input the original image from which the curve data to be extracted on the web interface, mark and crop the original image along the length or width direction, construct the image xy coordinate system on the original image and set the maximum and minimum values ​​on the x-axis and y-axis;

[0011] The original image is preprocessed to obtain an auxiliary image. The preprocessing includes grayscale conversion and binarization operations.

[0012] The skeleton of the curve in the auxiliary image is extracted by a thinning algorithm and all endpoints and intersections are marked to obtain a set of intersections and endpoints;

[0013] Based on the set of intersection points and endpoints, the curves in the original image are broken apart to obtain a set of broken curves; the width of each curve in the set of curves is calculated, and the curves are merged based on the width results to obtain several individual curves in the original image.

[0014] The raw data for each individual curve is calculated based on the maximum and minimum values ​​on the input x and y axes, as well as the set of coordinate points, and then displayed on the web.

[0015] Preferably, the refinement algorithm includes:

[0016] By analyzing the eight neighboring points of each black pixel in the auxiliary image, it is determined whether each black pixel can be deleted. If so, it is deleted.

[0017] Preferably, the step of determining whether each black pixel can be deleted by analyzing the eight neighboring points of each black pixel in the curve of the auxiliary image includes:

[0018] For each black pixel, calculate its total value, map the total value to a pre-built index table, and determine whether each black pixel can be deleted.

[0019] The methods for calculating its total value include:

[0020] Set the weight of black pixels to 0 and the weight of white pixels to 1. Assign different multipliers to the eight neighboring pixels of the black pixel. Multiply the multipliers and weights to get the value of the eight neighboring pixels. Add the values ​​of the eight neighboring pixels to get the total value.

[0021] The pre-built index table includes a one-dimensional array with 256 elements, where 0 indicates that an element cannot be removed and 1 indicates that an element can be removed.

[0022] Preferably, the method for obtaining the information of the eight neighboring points of each black pixel includes:

[0023] The algorithm searches for the eight neighboring points of each pixel by scanning. During each horizontal scan, it first checks the left and right neighbors of each pixel. If both neighbors are black pixels, no processing is done. If a black pixel is deleted, its right neighbor is skipped and the next pixel is processed. After completing one horizontal scan of the rectangle, two rows of pixels are reduced. Then, a vertical scan is performed, and the vertical scan is performed in the same way as the horizontal scan. The horizontal and vertical scans are repeated multiple times until the shape no longer changes.

[0024] Preferably, the endpoint refers to: if only one of the eight neighboring points of the current black pixel is a black pixel, then the current black pixel is the endpoint;

[0025] The intersection point refers to a black pixel point where there are three or more black pixels among its eight neighboring points.

[0026] Preferably, the step of breaking down the curves in the original image based on the set of intersection points and endpoints includes:

[0027] Based on the set of intersections and endpoints, repeatedly iterate through the original image to find the black points that exist on the eight adjacent points from the intersections until the endpoints are found, thus breaking up the curve in the original image.

[0028] Preferably, the width of each curve in the calculated curve set is calculated, and the curves are merged based on the width results to obtain several individual curves in the original image, including:

[0029] After obtaining the set of all the disassembled curves, take the midpoint of each curve and iteratively search for 8 neighboring points on the original image until each of the 8 neighboring points is white. Finally, calculate the shortest distance, which is the width of the merged curve.

[0030] Preferably, the step of calculating the raw data of a separate curve based on the input maximum and minimum values ​​on the x-axis and y-axis and the set of coordinate points, and displaying it on the web, includes:

[0031] Click on the curve you want to extract on the web interface. The system calculates the raw data of the selected curve based on the maximum and minimum values ​​on the x and y axes and the set of coordinate points, and then displays it on the web interface.

[0032] (III) Beneficial Effects

[0033] This invention provides a method for extracting curve data from curve graphs on a web platform. Compared with existing technologies, it has the following advantages:

[0034] This invention enables the reconstruction and sampling of complex curves, including those with diverse background colors, grids, steep slopes, and multiple intersecting curves, on a web-based platform. It obtains the coordinate information of the image, allowing for the extraction and application of data from multiple curves within the image. Simultaneously, this invention introduces an advanced image preprocessing mechanism. By performing grayscale and binarization operations on the input image, it achieves efficient compression of image information and highlights key features. Employing a unique grayscale conversion algorithm and adaptive binarization strategy, it dynamically adjusts parameters according to the specific characteristics of the image, ensuring that while preserving the core features of the curve, it removes irrelevant noise and interference elements to the maximum extent. This preprocessing method not only improves the efficiency of subsequent processing steps but also lays a solid foundation for accurate curve recognition. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a block diagram illustrating a method for extracting curve data from a curve graph on a web interface, according to an embodiment of the present invention.

[0037] Figure 2 A flowchart illustrating a method for extracting curve data from a curve graph on a web platform;

[0038] Figure 3 A diagram illustrating the setting of the maximum and minimum values ​​in the X and Y directions;

[0039] Figure 4 A schematic diagram for supplementary images;

[0040] Figure 5 This is a diagram illustrating how images are displayed on the web.

[0041] Figure 6 It is an index table, that is, a one-dimensional array with 256 elements.

[0042] Figures 7a-7d Four scenarios for the distribution of pixels surrounding the black pixel to be removed;

[0043] Figures 8a-8f Six cases where pixels cannot be removed;

[0044] Figure 9 A diagram showing the multiplier corresponding to each position;

[0045] Figure 10This is a schematic diagram illustrating a specific instance of calculating whether the black dot in the middle can be removed;

[0046] Figure 11 This is a skeleton diagram;

[0047] Figure 12 A diagram illustrating the process of locating endpoints;

[0048] Figure 13 A diagram illustrating the process of finding intersections;

[0049] Figures 14a-14c This is a schematic diagram for ultimately obtaining individual curves and raw data. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] This application provides a method for extracting curve data from curve graphs on a web platform, which solves the technical problem that existing curve recognition and extraction methods are unable to accurately extract curve data from complex curve graphs, and achieves accurate extraction of curve data from complex curve graphs.

[0052] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows:

[0053] Existing curve recognition and extraction methods are cumbersome to use and have low accuracy. They are difficult to extract data from any one curve when there are multiple curves. In particular, when the curve graph has a grid, a large curve slope, a variety of background colors, or multiple curves intersect, the extraction of the original curve data is even more difficult, which seriously hinders the efficiency of curve graph data utilization.

[0054] To address the aforementioned issues, embodiments of the present invention propose to reconstruct and sample complex curves that include diverse background colors, grids, steep curve slopes, and multiple intersecting curves, thereby obtaining the coordinate information of the image and extracting and applying data from multiple curves in the image.

[0055] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0056] This invention provides a method for extracting curve data from curve graphs on a web platform, such as... Figure 1 As shown, it includes:

[0057] S1. Input the original image of the curve data to be extracted on the web interface, mark and crop the original image along the length or width direction, construct the image xy coordinate system on the original image and set the maximum and minimum values ​​on the x-axis and y-axis;

[0058] S2. Preprocess the original image to obtain an auxiliary image. The preprocessing includes grayscale conversion and binarization operations.

[0059] S3. Extract the skeleton of the curve in the auxiliary image using a thinning algorithm and mark all endpoints and intersections to obtain a set of intersections and endpoints;

[0060] S4. Based on the set of intersection points and endpoints, disassemble the curves in the original image to obtain a set of disassembled curves; calculate the width of each curve in the set of curves, and merge the curves based on the width results to obtain several individual curves in the original image.

[0061] S5. Calculate the raw data of the individual curves based on the maximum and minimum values ​​on the input x-axis and y-axis, as well as the set of coordinate points, and display them on the web.

[0062] This invention introduces an advanced image preprocessing mechanism. By performing grayscale and binarization operations on the input image, it achieves efficient compression of image information and highlights key features. Employing a unique grayscale conversion algorithm and adaptive binarization strategy, it dynamically adjusts parameters according to the specific characteristics of the image, ensuring that while preserving the core features of the curve, it removes irrelevant noise and interference elements to the maximum extent. This preprocessing method not only improves the efficiency of subsequent processing steps but also lays a solid foundation for accurate curve recognition.

[0063] The following is combined with, for example Figure 2 The detailed flowchart shown illustrates the method for extracting curve data from curve graphs on the web in an embodiment of the present invention.

[0064] In step S1, the original image from which the curve data to be extracted is input on the web interface. The original image is marked and cropped along its length and direction. An xy coordinate system is constructed on the original image, and the maximum and minimum values ​​on the x and y axes are set. The specific implementation process is as follows:

[0065] Input the original image from which you want to extract curve data on the web interface. The original image is then cropped by marking the X and Y directions, and the maximum and minimum values ​​for the X and Y directions are set. During the operation, click the minimum and maximum values ​​on the X-axis and Y-axis sequentially; these values ​​are x1, x2, y1, and y2, respectively. Figure 3 As shown.

[0066] In step S2, the original image is preprocessed to obtain an auxiliary image. The specific implementation process is as follows:

[0067] The original image is processed through grayscale conversion, binarization, filtering, erosion, and inversion to obtain an auxiliary image. The auxiliary image is shown below. Figure 4 As shown, its display on the web is as follows. Figure 5 As shown.

[0068] In step S3, the skeleton of the curve in the auxiliary image is extracted using a thinning algorithm, and all endpoints and intersections are marked to obtain a set of intersections and endpoints. The specific implementation process is as follows:

[0069] Refinement involves removing some points from the original image while maintaining its original shape. Determining whether a point can be removed is based on the situation of its eight neighboring points; specifically, it can be categorized as: internal points cannot be deleted, isolated points cannot be deleted, and endpoints of straight lines cannot be deleted. For boundary points, removal is acceptable if it doesn't increase the number of connected components. For a binary image, the pixel distribution around the eight positions of the central black pixel has two possibilities: either black or white. Therefore, there are a total of 2 × 2 × 2 × 2 × 2 × 2 × 2 = 2⁸ = 256 possibilities, which can be represented by a one-dimensional array of 256 elements defined in the program. In this array, 0 indicates that the pixel cannot be removed, and 1 indicates that it can be removed. The array is as follows: Figure 6 As shown.

[0070] The pixel distribution around the black pixels to be removed is as follows: Figures 7a-7d Several location scenarios.

[0071] However, among these 256 possible location distributions, some cannot be removed, while others can. Among these, the points that cannot be removed include... Figures 8a-8f As shown, it can be specifically described as follows:

[0072] The first point cannot be removed because it is an interior point.

[0073] The second point cannot be removed; it is also an interior point.

[0074] The third point cannot be removed; deleting it will break the previously connected portion.

[0075] The fourth point can be removed; this point is not part of the skeleton.

[0076] The fifth point cannot be removed; it is an endpoint of the line.

[0077] The sixth point cannot be removed; it is an endpoint of the line.

[0078] In the actual implementation process, a lookup table method is used to determine whether a point can be deleted:

[0079] For a black pixel, different values ​​are assigned based on the values ​​of its eight neighboring pixels (0 for black pixels and the corresponding value for white pixels in a 3x3 grid). All pixel values ​​are mapped to an index table of 0-255. The decision to retain a pixel is made by checking the corresponding entry in the index table. This method of determining value through index table construction is one of the core features of this algorithm, distinguishing it from other refinement algorithms based on complex geometric rules or iterative calculations.

[0080] Index table (i.e.) Figure 6 The one-dimensional array (with 256 elements) is constructed based on the 8-connectivity criterion, which states that:

[0081] The criteria for determining whether a point can be removed are based on the condition that it has 8 adjacent points (eight-connected). Specifically, internal points cannot be deleted, isolated points cannot be deleted, and endpoints of straight lines cannot be deleted. If it is a boundary point, it can be deleted if removing the point does not increase the connected components.

[0082] The method for calculating value includes: setting the weight of black pixels to 0, white pixels to 1, and multiplying the weights of the surrounding 8 positions by 1, 2, 4, 8, 16, 32, 64, and 128, respectively. Figure 9 Calculation as follows Figure 10 The calculation process for whether the black dot in the middle can be removed is as follows:

[0083] The first pixel is black, its pixel value is 0, and the corresponding multiplier is 1. So the calculation result of this item is: 0×1=0.

[0084] The second pixel is white, with a pixel value of 1 (because the weight of a white pixel is set to 1), and the corresponding multiplier is 2. The result of this calculation is: 1×2=2.

[0085] The third pixel is white with a pixel value of 1, and the corresponding multiplier is 4. Therefore, we can calculate that 1 × 4 = 4.

[0086] The fourth pixel is white, with a pixel value of 1, and the corresponding multiplier is 8, so we get: 1×8=8.

[0087] The fifth pixel is white, with a pixel value of 1, and the corresponding multiplier is 16. Therefore, 1 × 16 = 16.

[0088] The sixth pixel is black, with a pixel value of 0. The corresponding multiplier is 32, and the calculation result is: 0×32=0.

[0089] The seventh pixel is black, with a pixel value of 0. The corresponding multiplier is 64, resulting in: 0 × 64 = 0.

[0090] The last pixel is white, with a pixel value of 1, and the corresponding multiplier is 128, so the calculation is: 1 × 128 = 128.

[0091] Adding up the results of the above calculations, we get the total value:

[0092] 0×1+1×2+1×4+1×8+1×16+0×32+0×64+1×128=158

[0093] array

[158] = 0, therefore this point cannot be removed;

[0094] The skeleton of the curve in the auxiliary image is extracted using the method described above. The skeleton is as follows: Figure 11 As shown. In this embodiment of the invention, the "skeleton" is consistent with the common understanding of a skeleton, such as the central axis in the long direction of a rectangle, the center of a circle, and the skeleton of a straight line and isolated point being itself. After obtaining the skeleton of the curve, find the 8 neighboring points of each black point. If there is only one neighboring point (pixel value 0), then the current point is an endpoint. If a point has 3 or more black pixels around it (pixel value 255), it is considered an intersection point. The view for finding endpoints is as follows. Figure 12 As shown, the endpoint is the point where only one of the eight neighboring points of the current point is black (0). The view for finding the intersection point is as follows. Figure 13 As shown, a point is an intersection point if more than 3 of its 8 adjacent points are black (0).

[0095] It should be noted that when determining whether a point can be deleted, the algorithm searches for the eight neighboring points of each point using a scanning method. However, the original algorithm may make erroneous deletions during the scanning process. For example, in a simple vertical line example, scanning from top to bottom and from left to right may mistakenly delete the entire line, resulting in an unexpected final result.

[0096] In this embodiment of the invention, the scanning method is improved: during each horizontal scan, the left and right neighbors of each point are first determined. If both are black points, the point is left unprocessed. If a black point is deleted, its right neighbor is skipped, and the next point is processed. After completing one horizontal scan of the rectangle, two rows of pixels are reduced, and then a vertical scan is performed using the same method. Horizontal and vertical scans are repeated multiple times until the graphic no longer changes. This improvement measure, addressing problems encountered during the scanning process, reflects the continuous optimization of the algorithm in practical applications. Compared to some refinement algorithms that do not consider these special cases, it has better accuracy and stability.

[0097] In step S4, based on the set of intersection points and endpoints, the curves in the original image are broken down to obtain a set of broken curves. The width of each curve in the set is calculated, and the curves are merged based on the width results to obtain several individual curves from the original image. The specific implementation process is as follows:

[0098] Based on the set of intersection points and endpoints, repeatedly iterate through the original image from the intersection points to find the black points (pixel value 0) that exist at the 8 adjacent points until the endpoint is found. Disassemble the curves in the original image. After obtaining the set of all disassembled curves, take out the midpoint of each curve (i.e. the midpoint of the line from each intersection point to the endpoint) and iterate through the original image to find the 8 adjacent points until the pixel value of each point is white (255). Finally, calculate the shortest distance, which is the width of the merged curve.

[0099] Based on the widths obtained in the above steps, the curve set is grouped. If curves have the same width, they are merged to obtain the individual curves from the original image from which the curve data to be extracted. The merged curves are then displayed on the web.

[0100] Using the above method, the black point coordinates of the extracted skeleton are searched in the original image, and then the width is calculated based on the case where the adjacent points are black and white (the search is iterated until a white point is found). The calculation of the width is to freely merge the disassembled skeleton lines according to the original width, so as to obtain the desired individual curve.

[0101] In step S5, the raw data of the individual curves are calculated based on the maximum and minimum values ​​on the input x-axis and y-axis and the set of coordinate points, and then displayed on the web.

[0102] Click on the curve you want to extract on the web interface. The system calculates the raw data of the selected curve based on the maximum and minimum values ​​on the x and y axes and the set of coordinate points, and then displays it on the web interface.

[0103] Finally, obtain individual curves and raw data as follows: Figure 14a , Figure 14b , Figure 14c As shown.

[0104] This invention provides a web-based application that significantly assists in the design of radio frequency (RF) front-end components. It facilitates the acquisition of curves and the extraction of raw data for various complex graphs. For example, in RF front-end component design, the raw coordinate data of coordinate points in the load curve obtained from component simulation can be quickly extracted, improving data utilization efficiency. Furthermore, this invention serves as an interface for acquiring raw curve data and can be easily integrated with other applications. Using graph resources as input, the data can be directly output after processing by this invention, providing a data interface for other applications.

[0105] In summary, compared with existing technologies, it has the following beneficial effects:

[0106] 1. The embodiments of the present invention can reconstruct and sample complex curves with diverse background colors, grids, large curve slopes, and multiple intersecting curves on the web, and obtain the coordinate information of the image to extract data from multiple curves in the image and apply the data.

[0107] 2. This invention introduces an advanced image preprocessing mechanism. By performing grayscale and binarization operations on the input image, it achieves efficient compression of image information and highlights key features. Employing a unique grayscale conversion algorithm and adaptive binarization strategy, it dynamically adjusts parameters according to the specific characteristics of the image, ensuring that while preserving the core features of the curve, it removes irrelevant noise and interference elements to the maximum extent. This preprocessing method not only improves the efficiency of subsequent processing steps but also lays a solid foundation for accurate curve recognition.

[0108] 3. The innovative erosion algorithm (i.e., removing redundant points) in this invention embodiment is applied to remove redundant lines and points from images. Based on a complex mathematical model and intelligent decision-making mechanism, this algorithm can accurately identify redundant elements that may affect the accuracy of curve recognition and perform targeted erosion processing. Through in-depth analysis of the pixel neighborhood and dynamic adjustment of erosion parameters, it ensures that the integrity and realism of the curve are not compromised while removing redundant elements.

[0109] 4. A unique thinning algorithm is meticulously designed for extracting image skeletons. This algorithm integrates advanced mathematical morphology theory and deep learning techniques, enabling it to capture the core structure of curves with extremely high precision. Through multi-level analysis and iterative processing of the image, the skeleton extraction results are continuously optimized, resulting in a more refined and accurate skeleton, providing high-quality foundational data for subsequent endpoint and intersection point extraction.

[0110] 5. Precise endpoint extraction technology is based on advanced pixel gradient analysis and feature detection algorithms. By deeply mining the gradient information of image pixels (image gradient information represents the rate of change of the image and reflects the edge information of the image), combined with sophisticated pattern recognition technology, the endpoints of lines can be located quickly and accurately. This endpoint extraction method has high robustness and adaptability, and can work reliably even in extremely complex image environments, providing crucial starting point information for the accurate analysis of curves.

[0111] 6. The innovative intersection point extraction method employs multi-dimensional pixel correlation judgment and intelligent region segmentation algorithms. By deeply analyzing the multi-dimensional correlation features of pixels within local regions and combining this with intelligently segmented analysis areas, the intersection points of lines are accurately identified. This intersection point extraction method not only comprehensively captures different types of intersection points but also provides crucial node information for subsequent coordinate point grouping and curve analysis.

[0112] 7. This embodiment of the invention groups all coordinate points of the line from the intersection to the endpoint, uses an improved scanning method to find the pixel values ​​of 8 adjacent points, and efficiently groups them based on the number of points with a pixel value of 255. This method combines advanced graph theory and data structure techniques, enabling fast and accurate grouping of coordinate points, providing strong support for subsequent curve analysis and processing.

[0113] 8. Regarding the calculation of line width, this embodiment of the invention employs an innovative iterative approximation algorithm. It calculates the midpoint of the line from each intersection to the endpoint, then finds eight adjacent pixels in the original image, iteratively approximating until the pixel values ​​are inconsistent, at which point the approximation is marked. This algorithm, based on complex mathematical models and optimization theories, can accurately calculate the line width, providing important parameters for curve analysis and processing.

[0114] 9. The efficient line filtering and merging algorithm is based on advanced machine learning techniques and optimization strategies. Based on the calculated width, an intelligent classification algorithm accurately filters out lines that meet the requirements, and then merges them appropriately using an optimized merging strategy. This algorithm effectively removes unnecessary lines while retaining key curve information, improving the accuracy and reliability of curve recognition.

[0115] 10. This embodiment of the invention calculates the original coordinate values ​​according to the maximum and minimum values ​​of the X and Y axes set by the front end through an intelligent mechanism that interacts with the front end. This mechanism integrates advanced front-end technology and back-end algorithms, enabling seamless data interaction and accurate coordinate calculation, providing accurate coordinate information for further image processing and analysis, and meeting the needs of different application scenarios.

[0116] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0117] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting curve data from a curve graph on a web-based application, characterized in that, include: Input the original image from which the curve data to be extracted on the web interface, mark and crop the original image along the length or width direction, construct the image xy coordinate system on the original image and set the maximum and minimum values ​​on the x-axis and y-axis; The original image is preprocessed to obtain an auxiliary image. The preprocessing includes grayscale conversion and binarization operations. The skeleton of the curve in the auxiliary image is extracted by a thinning algorithm and all endpoints and intersections are marked to obtain a set of intersections and endpoints; Based on the set of intersection points and endpoints, the curves in the original image are broken apart to obtain the set of broken curves; Calculate the width of each curve in the curve set, and merge the curves based on the width results to obtain several individual curves in the original image; The raw data for each individual curve is calculated based on the maximum and minimum values ​​on the x and y axes and the set of coordinate points, and then displayed on the web. The process involves calculating the width of each curve in the curve set and merging the curves based on the width results to obtain several individual curves in the original image. This includes: after obtaining all the separated curve sets, taking the midpoint of each curve and iteratively searching for 8 adjacent points on the original image until each of the 8 adjacent points is white; finally, calculating the shortest distance, which is the width of the merged curve; if the curves have the same width, they are merged to obtain the individual curves in the original image from which the curve data is to be extracted.

2. The method for extracting curve data from a curve graph on a web-based application as described in claim 1, characterized in that, The refinement algorithm includes: By analyzing the eight neighboring points of each black pixel in the auxiliary image, it is determined whether each black pixel can be deleted. If so, it is deleted.

3. The method for extracting curve data from a curve graph on a web platform as described in claim 2, characterized in that, The step of analyzing the eight neighboring points of each black pixel in the curve of the auxiliary image to determine whether each black pixel can be deleted includes: For each black pixel, calculate its total value, map the total value to a pre-built index table, and determine whether each black pixel can be deleted. The methods for calculating its total value include: Set the weight of black pixels to 0 and the weight of white pixels to 1. Assign different multipliers to the eight neighboring pixels of the black pixel. Multiply the multipliers and weights to get the value of the eight neighboring pixels. Add the values ​​of the eight neighboring pixels to get the total value. The pre-built index table includes a one-dimensional array with 256 elements, where 0 indicates that an element cannot be removed and 1 indicates that an element can be removed.

4. The method for extracting curve data from a curve graph on a web-based platform as described in claim 2, characterized in that, The methods for obtaining the information of the eight neighboring points of each black pixel include: The algorithm searches for the eight neighboring points of each pixel by scanning. During each horizontal scan, it first checks the left and right neighbors of each pixel. If both neighbors are black pixels, no processing is done. If a black pixel is deleted, its right neighbor is skipped and the next pixel is processed. After completing one horizontal scan of the rectangle, two rows of pixels are reduced. Then, a vertical scan is performed, and the vertical scan is performed in the same way as the horizontal scan. The horizontal and vertical scans are repeated multiple times until the shape no longer changes.

5. The method for extracting curve data from a curve graph on a web-based platform as described in any one of claims 1 to 4, characterized in that, The endpoint refers to the point where only one of the eight neighboring points of the current black pixel is a black pixel. The intersection point refers to a black pixel point where there are three or more black pixels among its eight neighboring points.

6. The method for extracting curve data from a curve graph on a web-based platform as described in any one of claims 1 to 4, characterized in that, The step of breaking down the curves in the original image based on the set of intersection points and endpoints includes: Based on the set of intersections and endpoints, repeatedly iterate through the original image to find the black points that exist on the eight adjacent points from the intersections until the endpoints are found, thus breaking up the curve in the original image.

7. The method for extracting curve data from a curve graph on a web-based platform as described in any one of claims 1 to 4, characterized in that, The process of calculating the raw data for individual curves based on the input maximum and minimum values ​​on the x and y axes and the set of coordinate points, and displaying it on the web, includes: Click on the curve you want to extract on the web interface. The system calculates the raw data of the selected curve based on the maximum and minimum values ​​on the x and y axes and the set of coordinate points, and then displays it on the web interface.