A curve extraction method for a binary grid curve graph obtained by shooting

By performing image block segmentation, weight calculation and breakpoint repair on the paper signal diagram, the problem of background grid line removal errors in the existing technology is solved, and the digital accuracy and precision of the signal lines are improved.

CN111832408BActive Publication Date: 2024-09-06HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010511977.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-08
Publication Date
2024-09-06
Estimated Expiration
2040-06-08

AI Technical Summary

Technical Problem

There are errors in the existing technology when removing the background grid lines of paper signal diagrams, resulting in low digitization accuracy. Especially when the images captured by smartphones are distorted, morphological methods and Hough transform cannot effectively remove the background. grid lines.

Method used

By dividing the image into multiple image blocks, extracting the vertical grid line position, calculating the weight sum of each row of pixels, removing pixels whose weight sum is less than the threshold, retaining the connected domain with the largest number of pixels, repairing breakpoints, using Radon transformation and binary Value processing performs tilt correction and cropping, combined with breakpoint repair and segmented sampling to reduce the impact of distortion.

Benefits of technology

It effectively removes background grid lines, improves the repair accuracy of signal lines, reduces the impact of distortion on signal calibration, and improves the digital accuracy of binary paper signal maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111832408B
    Figure CN111832408B
Patent Text Reader

Abstract

The present invention discloses a curve extraction method for a binary grid curve graph obtained by shooting. The existing binary paper signal graph digitization method does not consider the influence of distortion etc. generated when the image is shot, so that the digital signal cannot be accurately and effectively obtained. The present invention is as follows: 1. The image is shot for preprocessing, the image is divided into n image blocks, and the position of each longitudinal grid line is extracted. 2. The connected domain of each image block is counted and the connected domain with the largest number of pixels is retained. 3. The column coordinates of the pixels are used as weight values, and the weight sum of the black pixels in each row of the image block is counted; the rows with the weight sum less than the threshold are removed. 4. The image breakpoints are repaired. 5. According to the positional relationship between the signal line pixels and the background grid line pixels, the digital signal is obtained by adopting the segmented sampling method. The present invention greatly reduces the influence of image distortion on the digitization of the binary paper signal graph and improves the accuracy of digitization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer image processing, and in particular relates to a method for extracting signal lines from a photographed grid curve graph. Background Art

[0002] Although with the development of science and technology, most signal diagrams have digital output, there are still some that cannot be output digitally. Moreover, for some important signal diagrams in the past, digitizing them is very important for data preservation, discussion and communication between people, and subsequent development and research. Usually, black and white paper signal diagrams are the most commonly used. The processing object of the present invention is a black and white paper signal diagram with solid horizontal lines and dotted vertical lines.

[0003] At present, there are mainly color filter method, morphological method, Hough transform method, and global threshold method for removing background grid lines. Among them, the color filter method and the more commonly used global threshold method cannot digitize binary signal images. However, since the device for acquiring the image is a smart phone, the obtained digital image is distorted. Therefore, the morphological method and Hough transform cannot remove the background grid lines completely, and there is a large error with the original data due to distortion and other reasons when calibrating the signal lines. Therefore, the effective removal of background grid lines and the elimination of distortion have a very large impact on the accuracy of digitizing binary paper signal images. Summary of the invention

[0004] The purpose of the present invention is to provide a curve extraction method for a binary grid curve graph obtained by shooting.

[0005] The specific steps of the present invention are as follows:

[0006] Step 1: Take an image and perform preprocessing, divide the image into n image blocks, and extract the position of each longitudinal grid line, where n is the number of longitudinal grid lines.

[0007] Step 2: extract the connected domain for each image block and retain only the connected domain with the largest number of pixels in each image block.

[0008] Step 3: Take the column coordinates of the pixels in each image block as the weight value, and count the weight sum of each row of black pixels in each image block; t The weight and Ep(i) of the pixels in the i-th row are calculated as follows:

[0009]

