A method for detecting uneven wear of motor carbon brush holder
By constructing a preset neighborhood window and screening seed pixels, the problem of over-segmentation of the wear area caused by the region growing algorithm is solved, and the uneven wear degree of the motor carbon brush holder is accurately detected and the stable operation of the motor is ensured.
Patent Information
- Application Number
- CN202411084145.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-08-08
AI Technical Summary
When existing methods detect the uneven wear of the motor carbon brush holder, the random selection of seed pixels in the region growing algorithm can easily lead to over-segmentation of the wear area, which makes it impossible to accurately analyze the uneven wear of the carbon brush holder.
By constructing a preset neighborhood window for each pixel, the gradient distribution and gray value difference of the pixel are analyzed, suspected seed pixels are screened out, and accurate seed pixels are screened out according to the reasonableness of the location, and regional growth is performed to obtain Wear area, and finally obtain the wear unevenness of the carbon brush holder based on the gray value distribution.
It improves the accuracy of wear area division, ensures accurate analysis of the uneven wear of the carbon brush holder, and promptly replaces the carbon brush holder to ensure the stable operation of the motor.
Smart Images

Figure CN118608531B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of region segmentation, and in particular to a method for detecting wear imbalance of a motor carbon brush holder. Background Art
[0002] The motor carbon brush holder is an important component in the motor, mainly used to support the carbon brush and ensure good contact between the carbon brush and the commutator or slip ring. The carbon brush holder will wear out due to the continuous contact and sliding between the carbon brush and the commutator. Once the carbon brush holder wears unevenly, the contact between the carbon brush and the carbon brush holder is prone to uneven, which will cause unstable current transmission and affect the performance of the motor. Therefore, it is necessary to regularly analyze the wear of the carbon brush holder to avoid uneven wear of the carbon brush holder.
[0003] The existing method uses the region growing algorithm to obtain the wear area in the carbon brush holder image, and then analyzes the grayscale value in the wear area to determine whether the motor carbon brush holder has uneven wear. However, in actual situations, when the seed pixel points of the region growing algorithm are randomly selected, the wear area of the carbon brush holder will be over-segmented, resulting in inaccurate division of the wear area, and thus unable to analyze the uneven wear of the motor carbon brush holder. Summary of the invention
[0004] In order to solve the technical problem that when the seed pixel points of the region growing algorithm are randomly selected, the wear area of the carbon brush holder will be over-segmented, resulting in inaccurate division of the wear area, and thus the uneven wear of the motor carbon brush holder cannot be analyzed, the purpose of the present invention is to provide a method for detecting uneven wear of the motor carbon brush holder, and the technical scheme adopted is as follows:
[0005] An embodiment of the present invention provides a method for detecting uneven wear of a motor carbon brush holder, the method comprising the following steps:
[0006] Get the brush holder image of the motor;
[0007] Construct a preset neighborhood window for each pixel in the carbon brush holder image, and obtain the seed possibility degree of each pixel according to the gradient distribution of each neighboring pixel in the preset neighborhood window of each pixel and the gray value difference between each pixel and each neighboring pixel in its preset neighborhood window;
[0008] Based on the seed possibility degree, the suspected seed pixel points are screened out, and according to the position distribution of each suspected seed pixel point in the carbon brush holder image, the reasonableness of the position of each suspected seed pixel point is obtained;
[0009] The seed pixels are selected based on the reasonableness of the position; the seed pixels are grown by the region growing algorithm to obtain the wear area;
[0010] The uneven wear degree of the carbon brush holder is obtained according to the distribution of gray values in each wear area.
[0011] Furthermore, the method for obtaining the seed possibility is:
[0012] According to the gradient distribution of each neighboring pixel point in a preset neighborhood window of each pixel point, the directional wear degree of each pixel point is obtained;
[0013] Obtain the significance of each pixel point according to the difference in grayscale value between each pixel point and each neighboring pixel point in its preset neighborhood window;
[0014] According to the directional wear degree and significance degree of each pixel point, the seed possibility degree of each pixel point is obtained; among which, the directional wear degree and significance degree are positively correlated with the seed possibility degree.
[0015] Furthermore, the method for obtaining the directional wear degree is:
[0016] For any pixel point in the carbon brush holder image, all neighboring pixel points within a preset neighborhood window of the pixel point are used as reference pixel points;
[0017] The angle formed by the gradient direction of each reference pixel and the wear direction of the carbon brush holder is used as the reference angle of the corresponding reference pixel;
[0018] Obtain the product of the gradient amplitude of each reference pixel and the cosine value of the reference angle as the gradient component of the corresponding reference pixel in the wear direction;
[0019] The result of accumulating and normalizing all gradient components is used as the directional wear degree value of the pixel point.
[0020] Furthermore, the method for obtaining the significance level is:
[0021] For any pixel point in the carbon brush holder image, obtain the gray value difference between the pixel point and each neighboring pixel point in the preset neighborhood window, all of which are taken as the first difference;
[0022] The result of normalizing the mean of the first difference is used as the significance value of the pixel point.
[0023] Furthermore, the method for obtaining the suspected seed pixel point is:
[0024] When the seed probability level meets the preset seed probability level range, the corresponding pixel point is regarded as a suspected seed pixel point.
[0025] Furthermore, the method for obtaining the rationality of the position is:
[0026] Obtaining the centroid of the carbon brush holder image, and obtaining a first distance reference degree of each suspected seed pixel point according to the distance between each suspected seed pixel point and the centroid;
[0027] Obtaining a second distance reference degree for each suspected seed pixel according to the distance between each suspected seed pixel and each other suspected seed pixel;
[0028] The reasonableness of the position of each suspected seed pixel is obtained according to the first distance reference degree and the second distance reference degree; wherein the first distance reference degree and the second distance reference degree are both positively correlated with the reasonableness of the position.
[0029] Furthermore, the method for acquiring the first distance reference degree is:
[0030] For any suspected seed pixel point, the reciprocal of the distance between the suspected seed pixel point and the centroid is obtained as the first distance reference value of the suspected seed pixel point.
[0031] Furthermore, the method for obtaining the second distance reference degree is:
[0032] For any suspected seed pixel point, obtain the distance between the suspected seed pixel point and each other suspected seed pixel point, and use them as the first distance;
[0033] The mean value of the first distance is used as the second distance reference value of the suspected seed pixel.
[0034] Furthermore, the method for obtaining the seed pixel point is:
[0035] Arrange the suspected seed pixel points in descending order according to the reasonableness of their positions to obtain a suspected seed pixel point sequence;
[0036] The first preset number of suspected seed pixel points in the suspected seed pixel point sequence are used as seed pixel points.
[0037] Furthermore, the method for obtaining the uneven degree of wear of the carbon brush holder is:
[0038] Obtain the average grayscale value of all pixels in each wear area as the reference grayscale value of each wear area;
[0039] According to the fluctuation of the reference gray value, the uneven wear reference value of the carbon brush holder is obtained;
[0040] The result of normalizing the wear imbalance reference value is taken as the wear imbalance degree of the carbon brush holder.
[0041] The present invention has the following beneficial effects:
[0042] Constructing a preset neighborhood window for each pixel in the carbon brush holder image and determining the pixels around each pixel is conducive to the subsequent analysis of the characteristics of each pixel, so as to accurately screen out the seed pixels of the regional production algorithm; then, according to the gradient distribution of each neighborhood pixel in the preset neighborhood window of each pixel, and the gray value difference between each pixel and each neighborhood pixel in its preset neighborhood window, the seed possibility degree of each pixel is obtained, which preliminarily reflects the possibility that each pixel can be used as a seed pixel; in order to improve the efficiency of obtaining seed pixels, the suspected seed pixels are screened out based on the seed possibility degree; further In the first step, according to the position distribution of each suspected seed pixel in the carbon brush holder image, the reasonableness of the position of each suspected seed pixel is obtained, which accurately reflects the degree to which each suspected seed pixel is a seed pixel, and then the seed pixels are accurately screened out based on the reasonableness of the position; the seed pixels are regionally grown through the regional growing algorithm to accurately obtain the wear area; in order to analyze the uneven wear of the carbon brush holder, the uneven wear degree of the carbon brush holder is accurately obtained according to the gray value distribution in each wear area, which accurately reflects the uneven wear of the carbon brush holder, which is conducive to timely replacement of the carbon brush holder and ensures stable and efficient operation of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A schematic flow chart of a method for detecting uneven wear of a motor carbon brush holder provided by an embodiment of the present invention;
[0045] Figure 2 A flow chart of a method for obtaining a possible degree of a seed provided by an embodiment of the present invention;
[0046] Figure 3 A flow chart of a method for obtaining a reasonableness of a position provided by an embodiment of the present invention;
[0047] Figure 4 A structural diagram of a motor carbon brush holder wear imbalance detection system provided by an embodiment of the present invention;
[0048] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method for detecting the uneven wear of the motor carbon brush holder proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0051] The specific scheme of the method for detecting the uneven wear of the motor carbon brush holder provided by the present invention is described in detail below with reference to the accompanying drawings.
[0052] Embodiment 1:
[0053] The specific scenario of this embodiment is: in actual situations, different wear areas may not have obvious boundaries in the carbon brush holder image. In order to segment different wear areas in the carbon brush holder image and accurately analyze the uneven wear of the carbon brush holder, this embodiment obtains the wear area in the carbon brush holder image through a regional growing algorithm. Among them, the selection of seed pixels in the regional growing algorithm is a key parameter affecting the wear area segmentation result. If the selection of seed pixels is inappropriate, it will lead to other unexpected situations such as over-segmentation of the wear area, resulting in inaccurate division of the wear area. Therefore, in order to obtain suitable seed pixels, this embodiment first analyzes the gradient and grayscale value of each pixel in the carbon brush holder image and its surrounding pixels, obtains the seed possibility of each pixel, and then screens out suspected seed pixels; in order to avoid over-segmentation of the wear area, further analyzes the position distribution of suspected seed pixels in the carbon brush holder image, obtains the reasonableness of the position of the suspected seed pixels, and then accurately screens out the seed pixels based on the reasonableness of the position and performs regional growth to accurately obtain the wear area; analyzes the fluctuation of the grayscale value distribution between the wear areas, and then accurately analyzes the uneven wear of the carbon brush holder. The region growing algorithm is a well-known calculation and will not be described in detail.
[0054] The present invention proposes a method for detecting the uneven wear of a motor carbon brush holder. Figure 1 , which shows a schematic flow chart of a method for detecting uneven wear of a motor carbon brush holder provided by an embodiment of the present invention, the method comprising the following steps:
[0055] Step S1: Acquire the carbon brush holder image of the motor.
[0056] The motor brush holder is an indispensable key component in the motor system. The brush holder is mainly responsible for supporting the carbon brushes and ensuring stable and reliable electrical contact between the carbon brushes and the commutator or slip ring of the motor. The role of the brush holder in the motor is particularly important, directly affecting the operating efficiency and reliability of the motor. The brush holder not only needs to withstand the mechanical pressure of the brushes during operation, but also needs to remain stable under various environmental conditions. Over time, the brush holder will gradually wear out due to friction. Due to the inconsistent contact pressure between the brush holder and the brush, the wear on the brush holder is uneven. When the motor is running, the unevenly worn brush holder will generate additional noise and vibration, affecting the stability of the motor, and may also cause the brushes to break or the commutator to be damaged, causing poor contact and unstable current transmission, and even causing motor failure. Therefore, regular inspection and maintenance of the brush holder is essential to maintain the long-term stable operation of the motor.
[0057] This embodiment uses an industrial camera to photograph the motor carbon brush holder to be inspected from above to obtain an image of the carbon brush holder. In actual situations, there may be noise interference in the carbon brush holder image obtained, which affects the wear analysis of the carbon brush holder. Therefore, this embodiment first denoises the carbon brush holder image through Gaussian filtering to obtain a denoised carbon brush holder image. At the same time, in order to accurately and efficiently analyze the wear of the carbon brush holder, the denoised carbon brush holder image is grayed to obtain a grayed carbon brush holder image. It should be noted that the subsequent carbon brush holder images are all grayed carbon brush holder images. Among them, Gaussian filtering and graying are both well-known technologies and will not be described in detail.
[0058] Step S2: construct a preset neighborhood window for each pixel in the carbon brush holder image, and obtain the seed possibility of each pixel according to the gradient distribution of each neighborhood pixel in the preset neighborhood window of each pixel and the grayscale value difference between each pixel and each neighborhood pixel in its preset neighborhood window.
[0059] Specifically, in order to accurately segment the wear area through the region growing algorithm, the present embodiment needs to accurately obtain the seed pixel points of the region growing algorithm in the carbon brush holder image. In actual situations, the seed pixel points should be at the edge of the wear area, so that different wear areas can be segmented to the greatest extent. Since the wear of the carbon brush holder is caused by friction, the wear is often more obvious along the direction of the carbon brush sliding. This is because the relative movement between the carbon brush and the contact surface of the carbon brush holder causes the wear to accumulate mainly along the direction of the carbon brush sliding. Therefore, the wear direction of the carbon brush holder is the direction of the carbon brush sliding. This directional wear pattern provides an intuitive method to identify potential seed pixel points, that is, the pixel points that show significant characteristic changes in the wear direction are more likely to be seed pixel points. Therefore, when the gradient component of the surrounding pixels of a certain pixel point in the wear direction is larger, it means that the pixel point is more likely to be in the wear area, and the pixel point is more likely to be a seed pixel point; at the same time, when the gray value difference between the pixel point and the surrounding pixels is larger, the pixel point is more likely to be an edge pixel point, further indicating that the pixel point is more likely to be a seed pixel point. In order to analyze the possibility that each pixel in the carbon brush holder image is a seed pixel, the present embodiment first constructs a preset neighborhood window for each pixel in the carbon brush holder image, wherein the method for constructing the preset neighborhood window is: taking each pixel in the carbon brush holder image as the center, constructing a preset neighborhood window for each pixel. The present embodiment sets the preset neighborhood window to 3×3. The implementer may set the size of the preset neighborhood window and the position of each pixel in the carbon brush holder image in the preset neighborhood window according to actual conditions, which are not limited here. It should be noted that for any boundary pixel in the carbon brush holder image, part of the preset neighborhood window of the boundary pixel is not in the carbon brush holder image. In order to obtain the grayscale value of the pixel in the part of the preset neighborhood window that is not in the carbon brush holder image, the grayscale value average of the pixel in the preset neighborhood window of the boundary pixel that is in the carbon brush holder image is obtained as the grayscale value of the pixel in the part of the preset neighborhood window that is not in the carbon brush holder image. Then, according to the gradient distribution of each neighboring pixel point in the preset neighborhood window of each pixel point, and the grayscale value difference between each pixel point and each neighboring pixel point in its preset neighborhood window, the seed possibility degree of each pixel point is obtained, wherein the greater the seed possibility degree, the more likely the corresponding pixel point is a seed pixel point.
[0060] Preferably, in some possible implementations of this embodiment, the method for obtaining the seed probability level can be found in Figure 2 , which shows a flow chart of a method for obtaining a possible degree of a seed provided by an embodiment of the present invention, the method comprising the following steps:
[0061] Step S201: Obtain the directional wear degree of each pixel point according to the gradient distribution of each neighborhood pixel point in a preset neighborhood window of each pixel point.
[0062] The seed pixel point must be in the wear area, so that the wear area can be grown through the seed pixel point area. It is known that the wear direction of the pixels in the wear area is consistent. Therefore, this embodiment analyzes the gradient component of the gradient amplitude of each neighborhood pixel point in the wear direction within the preset neighborhood window of each pixel point. When the gradient component of the gradient amplitude of the neighborhood pixel point of a certain pixel point in the wear direction is larger, it means that the pixels around the pixel point are more likely to be pixels in the wear area, which indirectly means that the pixel point is more likely to be in the wear area, and the pixel point is more suitable to be a seed pixel point. Therefore, this embodiment obtains the degree of directional wear of each pixel point according to the gradient distribution of each neighborhood pixel point in the preset neighborhood window of each pixel point. The greater the degree of directional wear, the greater the possibility that the corresponding pixel point is in the wear area, and the corresponding pixel point is more suitable to be a seed pixel point.
[0063] Preferably, in some possible implementations of this embodiment, the method for obtaining the degree of directional wear is as follows: for any pixel in the carbon brush holder image, the neighboring pixels within the preset neighborhood window of the pixel are all used as reference pixels; the angle formed by the gradient direction of each reference pixel and the wear direction of the carbon brush holder is used as the reference angle of the corresponding reference pixel, so as to subsequently accurately obtain the gradient component of the gradient amplitude of each reference pixel in the wear direction, and then obtain the product of the gradient amplitude of each reference pixel and the cosine value of the reference angle as the gradient component of the corresponding reference pixel in the wear direction. Wherein, the range of the reference angle is 0° to 180°. The larger the gradient component, the more significant the change of the corresponding reference pixel in the wear direction. When the changes of all reference pixels in the wear direction are more significant, it is indirectly indicated that the pixel is more likely to be a worn pixel. In order to more accurately illustrate the possibility that the pixel is a worn pixel, all gradient components are further accumulated and normalized as the result of the directional wear degree value of the pixel. The larger the directional wear degree value, the greater the possibility that the pixel is in the wear area, and the more suitable the pixel is to be a seed pixel. The calculation formula for the directional wear degree value is: ; In the formula, is the directional wear degree value of the kth pixel; N is the total number of pixels in the preset neighborhood window; is the gradient amplitude of the nth neighboring pixel point in the preset neighborhood window of the kth pixel point; is the reference angle of the nth neighboring pixel point within the preset neighborhood window of the kth pixel point; is the cosine value of the reference angle of the nth neighboring pixel point within the preset neighborhood window of the kth pixel point; is the gradient component of the nth neighboring pixel in the preset neighborhood window of the kth pixel in the wear direction; norm is the normalization function.
[0064] At this point, the directional wear degree value of each pixel in the carbon brush holder image is obtained.
[0065] Step S202: Obtain the prominence of each pixel point according to the gray value difference between each pixel point and each neighboring pixel point in its preset neighborhood window.
[0066] The more suitable the edge pixel points in the wear area are to become seed pixel points, the more likely it is that each wear area can be segmented. In the carbon brush holder image, there will be differences in the grayscale values between the wear area and the non-wear area, and between different wear areas. The grayscale values of the pixel points at the edge must be different from those of other surrounding pixels. Therefore, this embodiment obtains the significance of each pixel point based on the difference in grayscale values between each pixel point and each neighboring pixel point in its preset neighborhood window. The greater the significance, the more likely the corresponding pixel point is to be an edge pixel point, and the greater the possibility of becoming a seed pixel point.
[0067] Preferably, in some possible implementations of this embodiment, the method for obtaining the degree of significance is: for any pixel in the carbon brush holder image, the absolute value of the difference between the grayscale value of the pixel and each neighboring pixel in its preset neighborhood window is obtained, and all are taken as the first difference; in order to more accurately represent the possibility that the pixel is an edge pixel, the mean of the first difference is obtained and the result of normalization is taken as the degree of significance of the pixel. The larger the degree of significance, the greater the possibility that the pixel is an edge pixel, and the greater the possibility that the pixel is suitable to be a seed pixel. The calculation formula of the degree of significance is: ; In the formula, is the significance value of the kth pixel; N is the total number of pixels in the preset neighborhood window; is the gray value of the kth pixel; is the gray value of the nth neighboring pixel in the preset neighborhood window of the kth pixel; is the first difference; is the absolute value function; norm is the normalization function.
[0068] At this point, the significance value of each pixel in the carbon brush holder image is obtained.
[0069] Step S203: Obtain the seed possibility degree of each pixel point according to the directional wear degree and the prominence degree of each pixel point; wherein the directional wear degree and the prominence degree are both positively correlated with the seed possibility degree.
[0070] It is known that the larger the directional wear value is, the more likely the corresponding pixel is to be located in the wear area; the larger the significance value is, the more likely the corresponding pixel is to be an edge pixel. Therefore, the pixel with larger directional wear value and significance value is more likely to be a seed pixel. Then, according to the directional wear value and significance of each pixel, the seed possibility of each pixel is obtained; wherein, the directional wear value and significance are both positively correlated with the seed possibility. The larger the seed possibility, the more suitable the corresponding pixel is as a seed pixel. Considering that the seed pixel must be located in the wear area, therefore, in this embodiment, the directional wear value is taken as the power of an exponential function with a natural constant as the base, so as to amplify the directional wear value and increase the importance of the directional wear value. The implementer can amplify the directional wear value using different methods according to the actual situation, which is not limited here.
[0071] In order to accurately represent the possibility of each pixel being a seed pixel, this embodiment specifically quantifies the seed possibility degree into a seed possibility degree value. The larger the seed possibility degree value, the more likely the corresponding pixel is to be a seed pixel. The calculation formula of the seed possibility degree value is: ; In the formula, is the possible degree value of the seed of the kth pixel; e is a natural constant; is the directional wear degree value of the k-th pixel; is the significance value of the k-th pixel. and The addition result is obtained , which is not limited here.
[0072] At this point, the seed likelihood value of each pixel in the carbon brush holder image is obtained.
[0073] Step S3: Screening out suspected seed pixels based on the seed possibility degree, and obtaining the reasonableness of the position of each suspected seed pixel according to the position distribution of each suspected seed pixel in the carbon brush holder image.
[0074] Specifically, it is known that the greater the seed possibility, the more likely the corresponding pixel is to be a seed pixel. Therefore, this embodiment first screens out suspected seed pixels based on the seed possibility. In actual situations, when the seed pixels are more densely distributed in the carbon brush holder image, the wear area obtained by performing regional growth on the seed pixels through the region growing algorithm is more likely to be over-segmented, which is not conducive to accurate analysis of uneven wear of the carbon brush holder. In order to find suitable seed pixels, this embodiment further analyzes the position distribution of each suspected seed pixel. When the Euclidean distance between a suspected seed pixel and other suspected seed pixels is larger, the suspected seed pixel is more likely to divide the wear area to the maximum extent, and the suspected seed pixel is more suitable as a seed pixel. Among them, the method for obtaining the Euclidean distance is a well-known technology and will not be repeated. Considering that the degree of wear of the carbon brush holder is significantly correlated with the installation position of the carbon brush, that is, the closer the carbon brush holder area is to the carbon brush, the greater the contact pressure is, and the greater the degree of wear is. In order to more accurately identify and analyze the wear area, this embodiment obtains the position installation point of the carbon brush in the carbon brush holder image. It is known that the carbon brush holder as a whole can be regarded as a symmetrical structure, and the carbon brush is installed at the center of the carbon brush holder. Therefore, this embodiment obtains the centroid of the carbon brush holder image as the position installation point of the carbon brush in the carbon brush holder image. Among them, the method for obtaining the centroid is a well-known technology and will not be repeated. When a suspected seed pixel point is closer to the centroid, the suspected seed pixel point is more likely to be in the wear area, and the suspected seed pixel point is more likely to be a seed pixel point. Therefore, this embodiment obtains the reasonableness of the position of each suspected seed pixel point according to the position distribution of each suspected seed pixel point in the carbon brush holder image. The greater the reasonableness of the position, the more suitable the corresponding suspected seed pixel point is as a seed pixel point of the region growing algorithm.
[0075] Preferably, in some possible implementations of this embodiment, the method for obtaining the suspected seed pixel point is: first, the seed possibility value of each pixel point in the carbon brush holder image is normalized to obtain the normalized seed possibility value; when the normalized seed possibility value is greater than the preset seed possibility value threshold, the corresponding pixel point is used as the suspected seed pixel point. This embodiment sets the preset seed possibility value threshold to 0.6, and the implementer can set the size of the preset seed possibility value threshold according to the actual situation, which is not limited here.
[0076] Preferably, in some possible implementations of this embodiment, the method for obtaining the reasonableness of the position can be found in Figure 3 , which shows a flow chart of a method for obtaining a reasonable degree of a position provided by an embodiment of the present invention, the method comprising the following steps:
[0077] Step S301: obtaining the centroid of the carbon brush holder image, and obtaining a first distance reference degree of each suspected seed pixel point according to the distance between each suspected seed pixel point and the centroid.
[0078] The smaller the Euclidean distance between a suspected seed pixel and the centroid, the more suitable the suspected seed pixel is as a seed pixel. Therefore, this embodiment obtains the inverse of the Euclidean distance between each suspected seed pixel and the centroid as the first distance reference value of each suspected seed pixel; the larger the first distance reference value, the greater the possibility that the corresponding suspected seed pixel is in the wear area, and the more likely the corresponding suspected seed pixel is a seed pixel. It should be noted that when the Euclidean distance between a suspected seed pixel and the centroid is 0, the default first distance reference value is 0.
[0079] Step S302: acquiring a second distance reference degree of each suspected seed pixel according to the distance between each suspected seed pixel and each other suspected seed pixel.
[0080] The larger the second distance reference degree is, the more suitable the corresponding suspected seed pixel is for being used as a seed pixel of the region growing algorithm.
[0081] In some possible implementations of this embodiment, the method for obtaining the second distance reference degree is: for any suspected seed pixel point, the Euclidean distance between the suspected seed pixel point and each other suspected seed pixel point is obtained, and each is used as the first distance; when the first distance is larger, it means that the suspected seed pixel point is more isolated in the carbon brush holder image, and the wear area where the suspected seed pixel point is located is less likely to be over-segmented. In order to more accurately analyze the possibility that the suspected seed pixel point is a seed pixel point, the mean value of the first distance is obtained as the second distance reference degree value of the suspected seed pixel point. The larger the second distance reference degree value, the more likely the suspected seed pixel point is to completely divide the wear area where it is located, and the more likely the suspected seed pixel point is to be a seed pixel point of the region growing algorithm.
[0082] At this point, the second distance reference value of each suspected seed pixel is obtained.
[0083] Step S303: Obtaining the reasonableness of the position of each suspected seed pixel according to the first distance reference degree and the second distance reference degree; wherein the first distance reference degree and the second distance reference degree are both positively correlated with the reasonableness of the position.
[0084] It is known that the greater the first distance reference degree, the greater the possibility that the corresponding suspected seed pixel is in the wear area, and the more likely the corresponding suspected seed pixel is a seed pixel. The greater the second distance reference degree, the more likely the corresponding suspected seed pixel will completely divide the wear area in which it is located, and the more likely the corresponding suspected seed pixel is a seed pixel of the region growing algorithm. Therefore, this embodiment obtains the reasonableness of the position of each suspected seed pixel according to the first distance reference degree and the second distance reference degree; wherein the first distance reference degree and the second distance reference degree are both positively correlated with the reasonableness of the position. The greater the reasonableness of the position, the more suitable the corresponding suspected seed pixel is as a seed pixel of the region growing algorithm.
[0085] In order to accurately indicate the reasonableness of the position of each suspected seed pixel as a seed pixel, this embodiment specifically quantifies the reasonableness of the position as a reasonableness value. The larger the reasonableness value of the position, the more suitable the corresponding suspected seed pixel is as a seed pixel of the region growing algorithm. The calculation formula of the reasonableness value of the position is: ; In the formula, is the reasonableness value of the position of the i-th suspected seed pixel; is the first distance reference value of the i-th suspected seed pixel; is the second distance reference value of the ith suspected seed pixel. In other embodiments, the reasonableness value of the position may be obtained by adding the first distance reference value to the second distance reference value, which is not limited here.
[0086] At this point, the reasonableness value of the position of each suspected seed pixel is obtained.
[0087] Step S4: selecting seed pixels based on the reasonableness of the positions; performing region growing on the seed pixels by using a region growing algorithm to obtain a wear region.
[0088] It is known that the greater the reasonableness of the position, the more suitable the corresponding suspected seed pixel point is as the seed pixel point of the region growing algorithm. Therefore, this embodiment selects the seed pixel points of the region growing algorithm based on the reasonableness of the position. In some possible implementations of this embodiment, the method for obtaining the seed pixel points is: arranging the suspected seed pixel points in order from high to low according to the reasonableness of the position, that is, arranging the suspected seed pixel points in order from large to small according to the reasonableness of the position value, to obtain a suspected seed pixel point sequence; the first preset number of suspected seed pixel points in the suspected seed pixel point sequence are used as seed pixel points. This embodiment sets the preset number to 10, and the implementer can set the size of the preset number according to the actual situation, which is not limited here. At this point, the seed pixel points in the carbon brush holder image are obtained.
[0089] The region growing algorithm is used to start with each seed pixel point and perform region growing respectively, wherein the similarity measure of the region growing algorithm is set to the gray value of the pixel point. The maximum pixel gray value distance is defined as 10 in this embodiment. The implementer can set the maximum pixel gray value distance according to the actual situation, which is not limited here. For any seed pixel point, when the absolute value of the difference between the gray value of the pixel point to be added and the average gray value of all the pixels in the segmented area corresponding to the seed pixel point is less than or equal to the maximum pixel gray value distance, the pixel point is added to the segmented area. Otherwise, the region growing algorithm stops, and the wear area segmented by the seed pixel point through the region growing algorithm is accurately obtained.
[0090] At this point, the wear area segmented by the region growing algorithm for each seed pixel is obtained.
[0091] Step S5: Obtain the uneven wear degree of the carbon brush holder according to the distribution of gray values in each wear area.
[0092] Specifically, the degree of wear between different wear areas may be different, wherein the degree of wear between different wear areas is different, which is reflected in the gray value difference between different wear areas. Therefore, the greater the gray value difference between different wear areas, the greater the uneven wear of the carbon brush holder. Therefore, this embodiment obtains the uneven wear of the carbon brush holder according to the distribution of gray values in each wear area. The greater the uneven wear of the carbon brush holder, the greater the difference in the degree of wear of different wear areas of the carbon brush holder, and the more timely the carbon brush holder should be replaced to avoid causing motor failure.
[0093] Preferably, in some possible implementations of this embodiment, the method for obtaining the uneven wear of the carbon brush holder is: obtaining the grayscale value mean of all pixels in each wear area as the reference grayscale value of each wear area; accurately reflecting the distribution of grayscale values in each wear area through the reference grayscale value. Then, according to the fluctuation of the reference grayscale value, obtain the uneven wear reference value of the carbon brush holder; in order to better analyze the uneven wear of the carbon brush holder in the future, the result of normalizing the uneven wear reference value is used as the uneven wear of the carbon brush holder. Among them, the calculation formula of the uneven wear of the carbon brush holder is: ; In the formula, is the uneven wear degree of the carbon brush holder; W is the number of wear areas; is the reference gray value of the w-th wear area; is the mean of the reference grayscale values of all worn areas; is the absolute value function; norm is the normalization function.
[0094] In this embodiment, the preset carbon brush holder wear imbalance threshold is set to 0.5. The implementer can set the preset carbon brush holder wear imbalance threshold according to the actual situation, and it is not limited here. When the carbon brush holder wear imbalance is greater than the preset carbon brush holder wear imbalance threshold, it means that the wear degree of each wear area is very different, and the carbon brush holder should be replaced in time to avoid motor failure.
[0095] So far, the present invention is complete.
[0096] In summary, the present embodiment obtains the carbon brush holder image; obtains the seed possibility degree of each pixel point according to the gradient distribution of each neighboring pixel point in the preset neighborhood window of each pixel point, and the gray value difference between each pixel point and each neighboring pixel point in its preset neighborhood window, and then screens out the suspected seed pixel points; obtains the reasonableness of the position according to the position distribution of the suspected seed pixel points in the carbon brush holder image, and then screens out the seed pixel points; performs regional growth on the seed pixel points through the regional growing algorithm to obtain the wear area; obtains the uneven wear degree of the carbon brush holder according to the gray value distribution in the wear area. The present invention determines the seed pixel points, and then accurately obtains the wear area through the regional growing algorithm, so as to accurately analyze the uneven wear of the carbon brush holder.
[0097] Embodiment 2:
[0098] The present invention also proposes a motor carbon brush holder wear imbalance detection system, please refer to Figure 4 , which shows a structural diagram of a motor carbon brush holder wear imbalance detection system provided by an embodiment of the present invention, the system includes: an acquisition module 10, a seed possibility degree acquisition module 20, a position rationality degree acquisition module 30, a wear area acquisition module 40 and a carbon brush holder wear imbalance acquisition module 50.
[0099] The acquisition module 10 is used to acquire the image of the carbon brush holder of the motor.
[0100] The seed possibility degree acquisition module 20 is used to construct a preset neighborhood window for each pixel in the carbon brush holder image, and obtain the seed possibility degree of each pixel according to the gradient distribution of each neighborhood pixel in the preset neighborhood window of each pixel, and the gray value difference between each pixel and each neighborhood pixel in its preset neighborhood window.
[0101] The position rationality acquisition module 30 is used to screen out suspected seed pixels based on the seed possibility degree, and acquire the position rationality of each suspected seed pixel according to the position distribution of each suspected seed pixel in the carbon brush holder image.
[0102] The wear region acquisition module 40 is used to select seed pixel points based on the reasonableness of the position; perform region growth on the seed pixel points through a region growing algorithm to obtain the wear region.
[0103] The carbon brush holder wear unevenness acquisition module 50 is used to acquire the carbon brush holder wear unevenness according to the gray value distribution in each wear area.
[0104] It should be noted that: the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the motor carbon brush holder wear imbalance detection system and the motor carbon brush holder wear imbalance detection method embodiment provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0105] Embodiment 3:
[0106] The present invention also proposes a motor carbon brush holder wear imbalance detection device, the device includes a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a motor carbon brush holder wear imbalance detection method provided in the embodiment of the present application. The device can be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a motor carbon brush holder wear imbalance detection method provided in the above embodiment.
[0107] In addition, the present application embodiment also protects a computer device, see Figure 5 The computer device includes a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402, wherein when the processor 402 executes the computer program 403, the computer device can execute any of the motor carbon brush holder wear imbalance detection methods introduced above.
[0108] Embodiment 4:
[0109] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement a method for detecting uneven wear of a motor carbon brush holder provided in the above embodiment.
[0110] Embodiment 5:
[0111] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement a method for detecting uneven wear of a motor carbon brush holder provided in the above embodiment.
[0112] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0113] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0114] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for detecting uneven wear of a motor carbon brush holder, characterized in that: The method comprises the following steps: Get the brush holder image of the motor; Construct a preset neighborhood window for each pixel in the carbon brush holder image, and obtain the seed possibility degree of each pixel according to the gradient distribution of each neighboring pixel in the preset neighborhood window of each pixel and the gray value difference between each pixel and each neighboring pixel in its preset neighborhood window; Based on the seed possibility degree, the suspected seed pixel points are screened out, and according to the position distribution of each suspected seed pixel point in the carbon brush holder image, the reasonableness of the position of each suspected seed pixel point is obtained; The seed pixels are selected based on the reasonableness of the position; the seed pixels are grown by the region growing algorithm to obtain the wear area; The uneven wear degree of the carbon brush holder is obtained according to the distribution of gray values in each wear area.
2. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 1, characterized in that: The method for obtaining the seed possibility is: According to the gradient distribution of each neighboring pixel point in a preset neighborhood window of each pixel point, the directional wear degree of each pixel point is obtained; Obtain the significance of each pixel point according to the difference in grayscale value between each pixel point and each neighboring pixel point in its preset neighborhood window; According to the directional wear degree and significance degree of each pixel point, the seed possibility degree of each pixel point is obtained; among which, the directional wear degree and significance degree are positively correlated with the seed possibility degree.
3. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 2, characterized in that: The method for obtaining the degree of directional wear is: For any pixel point in the carbon brush holder image, all neighboring pixel points within a preset neighborhood window of the pixel point are used as reference pixel points; The angle formed by the gradient direction of each reference pixel and the wear direction of the carbon brush holder is used as the reference angle of the corresponding reference pixel; Obtain the product of the gradient amplitude of each reference pixel and the cosine value of the reference angle as the gradient component of the corresponding reference pixel in the wear direction; The result of accumulating and normalizing all gradient components is used as the directional wear degree value of the pixel point.
4. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 2, characterized in that: The method for obtaining the significance level is: For any pixel point in the carbon brush holder image, obtain the gray value difference between the pixel point and each neighboring pixel point in the preset neighborhood window, all of which are taken as the first difference; The result of normalizing the mean of the first difference is used as the significance value of the pixel point.
5. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 1, characterized in that: The method for obtaining the suspected seed pixel point is: When the seed probability level meets the preset seed probability level range, the corresponding pixel point is regarded as a suspected seed pixel point.
6. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 1, characterized in that: The method for obtaining the rationality of the position is: Obtaining the centroid of the carbon brush holder image, and obtaining a first distance reference degree of each suspected seed pixel point according to the distance between each suspected seed pixel point and the centroid; Obtaining a second distance reference degree for each suspected seed pixel according to the distance between each suspected seed pixel and each other suspected seed pixel; The reasonableness of the position of each suspected seed pixel is obtained according to the first distance reference degree and the second distance reference degree; wherein the first distance reference degree and the second distance reference degree are both positively correlated with the reasonableness of the position.
7. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 6, characterized in that: The method for obtaining the first distance reference degree is: For any suspected seed pixel point, the reciprocal of the distance between the suspected seed pixel point and the centroid is obtained as the first distance reference value of the suspected seed pixel point.
8. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 6, characterized in that: The method for obtaining the second distance reference degree is: For any suspected seed pixel point, obtain the distance between the suspected seed pixel point and each other suspected seed pixel point, and use them as the first distance; The mean value of the first distance is used as the second distance reference value of the suspected seed pixel.
9. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 1, characterized in that: The method for obtaining the seed pixel point is: Arrange the suspected seed pixel points in descending order according to the reasonableness of their positions to obtain a suspected seed pixel point sequence; The first preset number of suspected seed pixel points in the suspected seed pixel point sequence are used as seed pixel points.
10. A method for detecting uneven wear of a motor carbon brush holder as claimed in claim 1, characterized in that: The method for obtaining the uneven wear degree of the carbon brush holder is as follows: Obtain the average grayscale value of all pixels in each wear area as the reference grayscale value of each wear area; According to the fluctuation of the reference gray value, the uneven wear reference value of the carbon brush holder is obtained; The result of normalizing the wear imbalance reference value is taken as the wear imbalance degree of the carbon brush holder.
