A method for extracting data of operation characteristic curve of a hydraulic turbine
Patent Information
- Application Number
- CN202511608576.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2045-11-05
AI Technical Summary
然而,现有的图像处理方法在处理具有非均匀刻度的坐标轴以及复杂背景的图像时,存在一定的局限性
1、通过图像预处理与坐标系基准建立,采用基于OTSU算法或自适应阈值处理进行背景分离与噪声抑制,以及应用Radon变换或霍夫变换进行坐标轴定向识别,能够有效消除图像噪声并准确识别坐标轴,解决了现有技术中因图像噪声和坐标轴倾斜导致的图像处理不准确和数据提取误差大的问题,提高了图像处理的准确性和可靠性,为后续的特性曲线数据提取提供了高质量的图像基础,确保了数据提取的精确性和稳定性。
Smart Images

Figure CN121564372B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing and data analysis technology, and more specifically, to a method for extracting operating characteristic curve data of a water turbine. Background Technology
[0002] In the operation monitoring and performance evaluation of hydroelectric turbines, operating characteristic curves are a crucial data source, directly reflecting the turbine's operating status and performance indicators under different working conditions. Traditional data extraction methods primarily rely on manually reading data points on the curves. This method is not only inefficient but also susceptible to human error, leading to inaccurate data. With the development of computer technology, image processing techniques have been increasingly applied to characteristic curve data extraction. These methods, through image recognition technology, can automatically identify data points on the curves, thereby improving the efficiency and accuracy of data extraction. However, existing image processing methods have limitations when processing images with non-uniformly scaled axes and complex backgrounds. For example, some methods can only extract data points at the integer pixel level, lacking sufficient precision to meet the demands of high-precision analysis. Furthermore, existing technologies also have shortcomings in handling image noise, axis tilt, and scale line recognition, affecting the accuracy and reliability of data extraction.
[0003] In implementing the embodiments of the present invention, the prior art has at least the following problems or defects: First, the prior art struggles to establish accurate mapping relationships when processing non-uniform scale coordinate axes, leading to inaccurate data conversion; second, the prior art's handling of noise and background interference in the image preprocessing stage is insufficient, affecting the accuracy of subsequent data extraction; finally, the prior art's accuracy in extracting data points is limited to the integer pixel level, failing to meet the requirements of high-precision analysis. These problems limit the efficiency and accuracy of turbine operating characteristic curve data extraction, affecting the reliability of turbine operation analysis and optimization. Summary of the Invention
[0004] This invention provides a method for extracting operating characteristic curve data of a water turbine, comprising: S1. Image preprocessing and coordinate system benchmark establishment: Obtain the original image of the turbine operating characteristic curve, perform denoising and enhancement processing on the original image to obtain an optimized image; identify and locate the two coordinate axes of the coordinate system from the optimized image, and establish the mapping relationship between the image pixel coordinate system and the actual physical quantity coordinate system. S2. Dynamic Mesh Construction: Based on the identified coordinate axes and with the main scale lines as reference, an initial mesh is constructed within the characteristic curve region of the optimized image; the existence of characteristic curves in each mesh cell of the initial mesh is detected, and blank mesh cells without characteristic curves are merged to form a dynamic adaptive mesh. S3, Subpixel-level Intersection Coordinate Analysis: Traverse each non-blank grid cell of the dynamic adaptive grid to accurately locate the intersection points of the characteristic curve and each boundary of the current grid cell; based on the mapping relationship, use an interpolation algorithm to calculate the actual physical quantity coordinate values corresponding to the intersection points; S4. Data Reconstruction and Output: Sort the actual physical quantity coordinate values corresponding to all the intersection points according to the direction of the characteristic curve, reconstruct the complete data sequence, and output it as a structured data file.
[0005] Furthermore, the image preprocessing and coordinate system benchmark establishment in step S1 specifically include: S101. Background Separation and Noise Suppression: The original image after grayscale conversion is binarized using global thresholding based on the OTSU algorithm or adaptive thresholding based on local pixel brightness to separate the foreground of the characteristic curve from the background of the coordinate grid; morphological opening operation is used to process the binary image to eliminate discrete noise points. S102, Coordinate Axis Orientation Recognition: Apply Radon transform or Hough transform to detect the binarized image and find the direction with the most concentrated energy to determine the tilt angle θ of the coordinate axis; perform rotation correction on the image according to the tilt angle θ to make the coordinate axis parallel to the image boundary, where θ is the angle between the coordinate axis and the horizontal or vertical boundary of the image, and θ is a parameter describing the degree of tilt of the coordinate axis. S103, Intelligent Recognition of Scale Lines and Scale Values: Project pixels along the calibrated coordinate axis direction and locate the scale lines by finding the projection peaks; use optical character recognition technology to recognize the numerical text next to the scale lines; establish a mapping model from pixel position to scale value; S104. Establishing the mapping relationship: Based on the located origin pixel position, scale value, and corresponding pixel position, calculate the linear scaling ratio and offset between the image pixel coordinate system and the actual physical quantity coordinate system to complete the establishment of the mapping relationship.
[0006] Furthermore, the specific method for constructing the dynamic adaptive mesh in step S2 is as follows: The pixel distance between adjacent major tick marks on the image is used as the fixed step size of the initial grid. Traverse all grid cells in the initial grid one by one and calculate the proportion of foreground pixels in the characteristic curve within each grid cell; If the percentage is lower than a preset first threshold, the grid cell is determined to be a blank cell and is merged with the adjacent blank cells. If the area of the new block formed after merging grid cells exceeds a preset second threshold, merging in that direction is stopped, and the dynamic adaptive grid that tightly wraps the characteristic curve is finally formed. The first threshold is the critical proportion for determining whether a grid cell is a blank cell, and the first threshold is a parameter preset according to the pixel density of the characteristic curve. The second threshold is the critical area that limits the range of grid merging, and the second threshold is a parameter preset according to the distribution density of the characteristic curve.
[0007] Furthermore, in step S3, the method for calculating the actual physical quantity coordinates of the intersection point of the characteristic curve and the horizontal boundary of the mesh element is as follows: Let the intersection point be located at the upper or lower boundary of the grid cell, and its pixel ordinate be... Known; The x-coordinate of the pixel at the center of the foreground pixel interval of the positioning characteristic curve on the horizontal pixel line where the boundary lies is used as the intersection point. The initial estimate; Based on the mapping relationship, Convert to actual physical quantity coordinates ; Using the actual physical quantity values corresponding to the left and right boundaries of the grid cell on the horizontal axis And the x-coordinate of the pixels within this interval of the horizontal line where the intersection point is located. The coordinates of the actual physical quantities corresponding to the intersection points are calculated by linear interpolation. ; The calculation formula is as follows: ; in, This represents the ordinate of the horizontal boundary of the grid cell in the image pixel coordinate system. Let x be the x-coordinate of the intersection point in the image pixel coordinate system. Let be the ordinate of the intersection point in the actual physical quantity coordinate system. This represents the x-coordinate of the left boundary of the grid cell in the actual physical quantity coordinate system. This represents the x-coordinate of the right boundary of the grid cell in the actual physical quantity coordinate system. Let x be the x-coordinate of the intersection point in the actual physical quantity coordinate system. The x-coordinate of the left boundary pixel of the current grid cell. This is the x-coordinate of the right boundary pixel of the current grid cell.
[0008] Furthermore, in step S3, the method for calculating the actual physical quantity coordinates of the intersection point of the characteristic curve and the vertical boundary of the mesh cell is as follows: Let the intersection point be located at the left or right boundary of the grid cell, and its pixel x-coordinate be... Known; The vertical pixel coordinate of the intersection point is the center position of the foreground pixel interval of the positioning characteristic curve on the vertical pixel line where the boundary is located. The initial estimate; Based on the mapping relationship, Convert to actual physical quantity coordinates ; Using the actual physical quantity values corresponding to the upper and lower boundaries of the grid cell on the vertical axis And the pixel ordinate of the vertical line where the intersection point is located within this interval. The coordinates of the actual physical quantities corresponding to the intersection points are calculated by linear interpolation. ; The calculation formula is as follows: ; in, y_pixel represents the x-coordinate of the vertical boundary of the grid cell in the image pixel coordinate system, and y_pixel represents the y-coordinate of the intersection point in the image pixel coordinate system. Let x be the x-coordinate of the intersection point in the actual physical quantity coordinate system. This represents the ordinate of the lower boundary of the grid cell in the actual physical quantity coordinate system. This represents the ordinate of the upper boundary of the grid cell in the actual physical quantity coordinate system. Let be the ordinate of the intersection point in the actual physical quantity coordinate system. This represents the pixel ordinate of the lower boundary of the current grid cell. This represents the pixel ordinate of the upper boundary of the current grid cell.
[0009] Furthermore, the center position of the foreground pixel interval of the positioning characteristic curve is located with sub-pixel accuracy using the gray-scale centroid method, and the calculation formula is as follows: For horizontal boundaries, ; For vertical boundaries, ; in, The x-coordinate index of the pixel on the pixel line where the horizontal boundary lies. This is the y-coordinate index of the pixel on the pixel line where the vertical boundary lies. coordinates The grayscale value of the pixel at that location. The sub-pixel level x-coordinate of the intersection point on the horizontal boundary. The sub-pixel level ordinate of the intersection point on the vertical boundary. This represents the ordinate of the horizontal boundary of the grid cell in the image pixel coordinate system. This represents the x-coordinate of the vertical boundary of the grid cell in the image pixel coordinate system.
[0010] Further, the data reconstruction in step S4 specifically involves: taking one end of the characteristic curve as the starting point, calculating the Euclidean distance between all data points and that starting point, and sorting the data points in ascending order of distance to restore the true direction of the characteristic curve. Here, the Euclidean distance is the straight-line distance between the data point and the starting point in the actual physical quantity coordinate system, and the formula for calculating the Euclidean distance is... X1 is the x-coordinate of the starting point in the actual physical quantity coordinate system, Y1 is the y-coordinate of the starting point in the actual physical quantity coordinate system, X2 is the x-coordinate of the data point in the actual physical quantity coordinate system, and Y2 is the y-coordinate of the data point in the actual physical quantity coordinate system.
[0011] Furthermore, before sorting, a density-based clustering method is used to remove outlier data points caused by misjudgment of grid boundaries.
[0012] Furthermore, in step S1, if the coordinate axis is identified as having a non-uniform scale when establishing the mapping relationship, the mapping relationship is established by using a piecewise linear mapping or nonlinear function fitting method.
[0013] Furthermore, the output structured data file is a CSV file or a JSON file, and its data point sequence contains both pixel coordinates and actual physical quantity coordinates. The pixel coordinates are the horizontal and vertical coordinates of the data points in the image pixel coordinate system, and the actual physical quantity coordinates are the horizontal and vertical coordinates of the data points in the actual physical quantity coordinate system.
[0014] The embodiments of the present invention have at least the following beneficial effects: 1. By preprocessing images and establishing a coordinate system benchmark, background separation and noise suppression are performed using the OTSU algorithm or adaptive thresholding, and coordinate axis orientation recognition is performed using Radon transform or Hough transform. This effectively eliminates image noise and accurately identifies coordinate axes, solving the problems of inaccurate image processing and large data extraction errors caused by image noise and coordinate axis tilt in existing technologies. It improves the accuracy and reliability of image processing, provides a high-quality image foundation for subsequent characteristic curve data extraction, and ensures the accuracy and stability of data extraction.
[0015] 2. A dynamic adaptive grid is constructed, using the main scale line as a reference and dynamically adjusting the grid cells according to the proportion of foreground pixels on the characteristic curve. This achieves tight wrapping of the characteristic curve region, solving the problem in existing technologies where fixed grids cannot adapt to different characteristic curve distribution densities, resulting in incomplete or insufficient data extraction. This improves the grid's adaptability to characteristic curves and the completeness of data extraction, enabling more accurate capture of data points on the characteristic curve and enhancing the flexibility and accuracy of data extraction.
[0016] 3. A sub-pixel level intersection point coordinate analysis method is adopted. Sub-pixel precision positioning is achieved through the gray-scale centroid method, and the actual physical quantity coordinate values of the intersection points are calculated by combining a linear interpolation algorithm. This solves the problem that existing technologies can only extract data points at the integer pixel level, resulting in low precision. High-precision data extraction is achieved, which can more accurately reflect the true situation of the turbine's operating characteristic curve. This provides more reliable data support for the turbine's operation analysis and optimization, and improves the accuracy and practicality of data extraction. Attached Figure Description
[0017] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein: Figure 1 This is a flowchart illustrating a method for extracting turbine operating characteristic curve data according to an embodiment of the present invention. Detailed Implementation
[0018] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make the invention more thorough and complete, and to fully convey the scope of the invention to those skilled in the art.
[0019] The following is for reference. Figure 1 , Figure 1 This is a schematic flowchart illustrating a method for extracting operating characteristic curve data of a hydraulic turbine according to an embodiment of the present invention. Figure 1 As shown, a method for extracting operating characteristic curve data of a water turbine includes: S1. Image preprocessing and coordinate system benchmark establishment: Obtain the original image of the turbine operating characteristic curve, perform denoising and enhancement processing on the original image to obtain an optimized image; identify and locate the two coordinate axes of the coordinate system from the optimized image, and establish the mapping relationship between the image pixel coordinate system and the actual physical quantity coordinate system. S2. Dynamic Mesh Construction: Based on the identified coordinate axes and with the main scale lines as reference, an initial mesh is constructed within the characteristic curve region of the optimized image; the existence of characteristic curves in each mesh cell of the initial mesh is detected, and blank mesh cells without characteristic curves are merged to form a dynamic adaptive mesh. S3, Subpixel-level Intersection Coordinate Analysis: Traverse each non-blank grid cell of the dynamic adaptive grid to accurately locate the intersection points of the characteristic curve and each boundary of the current grid cell; based on the mapping relationship, use an interpolation algorithm to calculate the actual physical quantity coordinate values corresponding to the intersection points; S4. Data Reconstruction and Output: Sort the actual physical quantity coordinate values corresponding to all the intersection points according to the direction of the characteristic curve, reconstruct the complete data sequence, and output it as a structured data file.
[0020] This invention proposes a method for extracting operating characteristic curve data from hydro turbines. This method achieves efficient and accurate data extraction from hydro turbine operating characteristic curve images through steps such as image preprocessing and coordinate system benchmark establishment, dynamic mesh construction, sub-pixel level intersection coordinate analysis, and data reconstruction and output. In the image preprocessing and coordinate system benchmark establishment step, the image is optimized through denoising and enhancement processes, and a mapping relationship between the image pixel coordinate system and the actual physical quantity coordinate system is established, providing a foundation for subsequent data extraction. In the dynamic mesh construction step, an initial mesh is constructed based on the identified coordinate axes, and a dynamic adaptive mesh is formed by detecting the existence of characteristic curves to adapt to the distribution of different characteristic curves.
[0021] In the sub-pixel level intersection point coordinate analysis step, the intersection points of the characteristic curve and the grid boundary are precisely located, and an interpolation algorithm is used to calculate the actual physical quantity coordinate values of the intersection points, ensuring high accuracy in data extraction. In the data reconstruction and output step, the intersection point coordinate values are sorted according to the direction of the characteristic curve and output as a structured data file for easy subsequent analysis and application.
[0022] Image preprocessing refers to denoising and enhancing the original image to improve its quality; coordinate system benchmark establishment refers to converting image pixel coordinates into actual physical quantity coordinates by identifying coordinate axes and establishing mapping relationships; dynamic mesh construction refers to dynamically adjusting the mesh according to the distribution of characteristic curves to adapt to different curve shapes; sub-pixel level intersection coordinate analysis refers to obtaining the actual physical quantity coordinates of intersection points through high-precision positioning and interpolation calculations; data reconstruction and output refers to arranging the extracted data in order and outputting it in a format that is easy to use.
[0023] Specifically, in the image preprocessing and coordinate system benchmark establishment steps, background separation and noise suppression employ global thresholding based on the OTSU algorithm or adaptive thresholding based on local pixel brightness to binarize the original grayscale image and separate the foreground of the characteristic curve from the background of the coordinate grid. The OTSU algorithm is a method for automatically determining the image binarization threshold by maximizing the variance between the image foreground and background. The adaptive thresholding, on the other hand, dynamically adjusts the threshold based on the brightness of local pixels to adapt to images under different lighting conditions.
[0024] Morphological opening operations are used to eliminate discrete noise points in binary images, removing small noise points through a process of erosion followed by dilation. Coordinate axis orientation recognition applies Radon or Hough transforms to detect in the binary image, finding the direction of highest energy concentration to determine the tilt angle θ of the coordinate axis. Radon transform projects the image onto lines at different angles, determining the coordinate axis orientation by analyzing the projection intensity distribution. Hough transform detects lines in the image, determining the line's position and orientation through accumulator voting.
[0025] The intelligent recognition of scale lines and values involves projecting pixels along the calibrated coordinate axis direction, locating the scale line by finding the projection peak, and using optical character recognition technology to identify the numerical text next to the scale line, establishing a mapping model from pixel position to scale value. The mapping relationship is established by calculating the linear scaling ratio and offset between the image pixel coordinate system and the actual physical quantity coordinate system based on the located coordinate origin pixel position, scale value, and corresponding pixel position. In the dynamic mesh construction step, the pixel distance between adjacent main scale lines on the image is used as the fixed step size of the initial mesh. All mesh units in the initial mesh are traversed one by one, and the proportion of foreground pixels of the characteristic curve within each mesh unit is calculated. If the proportion is lower than a preset first threshold, the mesh unit is determined to be a blank unit and merged. The first threshold is a parameter preset based on the characteristic curve pixel density to determine whether a mesh unit is a blank unit. The second threshold is a critical area limiting the mesh merging range, preset based on the characteristic curve distribution density, to prevent excessive mesh merging. In the sub-pixel level intersection coordinate analysis step, for the intersection of the characteristic curve and the horizontal boundary of the grid cell, the center position of the foreground pixel interval of the characteristic curve is used as the initial estimate of the pixel abscissa of the intersection point, and the actual physical quantity coordinate value corresponding to the intersection point is calculated by linear interpolation. Linear interpolation is a method of estimating unknown data points based on known data points using a linear function. The actual physical quantity coordinates of the intersection point are calculated by using the actual physical quantity values corresponding to the left and right boundaries of the known grid cells on the horizontal axis and the pixel abscissa of the horizontal line where the intersection point is located within this interval.
[0026] For the intersection of the characteristic curve and the vertical boundary of the grid cell, the initial estimate of the pixel ordinate of the intersection point is obtained by locating the center position of the foreground pixel interval of the characteristic curve, and the actual physical quantity coordinate value corresponding to the intersection point is calculated using linear interpolation. In the data reconstruction and output steps, taking one end of the characteristic curve as the starting point, the Euclidean distance between all data points and that starting point is calculated, and the data points are sorted in ascending order of distance. The Euclidean distance is the straight-line distance between the data point and the starting point in the actual physical quantity coordinate system. In this way, the true direction of the characteristic curve is restored, and the data is output as a structured data file, such as a CSV file or a JSON file, for easy subsequent data analysis and application.
[0027] Preferably, in the image preprocessing and coordinate system benchmark establishment steps, background separation and noise suppression can be further optimized. For example, when using the OTSU algorithm for binarization, a suitable threshold segmentation method can be selected based on the grayscale histogram features of the image to better separate the characteristic curve foreground from the coordinate grid background. In coordinate axis orientation recognition, the optimal tilt angle θ can be selected by applying Radon transform or Hough transform multiple times and combining the effect evaluation after image rotation correction to ensure that the coordinate axes are parallel to the image boundaries, thereby improving the accuracy of subsequent data extraction. In the intelligent recognition of tick marks and tick values, various optical character recognition technologies, such as deep learning models, can be combined to improve the accuracy of tick value recognition, especially when the tick value font is small or the background is complex.
[0028] In the dynamic mesh construction step, the mesh merging strategy can be further refined. For example, the merging direction and range of mesh cells can be dynamically adjusted based on the local curvature changes of the characteristic curve to better adapt to complex-shaped characteristic curves. In the sub-pixel level intersection coordinate analysis step, more advanced interpolation algorithms, such as spline interpolation or bilinear interpolation, can be used to improve the accuracy of the calculation of the actual physical quantity coordinates of the intersection points, especially when the characteristic curve changes are complex. In the data reconstruction and output step, density-based clustering methods can be used before sorting to remove outlier data points caused by misjudgment of mesh boundaries, further improving the accuracy and reliability of the data and ensuring that the output structured data file can truly reflect the operating characteristic curve of the turbine.
[0029] In some embodiments, the image preprocessing and coordinate system reference establishment in step S1 specifically include: S101. Background Separation and Noise Suppression: The original image after grayscale conversion is binarized using global thresholding based on the OTSU algorithm or adaptive thresholding based on local pixel brightness to separate the foreground of the characteristic curve from the background of the coordinate grid; morphological opening operation is used to process the binary image to eliminate discrete noise points. S102, Coordinate Axis Orientation Recognition: Apply Radon transform or Hough transform to detect the binarized image and find the direction with the most concentrated energy to determine the tilt angle θ of the coordinate axis; perform rotation correction on the image according to the tilt angle θ to make the coordinate axis parallel to the image boundary, where θ is the angle between the coordinate axis and the horizontal or vertical boundary of the image, and θ is a parameter describing the degree of tilt of the coordinate axis. S103, Intelligent Recognition of Scale Lines and Scale Values: Project pixels along the calibrated coordinate axis direction and locate the scale lines by finding the projection peaks; use optical character recognition technology to recognize the numerical text next to the scale lines; establish a mapping model from pixel position to scale value; S104. Establishing the mapping relationship: Based on the located origin pixel position, scale value, and corresponding pixel position, calculate the linear scaling ratio and offset between the image pixel coordinate system and the actual physical quantity coordinate system to complete the establishment of the mapping relationship.
[0030] Specifically, in the background separation and noise suppression steps, the original grayscale image is binarized using either global thresholding based on the OTSU algorithm or adaptive thresholding based on local pixel brightness. The OTSU algorithm is a method for automatically determining the image binarization threshold by maximizing the variance between the foreground and background, and is suitable for images with high contrast.
[0031] Adaptive thresholding dynamically adjusts the threshold based on the brightness of local pixels, better adapting to images under different lighting conditions. Morphological opening operations are used to eliminate discrete noise points in binary images. Small noise points are removed through erosion followed by dilation, ensuring image coherence and clarity. In the coordinate axis orientation recognition step, Radon or Hough transforms are applied to detect the binarized image, finding the direction with the highest energy concentration to determine the tilt angle θ of the coordinate axis. Radon transform is a method that projects an image onto lines at different angles, determining the coordinate axis direction by analyzing the projection intensity distribution. Hough transform is a method for detecting lines in an image, determining the line's position and direction through accumulator voting. In the intelligent recognition step of tick marks and tick values, pixels are projected along the corrected coordinate axis direction. Tick marks are located by finding projection peaks, and optical character recognition technology is used to identify numerical text next to the tick marks, establishing a mapping model from pixel position to tick value. In the mapping relationship establishment step, based on the located origin pixel position, scale value, and corresponding pixel position, the linear scaling ratio and offset between the image pixel coordinate system and the actual physical quantity coordinate system are calculated to complete the mapping relationship. These steps ensure the efficiency and accuracy of image preprocessing, providing a solid foundation for subsequent dynamic mesh construction and data extraction.
[0032] Preferably, the binarization method can be further optimized in the background separation and noise suppression steps. For example, when using the OTSU algorithm, a suitable threshold segmentation method can be selected based on the grayscale histogram features of the image to better separate the characteristic curve foreground from the coordinate grid background. In the morphological opening operation, structuring elements of different shapes and sizes can be selected to more effectively remove noise points. In the coordinate axis orientation recognition step, the optimal tilt angle θ can be selected by applying Radon transform or Hough transform multiple times and combining the effect evaluation after image rotation correction to ensure that the coordinate axes are parallel to the image boundaries, thereby improving the accuracy of subsequent data extraction. In the intelligent recognition step of tick lines and tick values, various optical character recognition technologies, such as deep learning models, can be combined to improve the accuracy of tick value recognition, especially when the tick value font is small or the background is complex. In the mapping relationship establishment step, more complex models, such as piecewise linear mapping or nonlinear function fitting, can be used to adapt to coordinate axes with non-uniform ticks, ensuring the accuracy and reliability of the mapping relationship. These optimization measures further improve the efficiency and accuracy of image preprocessing, providing a higher quality image foundation for subsequent dynamic grid construction and data extraction.
[0033] In some embodiments, the specific method for constructing the dynamic adaptive mesh in step S2 is as follows: The pixel distance between adjacent major tick marks on the image is used as the fixed step size of the initial grid. Traverse all grid cells in the initial grid one by one and calculate the proportion of foreground pixels in the characteristic curve within each grid cell; If the percentage is lower than a preset first threshold, the grid cell is determined to be a blank cell and is merged with the adjacent blank cells. If the area of the new block formed after merging grid cells exceeds a preset second threshold, merging in that direction is stopped, and the dynamic adaptive grid that tightly wraps the characteristic curve is finally formed. The first threshold is the critical proportion for determining whether a grid cell is a blank cell, and the first threshold is a parameter preset according to the pixel density of the characteristic curve. The second threshold is the critical area that limits the range of grid merging, and the second threshold is a parameter preset according to the distribution density of the characteristic curve.
[0034] It should be noted that when constructing the dynamic adaptive grid, the pixel distance between adjacent major tick marks on the image is used as the fixed step size of the initial grid. All grid cells in the initial grid are traversed one by one, and the proportion of foreground pixels of the characteristic curve within each grid cell is calculated. If this proportion is lower than a preset first threshold, the grid cell is determined to be a blank cell and merged with adjacent blank cells. If the area of the merged new block exceeds a preset second threshold, merging in that direction is stopped. This method can dynamically adjust the grid, tightly wrapping the characteristic curve, improving the accuracy and efficiency of data extraction. The first threshold is the critical proportion used to determine whether a grid cell is a blank cell, while the second threshold is the critical area limiting the range of grid merging. These two parameters are preset based on the pixel density and distribution density of the characteristic curve.
[0035] Specifically, the construction process of the dynamic adaptive grid is as follows: First, the pixel distance between adjacent major scale lines on the image is used as the fixed step size of the initial grid. This step ensures that the initial grid can uniformly cover the characteristic curve area. Next, all grid cells in the initial grid are traversed one by one, and the proportion of foreground pixels of the characteristic curve in each grid cell is calculated. Here, the proportion of foreground pixels of the characteristic curve refers to the ratio of the number of pixels belonging to the characteristic curve to the total number of pixels in the grid cell. If this proportion is lower than a preset first threshold, the grid cell is determined to be a blank cell. The first threshold is a parameter preset based on the pixel density of the characteristic curve, used to distinguish whether the grid cell contains the characteristic curve. Subsequently, blank cells are merged with adjacent blank cells to form a larger blank area. During the merging process, if the area of the newly formed block exceeds a preset second threshold, merging in that direction is stopped. The second threshold is a parameter preset based on the distribution density of the characteristic curve, used to limit the range of grid merging and prevent excessive merging from causing data loss. In this way, the final dynamic adaptive grid can tightly wrap the characteristic curve, improving the efficiency and accuracy of data extraction.
[0036] Preferably, parameter settings and processing steps can be further optimized during the construction of the dynamic adaptive mesh. For example, when calculating the proportion of foreground pixels on the characteristic curve, a more accurate image segmentation algorithm, such as edge detection or region growing methods, can be used to improve the accuracy of foreground pixel recognition. When determining whether a mesh cell is a blank cell, the first threshold can be dynamically adjusted based on the local features of the characteristic curve. For example, the first threshold can be lowered in areas where the characteristic curve is denser and raised in areas where it is sparser, to better adapt to characteristic curve distributions of different densities. When merging blank cells, directional judgment can be introduced, prioritizing the merging of blank cells perpendicular to the direction of the characteristic curve to reduce the impact on the shape of the characteristic curve.
[0037] Furthermore, the setting of the second threshold can be adaptively adjusted based on the overall distribution characteristics of the characteristic curves. For example, a suitable second threshold can be determined by analyzing the length-to-width ratio of the characteristic curves, thereby improving the flexibility and adaptability of mesh construction while ensuring data extraction accuracy. These optimization measures can further improve the efficiency and accuracy of dynamic adaptive mesh construction, providing a more accurate foundation for subsequent characteristic curve data extraction.
[0038] In some embodiments, in step S3, the method for calculating the actual physical quantity coordinates of the intersection point of the characteristic curve and the horizontal boundary of the grid cell is as follows: Let the intersection point be located at the upper or lower boundary of the grid cell, and its pixel ordinate be... Known; The x-coordinate of the pixel at the center of the foreground pixel interval of the positioning characteristic curve on the horizontal pixel line where the boundary lies is used as the intersection point. The initial estimate; Based on the mapping relationship, Convert to actual physical quantity coordinates ; Using the actual physical quantity values corresponding to the left and right boundaries of the grid cell on the horizontal axis And the x-coordinate of the pixels within this interval of the horizontal line where the intersection point is located. The coordinates of the actual physical quantities corresponding to the intersection points are calculated by linear interpolation. ; The calculation formula is as follows: ; in, This represents the ordinate of the horizontal boundary of the grid cell in the image pixel coordinate system. Let x be the x-coordinate of the intersection point in the image pixel coordinate system. Let be the ordinate of the intersection point in the actual physical quantity coordinate system. This represents the x-coordinate of the left boundary of the grid cell in the actual physical quantity coordinate system. This represents the x-coordinate of the right boundary of the grid cell in the actual physical quantity coordinate system. Let x be the x-coordinate of the intersection point in the actual physical quantity coordinate system. The x-coordinate of the left boundary pixel of the current grid cell. This is the x-coordinate of the right boundary pixel of the current grid cell.
[0039] Specifically, the calculation method for the actual physical quantity coordinates of the intersection point of the characteristic curve and the horizontal boundary of the grid cell is as follows: First, determine whether the intersection point is located on the upper or lower boundary of the grid cell, and its pixel ordinate is known. On the horizontal pixel line where this boundary is located, determine the initial estimate of the pixel abscissa of the intersection point by locating the center position of the foreground pixel interval of the characteristic curve. Here, the foreground pixel interval of the characteristic curve refers to the pixel range occupied by the characteristic curve on the horizontal boundary, and the center position is the geometric center of this range. Next, according to the established mapping relationship, the pixel ordinate is converted into actual physical quantity coordinates. Then, using the actual physical quantity values corresponding to the left and right boundaries of the grid cell on the horizontal axis, and the pixel abscissa of the horizontal line where the intersection point is located within this interval, the actual physical quantity abscissa of the intersection point is calculated by linear interpolation. Linear interpolation is a method of estimating unknown data points based on known data points using a linear function. It calculates the actual physical quantity abscissa of the intersection point using the known actual physical quantity values corresponding to the left and right boundaries of the grid cell on the horizontal axis, and the pixel abscissa of the horizontal line where the intersection point is located within this interval. This method can accurately convert image pixel coordinates into actual physical quantity coordinates, ensuring high precision in data extraction.
[0040] Specifically, for horizontal boundaries, the sub-pixel-level x-coordinate of the intersection point can be obtained by calculating the weighted average of the gray values of each pixel on the horizontal boundary. This involves multiplying the gray value of each pixel by its x-coordinate, summing the results, and then dividing by the sum of the gray values of all pixels on the boundary. This method can more accurately locate the intersection point and reduce accuracy loss due to pixel quantization errors. In the interpolation calculation process, higher-order interpolation methods, such as spline interpolation or bilinear interpolation, can be considered to further improve the accuracy of coordinate transformation, especially when the characteristic curve changes are complex. These optimization measures can further improve the accuracy and reliability of data extraction, ensuring that the output data truly reflects the operating characteristic curve of the turbine.
[0041] In some embodiments, in step S3, the method for calculating the actual physical quantity coordinates of the intersection point of the characteristic curve and the vertical boundary of the mesh cell is as follows: Let the intersection point be located at the left or right boundary of the grid cell, and its pixel x-coordinate be... Known; The vertical pixel coordinate of the intersection point is the center position of the foreground pixel interval of the positioning characteristic curve on the vertical pixel line where the boundary is located. The initial estimate; Based on the mapping relationship, Convert to actual physical quantity coordinates ; Using the actual physical quantity values corresponding to the upper and lower boundaries of the grid cell on the vertical axis And the pixel ordinate of the vertical line where the intersection point is located within this interval. The coordinates of the actual physical quantities corresponding to the intersection points are calculated by linear interpolation. ; The calculation formula is as follows: ; in, y_pixel represents the x-coordinate of the vertical boundary of the grid cell in the image pixel coordinate system, and y_pixel represents the y-coordinate of the intersection point in the image pixel coordinate system. Let x be the x-coordinate of the intersection point in the actual physical quantity coordinate system. This represents the ordinate of the lower boundary of the grid cell in the actual physical quantity coordinate system. This represents the ordinate of the upper boundary of the grid cell in the actual physical quantity coordinate system. Let be the ordinate of the intersection point in the actual physical quantity coordinate system. This represents the pixel ordinate of the lower boundary of the current grid cell. This represents the pixel ordinate of the upper boundary of the current grid cell.
[0042] Specifically, the calculation method for the actual physical coordinate values of the intersection point of the characteristic curve and the vertical boundary of the grid cell is as follows: First, determine whether the intersection point is located on the left or right boundary of the grid cell, and its pixel abscissa is known. On the vertical pixel line where this boundary lies, determine the initial estimated value of the pixel ordinate of the intersection point by locating the center position of the foreground pixel interval of the characteristic curve. Here, the foreground pixel interval of the characteristic curve refers to the pixel range occupied by the characteristic curve on the vertical boundary, and the center position is the geometric center of this range.
[0043] Next, based on the established mapping relationship, the pixel x-coordinates are converted into actual physical quantity coordinates. Then, using the actual physical quantity values corresponding to the upper and lower boundaries of the grid cell on the y-axis, and the pixel y-coordinates of the vertical line where the intersection point is located within this interval, the actual physical quantity y-coordinates corresponding to the intersection point are calculated through linear interpolation. Linear interpolation is a method for estimating unknown data points based on known data points using a linear function. It calculates the actual physical quantity y-coordinates of the intersection point using the known actual physical quantity values corresponding to the upper and lower boundaries of the grid cell on the y-axis, and the pixel y-coordinates of the vertical line where the intersection point is located within this interval. This method can accurately convert image pixel coordinates into actual physical quantity coordinates, ensuring high accuracy in data extraction.
[0044] For vertical boundaries, the sub-pixel-level ordinate of the intersection point can be obtained by calculating the weighted average of the gray values of each pixel on the vertical boundary. This involves multiplying the gray value of each pixel by its ordinate, summing the results, and then dividing by the sum of the gray values of all pixels on that boundary. This method can more accurately locate the intersection point and reduce accuracy loss due to pixel quantization errors. In the interpolation calculation process, higher-order interpolation methods, such as spline interpolation or bilinear interpolation, can be considered to further improve the accuracy of coordinate transformation, especially when the characteristic curve changes are complex. These optimization measures can further improve the accuracy and reliability of data extraction, ensuring that the output data truly reflects the operating characteristic curve of the turbine.
[0045] In some embodiments, the center position of the foreground pixel range of the positioning characteristic curve is located with sub-pixel accuracy using the gray-scale centroid method, and the calculation formula is as follows: For horizontal boundaries, ; For vertical boundaries, ; in, The x-coordinate index of the pixel on the pixel line where the horizontal boundary lies. This is the y-coordinate index of the pixel on the pixel line where the vertical boundary lies. coordinates The grayscale value of the pixel at that location. The sub-pixel level x-coordinate of the intersection point on the horizontal boundary. The sub-pixel level ordinate of the intersection point on the vertical boundary. This represents the ordinate of the horizontal boundary of the grid cell in the image pixel coordinate system. This represents the x-coordinate of the vertical boundary of the grid cell in the image pixel coordinate system.
[0046] Specifically, the gray-scale centroid method is an algorithm that determines the sub-pixel-level coordinates of intersection points by calculating the gray-scale centroids of pixel intervals. For horizontal boundaries, the gray-scale value of each pixel on the horizontal boundary is first obtained. Then, the sum of the products of each pixel's gray-scale value and its x-coordinate is calculated and divided by the sum of the gray-scale values of all pixels on that boundary to obtain the sub-pixel-level x-coordinate of the intersection point. For vertical boundaries, the sum of the products of each pixel's gray-scale value and its y-coordinate is calculated and divided by the sum of the gray-scale values of all pixels on that boundary to obtain the sub-pixel-level y-coordinate of the intersection point. This method, through weighted averaging, can accurately locate intersection points and reduce the accuracy loss caused by pixel quantization errors. Here, gray-scale value refers to the brightness value of each pixel in the image, usually between 0 and 255; weighted averaging means multiplying the gray-scale value of each pixel by its corresponding coordinate value, summing the results, and then dividing by the sum of the gray-scale values of all pixels to obtain more accurate coordinate values.
[0047] In some embodiments, the data reconstruction in step S4 specifically involves: taking one end of the characteristic curve as the starting point, calculating the Euclidean distance between all data points and that starting point, and sorting the data points in ascending order of distance to restore the true direction of the characteristic curve. The Euclidean distance is the straight-line distance between the data point and the starting point in the actual physical quantity coordinate system, and the formula for calculating the Euclidean distance is... X1 is the x-coordinate of the starting point in the actual physical quantity coordinate system, Y1 is the y-coordinate of the starting point in the actual physical quantity coordinate system, X2 is the x-coordinate of the data point in the actual physical quantity coordinate system, and Y2 is the y-coordinate of the data point in the actual physical quantity coordinate system.
[0048] The Euclidean distance calculation and sorting operations during data reconstruction are as follows: First, select one end of the characteristic curve as the starting point. This starting point can be either the left or right end of the characteristic curve, depending on the overall direction of the curve and the analysis requirements. Then, calculate the Euclidean distance between each data point and this starting point. The Euclidean distance is calculated based on the coordinate values of the data point and the starting point in the actual physical quantity coordinate system, and is achieved by calculating the straight-line distance between the two points.
[0049] For each data point, its Euclidean distance is calculated by taking the square root of the sum of the squares of the differences between that point and the starting point on the x and y axes. Then, based on the calculated Euclidean distances, all data points are sorted to ensure that the order of the data points matches the actual trend of the characteristic curve. This method effectively restores the shape and trend of the characteristic curve, improving the accuracy and reliability of data reconstruction.
[0050] In some embodiments, density-based clustering is used to remove outlier data points caused by misjudgment of grid boundaries before sorting.
[0051] Effective identification and removal of outlier data before sorting improves data accuracy and reliability. Density clustering is a clustering algorithm based on the density distribution of data points, distinguishing normal data points from outliers by identifying local density. In this invention, this method is used to process characteristic curve data, ensuring that the order and distribution of data points accurately reflect the actual trend of the characteristic curve.
[0052] Specifically, first, a suitable density threshold is selected to distinguish between normal data points and outliers. The density threshold can be determined based on the distribution density of the data points, typically an empirical value, but can also be optimized through multiple experiments. Next, the local density of each data point is calculated; local density refers to the number of data points within a certain radius. If the local density of a data point is lower than the set density threshold, it is considered an outlier. Then, these outliers are removed from the dataset, retaining the normal data points for subsequent sorting and reconstruction. This method effectively reduces the impact of outliers caused by grid boundary misjudgments or image noise on the final result.
[0053] In some embodiments, in step S1, if the coordinate axis is identified as having a non-uniform scale when establishing the mapping relationship, the mapping relationship is established by using a piecewise linear mapping or non-linear function fitting method.
[0054] This invention employs piecewise linear mapping or nonlinear function fitting to establish the mapping relationship. This method effectively addresses the problem of uneven coordinate axis scales, ensuring accurate conversion between image pixel coordinates and actual physical quantity coordinates. Uneven scales refer to inconsistent intervals between scale marks on the coordinate axes, which is common in practical applications, especially when the coordinate axes have undergone special processing or the data range varies significantly. Piecewise linear mapping or nonlinear function fitting can more accurately reflect this unevenness, thereby improving the accuracy of data extraction.
[0055] Specifically, piecewise linear mapping involves dividing the coordinate axis into multiple intervals, with each interval using a linear function to approximate the mapping relationship. This method is suitable for non-uniform scales where the scale changes relatively regularly. Nonlinear function fitting, on the other hand, involves selecting an appropriate nonlinear function, such as a polynomial, exponential, or logarithmic function, to fit the mapping relationship across the entire coordinate axis. This method is suitable for cases with more complex scale changes.
[0056] In practical applications, an appropriate mapping method can be selected based on the specific scale distribution of the coordinate axes. For example, if the scale changes drastically in certain intervals, a nonlinear function can be used for fitting; while in intervals where the scale changes more gradually, piecewise linear mapping can be used. In this way, the conversion between image pixel coordinates and actual physical quantity coordinates can be ensured to be accurate throughout the entire coordinate axis range.
[0057] Preferably, the process of establishing the mapping relationship can be further optimized for piecewise linear mapping and nonlinear function fitting. For example, in piecewise linear mapping, the division points of each interval can be determined by automated algorithms, based on the rate of scale change. In nonlinear function fitting, the parameters of the fitting function can be determined by least squares or other optimization algorithms to ensure that the fitting function approximates the actual mapping relationship as closely as possible.
[0058] In some embodiments, the output structured data file is a CSV file or a JSON file, and its data point sequence contains both pixel coordinates and actual physical quantity coordinates. The pixel coordinates are the horizontal and vertical coordinates of the data points in the image pixel coordinate system, and the actual physical quantity coordinates are the horizontal and vertical coordinates of the data points in the actual physical quantity coordinate system.
[0059] It should be noted that, in the data output stage, this invention outputs the extracted data point sequence in the form of a structured data file, specifically either a CSV or JSON file format. CSV is a common text file format, separating data items with commas, facilitating data exchange and processing between different software. JSON is a lightweight data exchange format, easy to read and write, and also easy for machines to parse and generate. The data point sequence contains both pixel coordinates and actual physical coordinates. Pixel coordinates represent the position of the data point in the image pixel coordinate system, while actual physical coordinates are mapped and transformed coordinate values representing the position of the data point in the actual physical coordinate system. This output method facilitates subsequent data analysis and application, improving data usability and flexibility.
[0060] Specifically, in CSV file format, each row represents a data point, and the columns represent the pixel x-coordinate, pixel y-coordinate, actual physical quantity x-coordinate, and actual physical quantity y-coordinate, respectively. JSON file format stores data in key-value pairs, where the key is the coordinate type (pixel coordinate or actual physical quantity coordinate), and the value is a list of the corresponding coordinate values. When outputting data, you can choose the appropriate file format based on your actual needs. For example, if further analysis is required in spreadsheet software, you can choose CSV format; if data processing is required in a programming environment, you can choose JSON format. In addition, the output data file can also include metadata such as data source, extraction time, and coordinate system information to help users better understand and use the data.
[0061] Preferably, when outputting structured data files, the organization and storage of the data can be further optimized. For example, in a CSV file, a header row can be added to clarify the meaning of each column, making it easier for users to quickly understand the data structure. In a JSON file, nested structures can be used to organize the data, storing the pixel coordinates and actual physical coordinates of each data point as separate objects, and then storing these objects in an array. This can more clearly represent the hierarchical relationship of the data.
[0062] Furthermore, the output data can be compressed or encrypted to reduce file size and protect data security. During data output, a user-friendly interface or command-line tool can be provided, allowing users to select the output file format, path, and name, improving the flexibility and convenience of data output. These optimizations further enhance the quality and usability of data output, meeting the needs of diverse users.
[0063] The above description is merely an explanation of some preferred embodiments of the present invention and the technical principles employed. Those skilled in the art should understand that the scope of the invention as described in the embodiments of the present invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. A method for extracting operating characteristic curve data of a water turbine, characterized in that, Includes the following steps: S1. Image preprocessing and coordinate system benchmark establishment: Obtain the original image of the turbine operating characteristic curve, and perform noise reduction and enhancement processing on the original image to obtain an optimized image; Identify and locate the two coordinate axes of the coordinate system from the optimized image, and establish the mapping relationship between the image pixel coordinate system and the actual physical quantity coordinate system; S2. Dynamic Mesh Construction: Based on the identified coordinate axes and with the main scale lines as a reference, an initial mesh is constructed within the characteristic curve region of the optimized image. The existence of characteristic curves within each grid cell of the initial grid is detected, and blank grid cells without characteristic curves are merged to form a dynamic adaptive grid. Forming the dynamic adaptive grid includes: using the pixel distance between adjacent major scale lines on the image as the fixed step size of the initial grid; traversing all grid cells in the initial grid one by one, calculating the proportion of foreground pixels of the characteristic curve within each grid cell; if the proportion is lower than a preset first threshold, the grid cell is determined to be a blank cell and merged with adjacent blank cells; if the area of the new block formed after merging the grid cells exceeds a preset second threshold, merging in that direction is stopped, ultimately forming the dynamic adaptive grid that tightly wraps the characteristic curve. The first threshold is the critical proportion for determining whether a grid cell is a blank cell, and is a parameter preset based on the pixel density of the characteristic curve; the second threshold is the critical area limiting the range of grid merging, and is a parameter preset based on the distribution density of the characteristic curve. S3, Subpixel-level Intersection Coordinate Analysis: Traverse each non-blank grid cell of the dynamic adaptive grid to accurately locate the intersection points of the characteristic curve and each boundary of the current grid cell; based on the mapping relationship, use an interpolation algorithm to calculate the actual physical quantity coordinate values corresponding to the intersection points; S4. Data Reconstruction and Output: Sort the actual physical quantity coordinate values corresponding to all the intersection points according to the direction of the characteristic curve, reconstruct the complete data sequence, and output it as a structured data file.
2. The method for extracting operating characteristic curve data of a water turbine according to claim 1, characterized in that, The image preprocessing and coordinate system benchmark establishment in step S1 specifically include: S101. Background Separation and Noise Suppression: The original image after grayscale conversion is binarized using global thresholding based on the OTSU algorithm or adaptive thresholding based on local pixel brightness to separate the foreground of the characteristic curve from the background of the coordinate grid; morphological opening operation is used to process the binary image to eliminate discrete noise points. S102, Coordinate Axis Orientation Recognition: Apply Radon transform or Hough transform to detect the binarized image and find the direction with the most concentrated energy to determine the tilt angle θ of the coordinate axis; perform rotation correction on the image according to the tilt angle θ to make the coordinate axis parallel to the image boundary, where θ is the angle between the coordinate axis and the horizontal or vertical boundary of the image, and θ is a parameter describing the degree of tilt of the coordinate axis. S103, Intelligent Recognition of Scale Lines and Scale Values: Project pixels along the calibrated coordinate axis direction and locate the scale lines by finding the projection peaks; use optical character recognition technology to recognize the numerical text next to the scale lines; establish a mapping model from pixel position to scale value; S104. Establishing the mapping relationship: Based on the located origin pixel position, scale value, and corresponding pixel position, calculate the linear scaling ratio and offset between the image pixel coordinate system and the actual physical quantity coordinate system to complete the establishment of the mapping relationship.
3. The method for extracting turbine operating characteristic curve data according to claim 1, characterized in that, In step S3, the method for calculating the actual physical quantity coordinates of the intersection point of the characteristic curve and the horizontal boundary of the grid cell is as follows: Let the intersection point be located at the upper or lower boundary of the grid cell, and its pixel ordinate be... Known; The x-coordinate of the pixel at the center of the foreground pixel interval of the positioning characteristic curve on the horizontal pixel line where the boundary lies is used as the intersection point. The initial estimate; Based on the mapping relationship, Convert to actual physical quantity coordinates ; Using the actual physical quantity values corresponding to the left and right boundaries of the grid cell on the horizontal axis And the x-coordinate of the pixels within this interval of the horizontal line where the intersection point is located. The coordinates of the actual physical quantities corresponding to the intersection points are calculated by linear interpolation. ; The calculation formula is as follows: ; in, This represents the ordinate of the horizontal boundary of the grid cell in the image pixel coordinate system. Let x be the x-coordinate of the intersection point in the image pixel coordinate system. Let be the ordinate of the intersection point in the actual physical quantity coordinate system. This represents the x-coordinate of the left boundary of the grid cell in the actual physical quantity coordinate system. This represents the x-coordinate of the right boundary of the grid cell in the actual physical quantity coordinate system. Let x be the x-coordinate of the intersection point in the actual physical quantity coordinate system. The x-coordinate of the left boundary pixel of the current grid cell. This is the x-coordinate of the right boundary pixel of the current grid cell.
4. The method for extracting operating characteristic curve data of a water turbine according to claim 1, characterized in that, In step S3, the method for calculating the actual physical quantity coordinates of the intersection point of the characteristic curve and the vertical boundary of the mesh element is as follows: Let the intersection point be located at the left or right boundary of the grid cell, and its pixel x-coordinate be... Known; The vertical pixel coordinate of the intersection point is the center position of the foreground pixel interval of the positioning characteristic curve on the vertical pixel line where the boundary is located. The initial estimate; Based on the mapping relationship, Convert to actual physical quantity coordinates ; Using the actual physical quantity values corresponding to the upper and lower boundaries of the grid cell on the vertical axis And the pixel ordinate of the vertical line where the intersection point is located within this interval. The coordinates of the actual physical quantities corresponding to the intersection points are calculated by linear interpolation. ; The calculation formula is as follows: ; in, y_x is the x-coordinate of the vertical boundary of the grid cell in the image pixel coordinate system, and y_pixel is the y-coordinate of the intersection point in the image pixel coordinate system. Let x be the x-coordinate of the intersection point in the actual physical quantity coordinate system. This represents the ordinate of the lower boundary of the grid cell in the actual physical quantity coordinate system. This represents the ordinate of the upper boundary of the grid cell in the actual physical quantity coordinate system. Let be the ordinate of the intersection point in the actual physical quantity coordinate system. The ordinate of the pixel at the lower boundary of the current grid cell. This represents the pixel ordinate of the upper boundary of the current grid cell.
5. The method for extracting turbine operating characteristic curve data according to claim 4, characterized in that, The center position of the foreground pixel interval of the positioning characteristic curve is located with sub-pixel accuracy using the gray-scale centroid method, and the calculation formula is as follows: For horizontal boundaries, ; For vertical boundaries, ; in, The x-coordinate index of the pixel on the pixel line where the horizontal boundary lies. This is the y-coordinate index of the pixel on the pixel line where the vertical boundary lies. coordinates The grayscale value of the pixel at that location. The sub-pixel level x-coordinate of the intersection point on the horizontal boundary. The sub-pixel level ordinate of the intersection point on the vertical boundary. This represents the ordinate of the horizontal boundary of the grid cell in the image pixel coordinate system. This represents the x-coordinate of the vertical boundary of the grid cell in the image pixel coordinate system.
6. The method for extracting operating characteristic curve data of a water turbine according to claim 1, characterized in that, The data reconstruction in step S4 specifically involves: taking one end of the characteristic curve as the starting point, calculating the Euclidean distance between all data points and that starting point, and sorting the data points in ascending order of distance to restore the true direction of the characteristic curve. Here, the Euclidean distance is the straight-line distance between the data point and the starting point in the actual physical quantity coordinate system, and the formula for calculating the Euclidean distance is... X1 is the x-coordinate of the starting point in the actual physical quantity coordinate system, Y1 is the y-coordinate of the starting point in the actual physical quantity coordinate system, X2 is the x-coordinate of the data point in the actual physical quantity coordinate system, and Y2 is the y-coordinate of the data point in the actual physical quantity coordinate system.
7. The method for extracting turbine operating characteristic curve data according to claim 6, characterized in that, Before sorting, density-based clustering is used to remove outlier data points caused by misjudgment of grid boundaries.
8. The method for extracting operating characteristic curve data of a water turbine according to claim 1, characterized in that, In step S1, if the coordinate axis is identified as having a non-uniform scale when establishing the mapping relationship, the mapping relationship is established by using a piecewise linear mapping or non-linear function fitting method.
9. The method for extracting operating characteristic curve data of a water turbine according to claim 1, characterized in that, The output structured data file is a CSV file or a JSON file, and its data point sequence contains both pixel coordinates and actual physical quantity coordinates. The pixel coordinates are the horizontal and vertical coordinates of the data points in the image pixel coordinate system, and the actual physical quantity coordinates are the horizontal and vertical coordinates of the data points in the actual physical quantity coordinate system.
Citation Information
Patent Citations
Curve data extraction method and device, computer equipment and storage medium
CN116152844A
Curve coordinate extraction method and device, electronic equipment and storage medium
CN119273932A
Productivity evaluation method and equipment for variable-frequency centrifugal pump and medium
CN120520798A