[0010] Where I(i,j) is the pixel value at the coordinate (i,j) position in the image block, black is 1, and white is 0; j is the column number of the image block; W is the number of pixel columns in a single image block.

[0011] Take the M rows of pixels with the largest number of black pixels in the image block as the initial grid line range; M is the line width of the background grid line. Create the initial grid line range array Y = {Y 1 ,Y 2 ,...,Y M}; Y h is the number of black pixels in the hth row of pixels within the preliminary grid line range, h=1,2,…,M; calculate the minimum target proportion β.

[0012]

[0013] Among them, Y min is the smallest element in array Y.

[0014] Calculate the minimum weight and Ep of the grid line in the case of β min as follows:

[0015]

[0016] Calculate the maximum weight and Ep of the grid line W as follows:

[0017] Ep W =(1+W)·W / 2

[0018] Calculate the threshold E t The expression is as follows:

[0019] E t =β 2 Ep W

[0020] The weight sum of the image blocks is less than the threshold E t The pixels of each row are taken out, and only the target curve with breakpoints is retained.

[0021] Step 4: Repair image interruption points.

[0022] As a preferred embodiment, the specific process of step one is as follows:

[0023] 1-1. Take a photo of the grid curve graph printed on paper to obtain a photo of the curve graph; convert the photo of the curve graph into a grayscale image, then use Radon transformation to perform tilt correction on the image, and then perform binarization on the grayscale image to obtain a binary image. And cut off the parts other than the horizontal and vertical coordinate axes and grid lines in the binary image. If there is a vertical grid line on the far right of the coordinate system, cut off the vertical grid line together.

[0024] 1-2. Divide the binary image into n image blocks arranged in sequence along the horizontal direction; n is the number of vertical grid lines of the captured grid curve image.

[0025] 1-3. Count the number of black pixels in each column of the binary image; take the column with the largest number of black pixels in each of the n image blocks as the vertical grid position, and obtain the column number LN corresponding to the n vertical grid lines k , k=1,2,…,n.

[0026] 1-4. Get the maximum row coordinate value r of the black pixel in each column of the binary image maxG,j , minimum row coordinate value r minG,j .

[0027] Preferably, in step 2, if a pixel is within the eight-neighborhood of another pixel, and both pixels are black pixels, then it is considered that the two pixels belong to the same connected domain.

[0028] As a preferred embodiment, the specific process of step 4 is as follows:

[0029] 4-1. Extract each breakpoint of the target curve.

[0030] 4-2. For each breakpoint, extract the maximum row coordinates max(r R1 )、max(r R2 ), the maximum column coordinate max(c R1 )、max(c R2 )、minimum row coordinate min(r R1 )、min(r R2 )、minimum column coordinate min(c R1 )min(c R2 ); the end regions R1 and R2 on both sides of the breakpoint respectively represent M rows of pixel points at the opposite ends of the two target curve segments separated by the breakpoint. R1 、r R2 are the horizontal sequence number arrays of the end areas on both sides of the breakpoint; c R1 、c R2 They are the vertical sequence number arrays of the end areas on both sides of the breakpoint;

[0031] Breakpoints are divided into the following four types:

[0032] Type 1: Use a size L 1 ×H 1 The rectangular block is repaired and placed between the end areas on both sides of the breakpoint so that the end areas on both sides of the breakpoint are connected together.

[0033]

[0034] Type 2: Use a size L 2 ×H 2 The rectangular block is repaired and placed between the end areas on both sides of the breakpoint so that the end areas on both sides of the breakpoint are connected together.

[0035]

[0036] Type 3: Use a size L 3 ×H 3 The rectangular block is repaired and placed in a position in contact with the end surfaces of the end areas on both sides of the breakpoint, so that the end areas on both sides of the breakpoint are connected together.

[0037]

