Hydro-generator stator hole positioning method and system

By using image processing based on the HSV color space and a similar triangle ranging algorithm, the problem of low positioning accuracy of turbine stator holes was solved, achieving efficient hole feature extraction and precise positioning, thus improving positioning accuracy and operational efficiency.

CN121190559BActive Publication Date: 2026-02-17NANCHANG INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511714251.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-17
Estimated Expiration
2045-11-21

AI Technical Summary

Technical Problem

Impurities tend to accumulate in the stator holes of water turbines during long-term operation, leading to decreased heat dissipation efficiency and deterioration of electromagnetic performance. Traditional positioning and cleaning methods are inefficient, inaccurate, and pose safety hazards.

Method used

An improved Retinex algorithm based on bilateral filtering in HSV color space is used to enhance the image of stator holes. Black pixels are extracted by setting an HSV threshold, a two-dimensional coordinate system is established for coordinate mapping, and quadrant analysis and similar triangle ranging algorithms are combined for accurate positioning.

Benefits of technology

It significantly improves the prominence of hole features, enables precise screening and accurate positioning of effective hole areas, improves positioning accuracy and operational efficiency, and provides reliable technical support for subsequent automated cleaning operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190559B_ABST
    Figure CN121190559B_ABST
Patent Text Reader

Abstract

The application discloses a kind of water turbine generator stator hole positioning method and system, belong to water turbine maintenance technical field.The method includes: acquisition stator hole image, using the improved Retinex algorithm of bilateral filter based on HSV color space is carried out image enhancement;By setting HSV threshold value, extract black pixel, establish two-dimensional coordinate system and filter non-target pixel;By quadrant analysis and coordinate average method, accurately position hole center pixel coordinate;In combination with similar triangle ranging algorithm and coordinate system transformation, calculate hole actual space coordinates.Realize the full-process automation from image recognition to space positioning, greatly improve the positioning accuracy and operation efficiency, provide reliable technical support for subsequent automatic cleaning operation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of water turbine stator cleaning, and particularly relates to a water turbine generator stator hole positioning method and system. BACKGROUND

[0002] As a core component of a hydroelectric power system, the operation stability and efficiency of a water turbine directly affect the power generation performance of a power station. The stator is a key component of the water turbine, and is usually designed with hole structures for ventilation, cooling or detection. However, during long-term operation, the stator holes are prone to accumulate dust, metal debris and other impurities, which leads to a decrease in heat dissipation efficiency, degradation of electromagnetic performance, and even causes partial discharge or insulation failure. In addition, the traditional manual positioning and cleaning method needs to accurately position the stator holes to complete the measurement, accessory installation and other operations. There are problems such as low efficiency, poor accuracy and great safety hazards. SUMMARY

[0003] The application provides a water turbine generator stator hole positioning method and system, which is used to solve the technical problem of low accuracy of positioning the stator holes.

[0004] In a first aspect, the application provides a water turbine generator stator hole positioning method, which comprises the following steps:

[0005] An image of the stator hole is collected, and the image is preprocessed, wherein the preprocessing includes intercepting an image region and applying a bilateral filter improved Retinex algorithm based on an HSV color space for image enhancement to highlight the hole features;

[0006] Based on the preprocessed image, the threshold range of hue, saturation and lightness in the HSV color space is set, black pixel points are extracted, and a composite image corresponding to the stator hole is generated;

[0007] A two-dimensional rectangular coordinate system is established with the center of the preprocessed image as the origin, the black pixel points in the composite image are mapped into the coordinate system, and each pixel point is given a coordinate;

[0008] The mapped black pixel points are filtered, the number of black pixel points in the y-axis direction is calculated, and a constraint condition is set to filter out non-target pixel points and retain the effective hole region;

[0009] Based on the filtered effective hole region, the hole center pixel coordinates are accurately positioned through quadrant analysis and coordinate averaging method;

[0010] The obtained hole center pixel coordinates are calculated through a similar triangle ranging algorithm and coordinate system transformation, and the actual spatial coordinates of the hole are calculated, wherein the similar triangle ranging algorithm considers the influence of the camera attitude angle pitch.

[0011] In a second aspect, the present application provides a hydro-generator stator hole positioning system, comprising:

