A method for detecting vibration amplitude of a spinning high-speed spindle during rotation
By preprocessing and edge detection of the image of the high-speed rotating spindle, combined with the analysis of smear characteristics and motion direction, and adjusting the camera exposure time, the problem of the influence of smear superposition is solved, and the accurate detection of the vibration amplitude of the high-speed spindle is achieved.
Patent Information
- Application Number
- CN202210475326.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-04-29
AI Technical Summary
When the existing technology detects the vibration amplitude of a high-speed rotating spindle, the detection is inaccurate due to the influence of smear superposition.
By collecting spindle images, perform preprocessing and edge detection, calculate the similarity of pixel blocks, generate a weight matrix, use the matching template sliding window to match the smear area, adjust the camera exposure time until the weight difference is greater than or equal to the preset threshold, and update the smear area, calculate the length of the smear area to obtain the vibration amplitude.
The influence of smear superposition on vibration amplitude detection is eliminated, and the accuracy of vibration amplitude detection of high-speed spindles is improved.
Smart Images

Figure CN114923629B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to a method for detecting vibration amplitude when a textile high-speed spindle rotates. Background Art
[0002] For rotating bodies, if there is static or dynamic imbalance, periodic or random unbalanced forces will be generated, causing vibration and radiating noise. In addition, there are other factors that can also cause high-speed rotating spindles to vibrate. Therefore, when producing spindles, the stability of the spindles at high speed, that is, the vibration amplitude caused by high-speed rotation, is an important indicator to describe the quality of the spindles.
[0003] At present, a common method for detecting spindles is to use a camera to capture images of the spindles as they rotate and perform a simple analysis of the image smear. Due to the fast rotation rate of the spindles, the vibration amplitude of the spindles obtained by this method will be affected by the superposition of smears, which will lead to inaccurate detection of the vibration amplitude. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method for detecting the vibration amplitude of a textile high-speed spindle during rotation. The technical solution adopted is as follows:
[0005] Collecting an ingot image, and preprocessing the ingot image to obtain an ingot region;
[0006] Based on the spindle area, the edge of the spindle is obtained by using an edge detection algorithm; the spindle is divided according to the edge, and pixel blocks on both sides of the edge are obtained according to the division, and the similarity of the pixel blocks on both sides is calculated to determine whether to expand the size of the pixel blocks to obtain the pixel block size; the obtained pixel block size and the gray value matrix corresponding to the pixel block are jointly analyzed according to the smear characteristics and the movement direction to obtain a weight matrix; according to the obtained pixel block size, the image on the right side of the image edge is matched using a matching template; based on the weight matrix and the matching template, the subsequent pixel blocks are matched by a sliding window to determine whether the subsequent pixel blocks are the smear part to obtain the smear area;
[0007] Adjusting the exposure time of the camera according to the trend of the weight difference of each pixel block in the smear area until the weight difference is greater than or equal to a preset difference threshold, and updating the smear area;
[0008] According to the length of the smear area, the vibration amplitude of the spindle is obtained.
[0009] Preferably, the similarity between the pixel blocks on both sides is calculated as follows:
[0010] The calculation formula of the similarity of the pixel blocks on both sides is:
[0011]
[0012] Wherein, Q is the similarity of the pixel blocks on both sides; N is the length and width of the pixel block, g (i,j) is the gray value at the position with length i and width j in any pixel block; h (i,j) is the grayscale value at the corresponding length i and width j in another pixel block.
[0013] Preferably, the sliding window matches the subsequent pixel blocks based on the weight matrix and the matching template, and determines whether the subsequent pixel blocks are the smear part, including:
[0014] According to the obtained weight matrix and matching template, the pixel block size is used as the size of the sliding window and the step length is the pixel block width. The subsequent pixel blocks are matched to determine whether the subsequent pixel blocks are the smear part.
[0015] Preferably, the sliding window matches the subsequent pixel blocks based on the weight matrix and the matching template to determine whether the subsequent pixel blocks are the smear part, and further includes:
[0016] The grayscale value of the pixel block at the position of the sliding window when the sliding window is stationary is obtained according to the position of the sliding window to obtain a first image; the two first images are fitted by using weights to obtain a second image, and the similarity between the second image and the grayscale value of the window part at this time is calculated to determine whether the window is a smear part;
[0017] The method for fitting the two first images is as follows:
[0018]
[0019] Among them, P (i,j) is the gray value of the pixel (i, j) in any first image, O (i,j) is the gray value of the pixel (i, j) in the second image, W i is the weight of the i-th column of the image pixel block; T is the fitted image.
[0020] Preferably, the determining whether the subsequent pixel block is a smear portion to obtain the smear area includes:
[0021] When template matching starts from the edge of the main body of the image, the weight matrix obtained at each match is calculated. When any matching weight in the weight matrix is less than the preset weight threshold, the matching is stopped and all the pixel block areas obtained are the smear areas.
[0022] Preferably, the weight difference is calculated as follows:
[0023] According to the obtained smear area, the weight of each match is obtained, and the average weight of each match is calculated;
[0024]
[0025] Among them, ω is the average weight of the i-th pixel block, N is the length and width of the pixel block; W i is the weight of the i-th column in the pixel block;
[0026] The calculation formula of the weight difference is:
[0027]
[0028] Where b is the weight difference, ω i is the average weight of the i-th pixel block; ω i+1 is the average weight of the i+1th pixel block, and m is the number of pixel blocks in the smear area.
[0029] Preferably, obtaining the vibration amplitude of the spindle according to the length of the smear area includes:
[0030] The product of the number of pixel blocks in the smear area and the width of the pixel block is the length of the smear area; the distance from the edge of the spindle to the center line of the spindle is calculated; the sum of the length of the smear area and the distance is the vibration amplitude of the spindle.
[0031] Preferably, the collecting of the spindle image and preprocessing of the spindle image to obtain the spindle region includes:
[0032] The ingot region containing the ingot in the ingot image is segmented out through semantic segmentation to obtain the ingot region.
[0033] The embodiments of the present invention have at least the following beneficial effects:
[0034] The embodiment of the present invention utilizes data processing technology, and the method is a method for applying electronic equipment for identification, and uses the artificial intelligence system in the production field to complete the acquisition of the vibration amplitude of the high-speed spindle. The specific method first collects the spindle image, pre-processes the spindle image to obtain the spindle area; based on the spindle area, the edge of the spindle is obtained using the edge detection algorithm; the spindle is divided according to the edge, and the pixel blocks on both sides of the edge are obtained according to the division, and the similarity of the pixel blocks on both sides is calculated to determine whether to expand the size of the pixel block; the obtained pixel block size, the corresponding gray value matrix of the pixel block and the smear feature and the direction of movement are jointly analyzed to obtain the weight matrix; according to the size of the obtained pixel block, the image on the right side of the image edge is matched using a matching template; based on the weight matrix and the matching template, the sliding window matches the subsequent pixel blocks, and determines whether the subsequent pixel blocks are the smear part to obtain the smear area; according to the trend of the weight difference of each pixel block in the smear area, the exposure time of the camera is adjusted until the weight difference is greater than or equal to the preset difference threshold, and the smear area is updated; according to the length of the smear area, the vibration amplitude of the spindle is obtained. The embodiment of the present invention obtains and adjusts the image ghost and adjusts the exposure time of the camera at the same time, so that the ghost of the spindle image collected by the camera is as non-superimposed as possible, thereby eliminating the influence of the ghost superposition on the vibration amplitude detection, and finally realizing the amplitude acquisition of the high-speed spindle, thereby improving the accuracy of the spindle amplitude detection when the spindle rotates at a high speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] 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.
[0036] Figure 1 A method flow chart of a method for detecting vibration amplitude of a spinning high-speed spindle during rotation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] 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 vibration amplitude detection method of a textile high-speed spindle during rotation according to the present invention, its specific implementation, structure, features and effects, in conjunction 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.
[0038] 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.
[0039] The embodiment of the present invention provides a specific implementation method of a vibration amplitude detection method when a textile high-speed spindle rotates, and the method is suitable for a high-speed spindle vibration amplitude detection scenario. In this scenario, a camera is installed and placed directly in front of the spindle for collecting spindle images. In order to solve the problem that a simple analysis of the smear in the image will be affected by the superposition of smears, thereby causing inaccurate vibration amplitude detection, the embodiment of the present invention is a method for using electronic equipment for identification, and the vibration amplitude acquisition of the high-speed spindle is completed by using the production field artificial intelligence system. First, by acquiring and adjusting the image smear, and adjusting the exposure time of the camera at the same time, the smear of the spindle image collected by the camera is as non-superimposed as possible, so as to eliminate the influence of smear superposition on vibration amplitude detection, and finally realize the acquisition of the amplitude of the high-speed spindle, so as to improve the accuracy of the spindle amplitude detection when the spindle rotates at high speed.
[0040] The specific scheme of the vibration amplitude detection method of a spinning high-speed spindle during rotation provided by the present invention is described in detail below with reference to the accompanying drawings.
[0041] See also Figure 1 , which shows a flowchart of a method for detecting vibration amplitude of a spinning high-speed spindle during rotation provided by an embodiment of the present invention, the method comprising the following steps:
[0042] Step S100, collecting an ingot image, and preprocessing the ingot image to obtain an ingot area.
[0043] When inspecting the spindle, a camera is placed directly in front of the spindle, and the camera captures the image of the spindle during the entire process of its high-speed and stable rotation.
[0044] The ingot region containing the ingot in the ingot image is segmented out through semantic segmentation of a neural network to obtain the ingot region.
[0045] Step S200, based on the spindle area, use the edge detection algorithm to obtain the edge of the spindle; divide the spindle according to the edge, obtain pixel blocks on both sides of the edge according to the division, and determine whether to expand the size of the pixel blocks by calculating the similarity of the pixel blocks on both sides to obtain the pixel block size; jointly analyze the obtained pixel block size and the gray value matrix corresponding to the pixel block according to the smear characteristics and the movement direction to obtain the weight matrix; according to the obtained pixel block size, use the matching template to match the image on the right side of the image edge; based on the weight matrix and the matching template, use the sliding window to match the subsequent pixel blocks, determine whether the subsequent pixel blocks are the smear part, and obtain the smear area.
[0046] Image smear is a normal phenomenon in the camera shooting process. Smear is formed when there is relative motion between the shooting object and the camera system during exposure. Because of this relative motion, the image formed on the chip is constantly changing. The pixels in various parts are affected by the imaging from different positions of the object during the exposure process. The final image is a superposition of images in a continuously changing image space.
[0047] Get the exposure time after the camera shoots, and get the motion speed v according to the length of the trailing image, i.e. the distance between the leftmost and leftmost sides of the spindle, and the exposure time t. And the camera parameter q, where q is related to the optical magnification of the camera. The relationship among the three is as follows:
[0048] e=tvq
[0049] Among them, e is the length of the smear produced in the image; t is the exposure time; v is the motion rate; and q is the camera parameter.
[0050] That is, when the image is collected, it is impossible for every frame to be collected as the image when the image moves to the maximum amplitude. Therefore, the length of the smear obtained under certain conditions can be regarded as the movement distance of the image, so the vibration amplitude can be obtained based on the smear.
[0051] However, there are several situations in which the image produces ghosting, which results in the ghosting information being unable to accurately reflect the motion amplitude.
[0052] If the smear part produced in the image is recorded as a virtual image, the image of the ingot itself is a real image.
[0053] Then the images captured by the camera may have the following three situations:
[0054] Case 1: The virtual image and the real image are exactly attached to each other, which is the most ideal case.
[0055] Case 2: No ghosting occurs, that is, the exposure time is too short.
[0056] Case 3: The virtual image overlaps with the real image, that is, the virtual image is on both sides of the real image.
[0057] Therefore, after knowing other parameters of the camera, and based on experience, we know that the speed generated by vibration fluctuates within a certain range, and the fluctuation range is not large, so the speed can also be considered as a constant. Therefore, we only need to adjust the exposure time of the camera, and then adjust the length of the image smear so that the smear generated in the image is only generated by one vibration.
[0058] Based on the obtained spindle region, a virtual image and a real image are included in the spindle region.
[0059] The main difference between the virtual image and the real image is that both are extensions of the original image near the edge, and the main difference is that the number of pixels describing the image is inconsistent between the virtual image and the real image, that is, the virtual image contains not only pixels describing the desired image, but also pixels describing the image background.
[0060] By adjusting the camera exposure time, the image smear is only the first case, that is, the spindle vibrates only once during the camera exposure time. Then the smear length is the required vibration amplitude.
[0061] According to the analysis of the smear area, it can be said that the smear area is a combination of the image background and the part close to the edge of the image, that is, this part can reflect both the edge information of the main image and the background information of the main image. The smear effect will form a gradual process between the background and the main image.
[0062] Since we don’t know how much information of the main area is contained in the smear area, we divide the main area information into blocks, and calculate the similarity between the main area near the edge and the smear area to determine which part the smear area mainly drags. That is, we can find out which parts of the repeated main area are found through block division.
[0063] According to the scenario targeted by the present invention, that is, the vibration amplitudes at different locations of the spindle are different, the image is divided into blocks, and the vibration amplitude of each part is calculated respectively, wherein the block size is N*N.
[0064] If the edge is not a straight line, the edge is scanned with the block size to obtain the average horizontal coordinate in the pixel block as the boundary between two pixel blocks.
[0065] Firstly, based on the spindle area, an edge detection algorithm is used to obtain the edge of the spindle, and then the spindle is divided according to the edge. According to the division, pixel blocks on both sides of the edge are obtained. By calculating the similarity of the pixel blocks on both sides, it is determined whether to expand the size of the pixel block to obtain the pixel block size.
[0066] The similarity calculation method of two pixel blocks is to calculate the grayscale difference of the corresponding pixel blocks.
[0067] The calculation formula of the similarity Q of the pixel blocks on both sides is:
[0068]
[0069] Among them, N is the length and width of the pixel block, g (i,j) is the gray value at the position with length i and width j in any pixel block; h (i,j) is the grayscale value at the corresponding length i and width j in another pixel block.
[0070] A similarity threshold is preset, that is, if the similarity between two pixel blocks is greater than the preset similarity threshold, the two pixel blocks are considered to be dissimilar. In the embodiment of the present invention, the preset similarity threshold is 20.
[0071] That is, N0=1 is set, so that the pixel block size N changes from 1, and increases by 1 each time until the above conditions are no longer met, that is, when the two images are not similar, the pixel block size is stopped from changing, and the pixel block size at this time and the gray value matrix of the corresponding smear image are obtained.
[0072] The obtained pixel block size, the gray value matrix corresponding to the pixel block, the smear characteristics and the motion direction are jointly analyzed to obtain a weight matrix.
[0073] The characteristic of the smear is that the smear is generated by the movement of the object, and the vibration of the scene object in the present invention is the left-right movement in the image, that is, the change of the smear part of the image is the left-right change.
[0074] A set of weight matrices W[] with a length of N is obtained, and the image on the right side of the image edge is matched using a matching template according to the size of the obtained pixel block. It should be noted that the matching template is a pixel block of a real image at the edge of the ingot. In the embodiment of the present invention, the pixel block on the left side of the edge of the ingot is taken as a real image, that is, a matching template, and the pixel block on the right side of the edge of the ingot is taken as a virtual image. The pixel block on the right side is matched with the matching template.
[0075] According to the obtained weight matrix and matching template, the pixel block size is used as the sliding window size, the step length is the pixel block width, and the subsequent pixel blocks are matched to determine whether the subsequent pixel blocks are the smear part; that is, according to the obtained weight matrix and matching template P, the pixel block size N*N is used as the sliding window, the step length is N, and the subsequent pixel blocks are matched to determine whether the subsequent pixel blocks are the smear part.
[0076] According to the position of the scanning frame, the grayscale value of the pixel block where the scanning frame is located when it is still is obtained, and image O is obtained. According to the above, the smear image contains both the main body information and the background information. Therefore, by using the weights, the two images are fitted to obtain image K, and by calculating the similarity between K and the grayscale value of the window part at this time, it is determined whether the window is the smear part. That is, according to the position of the sliding window, the grayscale value of the pixel block where the sliding window is located when it is still is obtained to obtain the first image; by using the weights, the two first images are fitted to obtain the second image, and by calculating the similarity between the second image and the grayscale value of the window part at this time, it is determined whether the window is the smear part.
[0077] The method for fitting the two first images is as follows:
[0078]
[0079] Among them, P (i,j) is the gray value of the pixel (i, j) in any first image, O (i,j) is the gray value of the pixel (i, j) in the second image, W i is the weight of the i-th column of the image pixel block; T is the fitted image.
[0080] That is, after the template image is transformed by fitting the two first images, a second image T is obtained. By comparing the similarity between the transformed second image T and the pixel block where the sliding window is located, it is determined whether the area is a smear area.
[0081] The similarity measurement method is the grayscale difference Q between the corresponding pixels of the two image blocks.
[0082] By adjusting the transformation weight matrix W, the difference between the transformed template and the subsequent pixel block is minimized, that is, the similarity condition of the two pixel blocks is met.
[0083] When template matching starts from the edge of the main body of the image, the weight matrix obtained at each match is calculated. When any matching weight in the weight matrix is less than the preset weight threshold, the matching is stopped, and all the pixel block areas obtained are the smear areas. In the embodiment of the present invention, the preset weight threshold is 0.2, and in other embodiments, the implementer can adjust the value according to the actual situation.
[0084] Step S300, adjusting the exposure time of the camera according to the trend of the weight difference of each pixel block in the smear area until the weight difference is greater than or equal to a preset difference threshold, and updating the smear area.
[0085] If the smear area is not obtained according to step S200, it means that the situation is situation 2, and the camera exposure time needs to be increased at this time so that the image has a smear phenomenon.
[0086] According to the obtained smear image, after the smear is generated, it changes with the distance from the edge of the main image. The farther away from the edge of the main image, the greater the difference between the grayscale value of the smear part and the grayscale value of the main edge.
[0087] Therefore, according to this feature, the change of the gray gradient of the smear image changes with the change of the subject's movement direction, and the gradient change is uniform.
[0088] According to the above method for obtaining the smear area, the smear length corresponding to a certain edge is m*N. That is, during the smear detection, the scan is performed m+1 times, and the matching weight obtained at the m+1th time is less than the threshold s. According to the obtained smear area, the weight of each match is obtained. The average weight ω of each match is obtained.
[0089] According to the obtained smear area, the weight of each match is obtained, and the average weight of each match is calculated;
[0090]
[0091] Among them, ω i is the average weight of the i-th pixel block, N is the length and width of the pixel block; W i is the weight of the i-th column in the pixel block;
[0092] According to the above rules, ω 1 Must be greater than ω m , and when it changes, it changes uniformly.
[0093] The calculation formula of weight difference b is:
[0094]
[0095] Among them, ω i is the average weight of the i-th pixel block; ω i+1 is the average weight of the i+1th pixel block, and m is the number of pixel blocks in the smear area.
[0096] That is, if the weight difference is less than the preset difference threshold, the smear can be considered as situation 3, and the camera exposure time needs to be reduced to shorten the smear. Until the calculated weight difference is greater than or equal to the preset difference threshold. In the embodiment of the present invention, the preset difference threshold is 0, and in other embodiments, the implementer can adjust the value according to the actual situation.
[0097] By adjusting the exposure time of the camera, the smear image is updated accordingly.
[0098] Step S400, obtaining the vibration amplitude of the spindle according to the length of the trailing shadow area.
[0099] The product of the number of pixel blocks in the smear area and the width of the pixel block is the length of the smear area; by calculating the distance from the edge of the spindle to the center line of the spindle at this time, the sum of the length of the smear area and this distance is the vibration amplitude of the spindle. Through real-time shooting, the spindle vibration amplitude time diagram is drawn to obtain the maximum vibration amplitude and average vibration amplitude of the spindle.
[0100] In summary, the embodiment of the present invention utilizes data processing technology, and the method is a method for applying electronic equipment for identification, and uses the artificial intelligence system in the production field to complete the acquisition of the vibration amplitude of the high-speed spindle. The method first collects the spindle image, pre-processes the spindle image to obtain the spindle area; based on the spindle area, the edge of the spindle is obtained using the edge detection algorithm; the spindle is divided according to the edge, and the pixel blocks on both sides of the edge are obtained according to the division, and the similarity of the pixel blocks on both sides is calculated to determine whether to expand the size of the pixel block; the obtained pixel block size, the corresponding gray value matrix of the pixel block and the smear feature and the direction of movement are jointly analyzed to obtain the weight matrix; according to the size of the obtained pixel block, the image on the right side of the image edge is matched using the matching template; based on the weight matrix and the matching template, the sliding window matches the subsequent pixel blocks, and determines whether the subsequent pixel blocks are the smear part to obtain the smear area; according to the trend of the weight difference of each pixel block in the smear area, the exposure time of the camera is adjusted until the weight difference is greater than or equal to the preset difference threshold, and the smear area is updated; according to the length of the smear area, the vibration amplitude of the spindle is obtained. The embodiment of the present invention acquires and adjusts the image smear, and finally acquires the amplitude of the high-speed spindle, thereby improving the accuracy of spindle amplitude detection when the spindle rotates at a high speed.
[0101] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the 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.
[0102] 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.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting vibration amplitude of a spinning high-speed spindle during rotation, characterized in that: The method comprises the following steps: Collecting an ingot image, and preprocessing the ingot image to obtain an ingot region; Based on the spindle area, the edge of the spindle is obtained by using an edge detection algorithm; the spindle is divided according to the edge, and pixel blocks on both sides of the edge are obtained according to the division, and the similarity of the pixel blocks on both sides is calculated to determine whether to expand the size of the pixel blocks to obtain the pixel block size; the obtained pixel block size and the gray value matrix corresponding to the pixel block are jointly analyzed according to the smear characteristics and the movement direction to obtain a weight matrix; according to the obtained pixel block size, the image on the right side of the image edge is matched using a matching template; based on the weight matrix and the matching template, the subsequent pixel blocks are matched by a sliding window to determine whether the subsequent pixel blocks are the smear part to obtain the smear area; Adjusting the exposure time of the camera according to the trend of the weight difference of each pixel block in the smear area until the weight difference is greater than or equal to a preset difference threshold, and updating the smear area; According to the length of the smear area, the vibration amplitude of the spindle is obtained.
2. A method for detecting vibration amplitude of a spinning high-speed spindle during rotation according to claim 1, characterized in that: The similarity of the pixel blocks on both sides is calculated as follows: The calculation formula of the similarity of the pixel blocks on both sides is: Wherein, Q is the similarity of the pixel blocks on both sides; N is the length and width of the pixel block, g (i,j) is the gray value at the position with length i and width j in any pixel block; h (i,j) is the grayscale value at the corresponding length i and width j in another pixel block.
3. The vibration amplitude detection method of a spinning high-speed spindle during rotation according to claim 1 is characterized in that: The sliding window matches the subsequent pixel blocks based on the weight matrix and the matching template, and determines whether the subsequent pixel blocks are the smear part, including: According to the obtained weight matrix and matching template, the pixel block size is used as the size of the sliding window and the step length is the pixel block width. The subsequent pixel blocks are matched to determine whether the subsequent pixel blocks are the smear part.
4. The method for detecting vibration amplitude of a spinning high-speed spindle during rotation according to claim 1, characterized in that: The sliding window matches the subsequent pixel blocks based on the weight matrix and the matching template, and determines whether the subsequent pixel blocks are the smear part, and further includes: The grayscale value of the pixel block at the position of the sliding window when the sliding window is stationary is obtained according to the position of the sliding window to obtain a first image; the two first images are fitted by using weights to obtain a second image, and the similarity between the second image and the grayscale value of the window part at this time is calculated to determine whether the window is a smear part; The method for fitting the two first images is as follows: Among them, P (i,j) is the gray value of the pixel (i, j) in any first image, O (i,j) is the gray value of the pixel (i, j) in the second image, W i is the weight of the i-th column of the image pixel block; T is the fitted image.
5. The method for detecting vibration amplitude of a spinning high-speed spindle during rotation according to claim 1, characterized in that: The determining whether the subsequent pixel block is a smear portion to obtain the smear area includes: When template matching starts from the edge of the main body of the image, the weight matrix obtained at each match is calculated. When any matching weight in the weight matrix is less than the preset weight threshold, the matching is stopped and all the pixel block areas obtained are the smear areas.
6. A method for detecting vibration amplitude of a spinning high-speed spindle during rotation according to claim 1, characterized in that: The weight difference is calculated as follows: According to the obtained smear area, the weight of each match is obtained, and the average weight of each match is calculated; Among them, ω is the average weight of the i-th pixel block, N is the length and width of the pixel block; W i is the weight of the i-th column in the pixel block; The calculation formula of the weight difference is: Where b is the weight difference, ω i is the average weight of the i-th pixel block; ω i+1 is the average weight of the i+1th pixel block, and m is the number of pixel blocks in the smear area.
7. A method for detecting vibration amplitude of a spinning high-speed spindle during rotation according to claim 1, characterized in that: The step of obtaining the vibration amplitude of the spindle according to the length of the smear area includes: The product of the number of pixel blocks in the smear area and the width of the pixel block is the length of the smear area; the distance from the edge of the spindle to the center line of the spindle is calculated; the sum of the length of the smear area and the distance is the vibration amplitude of the spindle.
8. The method for detecting vibration amplitude of a spinning high-speed spindle during rotation according to claim 1, characterized in that: The collecting of the spindle image and preprocessing of the spindle image to obtain the spindle region include: The ingot region containing the ingot in the ingot image is segmented out through semantic segmentation to obtain the ingot region.