[0038] Type 4: The three sizes arranged in a ladder shape are L 4 ×H 4 , L 5 ×H 5 , L 6 ×H 6 Rectangular block for repair; size L 4 ×H 4 Rectangular block, size L 6 ×H 6 The rectangular block contacts the end areas on both sides of the breakpoint, with a size of L 4 ×H 4 The rectangular block is connected to the end area on the upper side of the breakpoint; dimension L 6 ×H 6 The rectangular block is connected to the end region on the lower side of the breakpoint, so that the end regions on both sides of the breakpoint are connected together.

[0039]

[0040] 4-3. After all breakpoints are repaired, the target curve is skeletonized to obtain a single-pixel connected target curve.

[0041] Preferably, after step 4 is executed, the following steps are performed:

[0042] Calculate the amplitude S(j) of each point on the target curve in the vertical axis direction to obtain the amplitude curve. The specific formula is as follows:

[0043]

[0044] Where S(j) is the amplitude value of the target curve in the jth column; r maxG,j 、rminG,j The image obtained in step 1 is the maximum row coordinate value and the minimum row coordinate value of the black pixel in the jth column, G min is the minimum amplitude value corresponding to the horizontal grid line; G max is the maximum amplitude value corresponding to the horizontal grid line; r S,j is the row coordinate of the target curve listed in the jth column.

[0045] As a preferred method, finally, the target curve is subjected to distortion correction. The specific process is as follows:

[0046] 6-1. Segment the image according to the positions of the vertical grid lines in the initial image to obtain n+1 corrected image blocks.

[0047] 6-2. Evenly extract SP sampling points on each of the target curves in the n+1 corrected image blocks.

[0048] 6-3. Stretch or compress the n+1 corrected image blocks to a width of T, so that the position of each sampling point changes due to the stretching or compression. T is the number of standard pixel columns between two adjacent vertical grid lines.

[0049] 6-4; Fit each sampling point to obtain the final target curve.

[0050] The present invention has the following beneficial effects:

[0051] 1. The present invention effectively removes background grid lines through a connected domain method and a weight sum method.

[0052] 2. The present invention repairs the signal line by utilizing the basic set relationship of the coordinates of the two end points of the broken signal line and the trend of the signal line.

[0053] 3. The present invention utilizes the positional relationship between signal line pixels and background grid line pixels and the segmented sampling method to reduce the influence of distortion on signal calibration and improve accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flow chart of the present invention;

[0055] Figure 2 It is a binary image obtained after processing in step 1 of the present invention;

[0056] Figure 3 The preliminary de-gridding image obtained after the processing in step 2 of the present invention;

[0057] Figure 4 The completely de-grid map obtained after the processing in step 3 of the present invention;

[0058] Figure 5This is a schematic diagram of the end regions R1 and R2 on both sides of the break point in step 4 of the present invention;

[0059] Figure 6(a) to 6(d) They are schematic diagrams of four types of breakpoints in step 4 of the present invention;

[0060] Figures 7(a) to 7(d) They are schematic diagrams of the four types of breakpoints after repair in step 4 of the present invention;

[0061] Figure 8 This is the repair curve diagram obtained after the processing in step 4 of the present invention;

[0062] Fig. 9 This is a band amplitude curve graph obtained after processing in step five of the present invention. DETAILED DESCRIPTION

[0063] The present invention is further described below.

[0064] like Figure 1 As shown, a curve extraction method for a binary grid curve graph obtained by shooting, the specific steps are as follows:

[0065] Step 1: Take the image for preprocessing and extract the position of each vertical grid line

[0066] 1-1. Take a photo of the grid curve graph printed on paper to obtain a photo of the curve graph; convert the photo of the curve graph into a grayscale image, then use Radon transformation to perform tilt correction on the image, and then perform binarization on the grayscale image to obtain a binary image. And cut off the parts other than the horizontal and vertical coordinate axes and grid lines in the binary image. If there is a vertical grid line on the far right of the coordinate system, cut off the vertical grid line together.

[0067] 1-2. Divide the binary image into n image blocks arranged in sequence along the horizontal direction; n is the number of vertical grid lines in the cropped binary image. At this time, each image block has one vertical grid line.