[0012] a preprocessing module configured to collect images of the stator holes and pre-process the images, wherein the preprocessing includes image region interception and image enhancement by applying a bilateral filter improved Retinex algorithm based on an HSV color space to highlight hole features;

[0013] a generation module configured to generate a composite image corresponding to the stator holes by setting threshold ranges of hue, saturation and lightness in the HSV color space, extracting black pixel points and generating the composite image based on the pre-processed images;

[0014] a mapping module configured to establish a two-dimensional rectangular coordinate system with the center of the pre-processed image as the origin, map the black pixel points in the composite image to the coordinate system and assign coordinates to each pixel point;

[0015] a filtering module configured to filter the mapped black pixel points, filter out non-target pixel points and retain effective hole regions by calculating the number of black pixel points in the y-axis direction and setting a constraint condition;

[0016] a positioning module configured to accurately position the hole center pixel coordinates by quadrant analysis and coordinate averaging method based on the filtered effective hole regions;

[0017] a calculation module configured to calculate the actual spatial coordinates of the holes by similar triangle ranging algorithm and coordinate system transformation based on the obtained hole center pixel coordinates, wherein the similar triangle ranging algorithm takes into account the influence of the camera pitch angle.

[0018] In a third aspect, an electronic device is provided, comprising at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the hydro-generator stator hole positioning method of any one of the embodiments of the present application.

[0019] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the program instructions are executed by a processor to enable the processor to perform the steps of the hydro-generator stator hole positioning method of any one of the embodiments of the present application.

[0020] The water turbine generator stator hole positioning method and system of the application, through adopting the bilateral filter improved Retinex algorithm based on the HSV color space to enhance the stator hole image, effectively overcomes the recognition difficulties under the complex working conditions such as insufficient light and low image definition, and significantly improves the highlighting effect of the hole features; through setting the HSV threshold to extract the black pixel points, and establishing a two-dimensional coordinate system for coordinate mapping, combined with the y-axis direction pixel point quantity statistics and constraint condition filtering, the non-target pixel interference can be accurately excluded, and the accurate screening of the effective hole area is realized; further through the quadrant analysis and coordinate average method, the hole center pixel coordinates are accurately positioned, and the positioning deviation problem under the different situations that the origin falls inside or outside the hole is effectively solved; finally, combined with the similar triangle ranging algorithm considering the camera attitude angle and the multi-coordinate system transformation, the pixel coordinates are converted into actual space coordinates, the whole process automation from image recognition to space positioning is realized, the positioning precision and operation efficiency are greatly improved, and reliable technical support is provided for the subsequent automatic cleaning operation. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0022] Figure 1 A flow chart of a water turbine generator stator hole positioning method provided by an embodiment of the present application;

[0023] Figure 2 A structural block diagram of a water turbine generator stator hole positioning system provided by an embodiment of the present application;

[0024] Figure 3 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0026] Please refer to Figure 1 which shows a flow chart of a water turbine generator stator hole positioning method of the present application.

[0027] As Figure 1 shown, the water turbine generator stator hole positioning method specifically includes the following steps:

[0028] Step S101, collect the image of the stator hole, and pretreat the image, wherein the pretreatment includes intercepting the image region and applying the bilateral filter improved Retinex algorithm based on the HSV color space for image enhancement to highlight the hole features.

[0029] In this step, the intercepted image is a region with a width of and a height of , and an initial image is obtained, wherein the intercepting formula is:

[0030] ,

[0031] ,

[0032] In the formula, , are the initial points of the initial image in the horizontal and vertical directions on the imported image respectively, , are the width and height of the imported image respectively, , are the terminal points of the initial image in the horizontal and vertical directions on the imported image respectively;

[0033] Convert the intercepted initial image to double-precision floating point format, and the expression is:

[0034] ,

[0035] In the formula, is the converted double-precision floating point value, with a value range of 0-1, is the low-precision pixel value of the initial image stored in the position and channel in 8-bit binary, is the high-precision pixel value of the initial image stored in the position and channel in 16-bit binary;

[0036] Apply bilateral filtering to calculate the illumination component of the initial image, and obtain the reflection component through the Retinex algorithm. Specifically, in the Retinex algorithm, the initial image is modeled as:

[0037] ,

