Window detection method and device for bearing retainer
Through the method of combining the camera and the rotary table, and using the laser beam positioning, the efficient and accurate detection of the bearing retainer window is realized, which solves the problem of high cost and low efficiency of manual inspection and improves the finished product qualification rate.
Patent Information
- Application Number
- PCT/CN2023/106117
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-12
- Filing Date
- 2023-07-06
- Publication Date
- 2024-10-17
AI Technical Summary
The existing window inspection of bearing cages mainly relies on manual inspection, which results in high cost, low efficiency and difficulty in achieving comprehensive and detailed inspection, affecting the finished product qualification rate.
Using a method that combines a camera and a rotating stage, the initial window image set is obtained through continuous photography, and the abnormal images are compared and matched to screen out abnormal images. Combined with laser beam positioning, the abnormal types are identified and classified, reducing the amount of manual detection and improving detection efficiency and accuracy.
It achieves comprehensive and detailed inspection of the bearing retainer window, reduces human errors, improves the finished product qualification rate, reduces labor costs, and improves inspection efficiency.
Smart Images

Figure CN2023106117_17102024_PF_FP_ABST
Abstract
Description
A bearing retainer window detection method and device Technical Field
[0001] The present application relates to the field of image detection of bearing retainers, and in particular to a method and device for detecting a window of a bearing retainer. Background Art
[0002] A cage (also known as a bearing retainer) is a bearing component that partially wraps around all or part of the rolling elements and moves with them, isolating the rolling elements and usually guiding them and keeping them in the bearing.
[0003] Currently, the quality inspection method for bearing retainers is mostly manual inspection, with staff carefully checking each bearing retainer step by step. This is especially true for bearing retainers with special window processing requirements. This requires detailed manual inspection of the window size, window size, window beam slope, and whether the hole is open. This consumes a lot of manpower and has low quality inspection efficiency. Because manual inspection relies on the experience and carefulness of the personnel, it is prone to certain human errors, which affect the product quality of bearing retainers and make it difficult to control the qualified rate of finished bearing retainers.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a method and device for inspecting the windows of a bearing retainer, which are used to solve the following technical problems: the windows of existing bearing retainers are mostly inspected by workers, which easily leads to high labor costs, slow inspection efficiency, and difficulty in conducting comprehensive and detailed inspections of the windows, affecting the qualified rate of the finished bearing retainers.
[0006] The embodiments of this application adopt the following technical solutions:
[0007] On the one hand, an embodiment of the present application provides a window detection method for a bearing retainer, comprising: taking pictures of continuous window images of a bearing retainer on a rotating table by a camera to obtain an initial window image set; performing mutual comparison and matching on each window image in the initial window image set; and screening several window images with abnormal matching in the comparison and matching results according to the comparison and matching results to obtain several abnormal window images; identifying and marking abnormal area images in the abnormal window images to obtain abnormal marked areas in the abnormal window images; performing window abnormality classification on the abnormal marked areas to obtain the window abnormality type of the bearing retainer; wherein, the window The window abnormality type includes at least one or more of the following: abnormal window size, abnormal window beam slope, abnormal hole patency and abnormal groove depth; the abnormal window corresponding to the window abnormality type is photographed for a second time through the rotating stage and the camera to obtain a real window abnormality image; and the window position corresponding to the real window abnormality image is positioned by the ray of the two-dimensional coordinate system through laser rays to obtain abnormal window position information; based on the abnormal window position information, according to the window abnormality type and the real window abnormality image, the window detection result of the bearing retainer is determined, and the window detection result is sent to the staff's terminal.
[0008] The embodiment of the present application uses a rotating table and a camera to perform window detection on the bearing retainer, compares all the identified windows with each other, and then screens out abnormal windows and determines the type of window abnormality. After that, it can accurately identify the abnormal window position and abnormality type, and send them to the back-end staff in combination with the real window abnormality image, which can help the staff reduce a lot of window detection workload and also has a high accuracy rate. Combined with laser positioning, it can quickly help the staff find windows with abnormal conditions and determine the corresponding abnormal fault type, greatly reducing labor costs and improving detection efficiency. It can also perform comprehensive and detailed inspections on the windows, reducing human errors and improving the finished product qualification rate of the bearing retainer.
[0009] In a feasible embodiment, a camera is used to take continuous window images of the bearing retainer on the rotating table to obtain an initial window image set, which specifically includes: obtaining drawing information of the bearing retainer to be produced, wherein the drawing information at least includes: the number of windows, window size, bearing retainer radius and window beam processing parameters; inputting the number of windows and the bearing retainer radius in the drawing information into the control unit of the rotating table control system; wherein the rotating table control system includes the control unit, the servo motor unit and the laser emission unit; according to the number of windows and based on the interval of the camera, the angular velocity of the rotating table is determined to take pictures of each window of the bearing retainer; according to the angular velocity of the rotating table, the operation of the rotating table is controlled, and based on the camera, the number of windows and the bearing retainer radius are input into the control unit of the rotating table control system; wherein the rotating table control system includes the control unit, the servo motor unit and the laser emission unit; according to the number of windows and based on the interval of the camera, the angular velocity of the rotating table is determined to take pictures of each window of the bearing retainer; The bearing holder takes photos of consecutive windows to obtain a partial window image set; wherein the partial window image set is an image set taken at multiple time intervals before the camera starts; according to a preset Canny operator, the area of the window beam pixels is detected on the grayscale image set of the partial window image set to obtain the actual window beam pixel area; and the area values of the actual window beam pixel area are compared with the standard pixel area of the window beam; the actual window beam pixel area that has been successfully compared is determined as the complete window beam pixel value; the window image corresponding to the complete window beam pixel value is determined as the first window image; and according to the first window image and the corresponding camera shooting time interval, it is fed back to the control unit of the rotary table control system so that each window of the bearing holder can be completely photographed to obtain the initial window image set.
[0010] The embodiment of the present application controls the time interval between the servo motor of the rotating stage and the shooting of the camera so that the two can match each other, and based on the image edge detection of the Canny operator, ensures that each window in each different type of bearing retainer can be completely captured, that is, ensures that the rotation of the servo motor and the camera shooting can be combined with each other, and then obtains the initial window image set of all windows in the bearing retainer.
[0011] In a feasible embodiment, each window image in the initial window image set is subjected to mutual comparison and matching, specifically including: grayscale preprocessing of each window image to obtain a plurality of grayscale window images; region division of the grayscale window image based on a preset dividing line according to the actual pixel size of the grayscale window image to obtain a grayscale pixel region; wherein each of the grayscale window images is divided into 9 grayscale pixel regions; pixel features in each of the grayscale pixel regions are traversed; wherein the pixel features include the brightness gradient features of each pixel point and the corresponding pixel coordinate position features; according to the pixel features in each of the grayscale pixel regions, a plurality of pixel features in the plurality of grayscale window images corresponding to each grayscale pixel region are subjected to similarity comparison and matching between the grayscale window images to obtain the comparison and matching result; wherein the comparison and matching result includes: normal matching and abnormal matching; the similarity comparison and matching is the similarity matching of corresponding pixel features between any two groups of grayscale window images.
[0012] The embodiment of the present application can quickly find the window image with abnormal conditions by comparing and matching any two grayscale window images in the initial window image set, thereby obtaining the comparison group, reducing the difficulty of image processing, and saving the detection time of the entire bearing retainer.
[0013] In a feasible implementation, according to the comparison and matching results, several window images with abnormal matching in the comparison and matching results are screened to obtain several abnormal window images, specifically including: if the comparison and matching result is abnormal matching, obtaining several groups of grayscale window images with abnormal matching; extracting distinguishing pixel features and corresponding distinguishing grayscale pixel areas in the several groups of grayscale window images; and obtaining normal grayscale pixel areas based on several normal window images with normal matching results according to the comparison and matching results; performing cross-pixel feature analysis on the distinguishing grayscale pixel areas and the normal grayscale pixel areas according to the convolutional neural network and the Sigmoid function. Similarity learning training is performed to obtain a cross-classification network model; wherein, the cross-classification network model is based on a twin neural network as a basic architecture; through the cross-classification network model, based on the different assigned weights of the distinguishing grayscale pixel area and the normal grayscale pixel area, the several groups of grayscale window images are cross-classified to eliminate the normal pixel features in the distinguishing pixel features and obtain the abnormal pixel features in the distinguishing pixel features; wherein, the abnormal pixel features are the pixel features corresponding to the abnormal window images in each group of grayscale window images; several grayscale pixel areas corresponding to the abnormal pixel features are screened out to obtain the several abnormal window images corresponding thereto.
[0014] The embodiment of the present application cross-classifies several groups of grayscale window images through a cross-classification network model, thereby selecting the window images that truly have abnormal pixel features in the comparison and matching group, that is, abnormal window images.
[0015] In a feasible embodiment, before identifying and marking the abnormal area image in the abnormal window image to obtain the abnormal marked area in the abnormal window image, the method also includes: performing image sequence encoding processing on all window images in the initial window image set to obtain a coded data set; and marking the coding numbers corresponding to the abnormal window images in the coded data set as abnormal based on the corresponding positions of several abnormal window images and the initial window image set to obtain abnormal coding numbers.
[0016] The embodiment of the present application first encodes all the window images in the initial window image set, and then individually marks the identified abnormal window images to obtain abnormal coding numbers, which is conducive to accurately locating each abnormal window, and is also conducive to subsequent staff finding the corresponding abnormal window based on the marked abnormal window images.
[0017] In a feasible implementation manner, the abnormal area image in the abnormal window image is identified and marked to obtain the abnormal marked area in the abnormal window image, specifically comprising: performing image region segmentation on the abnormal window image corresponding to the abnormal coding number according to the grayscale pixel area corresponding to the abnormal pixel feature to obtain the original abnormal area image; and performing grayscale processing on the original abnormal area image; performing preliminary edge image feature constraints on the grayscale processed original abnormal area image through second-order differential to obtain a candidate abnormal area; calculating the minimum pixel distance between the centroid of the candidate abnormal area and the edge image feature area to obtain a distance constraint condition; wherein the edge image feature area is the edge pixel area of the candidate abnormal area; constructing an edge slope coordinate system based on the candidate abnormal area according to the image corner points and the centroid in the candidate abnormal area; according to the edge slope coordinate system, performing direction positioning of the inclination angle of the image slope pixels in the candidate abnormal area to obtain a direction constraint condition; and performing secondary edge image feature constraints on the candidate abnormal area according to the distance constraint condition and the direction constraint condition to obtain the abnormal marked area.
[0018] The embodiment of the present application locates the candidate abnormal area based on the edge constraint processing of the grayscale image by the second-order differential based on the original abnormal area images in several abnormal window images, and then constrains the grayscale pixels in the candidate abnormal area with secondary image edge features according to the distance constraint conditions and the direction constraint conditions, and further accurately constrains and locates the abnormal grayscale pixels and marks them, thereby obtaining the abnormal marked area corresponding to the abnormal grayscale pixels.
[0019] In a feasible implementation, the abnormal mark area is subjected to window abnormality classification to obtain the window abnormality type of the bearing retainer, specifically comprising: performing window abnormality classification matching on the abnormal mark area through the window abnormality template in the historical window abnormality database; if the match is successful, determining the window abnormality type corresponding to the window abnormality template as the window abnormality type of the abnormal mark area; if the match is unsuccessful, determining the window abnormality type of the abnormal mark area; performing line detection of the pixel point set on the horizontal beam pixels and the vertical beam pixels of the window in the abnormal mark area through the Hough transform line detection algorithm to obtain window size information; according to the Hough transform, The slope of a straight line is calculated for a set of pixels with the same brightness gradient in the abnormal mark area to obtain the window beam slope information; the non-intersecting curves in the abnormal mark area are identified by the Hough transform circle detection algorithm to obtain a circular contour area; and the area of the same pixels in the circular contour area is calculated based on the adjacent connected domains in the abnormal mark area to obtain the hole area information; the pixel length of the concave and convex area in the abnormal mark area is calculated to obtain the groove depth information; the drawing information is compared with the window size information, the window beam slope information, the hole area information and the groove depth information to determine the window abnormality type in the abnormal mark area.
[0020] The embodiment of the present application identifies several abnormal mark areas and compares them with the historical window abnormality database first, so as to achieve rapid matching and identification of some common abnormal types, and then performs various types of judgments on the abnormal mark areas that cannot be identified. Based on the Hough detection algorithm, the pixel curve, pixel area, continuous identical pixel length and adjacent connected domain of pixels in the abnormal mark area are identified and judged to obtain the corresponding window size information, window beam slope information, hole area information and groove depth information, and then this information is compared with the corresponding size standard ranges in the uploaded drawing information for range information judgment, so as to screen and identify the corresponding window abnormality type in the abnormal mark area.
[0021] In a feasible embodiment, the abnormal window corresponding to the window abnormality type is photographed with a secondary window image by the rotating stage and the camera to obtain a real window abnormality image, which specifically includes: obtaining the abnormal code number of the abnormal window corresponding to the window abnormality type; performing rotation feedback control on the servo motor of the rotating stage according to the sequence position of the abnormal code number in the coding data set so that the abnormal window corresponding to the abnormal code number faces the camera; wherein the rotation feedback control is to control the rotation of the servo motor according to the photographing time interval between the abnormal code number and the current code number; and taking secondary window images of several abnormal windows corresponding to the abnormal code number by the camera to obtain several real window abnormality images.
[0022] The embodiment of the present application controls the rotation of the motor in the rotating table according to the abnormal coding number of the abnormal window, takes a second photo of the abnormal window, and obtains a real abnormal image of the window, thereby forming a secondary inspection of the abnormal window. It can also provide staff with a judgment standard for whether the window is abnormal, and combine it with the abnormal window type detected by the system to facilitate better review by staff.
[0023] In a feasible embodiment, laser rays are used to perform ray positioning of the window position corresponding to the real window abnormal image in a two-dimensional coordinate system to obtain abnormal window position information, specifically including: after obtaining all the real window abnormal images and the corresponding several abnormal coding numbers, single-line laser irradiation is performed on several abnormal windows corresponding to the real window abnormal image by the laser rays to obtain several laser rays; based on the two-dimensional coordinate system preset on the rotating table, the several laser rays are positioned with respect to the ray inclination to obtain several ray inclination angles; and the abnormal window position information of several abnormal windows is determined according to the several ray inclination angles and the several abnormal coding numbers.
[0024] The embodiment of the present application obtains all the real window abnormality images and the corresponding abnormality coding numbers, and then uses the laser beam emitted by the laser emitting device in the middle of the rotating table to irradiate the abnormal window, thereby forming a number of laser beams. Then, based on the two-dimensional coordinate system preset on the rotating table, the inclination angle of each abnormal window is determined, and then the abnormal window position information is finally determined according to the corresponding abnormal coding number. This is beneficial for the staff to find the corresponding abnormal window in time according to the abnormal window position information obtained by the inclination angle and the abnormal coding number, saving the staff's searching time, thereby further improving the detection efficiency of the bearing retainer window.
[0025] On the other hand, an embodiment of the present application also provides a window detection device for a bearing retainer, characterized in that the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor so that the at least one processor can execute a window detection method for a bearing retainer described in any of the above embodiments.
[0026] This application uses a rotating table and a camera to perform window detection on the bearing retainer, compares all the identified windows with each other, and then screens out abnormal windows and determines the type of window abnormality. After that, it can accurately identify the abnormal window position and abnormality type, and send them to the back-end staff in combination with the real window abnormality image, which can help the staff reduce a lot of window detection workload, and also has a high accuracy rate. Combined with laser positioning, it can quickly help the staff find windows with abnormal conditions and determine the corresponding abnormal fault type, greatly reducing labor costs, improving detection efficiency, and can perform comprehensive and detailed inspections on windows, reducing human errors, and improving the finished product qualification rate of bearing retainers. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0028] FIG1 is a flow chart of a window detection method for a bearing retainer provided in an embodiment of the present application;
[0029] FIG2 is an overall structural diagram of a bearing retainer window detection method provided by an embodiment of the present application;
[0030] FIG3 is a plane scale diagram of a two-dimensional coordinate system of a rotation stage provided in an embodiment of the present application;
[0031] FIG4 is a schematic diagram of a window structure of a bearing retainer provided in an embodiment of the present application;
[0032] FIG5 is a schematic diagram of a window and window beam structure of a bearing retainer provided in an embodiment of the present application;
[0033] FIG6 is a schematic structural diagram of a window detection device for a bearing retainer provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the technical solutions in this application, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0035] The embodiment of the present application provides a method for detecting a window of a bearing retainer. As shown in FIG1 , the method for detecting a window of a bearing retainer specifically includes steps S101 to S106:
[0036] S101 , using a camera to take continuous window images of the bearing retainer on the rotating stage to obtain an initial window image set.
[0037] Specifically, a drawing of the bearing retainer to be produced is obtained, wherein the drawing information includes at least the number of windows, window size, bearing retainer radius, and window beam processing parameters. The number of windows and bearing retainer radius in the drawing information are input into a control unit of a rotary table control system. The rotary table control system includes a control unit, a servo motor unit, and a laser emission unit.
[0038] Furthermore, the angular velocity of the rotating stage is determined according to the number of windows and based on the interval of the cameras, so as to take a picture of each window of the bearing holder.
[0039] In one embodiment, FIG2 is a diagram illustrating the overall structure of a bearing retainer window inspection system provided by an embodiment of the present application. As shown in FIG2 , the drawing information of the bearing retainer to be produced is first uploaded to the bearing retainer window inspection system. FIG4 is a schematic diagram illustrating the window structure of a bearing retainer provided by an embodiment of the present application, and FIG5 is a schematic diagram illustrating the window and window beam structure of a bearing retainer provided by an embodiment of the present application. As shown in FIG4 and FIG5 , the windows and window beams of the bearing retainer have various complex structures to adapt to the operating characteristics of various bearings. Therefore, qualified inspection of the bearing retainer windows is a prerequisite for stable bearing operation. For example, 36 windows need to be produced, each with a length and width of 4*6cm, a thickness of 1cm, and a radius of 35cm. The window beam has four slopes, each with an angle of 45 degrees. Each window beam has three holes with a radius of 2mm on the front and two grooves with a width of 1cm at the bottom of each window, all of which are used to facilitate the smooth flow of lubricating fluid. The window number information and bearing retainer radius information in the drawing are then input into the turntable control system through the window detection system. Based on the camera's shooting interval, the servo motor's rotation angular velocity is calculated so that the camera and the turntable can cooperate with each other to complete the shooting of each window of the bearing retainer.
[0040] Furthermore, the rotation stage is controlled according to the angular velocity of the rotation stage, and a camera is used to continuously capture window images of the bearing retainer to obtain a partial window image set. The partial window image set is a set of images captured at multiple time intervals before the camera starts, for example, the image set is captured at the first five time intervals before the camera starts.
[0041] Furthermore, according to a preset Canny operator, the area of the window beam pixels is detected for the grayscale image set of the partial window image set to obtain the actual window beam pixel area. And according to the standard pixel area of the window beam, the area value of the actual window beam pixel area is compared. The actual window beam pixel area that has been successfully compared is determined as the complete window beam pixel value. The window image corresponding to the complete window beam pixel value is determined as the first window image. And according to the first window image and the corresponding camera shooting time interval, it is fed back to the control unit of the rotary table control system so that each window of the bearing retainer can be completely photographed to obtain the initial window image set.
[0042] In one embodiment, as shown in FIG2 , in order to ensure that the camera and the rotating stage are fully matched, that is, each image captured by the camera contains a complete bearing retaining window, partial photo preprocessing is first performed to determine the start-up time of the servo motor in the rotating stage. Then, the area of the window beam pixels is detected on the grayscale image set of the partial window image set through Canny operator coarse extraction to obtain the actual window beam pixel area. That is, the pixel area of the window beam in each image is calculated one by one, and then converted into the standard pixel area of the window beam based on the standard area of the window beam in the drawing information. The area value is then compared with the actual window beam pixel area, so that the actual window beam pixel area that has been successfully compared is determined as the complete window beam pixel value. The window image corresponding to the identified complete window beam pixel value is defined as the first window image. The first window image and the corresponding camera time interval are then fed back to the control unit to control the rotation of the servo motor so that the angular velocity of the servo motor matches the shooting time of the camera, ensuring that each window of the bearing retainer can be completely photographed.
[0043] S102: performing a comparison and matching on each window image in the initial window image set, and screening a number of window images with abnormal matching in the comparison and matching results to obtain a number of abnormal window images.
[0044] Specifically, grayscale preprocessing is performed on each window image to obtain a plurality of grayscale window images. Based on the actual pixel size of the grayscale window image and a preset segmentation line, the grayscale window image is region-divided to obtain grayscale pixel regions. Each grayscale window image is divided into nine grayscale pixel regions.
[0045] Furthermore, the pixel features in each grayscale pixel region are traversed. The pixel features include the brightness gradient features of each pixel point and the corresponding pixel coordinate position features. Based on the pixel features in each grayscale pixel region, a similarity comparison match is performed between the grayscale window images for the corresponding pixel features in the grayscale window images, obtaining a comparison match result. The comparison match result includes: a normal match and an abnormal match. Similarity comparison matching is a similarity match between corresponding pixel features between any two sets of grayscale window images.
[0046] In one embodiment, each window image in the acquired initial window image set is first grayscale preprocessed. Then, each grayscale window image is divided based on two horizontal and two vertical dividing lines according to the actual pixel size of the grayscale window image to obtain 9 grayscale pixel regions. Then, based on the brightness gradient characteristics of each pixel point traversed and the corresponding pixel coordinate position characteristics, a plurality of pixel features in the plurality of grayscale window images that correspond one-to-one to each grayscale pixel region are subjected to similarity comparison and matching between the plurality of grayscale window images. That is, the brightness gradient characteristics and the corresponding pixel coordinate position characteristics of the same grayscale pixel region in any two grayscale images in the initial window image set are compared one-to-one, and finally a plurality of groups of comparison and matching results are obtained.
[0047] Furthermore, if the comparison and matching result indicates an abnormal match, several sets of grayscale window images with abnormal matches are obtained. Distinguishing pixel features and corresponding distinguishing grayscale pixel regions are extracted from the several sets of grayscale window images. Furthermore, normal grayscale pixel regions are obtained based on several normal window images with normal matches as shown in the comparison and matching result.
[0048] Furthermore, based on the convolutional neural network and the Sigmoid function, similarity learning training of cross-pixel features is performed on the distinguishing grayscale pixel areas and the normal grayscale pixel areas to obtain a cross-classification network model. The cross-classification network model uses a twin neural network as the basic architecture. Through the cross-classification network model, based on the different weights assigned to the distinguishing grayscale pixel areas and the normal grayscale pixel areas, several groups of grayscale window images are cross-classified to eliminate the normal pixel features in the distinguishing pixel features and obtain abnormal pixel features in the distinguishing pixel features. The abnormal pixel features are the pixel features corresponding to the abnormal window images in each group of grayscale window images. The normal pixel features are the pixel features corresponding to the normal window images in each group of grayscale window images. Then, several grayscale pixel areas corresponding to the abnormal pixel features are continuously screened out to obtain several abnormal window images corresponding thereto.
[0049] In one embodiment, several groups of grayscale window images with matching anomalies in the comparison matching results are subjected to distinguishing pixel features and corresponding distinguishing grayscale pixel areas are extracted, and normal grayscale pixel areas in several normal window images with matching normality are obtained at the same time. Then, a convolutional neural network and the image similarity comparison effect of the Sigmoid function are used to learn and train a cross-classification network model with a distinguishing cross-classification effect on grayscale pixel area images. Based on the image template of the normal grayscale pixel area, several groups of grayscale window images with matching anomalies are cross-classified to identify the normal grayscale window images in each group of grayscale window images. Then, the normal pixel features in each group of distinguishing pixel features are eliminated, that is, the corresponding normal grayscale window images are eliminated, and only the abnormal window images corresponding to the abnormal pixel features are retained, thereby completing the classification of several groups of grayscale window images with matching anomalies, and finally obtaining each abnormal window image after classification.
[0050] S103 , identifying and marking the abnormal region image in the abnormal window image to obtain the abnormal marked region in the abnormal window image.
[0051] Specifically, all window images in the initial window image set are coded as an image sequence to obtain a coded data set. According to the corresponding positions of several abnormal window images and the initial window image set, the coding sequence numbers corresponding to the abnormal window images in the coded data set are marked as abnormal to obtain abnormal coding sequence numbers.
[0052] In one embodiment, after obtaining an initial set of window images, each window image in the initial set is encoded as an image sequence to construct a coded data set. After identifying an abnormal window image, the coded sequence number corresponding to the abnormal window image is marked as abnormal, such as by color marking or special marking, to ultimately obtain the marked abnormal coded sequence number.
[0053] Furthermore, based on the grayscale pixel area corresponding to the abnormal pixel feature, the abnormal window image corresponding to the abnormal coding number is segmented to obtain the original abnormal area image, and the original abnormal area image is grayscale processed.
[0054] Furthermore, through the second-order differential, the original abnormal region image after grayscale processing is subjected to preliminary edge image feature constraints to obtain the candidate abnormal region. The minimum pixel distance between the centroid of the candidate abnormal region and the edge image feature region is calculated to obtain the distance constraint condition. Among them, the edge image feature region is the edge pixel region of the candidate abnormal region. According to the image corner points and centroid in the candidate abnormal region, an edge oblique plane coordinate system based on the candidate abnormal region is constructed. According to the edge oblique plane coordinate system, the direction of the inclination angle of the image oblique plane pixels in the candidate abnormal region is located to obtain the direction constraint condition. According to the distance constraint condition and the direction constraint condition, the candidate abnormal region is subjected to secondary edge image feature constraints to obtain the abnormal marking region.
[0055] In one embodiment, the grayscale pixel region corresponding to the abnormal pixel feature pair at the input end is first obtained in the cross-classification network model, that is, the abnormal window image corresponding to the abnormal coding sequence is determined, and then the region segmentation of the image is implemented for the abnormal window image based on the segmentation line, which is defined as the original abnormal region image. Then, the feature constraints of the edge image in the original abnormal region image are constrained by the second-order differential to obtain a relatively rough candidate abnormal region, and then the image corner points and centroid of the selected abnormal region are used to locate the direction of the tilt angle of the image oblique pixels in the candidate abnormal region, and the minimum pixel distance is calculated between the centroid of the candidate abnormal region and the edge image feature region, and the secondary feature constraints of the image edge feature are respectively applied to the candidate abnormal region, that is, the image edge feature constraints are further applied to the candidate region using the direction constraint condition and the distance constraint condition, to obtain the precise abnormal region of the abnormal window image, and then the precise abnormal region is framed and marked to select the abnormal marked region.
[0056] As a feasible implementation method, the calculation of the minimum pixel distance in the distance constraint is: Where T is the top surface boundary area of the abnormal texture image of the window in the candidate abnormal area, is the centroid of the abnormal candidate edge of the window abnormal texture image, x i with y i is the coordinate of each pixel in the candidate abnormal area, D d is the minimum pixel distance. The direction constraint conditions are used to locate the direction of the tilt angle of the image oblique pixels, including: Get the relative angle θ of the image slope pixel, M 11 、M 20 、M 02 Represent different image corner points in the candidate abnormal area, where M ij =∑ (r,c)∈R (r0-r) i (c0-c) jis the image corner point, R is the candidate abnormal region, (r0, c0) is the centroid of the candidate region, and (r, c) is the coordinate of the intersection of the window abnormal texture image and its edge in the candidate abnormal region.
[0057] S104: Classify the abnormality marked area according to the historical window abnormality database to obtain the window abnormality type of the bearing retainer. The window abnormality type includes at least one or more of the following: abnormal window size, abnormal window beam slope, abnormal hole patency, and abnormal groove depth.
[0058] Specifically, the window anomaly template in the historical window anomaly database is used to classify and match the window anomaly in the anomaly marked area. If the match is successful, the window anomaly type corresponding to the window anomaly template is determined as the window anomaly type of the anomaly marked area.
[0059] In one embodiment, the selected abnormal marking area is matched with the window abnormality template in the historical window abnormality database for image template matching. For example, the parameter information such as window size information, window beam slope information, hole area information and groove depth information in the window abnormality template is compared and matched with the corresponding information in the abnormal marking area. If the comparison and matching is successful, the window abnormality type corresponding to the window abnormality template is determined as the window abnormality type corresponding to the abnormal marking area, that is, the window abnormality type corresponding to the abnormal window.
[0060] Furthermore, if the match is unsuccessful, the abnormal type of the window is judged for the abnormal mark area. The Hough transform line detection algorithm is used to perform line detection on the horizontal beam pixels and vertical beam pixels of the window in the abnormal mark area to obtain the window size information. According to the Hough transform, the slope of the line is calculated for the pixel set with the same brightness gradient in the abnormal mark area to obtain the window beam slope information. The Hough transform circle detection algorithm is used to identify the non-intersecting curves in the abnormal mark area to obtain the circular contour area. And based on the adjacent connected domains in the abnormal mark area, the area of the same pixels in the circular contour area is calculated to obtain the hole area information. The pixel length of the concave and convex area in the abnormal mark area is calculated to obtain the groove depth information.
[0061] Furthermore, the drawing information is compared with the window size information, the window beam slope information, the hole area information and the groove depth information to determine the window abnormality type in the abnormal marked area.
[0062] In one embodiment, as shown in Figures 5 and 6, the image of the abnormal marked area that does not conform to the window abnormality template is used to determine the window abnormality type. The pixel arrangement characteristics in the selected abnormal marked area are used to identify and obtain information on the brightness characteristics of various pixel points in the window, the arrangement of identical pixels, the distribution of adjacent connected domains, and the area size of identical pixels based on the Hough transform line detection algorithm and the Hough transform circle detection algorithm. Window size information, window beam slope information, hole area information, and groove depth information are obtained respectively. The error range is then compared with the drawing information uploaded to the window detection system. For example, if the error between the actual area of a single hole after conversion in the hole area information and the standard hole area in the drawing information is controlled within 1%, the hole area information is considered qualified information. Otherwise, it is hole unobstructed abnormal information. Finally, all unqualified window size information, window beam slope information, and groove depth information are respectively determined as window size abnormal information, window beam slope abnormal information, groove depth abnormal information, etc., thus obtaining the window abnormality type corresponding to each abnormal window.
[0063] S105: Using a rotating stage and a camera, a secondary window image is taken of the abnormal window corresponding to the window abnormality type to obtain a true window abnormality image. Laser rays are then used to locate the window position corresponding to the true window abnormality image in a two-dimensional coordinate system to obtain abnormal window position information.
[0064] Specifically, the abnormal code number of the abnormal window corresponding to the window abnormality type is obtained. Based on the sequence position of the abnormal code number in the coded data set, the servo motor of the rotating stage is subjected to rotational feedback control so that the abnormal window corresponding to the abnormal code number faces the camera. The rotational feedback control controls the rotation of the servo motor based on the time interval between the abnormal code number and the current code number. Then, the camera takes secondary window images of the abnormal windows corresponding to the abnormal code number to obtain multiple real window abnormality images.
[0065] In one embodiment, after all abnormal window types are identified, the servo motor in the rotating stage is turned off and then, based on the position of the abnormal code number corresponding to the window abnormal type in the entire coded data set and the position of the camera, the abnormal window corresponding to each abnormal code number is rotated and moved to the front of the camera so that the abnormal window corresponding to the abnormal code number is facing the camera. The rotation time of the servo motor is determined by the abnormal code number, the code number currently in front of the camera, and the time interval between camera photos. Combined with the fixed angular velocity of the rotating stage, each abnormal window of the bearing retainer on the rotating stage can be re-photographed by the camera, which is beneficial for the staff to see the actual bearing retainer window situation in the back-end system.
[0066] Furthermore, after all the real window abnormal images and the corresponding abnormal coding numbers are obtained, single-line laser irradiation is performed on the abnormal windows corresponding to the real window abnormal images by laser rays to obtain several laser rays.
[0067] Furthermore, based on a two-dimensional coordinate system preset on the rotating stage, the plurality of laser beams are positioned according to their inclination angles to obtain a plurality of beam inclination angles, and the abnormal window position information of the plurality of abnormal windows is determined based on the plurality of beam inclination angles and a plurality of abnormal coding numbers.
[0068] In one embodiment, Figure 3 is a plane scale diagram of a two-dimensional coordinate system of a rotating table provided in an embodiment of the present application. As shown in Figure 3 and Figure 2, the two-dimensional coordinate system on the rotating table is used to accurately locate the abnormal window through the laser beam emitted by the laser emitter, and the beam inclination angle formed by the laser beam at this time is obtained, and then the abnormal window position information related to the beam inclination angle-abnormal coding number is obtained according to the corresponding abnormal coding number.
[0069] S106. Based on the abnormal window position information, the window abnormality type and the actual window abnormality image, determine the window detection result of the bearing retainer, and send the window detection result to the staff's terminal.
[0070] Specifically, the abnormal window position information and several window abnormality types related to the ray inclination-anomaly coding serial numbers are combined with the actual window abnormality image obtained by secondary photography after feedback control of the rotating stage. The results are sent to the terminal of the window detection system. The window detection results are in the form of a table with a header including the abnormal window position information, the window abnormality type, and the actual window abnormality image. The data is then listed one by one according to the abnormality coding serial number to form the window detection result of the bearing retainer. The tabular window detection result data is then presented to the staff to help them conduct manual review based on the automatic detection results of the bearing retainer window, further ensuring the qualified rate of the finished bearing retainer, reducing human errors, and improving the efficiency of the bearing retainer window detection.
[0071] In addition, the embodiment of the present application further provides a bearing retainer window detection device, as shown in FIG6 , the bearing retainer window detection device 600 specifically includes:
[0072] At least one processor 601. And a memory 602 in communication with the at least one processor 601; wherein the memory 602 stores instructions executable by the at least one processor 601, so as to enable the at least one processor 601 to execute:
[0073] Using a camera, continuous window images of the bearing holder on the rotating stage are photographed to obtain an initial window image set;
[0074] Comparing and matching each window image in the initial window image set with each other; and screening a number of window images with abnormal matching in the comparison and matching results to obtain a number of abnormal window images;
[0075] Identify and mark the abnormal area image in the abnormal window image to obtain the abnormal marked area in the abnormal window image;
[0076] Performing window abnormality classification on the abnormal marked area to obtain the window abnormality type of the bearing retainer; wherein the window abnormality type includes at least one or more of the following: abnormal window size, abnormal window beam slope, abnormal hole patency, and abnormal groove depth;
[0077] The abnormal window corresponding to the window abnormality type is photographed with a secondary window image by a rotating stage and a camera to obtain a real window abnormality image; and the window position corresponding to the real window abnormality image is positioned by a ray in a two-dimensional coordinate system by laser rays to obtain abnormal window position information;
[0078] Based on the abnormal window position information, the window abnormality type and the real window abnormality image, the window detection result of the bearing retainer is determined and sent to the staff's terminal.
[0079] This application uses a rotating table and a camera to perform window detection on the bearing retainer, compares all the identified windows with each other, and then screens out abnormal windows and determines the type of window abnormality. After that, it can accurately identify the abnormal window position and abnormality type, and send them to the back-end staff in combination with the real window abnormality image, which can help the staff reduce a lot of window detection workload, and also has a high accuracy rate. Combined with laser positioning, it can quickly help the staff find windows with abnormal conditions and determine the corresponding abnormal fault type, greatly reducing labor costs, improving detection efficiency, and can perform comprehensive and detailed inspections on windows, reducing human errors, and improving the finished product qualification rate of bearing retainers.
[0080] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant parts, refer to the descriptions of the method embodiments.
[0081] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0082] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included within the scope of the claims of the present application.
Claims
1. A window detection method for a bearing retainer, It is characterized in that The method comprises: Using a camera, taking pictures of continuous window images of the bearing retainer on the rotating table to obtain an initial window image set; Compare and match each window image in the initial window image set with each other; and according to the comparison and matching results, screen a number of window images with matching anomalies in the comparison and matching results to obtain a number of abnormal window images, specifically including: if the comparison and matching result is a matching anomaly, obtain a number of groups of grayscale window images with matching anomalies; Identifying and marking the abnormal region image in the abnormal window image to obtain the abnormal marked region in the abnormal window image specifically includes: Performing image sequence encoding processing on all window images in the initial window image set to obtain an encoded data set; According to the corresponding positions of the plurality of abnormal window images and the initial window image set, marking the coding sequence numbers corresponding to the abnormal window images in the coding data set as abnormal to obtain abnormal coding sequence numbers; According to the grayscale pixel area corresponding to the abnormal pixel feature, the abnormal window image corresponding to the abnormal coding sequence number is subjected to image area segmentation to obtain an original abnormal area image; and the original abnormal area image is subjected to grayscale processing; wherein the abnormal pixel feature is a pixel feature corresponding to the abnormal window image in each group of grayscale window images; each grayscale window image is divided into 9 grayscale pixel areas; Through the second-order differential, the original abnormal region image after grayscale processing is subjected to preliminary edge image feature constraints to obtain the candidate abnormal region; Calculating the minimum pixel distance between the centroid of the candidate abnormal region and the edge image feature region to obtain a distance constraint condition; wherein the edge image feature region is an edge pixel region of the candidate abnormal region; According to the image corner points and the centroid in the candidate abnormal area, construct an edge slope coordinate system based on the candidate abnormal area; According to the edge slope coordinate system, the direction of the tilt angle of the image slope pixels in the candidate abnormal area is located to obtain a direction constraint condition; According to the distance constraint condition and the direction constraint condition, the candidate abnormal region is subjected to secondary edge image feature constraint to obtain the abnormal marked region; Performing window abnormality classification on the abnormal marked area to obtain the window abnormality type of the bearing retainer; wherein the window abnormality type includes at least one or more of the following: abnormal window size, abnormal window beam slope, abnormal hole patency, and abnormal groove depth; The abnormal window corresponding to the abnormal window type is photographed for a second time by the rotating stage and the camera to obtain a real abnormal window image; and the window position corresponding to the real abnormal window image is positioned by a ray in a two-dimensional coordinate system by laser rays to obtain abnormal window position information; Based on the abnormal window position information, according to the window abnormality type and the real window abnormality image, the window detection result of the bearing retainer is determined, and the window detection result is sent to the terminal of the staff.
2. A method for detecting a window of a bearing retainer according to claim 1, It is characterized in that The bearing retainer on the rotating table is photographed with a camera to continuously take window images to obtain an initial window image set, which specifically includes: Obtaining drawing information of the bearing retainer to be produced, wherein the drawing information at least includes: the number of windows, the window size, the radius of the bearing retainer and the processing parameters of the window beam; Inputting the number of windows and the bearing retainer radius in the drawing information into a control unit of a rotary table control system; wherein the rotary table control system includes the control unit, a servo motor unit, and a laser emitting unit; According to the number of windows and based on the photographing interval of the camera, the angular velocity of the rotating stage is determined to photograph each window of the bearing holder; According to the angular velocity of the rotating table, the operation of the rotating table is controlled, and based on the camera, the bearing retainer is photographed in a continuous window to obtain a partial window image set; wherein the partial window image set is an image set taken at multiple time intervals before the camera starts; According to a preset Canny operator, the area of the window beam pixels is detected on the grayscale image set of the partial window image set to obtain the actual window beam pixel area; and the area value of the actual window beam pixel area is compared with the standard pixel area of the window beam; the actual window beam pixel area that is successfully compared is determined as the complete window beam pixel value; The window image corresponding to the complete window beam pixel value is determined as the first window image; and according to the first window image and the corresponding camera shooting time interval, it is fed back to the control unit of the rotating table control system so that each window of the bearing retainer can be completely photographed to obtain the initial window image set.
3. A window detection method for a bearing retainer according to claim 1, It is characterized in that Comparing and matching each window image in the initial window image set with each other specifically includes: Perform grayscale preprocessing on each window image to obtain several grayscale window images; According to the actual pixel size of the grayscale window image, based on the preset segmentation line, the grayscale window image is divided into regions to obtain grayscale pixel regions; wherein each of the grayscale window images is divided into 9 grayscale pixel regions; Traversing the pixel features in each of the grayscale pixel regions; wherein the pixel features include the light-dark gradient features of each pixel point and the corresponding pixel coordinate position features; According to the pixel features in each of the grayscale pixel regions, a plurality of pixel features in the plurality of grayscale window images corresponding to each grayscale pixel region are subjected to similarity comparison and matching between the plurality of grayscale window images to obtain the comparison and matching result; wherein the comparison and matching result includes: normal matching and abnormal matching; the similarity comparison and matching is Similarity matching of corresponding pixel features between any two sets of grayscale window images.
4. A method for detecting a window of a bearing retainer according to claim 1, It is characterized in that According to the comparison and matching results, a number of window images with abnormal matching in the comparison and matching results are screened to obtain a number of abnormal window images, specifically including: Extracting distinguishing pixel features and corresponding distinguishing grayscale pixel regions from the plurality of groups of grayscale window images; and obtaining normal grayscale pixel regions based on the plurality of normal window images that match the normal comparison and matching results; According to the convolutional neural network and the Sigmoid function, similarity learning training on cross pixel features is performed on the distinguished grayscale pixel area and the normal grayscale pixel area to obtain a cross classification network model; wherein the cross classification network model uses a twin neural network as a basic architecture; Through the cross-classification network model, based on the different assigned weights of the distinguishing grayscale pixel regions and the normal grayscale pixel regions, the plurality of groups of grayscale window images are cross-classified to eliminate the normal pixel features in the distinguishing pixel features and obtain the abnormal pixel features in the distinguishing pixel features; wherein the abnormal pixel features are the pixel features corresponding to the abnormal window images in each group of grayscale window images; A number of grayscale pixel regions corresponding to the abnormal pixel features are screened out to obtain the corresponding abnormal window images.
5. A method for detecting a window of a bearing retainer according to claim 1, It is characterized in that The abnormal marking area is subjected to window abnormality classification to obtain the window abnormality type of the bearing retainer, which specifically includes: Using the window anomaly template in the historical window anomaly database, classify and match the window anomaly of the abnormal marking area; if the match is successful, determine the window anomaly type corresponding to the window anomaly template as the window anomaly type of the abnormal marking area; If the match is unsuccessful, the abnormal type of the window is judged on the abnormal marked area; By using the Hough transform straight line detection algorithm, straight line detection of pixel point sets is performed on the horizontal beam pixels and the vertical beam pixels of the window in the abnormal mark area to obtain window size information; According to the Hough transform, a linear slope is calculated for a pixel set with the same brightness gradient in the abnormal marking area to obtain the window beam slope information; Using the Hough transform circle detection algorithm, the non-intersecting curves in the abnormal mark area are identified to obtain a circular contour area; and according to the adjacent connected domains in the abnormal mark area, the area of the same pixels in the circular contour area is calculated to obtain hole area information; Calculate the pixel length of the concave and convex area in the abnormal mark area to obtain the groove depth information; The drawing information is compared with the window size information, the window beam slope information, the hole area information and the groove depth information to determine the window abnormality type of the abnormal marked area.
6. A method for detecting a window of a bearing retainer according to claim 1, It is characterized in that By using the rotating platform and the camera, the abnormal window corresponding to the abnormal window type is photographed for a second time to obtain a real abnormal window image, specifically including: Obtaining an abnormal code sequence number of an abnormal window corresponding to the window abnormal type; According to the sequence position of the abnormal code number in the code data set, the servo motor of the rotating stage is subjected to rotation feedback control so that the abnormal window corresponding to the abnormal code number faces the camera; wherein the rotation feedback control is to control the rotation operation of the servo motor according to the shooting time interval between the abnormal code number and the current code number; The camera is used to take secondary window image photos of a plurality of abnormal windows corresponding to the abnormal coding serial numbers to obtain a plurality of real window abnormal images.
7. A method for detecting a window of a bearing retainer according to claim 1, It is characterized in that By using laser rays, the window position corresponding to the real window abnormal image is positioned by rays in a two-dimensional coordinate system to obtain abnormal window position information, specifically including: After all the real window abnormal images and the corresponding abnormal coding numbers are obtained, a single-line laser is irradiated on the abnormal windows corresponding to the real window abnormal images by the laser beam to obtain a plurality of laser beams; Based on a two-dimensional coordinate system preset on the rotating table, the inclination angles of the laser beams are positioned to obtain a number of beam inclination angles; and according to the number of beam inclination angles and the number of abnormal coding numbers, the abnormal window position information of the abnormal windows is determined.
8. A window detection device for a bearing retainer, It is characterized in that The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute the window detection method for a bearing retainer according to any one of claims 1-7.
Citation Information
Patent Citations
Electronic component defect detection method
CN115082449A
Quality monitoring method and equipment based on bearing retainer
CN115493843A
Method and equipment for monitoring technological preparation flow of conical bearing retainer
CN115953397A
Window detection method and device for bearing retainer
CN116109633A
Accelerated learning in machine vision using artificially implanted defects
US20030182251A1
Cited By
Angle measuring device and method for building bridge construction
CN119379797A
Abnormal point positioning method and system under laser cutting die machining
CN119475196A
Overhead line anomaly detection method and device based on unmanned aerial vehicle inspection and medium
CN121325947A