[0068] 1-3. Count the number of black pixels in each column of the binary image; take the column with the largest number of black pixels in each of the n image blocks as the vertical grid position, and obtain the column number LN corresponding to the n vertical grid lines k , k=1,2,…,n.

[0069] 1-4. Get the maximum row coordinate value r of the black pixel in each column of the binary image maxG,j , minimum row coordinate value r minG,j (i.e. the row numbers of the top and bottom black pixels). The binary image after this step is as follows Figure 2 shown.

[0070] Step 2: For each image block, the connected domain is extracted and only the connected domain with the largest number of pixels in each image block is retained to obtain a preliminary de-gridding map. Figure 3 As shown in the figure. Since in the image block, the line width of most target curves is larger than the line width of the background grid lines and they intersect with the background grid lines, the number of pixels in the connected domain containing the target curve is much larger than that in other areas. By retaining the area with the largest number of pixels and removing other areas, the target curve and the grid lines intersecting with it are obtained.

[0071] The connected domain is defined as follows:

[0072] (1) The connected domain refers to the connected black pixel area, that is, the area where the background grid lines and the target curve are located.

[0073] (2) If a pixel is within the eight-neighborhood of another pixel and both pixels are black pixels, then the two pixels are considered to belong to the same connected domain.

[0074] Step 3: Take the column coordinates of the pixels in each image block as the weight value, and count the weight sum of each row of black pixels; set the weight sum less than the threshold E t The rows of are removed. This removes the background grid lines that intersect with the signal. The weight and Ep(i) of the i-th row of pixels in an image block are calculated as follows:

[0075]

[0076] Among them, Ep(i) is the weighted sum of the pixels in the i-th row, I(i,j) is the pixel value at the coordinate (i,j) position in the image block, black is 1, and white is 0; j is the column number; W is the number of pixel columns in a single image block.

[0077] Due to the quality of paper signal images and the digital image acquisition equipment, the background grid lines are not regular, and the black pixels cannot completely fill the entire row of the image block. Therefore, the number of black pixels in each row is counted and arranged from large to small.

[0078] Take the M rows of pixels with the largest number of black pixels as the initial grid line range; M is the line width of the background grid line. Create the initial grid line range array Y = {Y 1 ,Y 2 ...Y h ...Y M}; Y h is the number of black pixels in the hth row of pixels within the preliminary grid line range, h=1,2,…,M; calculate the minimum target proportion β.

[0079]

[0080] Among them, Y minis the minimum element in array Y. W is the number of pixel columns in a single image block.

[0081] Calculate the minimum weight and Ep of the grid line in the case of β min as follows:

[0082]

[0083] Calculate the maximum weight and Ep of the grid line W as follows:

[0084] Ep W =(1+W)·W / 2

[0085] The threshold E can be obtained from the above formula t as follows:

[0086]

[0087] Simplified threshold E t The expression is as follows:

[0088] E t =β 2 Ep W

[0089] The weight sum of the image blocks is less than the threshold E t The pixels in each row of are changed to white (i.e. set to 0), and a completely de-grid map is obtained. Figure 4 shown.

[0090] Step 4: In the process of removing the grid lines, the part where the grid lines overlap with the target curve is considered to be removed, so the target curve needs to be repaired. The target curve is repaired according to the set relationship of the coordinates of the two end points of the broken line and the trend of the target curve. The details are as follows:

[0091] 4-1. Extract the breakpoints of the target curve in the binary image.

[0092] 4-2. For each breakpoint, extract the maximum row coordinates max(r R1 )、max(r R2 ), the maximum column coordinate max(c R1 )、max(c R2 )、minimum row coordinate min(r R1 )、min(r R2 )、minimum column coordinate min(c R1 )min(c R2 )like Figure 5 As shown; the end regions R1 and R2 on both sides of the breakpoint respectively represent M rows of pixel points at the opposite ends of the two target curve segments separated by the breakpoint.R1 、r R2 are the horizontal sequence number arrays of the end areas on both sides of the breakpoint; c R1 、c R2 They are the vertical sequence number arrays of the end areas on both sides of the breakpoint;