[0038] In the formula, is the observed image, is the reflection component, is the illumination component;

[0039] The bilateral filtering is adopted to obtain the illumination component of the initial image, specifically including:

[0040] The spatial weight and the value range weight are calculated, and the expression is:

[0041] ,

[0042] ,

[0043] wherein, is the spatial weight, is the value range weight, , is the spatial standard deviation and the value range standard deviation respectively, is the center pixel position of the current to-be-filtered, is the position of the neighborhood pixel in the current filter window, is the brightness value of the center pixel, is the brightness value of the neighborhood pixel;

[0044] The normalization factor is calculated, and the expression is:

[0045] ,

[0046] In the formula, indicates a neighborhood window with the position of the neighborhood pixel in the current filter window as the center;

[0047] The bilateral filtering filtered illumination component is determined according to the spatial weight, the value range weight and the normalization factor , and the expression is:

[0048] ,

[0049] The reflection component is obtained by subtracting the illumination component, and the reflection component of the initial image is calculated by exponential transformation, and the expression is:

[0050] .

[0051] The processed reflection component and the adjusted brightness channel are combined in the HSV color space, and the preprocessed image is output by converting back to the RGB space. Specifically, the RGB is converted into the HSV color space, and the conversion formula is:

[0052] ,

[0053] ,

[0054] ,

[0055] wherein, is the saturation, is the hue, is the lightness, is the maximum value of the normalized color channel value of R, G, B, is the minimum value of the normalized color channel value of R, G, B;

[0056] After the conversion is completed, the luminance component is processed in the logarithmic domain by the following formula:

[0057] ,

[0058] wherein, is the pixel value of the luminance component of the converted image, is the pixel value of the luminance component of the initial image, is a small constant.

[0059] The processed pixel value is subjected to Gamma correction to adjust the luminance dynamic range, enhance dark details, and multiply the reflection component with the Gamma-corrected luminance component to obtain an enhanced luminance component ;

[0060] ,

[0061] wherein, is the pixel value after Gamma correction.

[0062] The enhanced HSV space is transformed, and the expression is:

[0063] ,

[0064] wherein, is the output result converted back to the RGB space, is a built-in function for converting the HSV color space back to the RGB color space;

[0065] The output result converted back to the RGB space is output to obtain the preprocessed image.

[0066] In step S102, based on the preprocessed image, the threshold range of the hue, saturation and lightness in the HSV color space is set to extract black pixel points and generate a composite image corresponding to the stator hole.

[0067] In this step, the hue (H), saturation (S) and lightness (V) range is set to achieve, since the color of the extracted hole is black, only the lightness needs to be set, in order to improve the recognition accuracy, the set range needs to be relaxed, therefore the extracted pixel points are , is the coordinate of the extracted black pixel point, is the lightness component in the HSV color space. All pixel points are converted into row, column matrix in the above enhanced HSV space, and the matrix coordinates of the black pixel points are obtained by linear indexing:

[0068] ,

[0069] wherein, , are the row and column coordinates of the black pixel point, is the linear index.

[0070] Step S103, a two-dimensional rectangular coordinate system is established with the center of the pre-processed image as the origin, the black pixel points in the composite image are mapped into the coordinate system, and each pixel point is assigned a coordinate.

[0071] In this step, the pixels of the pre-processed image are taken as a reference and the center is taken as the origin, the horizontal direction is set as the x-axis and the vertical direction is set as the y-axis, and a two-dimensional rectangular coordinate system is obtained, wherein the expression of the two-dimensional rectangular coordinate system is:

[0072] ,

[0073] ,

[0074] wherein, , are the initial horizontal and vertical coordinates of the pixels of the pre-processed image, , are the newly established horizontal and vertical coordinates;

[0075] The image coordinates of the black pixel points are converted into the coordinates in the two-dimensional rectangular coordinate system.

[0076] Step S104, the mapped black pixel points are filtered, the non-target pixel points are filtered out and the effective hole region is reserved by calculating the number of black pixel points in the y-axis direction and setting a constraint condition.

[0077] In this step, a set is established with the matrix coordinates of the black pixel points, is the number of pixel points, is the coordinate of the black pixel point:

[0078] The total sum of the number of black pixel points in the y-axis direction is calculated , indicates that if the condition is met, 1 is output, otherwise 0 is output, For subset.

[0079] Set constraints, filter out the pixel points that do not meet the constraints, and only keep the pixel points corresponding to the effective hole , To keep the coordinates of black pixel points, The y-axis coordinates of the retained black pixel points, wherein the expression of the constraint condition is:

[0080] ,

[0081] ,

[0082] In the formula, The set of longitudinal coordinates of black pixel points, The longitudinal coordinate of the tth black pixel point, The set of longitudinal coordinates of black pixel points on each column that are greater than The longitudinal coordinate of the tth black pixel point, The constraint threshold set up to filter out non-target black pixel points.

[0083] Step S105, based on the filtered effective hole region, accurately locate the hole center pixel coordinates through quadrant analysis and coordinate average method.

[0084] In this step, a set is established in the four quadrants of the two-dimensional rectangular coordinate system, the pixel point closest to the origin in each quadrant is extracted, and the modulus value is calculated;

[0085] According to the modulus value, it is judged whether the origin falls on the hole or not:

[0086] If the origin does not fall on the hole, calculate the height and width of the hole, and find the hole center closest to the origin to get the hole center pixel coordinates;

[0087] If the origin falls on the hole, correct the coordinates through quadrant analysis, and take the average value of the black pixel point coordinates in the rectangular range as the hole center to get the hole center pixel coordinates.

[0088] Specifically, a set is established in the four quadrants of the two-dimensional coordinate system , , , , in , , , , the pixel points closest to the origin in the first to fourth quadrants are extracted respectively by the formula , , , , and calculate its modulus if , it is determined that the origin is not on the hole. Then , the height of the hole is found:

[0089] ,

[0090] where, is the number of holes in the vertical direction; the set of the horizontal coordinates is , is , the number of all extracted black pixel points in the x-axis direction is summed , and the width of the hole is found:

[0091] ,

[0092] where, is the number of holes in the vertical direction. Then the coordinates of the minimum value in are . The center position of the hole closest to the origin is obtained by the following formula:

[0093] ,

[0094] where, is the coordinate of the pixel closest to the origin, is the coordinate of the center position of the located hole.

[0095] Otherwise, it is determined that the origin is on the hole. At this time, the relationship between the origin and the center position of the hole is determined, and the set is created. The set of four quadrants , , , is established. On , , , , the pixel closest to the origin in the first to fourth quadrants is extracted by the formula , , , , , and its modulus is calculated . If and , it is determined that the origin is located in the upper right of the midpoint; if and , it is determined that the origin is located in the upper left of the midpoint; if and , it is determined that the origin is located in the upper left of the midpoint; if​ and If the origin is located to the upper right of the midpoint, then the origin is determined to be located at the midpoint; otherwise, the origin is determined to be located at the midpoint. The corrected coordinates are then obtained using the following formula. :

[0096] ,

[0097] Obtain the corrected point Then, using that point as the midpoint, the height is... Width Establish a set of black pixels within a rectangular area .

[0098] For all pixels within the set , Calculate the average value of the coordinates:

[0099] ,

[0100] ,

[0101] In the formula, This represents the number of all pixels within the set. (The result is...) The midpoint of the hole.

[0102] Step S106: The obtained center pixel coordinates of the hole are used to calculate the actual spatial coordinates of the hole through a similar triangle ranging algorithm and coordinate system transformation. The similar triangle ranging algorithm takes into account the influence of the camera attitude angle pitch.

[0103] In this step, the extracted hole coordinates are used to obtain the actual coordinates of the hole using a similar triangle ranging algorithm. This algorithm takes into account the influence of the camera attitude angle pitch on the ranging, and the formula is as follows:

[0104] ,

[0105] ,

[0106] ,

[0107] ,

[0108] In the formula, For camera pose angle and Optical axis and Angle between optical axes the sum of The optical axis is from the ground Point and imaging plane The optical axis formed by connecting the dots The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane. The optical axis is the line connecting the ground point and the point on the imaging plane.

[0109] The coordinates of a point in the pixel coordinate system are , and the coordinates in the image coordinate system are , which satisfy the relationship:

[0110] ,