[0093] Breakpoints are divided into the following four types:

[0094] Type 1: It means that the end regions on both sides of the breakpoint are completely offset vertically, aligned horizontally, or incompletely offset, as shown in FIG6( a ).

[0095] This situation is caused by deleting grid lines that intersect with the target curve that rises or falls rapidly. Therefore, a grid line with size L is used. 1 ×H 1 The rectangular block is repaired and placed between the end areas on both sides of the breakpoint. The upper and lower sides of the rectangular block are connected to the edge lines of the breakpoint area, so that the end areas on both sides of the breakpoint are connected together.

[0096]

[0097] Before and after repair Figure 6(a) , 7(a) shown.

[0098] Type 2: This means that the end regions on both sides of the breakpoint are not completely offset up and down, but are completely offset left and right, as shown in FIG6( b ).

[0099] This is caused by deleting grid lines that almost completely coincide with the target curve. 2 ×H 2 The rectangular block is repaired and placed between the end areas on both sides of the breakpoint. The left and right sides of the rectangular block are connected to the edge lines of the breakpoint areas, so that the end areas on both sides of the breakpoint are connected together.

[0100]

[0101] The images before and after restoration are shown in Figures 6(b) and 7(b) respectively.

[0102] Type 3: This means that the end regions on both sides of the breakpoint are aligned vertically and completely offset from left to right, as shown in Figure 6(c).

[0103] This is caused by deleting the grid lines that coincide with the inflection points of the target curve. 3 ×H 3The rectangular block is repaired and placed at a position in contact with the end surfaces of the end areas on both sides of the breakpoint (if the breakpoint was originally a concave point, the rectangular block is placed below the end areas on both sides; if the breakpoint was originally a convex point, the rectangular block is placed above the end areas on both sides), so that the end areas on both sides of the breakpoint are connected together.

[0104]

[0105] The images before and after restoration are shown in Figures 6(c) and 7(c) respectively.

[0106] Type 4: This means that the end regions on both sides of the breakpoint are completely offset up and down, and left and right, as shown in Figure 6(d).

[0107] Type 4: The three sizes arranged in a ladder shape are L 4 ×H 4 , L 5 ×H 5 , L 6 ×H 6 Rectangular block for repair; size L 4 ×H 4 Rectangular block, size L 6 ×H 6 The rectangular block contacts the end areas on both sides of the breakpoint, with a size of L 4 ×H 4 The rectangular block is connected to the end area on the upper side of the breakpoint; dimension L 6 ×H 6 The rectangular block is connected to the end region on the lower side of the breakpoint, so that the end regions on both sides of the breakpoint are connected together.

[0108] This is caused by deleting the intersection of the grid lines and the soft target curve. 4 ×H 4 , L 5 ×H 5 , L 6 ×H 6 Rectangular block for repair; size L 4 ×H 4 Rectangular block, size L 6 ×H 6 The rectangular block is in contact with the end areas on both sides of the breakpoint (if the end areas on both sides of the breakpoint are higher on the left and lower on the right, then L 4 ×L 4 The rectangular block in L 5 ×H 5 The upper left corner of the rectangular block, size L 6 ×H 6 The rectangular block is located at the size L5 ×H 5 The lower right corner of the rectangular block; if the end areas on both sides of the breakpoint are lower on the left and higher on the right, then L 4 ×L 4 The rectangular block in L 5 ×H 5 The upper right corner of the rectangular block, size L 6 ×H 6 The rectangular block is located at the size L 5 ×H 5 The lower left corner of the rectangular block) makes the end areas on both sides of the breakpoint connected together.

[0109]

[0110] The images before and after restoration are shown in Figures 6(d) and 7(d) respectively.