[0111] In the formula, is the horizontal coordinate of the principal point in the pixel coordinate system, is the vertical coordinate of the principal point in the pixel coordinate system.

[0112] The actual physical size of a single pixel in the and directions is represented by and . The relationship is expressed in homogeneous coordinates as:

[0113] ,

[0114] The relationship between the image coordinate system and the camera coordinate system is a perspective projection transformation. In the camera coordinate system, the coordinates of a point are , and in the image coordinate system, the coordinates are , , which are the focal length of the camera. The relationship expression between them is:

[0115] ,

[0116] The conversion to matrix expression is:

[0117] ,

[0118] The camera coordinate system and the world coordinate system are both three-dimensional coordinate systems, and the transformation between them is a rigid body transformation, denoted as is a rotation matrix in the rigid body transformation, is a translation vector. The following relationship is satisfied:

[0119]

[0120] The transformation relationship from the two-dimensional image pixel point coordinate to the three-dimensional space point coordinate can be obtained:

[0121]

[0122] wherein is the scale factor in the horizontal axis direction of the image, is the scale factor in the vertical axis direction of the image; is an internal parameter matrix composed of parameters such as the focal length and the principal point (optical center point) of the camera; is mainly composed of a rotation matrix and a translation vector. It is an external parameter matrix of the camera, which determines the position and attitude of the camera in the world coordinate system.

[0123] In summary, the method of the present application improves the Retinex algorithm by using the bilateral filtering based on the HSV color space to enhance the stator hole image, effectively overcoming the recognition difficulties under complex working conditions such as insufficient illumination and low image clarity, and significantly improving the highlighting effect of the hole features; by setting the HSV threshold to extract black pixel points and establishing a two-dimensional coordinate system for coordinate mapping, combined with the number statistics of the pixel points in the y-axis direction and the constraint condition filtering, non-target pixel interference can be accurately excluded, and accurate screening of the effective hole area is realized; further through quadrant analysis and coordinate averaging method, the hole center pixel coordinates are accurately positioned, effectively solving the positioning deviation problem under different situations that the origin falls inside or outside the hole; finally, combined with the similar triangle ranging algorithm considering the camera attitude angle and the multi-coordinate system transformation, the pixel coordinates are converted into actual space coordinates, realizing the full-process automation from image recognition to spatial positioning, greatly improving the positioning accuracy and operation efficiency, and providing reliable technical support for subsequent automatic cleaning operation.

[0124] Referring to Figure 2 , a structural block diagram of a stator hole positioning system of a hydro-generator is shown.

[0125] As Figure 2 ​​​​​​As shown, the water turbine generator stator hole positioning system 200 comprises a preprocessing module 210, a generation module 220, a mapping module 230, a filtering module 240, a positioning module 250 and a calculation module 260.

[0126] The preprocessing module 210 is configured to collect an image of the stator hole and pre-process the image, wherein the pre-processing includes intercepting an image region and applying a bilateral filter improved Retinex algorithm based on an HSV color space for image enhancement to highlight the hole features; the generation module 220 is configured to extract black pixel points by setting a threshold range of hue, saturation and lightness in the HSV color space based on the pre-processed image, and generate a composite image corresponding to the stator hole; the mapping module 230 is configured to establish a two-dimensional rectangular coordinate system with the center of the pre-processed image as the origin, map the black pixel points in the composite image to the coordinate system, and assign coordinates to each pixel point; the filtering module 240 is configured to filter the mapped black pixel points, filter out non-target pixel points by calculating the number of black pixel points in the y-axis direction and setting a constraint condition, and retain the effective hole region; the positioning module 250 is configured to accurately position the hole center pixel coordinates based on the filtered effective hole region through quadrant analysis and coordinate averaging method; and the calculation module 260 is configured to calculate the actual spatial coordinates of the hole by similar triangle ranging algorithm and coordinate system transformation, wherein the similar triangle ranging algorithm considers the influence of the camera attitude angle pitch.

[0127] It should be understood that Figure 2 the modules described in the above Figure 1 correspond to the respective steps in the method described in the above Figure 2 The operations and features described above for the method also apply to the modules in the above

[0128] In some other embodiments, the present application also provides a computer readable storage medium having stored thereon a computer program, the program instructions being executed by a processor to cause the processor to execute the water turbine generator stator hole positioning method in any of the above method embodiments.

[0129] As an implementation form, the computer readable storage medium of the present application stores computer executable instructions, and the computer executable instructions are configured to:

[0130] collect an image of the stator hole and pre-process the image, wherein the pre-processing includes intercepting an image region and applying a bilateral filter improved Retinex algorithm based on an HSV color space for image enhancement to highlight the hole features;

[0131] Based on the preprocessed image, black pixels are extracted by setting the threshold range of hue, saturation and brightness in the HSV color space to generate a composite image corresponding to the stator hole.

[0132] A two-dimensional rectangular coordinate system is established with the center of the preprocessed image as the origin. The black pixels in the synthesized image are mapped to the coordinate system, and each pixel is assigned coordinates.

[0133] The mapped black pixels are filtered by calculating the number of black pixels in the y-axis direction and setting constraints to filter out non-target pixels and retain the effective hole area.

[0134] Based on the filtered effective hole region, the coordinates of the hole center pixel are accurately located by quadrant analysis and coordinate averaging methods.

[0135] The obtained center pixel coordinates of the hole are used to calculate the actual spatial coordinates of the hole through a similar triangle ranging algorithm and coordinate system transformation. The similar triangle ranging algorithm takes into account the influence of the camera attitude angle pitch.

[0136] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the hydro-generator stator hole positioning system, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely disposed relative to a processor, which can be connected to the hydro-generator stator hole positioning system via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0137] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3The bus connection is taken as an example. The memory 320 is the computer readable storage medium described above. The processor 310 performs various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, implements the method embodiment of the hydro-generator stator hole positioning method described above. The input device 330 can receive input digital or character information and generate key signal input related to user settings and function control of the hydro-generator stator hole positioning system. The output device 340 can include a display device such as a display screen.

[0138] The electronic device described above can execute the method provided by the embodiment of the application, and has the corresponding function modules and beneficial effects of executing the method. Technical details not described in detail in the embodiment can be referred to the method provided by the embodiment of the application.

[0139] As an implementation, the electronic device described above is applied to a hydro-generator stator hole positioning system, and is used for a client and includes at least one processor and a memory in communication connection with the at least one processor. The memory stores instructions executable by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to:

[0140] An image of the stator hole is collected, and the image is preprocessed. The preprocessing includes intercepting an image region and applying a bilateral filter improved Retinex algorithm based on an HSV color space for image enhancement to highlight hole features.

[0141] Based on the preprocessed image, a threshold range of hue, saturation and lightness in the HSV color space is set, black pixel points are extracted, and a composite image corresponding to the stator hole is generated.

[0142] A two-dimensional rectangular coordinate system is established with the center of the preprocessed image as the origin, the black pixel points in the composite image are mapped into the coordinate system, and each pixel point is assigned a coordinate.

[0143] The mapped black pixel points are filtered. The number of black pixel points in the y-axis direction is calculated, a constraint condition is set, non-target pixel points are filtered out, and an effective hole region is retained.

[0144] Based on the filtered effective hole region, the hole center pixel coordinates are accurately positioned through quadrant analysis and coordinate averaging method.

[0145] The obtained hole center pixel coordinates are calculated through a similar triangle ranging algorithm and coordinate system transformation, and the actual spatial coordinates of the hole are calculated. The similar triangle ranging algorithm takes into account the influence of the camera attitude angle pitch.

[0146] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and necessary general hardware platforms through the description of the above embodiments, and of course, the implementation can also be through hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of each embodiment or some parts of the embodiment.