[0111] 4-3. After all breakpoints are repaired, the target curve is skeletonized to obtain a single-pixel connected target curve. The repaired curve is shown in the figure below: Figure 8 shown.

[0112] Step 5: Compare the row number of the target curve in each column with the maximum row coordinate value r of the black pixel in the column obtained in step 1 maxG,j , minimum row coordinate value r minG,j , use the proportional relationship to obtain the amplitude S(j) of the target curve in the vertical axis direction, and obtain the amplitude curve graph. The specific formula is as follows:

[0113]

[0114] Among them, S(j) is the amplitude value of the target curve in the jth column, G min is the minimum amplitude value corresponding to the horizontal grid line; G max is the maximum amplitude value corresponding to the horizontal grid line (for example, in the score curve with a full score of 100, the maximum amplitude value corresponding to the horizontal grid line is G max is 100 points, and the minimum amplitude value G corresponding to the horizontal grid line min =0 points); r S,j is the row coordinate of the target curve listed in the jth column. Thus, the amplitude value of any point on the target curve is obtained.

[0115] Step 6: Perform distortion correction on the target curve.

[0116] 6-1. The amplitude curve obtained in step 5 is converted into the column number LN corresponding to the n vertical grid lines obtained in step 1-3. k Segmentation is performed to obtain n+1 corrected image blocks.

[0117] 6-2. Uniformly extract SP sampling points on each of the target curves in the n+1 corrected image blocks, and delete the remaining points on the target curve; then the sampling frequency of the corrected image block is T is the standard number of pixel columns between two adjacent longitudinal grid lines (the number of pixel columns in the absence of distortion, which value is preset).

[0118] 6-3. The n+1 corrected image blocks are stretched or compressed to a width of T, respectively, so that the position of each sampling point changes due to the stretching or compression.

[0119] 6-4; Fit each sampling point to get the final target curve. The amplitude curve after distortion correction is as follows: Fig. 9 shown.

Claims

1. A curve extraction method for a binary grid curve graph obtained by shooting, characterized in that: Step 1: Take the image and pre-process it, divide the image into n image blocks, and extract the position of each vertical grid line. n is the number of vertical grid lines; Step 2: extract the connected domain for each image block, and only retain the connected domain with the largest number of pixels in each image block; Step 3: Take the column coordinates of the pixels in each image block as the weight value, and count the weight sum of each row of black pixels in each image block; t The pixels in each row are removed; the weight and Ep(i) of the pixels in the i-th row are calculated as follows: Where I(i,j) is the pixel value at the coordinate (i,j) position in the image block, black is 1, and white is 0; j is the column number of the image block; W is the number of pixel columns in a single image block; Take the M rows of pixels with the largest number of black pixels in the image block as the initial grid line range; M is the line width of the background grid line; establish the initial grid line range array Y = {Y1, Y2, ..., Y M }; Y h is the number of black pixels in the hth row of pixels within the preliminary grid line range, h=1,2,…,M; calculate the minimum target proportion β; Among them, Y min is the smallest element in array Y; Calculate the minimum weight and Ep of the grid line in the case of β min as follows: Calculate the maximum weight and Ep of the grid line W as follows: Ep W =(1+W) W / 2 Calculate the threshold E t The expression is as follows: A t =β 2 Ep W The weight sum of the image blocks is less than the threshold E t Pixels in each row are taken out, and only the target curve with breakpoints is retained; Step 4: Repair the image interruption points; the specific process of step 4 is as follows: 4-1. Extract each breakpoint of the target curve; 4-2. For each breakpoint, extract the maximum row coordinates max(r R1 )、max(r R2 ), the maximum column coordinate max(c R1 )、max(c R2 )、minimum row coordinate min(r R1 )、min(r R2 )、minimum column coordinate min(c R1 )min(c R2 ); the end regions R1 and R2 on both sides of the breakpoint respectively represent M rows of pixel points at the opposite ends of the two target curve segments separated by the breakpoint; r R1 、r R2 are the horizontal sequence number arrays of the end areas on both sides of the breakpoint; c R1 、c R2 They are the vertical sequence number arrays of the end areas on both sides of the breakpoint; Breakpoints are divided into the following four types: Type 1: Use a rectangular block of size L1×H1 for repair, and place the rectangular block between the end areas on both sides of the breakpoint so that the end areas on both sides of the breakpoint are connected together; Type 2: Use a rectangular block of size L2×H2 for repair, and place the rectangular block between the end areas on both sides of the breakpoint so that the end areas on both sides of the breakpoint are connected together; Type 3: Use a rectangular block with a size of L3×H3 to repair, and place the rectangular block to a position that contacts the end surfaces of the end areas on both sides of the breakpoint, so that the end areas on both sides of the breakpoint are connected together; Type 4: Use three rectangular blocks of L4×H4, L5×H5, and L6×H6 arranged in a ladder shape for repair; the rectangular block of L4×H4 and the rectangular block of L6×H6 are in contact with the end regions on both sides of the breakpoint respectively, the rectangular block of L4×H4 is connected to the end region on the upper side of the breakpoint; the rectangular block of L6×H6 is connected to the end region on the lower side of the breakpoint, so that the end regions on both sides of the breakpoint are connected together; 4-3. After all breakpoints are repaired, the target curve is skeletonized to obtain a single-pixel connected target curve.

2. The curve extraction method of a binary grid curve graph obtained by shooting according to claim 1, characterized in that: The specific process of step one is as follows: 1-1. Take a photo of the grid curve graph printed on paper to obtain a photo of the curve graph; convert the photo of the curve graph into a grayscale image, then use Radon transform to perform tilt correction on the image, and then perform binarization processing on the grayscale image to obtain a binary image; and cut off the part other than the horizontal and vertical coordinate axes and grid lines in the binary image; if there is a vertical grid line on the far right of the coordinate system, cut off the vertical grid line together; 1-2. Divide the binary image into n image blocks arranged in sequence along the horizontal direction; n is the number of vertical grid lines of the binary image; 1-3. Count the number of black pixels in each column of the binary image; take the column with the largest number of black pixels in each of the n image blocks as the vertical grid position, and obtain the column number LN corresponding to the n vertical grid lines k , k=1,2,…,n; 1-4. Get the maximum row coordinate value r of the black pixel in each column of the binary image maxG,j , minimum row coordinate value r minG,j .

3. The curve extraction method of a binary grid curve graph obtained by shooting according to claim 1, characterized in that: In step 2, if a pixel is within the eight-neighborhood of another pixel, and both pixels are black pixels, then the two pixels are considered to belong to the same connected domain.

4. The curve extraction method of a binary grid curve graph obtained by shooting according to claim 1, characterized in that: After executing step 4, perform the following steps: Calculate the amplitude value S(j) of each point on the target curve in the vertical axis direction to obtain the amplitude curve graph; the specific formula is as follows: Where S(j) is the amplitude value of the target curve in the jth column; r maxG,j 、r minG,j are the maximum row coordinate value and the minimum row coordinate value of the black pixel in the jth column of the image obtained in step 1, respectively. min is the minimum amplitude value corresponding to the horizontal grid line; G max is the maximum amplitude value corresponding to the horizontal grid line; r S,j is the row coordinate of the target curve listed in the jth column.

5. The curve extraction method of a binary grid curve graph obtained by shooting according to claim 1 or 4, characterized in that: Finally, the target curve is distorted and corrected; the specific process is as follows: 6-1. Segment the image according to the positions of the vertical grid lines in the initial image to obtain n+1 corrected image blocks; 6-2. Uniformly extract SP sampling points on each of the target curves in the n+1 corrected image blocks; 6-3. The n+1 corrected image blocks are stretched or compressed to a width of T, so that the position of each sampling point changes due to the stretching or compression; T is the number of standard pixel columns between two adjacent vertical grid lines. 6-4; Fit each sampling point to obtain the final target curve.