[0147] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some technical features thereof; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for locating stator holes in a hydro-generator, characterized in that, include: Images of stator holes are acquired and preprocessed. The preprocessing includes cropping image regions and applying a bilateral filtering Retinex algorithm based on the HSV color space for image enhancement to highlight hole features. The image preprocessing includes: Crop the image to the width ,high The initial image is obtained by cropping the region, where the cropping formula is: , , In the formula, , These are the initial points of the initial image in the horizontal and vertical directions on the imported image, respectively. , These are the width and height of the imported image, respectively. , These represent the horizontal and vertical endpoints of the initial image on the imported image, respectively. The initial image after cropping is converted to double-precision floating-point format using the following expression: , In the formula, The converted double-precision floating-point value ranges from 0 to 1. For the initial image at position and channels It stores low-precision pixel values ​​in 8-bit binary format. For the initial image at position and channels It stores 16-bit binary high-precision pixel values; The illumination component of the initial image is calculated using bilateral filtering, and the reflection component is obtained using the Retinex algorithm. In the HSV color space, the luminance component is processed in the logarithmic domain and corrected for Gamma. The processed reflection component is combined with the adjusted luminance channel and converted back to the RGB space to obtain the preprocessed image. Based on the preprocessed image, black pixels are extracted by setting the threshold range of hue, saturation and brightness in the HSV color space to generate a composite image corresponding to the stator hole. A two-dimensional rectangular coordinate system is established with the center of the preprocessed image as the origin. The black pixels in the synthesized image are mapped to the coordinate system, and each pixel is assigned coordinates. The mapped black pixels are filtered by calculating the number of black pixels in the y-axis direction and setting constraints to filter out non-target pixels and retain the effective hole area. Based on the filtered effective hole region, the coordinates of the hole center pixel are accurately located by quadrant analysis and coordinate averaging methods. The obtained center pixel coordinates of the hole are used to calculate the actual spatial coordinates of the hole through a similar triangle ranging algorithm and coordinate system transformation. The similar triangle ranging algorithm takes into account the influence of the camera attitude angle pitch.

2. The method for locating stator holes in a hydro-generator according to claim 1, characterized in that, The application of bilateral filtering to calculate the illumination component of the initial image and obtaining the reflection component using the Retinex algorithm includes: In the Retinex algorithm, the initial image is modeled as follows: , In the formula, For the observed image, For the reflection component, For illumination components; The illumination components of the initial image are obtained using bilateral filtering, specifically including: The spatial weights and range weights are calculated using the following expressions: , , in, Spatial weights, For range weights, , These are the spatial standard deviation and the range standard deviation, respectively. This represents the position of the center pixel to be filtered. This represents the position of the neighboring pixels in the current filtering window. The brightness value of the center pixel. This represents the brightness value of the neighboring pixels; Calculate the normalization factor The expression is: , In the formula, This represents a neighborhood window centered on the positions of neighboring pixels in the current filter window; Based on spatial weight, range weight, and normalization factor The expression for determining the illumination components after bilateral filtering is: , The reflection component is obtained by subtracting the illumination component, and then the reflection component of the initial image is calculated by performing an exponential transform. The expression is: 。 3. The method for locating stator holes in a hydro-generator according to claim 2, characterized in that, The process of performing logarithmic domain processing and Gamma correction on the luminance component in the HSV color space, combining the processed reflection component with the adjusted luminance channel, and converting it back to the RGB color space to obtain the preprocessed image includes: The formula for converting RGB to HSV color space is: , , , In the formula, For saturation, For color tone, For brightness, The maximum value among the normalized color channel values ​​of R, G, and B. It is the minimum value among the normalized color channel values ​​of R, G, and B; After the conversion, the luminance component is processed in the numerical domain using the following formula: , In the formula, The luminance component pixel values ​​of the converted image. The pixel values ​​of the luminance component of the initial image. It is a tiny constant; The processed pixel values ​​are then subjected to Gamma correction to adjust the dynamic range of brightness and enhance shadow details. The reflection component is then multiplied by the Gamma-corrected brightness component to obtain the enhanced brightness component. ; , In the formula, These are the pixel values ​​after Gamma correction; The enhanced HSV space is transformed as follows: , In the formula, To convert the output back to RGB color space, This is a built-in function to convert the HSV color space back to the RGB color space. Convert the output back to RGB space and output the preprocessed image.

4. The method for locating stator holes in a hydro-generator according to claim 1, characterized in that, The step of establishing a two-dimensional rectangular coordinate system with the center of the preprocessed image as the origin, mapping the black pixels in the synthesized image to the coordinate system, and assigning coordinates to each pixel includes: Using the pixels of the preprocessed image as a reference and the center as the origin, a two-dimensional Cartesian coordinate system is obtained by setting the horizontal direction as the x-axis and the vertical direction as the y-axis. The expression for the two-dimensional Cartesian coordinate system is: , , In the formula, , These are the initial x and y coordinates of the pixels in the preprocessed image, respectively. , These are the newly established x and y coordinates, respectively; The image coordinates of the black pixels are converted to coordinates in the two-dimensional Cartesian coordinate system.

5. The method for locating stator holes in a hydro-generator according to claim 1, characterized in that, The process of filtering the mapped black pixels involves calculating the number of black pixels along the y-axis and setting constraints to filter out non-target pixels while retaining effective hole areas. This includes: Establish a set using the coordinates of the black pixel matrix ,in, The number of pixels. Coordinates of the black pixel: Calculate the total number of black pixels along the y-axis. , This means that if the condition is met, output 1; otherwise, output 0. for A subset of; Set constraints to filter out pixels that do not meet the constraints, and only keep pixels corresponding to valid holes. , To preserve the coordinates of black pixels, The y-axis coordinates of the retained black pixels are given, where the expression for the constraint condition is: , , In the formula, The set of ordinates of black pixels. Let be the y-coordinate of the t-th black pixel. For each column of black pixels, the value is greater than The set of ordinates, The constraint threshold set to filter out non-target black pixels.

6. The method for locating stator holes in a hydro-generator according to claim 1, characterized in that, The precise location of the center pixel coordinates of the holes based on the filtered effective hole region, using quadrant analysis and coordinate averaging methods, includes: Establish a set based on the four quadrants of the two-dimensional rectangular coordinate system, extract the pixel point closest to the origin in each quadrant and calculate the modulus value; Determine whether the origin falls on the hole based on the modulus value: If the origin does not fall on the hole, calculate the height and width of the hole, find the center of the hole closest to the origin, and obtain the pixel coordinates of the hole center. If the origin falls on the hole, the coordinates are corrected through quadrant analysis, and the average coordinates of the black pixels within the rectangular area are used as the center of the hole to obtain the center pixel coordinates of the hole.

7. A stator hole positioning system for a hydro-generator, characterized in that, include: The preprocessing module is configured to acquire images of stator holes and preprocess the images. The preprocessing includes cropping image regions and applying a bilateral filtering improved Retinex algorithm based on the HSV color space for image enhancement to highlight hole features. The image preprocessing includes: Crop the image to the width ,high The initial image is obtained by cropping the region, where the cropping formula is: , , In the formula, , These are the initial points of the initial image in the horizontal and vertical directions on the imported image, respectively. , These are the width and height of the imported image, respectively. , These represent the horizontal and vertical endpoints of the initial image on the imported image, respectively. The initial image after cropping is converted to double-precision floating-point format using the following expression: , In the formula, The converted double-precision floating-point value ranges from 0 to 1. For the initial image at position and channels It stores low-precision pixel values ​​in 8-bit binary format. For the initial image at position and channels It stores 16-bit binary high-precision pixel values; The illumination component of the initial image is calculated using bilateral filtering, and the reflection component is obtained using the Retinex algorithm. In the HSV color space, the luminance component is processed in the logarithmic domain and corrected for Gamma. The processed reflection component is combined with the adjusted luminance channel and converted back to the RGB space to obtain the preprocessed image. The generation module is configured to extract black pixels based on the preprocessed image by setting threshold ranges for hue, saturation, and brightness in the HSV color space, and generate a composite image corresponding to the stator holes. The mapping module is configured to establish a two-dimensional rectangular coordinate system with the center of the preprocessed image as the origin, and to map the black pixels in the synthesized image to the coordinate system, assigning coordinates to each pixel. The filtering module is configured to filter the mapped black pixels. By calculating the number of black pixels in the y-axis direction and setting constraints, it filters out non-target pixels and retains the effective hole area. The positioning module is configured to accurately locate the center pixel coordinates of holes based on the filtered effective hole area using quadrant analysis and coordinate averaging methods. The calculation module is configured to calculate the actual spatial coordinates of the hole by using a similar triangle ranging algorithm and coordinate system transformation to obtain the center pixel coordinates of the hole. The similar triangle ranging algorithm takes into account the influence of the camera attitude angle pitch.

8. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image enhancement method, image enhancement device, storage medium and electronic equipment

    CN117237225A

  • Image real-time filter processing method based on edge calculation

    CN120782664A