Clock production quality detection method and system based on machine vision

By using machine vision-based multispectral image acquisition and an improved YOLOv5s convolutional neural network model, combined with optical flow and Kalman filters, the problems of low efficiency and low accuracy in traditional detection methods are solved, achieving efficient and automated watch quality inspection and defect repair recommendations.

CN120912562AActive Publication Date: 2025-11-07HUNAN GUANGSHENGDA WATCH MFG CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511064669.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-07
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

Traditional inspection methods rely on manual visual inspection, which is susceptible to fatigue and subjective judgment errors, making them difficult to adapt to large-scale production. Existing technologies are unable to distinguish minute defects or are affected by reflection interference. There is a lack of effective means for real-time dynamic inspection of moving parts of watches, resulting in low inspection efficiency and low accuracy.

Method used

A machine vision-based inspection method is adopted. Multispectral image acquisition is used to eliminate surface reflection, multispectral fusion technology is used to enhance defect features, and sub-pixel edge analysis is performed by combining an improved YOLOv5s convolutional neural network model and Zernike moment edge localization algorithm. The pointer movement trajectory is analyzed by combining optical flow method and Kalman filter, and an inspection report is generated and polishing process parameters are recommended.

Benefits of technology

It has achieved automated testing, improved testing accuracy, reduced false detection rate, and can detect internal structural parameters non-contactly, assisting enterprises in quality grading and process parameter adjustment, thereby improving product qualification rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912562A_ABST
    Figure CN120912562A_ABST
Patent Text Reader

Abstract

The invention discloses a clock production quality detection method and system based on machine vision, and the method comprises the steps: fusing the two-channel data of a visible light image and an infrared image in an input layer through a YOLOv5s convolutional neural network model, adding an SPP-F spatial pyramid pooling layer in a network structure, inputting an initial feature image into the improved YOLOv5s convolutional neural network model, and carrying out the detection of the clock production quality. Outputting a part positioning area; performing sub-pixel edge analysis on the part positioning area based on an edge positioning algorithm of a Zernike moment, acquiring a movement track of a clock pointer through a sensor, and analyzing the movement track of the clock pointer in combination with an optical flow method and a Kalman filter to obtain a track analysis result; and generating a detection report according to the trajectory analysis result and the clock defect detection result, marking defect positions and recommending polishing process parameters. Automatic detection is realized in the whole process, the dependence on artificial experience is greatly reduced, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, in particular to a watch production quality detection method and system based on machine vision. BACKGROUND

[0002] As a precision mechanical product, the appearance quality and internal structure precision of a watch directly affect the product performance and market competitiveness. Traditional detection methods rely on manual visual inspection or single spectral imaging technology. Manual detection is susceptible to fatigue and subjective judgment errors, making it difficult to meet large-scale production needs. Existing technologies mostly use visible light imaging, which is difficult to distinguish between minor defects (oxidation spots, subsurface cracks) or interference from reflected light. There is a lack of effective means for real-time dynamic defect detection of watch moving parts (balance wheel, gear). This results in low efficiency and low accuracy in watch defect detection. SUMMARY

[0003] The purpose of the present application is to solve the above problems, and a watch production quality detection method and system based on machine vision are designed.

[0004] To achieve the above purpose, the technical solution of the present application is as follows: further, in the above-mentioned watch production quality detection method based on machine vision, the watch production quality detection method comprises the following steps: Collecting multispectral images, eliminating surface reflections through polarizing filters, and enhancing defect features using multispectral fusion technology to obtain initial feature images; Based on the YOLOv5s convolutional neural network model, the dual-channel data of visible light and infrared images are fused at the input layer, and the SPP-F spatial pyramid pooling layer is added to the network structure to obtain an improved YOLOv5s convolutional neural network model; The initial feature images are input into the improved YOLOv5s convolutional neural network model, and the part positioning area is output; the edge positioning algorithm based on Zernike moments is used to analyze the sub-pixel edge of the part positioning area, and the watch defect detection result is obtained; The trajectory of the watch pointer is collected by a sensor, and the optical flow method and Kalman filter are used to analyze the trajectory of the watch pointer to obtain the trajectory analysis result; According to the trajectory analysis result and the watch defect detection result, a detection report is generated, the defect position is marked, and the polishing process parameters are recommended.

[0005] Further, in the above-mentioned watch production quality detection method based on machine vision, the multispectral images are collected, the surface reflections are eliminated through polarizing filters, and the defect features are enhanced using multispectral fusion technology to obtain initial feature images, which comprises: A multi-angle, multi-band image of the watch sample is collected by using a multi-spectral image sensor and an adjustable-angle light source array, the multi-spectral image sensor at least including ultraviolet, visible light and near-infrared bands, and a multi-spectral image is obtained; Based on the polarization state decomposition of the Stokes vector, the optimal polarization angle of the multi-spectral image is calculated, the polarization image is fused, and a first multi-spectral image is obtained; The images of different angle light sources in the first multi-spectral image are fused by a weighted least squares algorithm, and the weight coefficient is adaptively adjusted by a maximum entropy criterion, and a second multi-spectral image is obtained. The second multi-spectral image is subjected to illumination equalization based on the Retinex theory by using an improved NSCT non-subsample contourlet transform, using adaptive weighted average in the low-frequency subband and using Laplace energy criterion in the high-frequency subband, and an initial feature image is obtained.

[0006] Further, in the above-mentioned watch production quality detection method based on machine vision, the improved YOLOv5s convolutional neural network model based on the YOLOv5s convolutional neural network model fuses the dual-channel data of visible light and infrared images at the input layer, and increases the SPP-F spatial pyramid pooling layer in the network structure, and the improved YOLOv5s convolutional neural network model comprises: The spatial deviation of the two types of images is corrected by coordinate mapping, the features at the same physical position are aligned at the pixel level, and the deviation is within 1 pixel; The channel attention mechanism is introduced to dynamically allocate weights to the feature maps of the visible light channel and the infrared channel; The fused feature map is subjected to dimension integration by a 3x3 convolutional layer, and the dual-channel information is compressed into a single-channel feature map.

[0007] Further, in the above-mentioned watch production quality detection method based on machine vision, the improved YOLOv5s convolutional neural network model based on the YOLOv5s convolutional neural network model fuses the dual-channel data of visible light and infrared images at the input layer, and increases the SPP-F spatial pyramid pooling layer in the network structure, and the improved YOLOv5s convolutional neural network model further comprises: Four sizes of pooling kernels are used, respectively corresponding to the large-scale contour features and the tiny defect details of the watch parts; The number of multi-scale feature channels after pooling is halved by convolution, and the SPP-F layer is used to capture the large-scale contour features of the watch case edge, the medium-scale features of the pointer assembly and the small-scale defects of the tiny scratches.

[0008] Further, in the above-mentioned machine vision-based watch production quality detection method, the initial feature image is input into the improved YOLOv5s convolutional neural network model to output a part positioning area; a Zernike matrix-based edge positioning algorithm is used to perform sub-pixel edge analysis on the part positioning area to obtain a watch defect detection result, including: Gaussian filtering is performed on the part positioning area, and the filter kernel size is dynamically adjusted according to the defect density in the area; The edge features of the low-contrast areas of the dial printing pattern and the metal base are enhanced through local histogram equalization; Based on the principle of gradient direction consistency, false edges caused by surface reflection and stains are removed, and continuous and directionally consistent true edge profiles are retained to obtain the watch defect detection result.

[0009] Further, in the above-mentioned machine vision-based watch production quality detection method, the watch pointer motion trajectory is collected by a sensor, and the optical flow method and Kalman filter are combined to analyze the watch pointer motion trajectory to obtain a trajectory analysis result, including: The tip and central shaft sleeve of the metal pointer are selected as double tracking points, and the midpoint of the skeleton line of the hollowed-out pointer is extracted through contour analysis; An adaptive threshold segmentation algorithm is used to separate the pointer from the background, and a pyramid Lucas-Kanade optical flow algorithm is used to calculate the continuous frame images to obtain the trajectory analysis result.

[0010] Further, in the above-mentioned machine vision-based watch production quality detection method, the detection report is generated according to the trajectory analysis result and the watch defect detection result, the defect position is marked, and the polishing process parameters are recommended, including: A mapping table is established according to historical process data, the polishing effect is predicted by a random forest model, and the parameters of the rule base are dynamically adjusted within a range of 10%.

[0011] Further, in the machine vision-based watch production quality detection system, the watch production quality detection system includes the following modules: A multispectral image acquisition module is used to acquire multispectral images, eliminate surface reflection through a polarizing filter, enhance defect features using multispectral fusion technology, and obtain an initial feature image; A network model establishment module is used to establish an improved YOLOv5s convolutional neural network model based on a YOLOv5s convolutional neural network model, fuse dual-channel data of visible light and infrared images at the input layer, and add an SPP-F spatial pyramid pooling layer in the network structure; The watch defect detection module is configured to input the initial feature image into the improved YOLOv5s convolutional neural network model, and output a part positioning area; and perform sub-pixel edge analysis on the part positioning area based on a Zernike matrix-based edge positioning algorithm, to obtain a watch defect detection result. The watch trajectory analysis module is configured to collect a watch pointer motion trajectory through a sensor, analyze the watch pointer motion trajectory in combination with an optical flow method and a Kalman filter, and obtain a trajectory analysis result. The detection report generation module is configured to generate a detection report according to the trajectory analysis result and the watch defect detection result, mark a defect position, and recommend polishing process parameters.

[0012] Further, in the machine vision-based watch production quality detection system, the watch trajectory analysis module includes the following sub-modules: The analysis sub-module is configured to select a tip of a metal pointer and a central shaft sleeve as double tracking points, and extract a skeleton line midpoint of a hollowed-out pointer through contour analysis. The calculation sub-module is configured to separate the pointer from the background by using an adaptive threshold segmentation algorithm, and calculate continuous frame images by using a pyramid Lucas-Kanade optical flow algorithm, to obtain the trajectory analysis result.

[0013] Further, in the machine vision-based watch production quality detection system, the detection report generation module includes the following sub-modules: The adjustment sub-module is configured to establish a mapping table according to historical process data, predict a polishing effect by using a random forest model, and dynamically adjust parameters in a rule base within a range of 10%.

[0014] The beneficial effects are as follows: 1. Compared with traditional manual visual inspection or a single visible light imaging method, the detection accuracy is improved, and the false detection rate is reduced. Meanwhile, the whole process is realized in an automated manner, the dependence on human experience is greatly reduced, and the detection efficiency is improved. 2. The system can non-contact detect key structural parameters such as gear meshing degree and balance wheel runout inside the watch, avoid the efficiency loss and product damage risk caused by traditional disassembly detection. 3. The system can output a watch quality score and a defect repair suggestion, to assist enterprises in realizing quality grading, process parameter adjustment, and production process control, and improve the overall product qualification rate. BRIEF DESCRIPTION OF DRAWINGS

[0015] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments with reference made to the accompanying drawings. The drawings are for purposes of illustration only and are not considered as limiting the application.

[0016] Figure 1 FIG. 1 is a schematic diagram of a first embodiment of a machine vision-based watch production quality detection method according to the present application. Figure 2 Figure 2 is a schematic diagram of a second embodiment of the machine vision-based watch production quality detection method in the present application; Figure 3 Figure 1 is a schematic diagram of a first embodiment of the machine vision-based watch production quality detection system in the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0018] Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an" and "the" used herein also include the plural forms. It should be further understood that the use of the word "comprise" in the specification of the present application means that the features, integers, steps, operations, elements and / or components exist, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0019] The present application is specifically described below in combination with the drawings, Figure 1 As shown, the machine vision-based watch production quality detection method includes the following steps: Step 101, collect multispectral images, eliminate surface reflection by polarizing filters, enhance defect features by multispectral fusion technology, and obtain initial feature images; Specifically, in the present embodiment, a multispectral image sensor and an adjustable-angle light source array are used to perform multi-angle and multi-band image acquisition on a watch sample. The multispectral image sensor includes at least ultraviolet, visible light and near-infrared bands, and multispectral images are obtained. Based on the polarization state decomposition of Stokes vector, the optimal polarization angle of the multispectral image is calculated, the polarization image is fused, and the first multispectral image is obtained. The first multispectral image is fused by a weighted least squares algorithm, and the weight coefficient is adaptively adjusted by a maximum entropy criterion to obtain a second multispectral image. An improved NSCT non-subsample contourlet transform is used, an adaptive weighted average is used in the low-frequency subband, a Laplace energy criterion is used in the high-frequency subband, and the second multispectral image is subjected to illumination equalization based on the Retinex theory to obtain the initial feature image.

[0020] Specifically, I. Multispectral image acquisition unit Multispectral camera parameters: Spectrum range: UV (200-400nm), visible light (400-760nm), near infrared (760-1100nm); Sensor type: back-illuminated CMOS, resolution 500 million pixels (2592x1944); Frame rate: ≥30fps at full resolution, supports ROI region windowing acceleration; Interface: GigEVision, data transmission rate 10Gbps; Adjustable angle light source array: Light source type: high-brightness LED array (ultraviolet 365nm, white light 6500K, infrared 940nm); Illumination angle: -45°~+45° continuously adjustable, step accuracy 0.5°; Light intensity control: 16-bit PWM adjustment, range 1%~100%; Layout: ring-shaped 8 groups of light sources, each group with 3 different waveband LEDs, achieving 360° non-dead-angle illumination; Polarization imaging module: Polarization filter: depolarization degree ≥99%, transmittance ≥85%; Adjustment method: electric rotation, 0°~360° continuously adjustable, accuracy ±0.5°; Synchronous control: linked with camera shutter, supports single-frame multi-polarization state acquisition; 2.2 Motion trajectory detection unit; Trajectory acquisition sensor: High-speed camera: 12 million pixels, frame rate ≥200fps, global shutter; Auxiliary light source: infrared dot matrix light source, wavelength 850nm, avoiding glare; Encoder: incremental rotary encoder, resolution 1024 lines / turn, response frequency ≥10kHz; Mechanical positioning device: Rotary platform: positioning accuracy ±0.01°, repeat positioning accuracy ±0.005°; Clamping mechanism: self-adaptive pneumatic clamp, compatible with watch parts with diameter φ20~φ60mm.

[0021] II. Algorithm module design; 3.1 Multispectral image preprocessing; Reflection elimination algorithm: Polarization image fusion: polarization state decomposition based on Stokes vector, calculation of optimal polarization angle; Multi-light source image synthesis: weighted least squares algorithm is used to fuse images of different angle light sources, and the weight coefficient is adaptively adjusted through the maximum entropy criterion; Multispectral fusion technology: Fusion strategy: improved non-subsample contourlet transform (NSCT) is adopted, adaptive weighted average is used in low-frequency subband, and Laplace energy criterion is used in high-frequency subband; Feature enhancement: the illumination balance based on Retinex theory is performed on the fused image to improve the contrast of defects and background.

[0022] Step 102, based on the YOLOv5s convolutional neural network model, the dual-channel data of visible light and infrared images are fused in the input layer, and the SPP-F spatial pyramid pooling layer is added in the network structure to obtain the improved YOLOv5s convolutional neural network model; Specifically, in the embodiment, the spatial deviation of the two types of images is corrected through coordinate mapping, the features at the same physical position are aligned at the pixel level, and the deviation is within 1 pixel; The channel attention mechanism is introduced to dynamically allocate weights to the feature maps of the visible light channel and the infrared channel. The fused feature map is dimensionally integrated through a 3x3 convolution layer to compress the dual-channel information into a single-channel feature map.

[0023] Four sizes of pooling kernels are used, respectively corresponding to the large-scale contour features and the tiny defect details of the clock parts. Through convolution, the number of multi-scale feature channels after pooling is halved, and the SPP-F layer is used to capture the large-scale contour features of the watch case edge, the medium-scale features of the pointer assembly, and the small-scale defects of the tiny scratches.

[0024] Specifically, I. Input layer dual-channel fusion module 1. Data preprocessing process The visible light and infrared images respectively pass through independent preprocessing channels: first, pixel normalization (compressing the pixel value to the range of 0-1) is used to eliminate the difference in light intensity, and then edge-preserving filtering is used to remove high-frequency noise. For the metal reflection residue on the surface of the watch, dynamic threshold clipping is used to weaken the influence of the highlight area, ensuring that the features of the two types of images are at the same feature level before fusion.

[0025] 2. Dual-channel feature fusion mechanism Feature alignment: the spatial deviation of the two types of images is corrected through coordinate mapping, ensuring that the features at the same physical position are aligned at the pixel level, with a deviation of within 1 pixel; Weight distribution: the channel attention mechanism is introduced to dynamically allocate weights to the feature maps of the visible light channel (focusing on surface texture) and the infrared channel (focusing on internal defects). When detecting a metal watch case, the weight of the infrared channel is automatically increased by 30%-50%; Dimension compression: the fused feature map is integrated by a 3x3 convolution layer to compress the dual-channel information into a single-channel feature map, reducing the subsequent calculation amount; III. SPP-F spatial pyramid pooling layer design 1. Structure improvement points On the basis of the original YOLOv5s SPP layer, a 1x1 convolution module is added to realize channel compression: Pooling kernel configuration: 13x13, 9x9, 5x5, and 1x1 pooling kernels are used, corresponding to large-scale contour features and small defect details of watch parts; Channel compression: the number of channels of the pooled multi-scale features is halved through 1x1 convolution, reducing the calculation overhead by 30% while maintaining the feature expression ability; Parallel computing: each pooling branch uses parallel processing mode to avoid information delay in feature extraction process; 2. Advantages of multi-scale feature extraction For multi-size detection requirements of watch parts, SPP-F layer can capture: Large-scale contour features of watch case edge (13x13 pooling kernel); Medium-scale features of pointer assembly (9x9, 5x5 pooling kernel); Small-scale defects such as micro-scratches and pinholes (1x1 pooling kernel); Through the combination of multi-scale features, the detection adaptability of the model for defects of different sizes is improved by more than 40%; IV. Neck optimization design 4.1 CSP2 structure alternative Reduce the number of residual blocks in the original CSP1 structure from 3 to 2, and adjust the connection mode of convolution layers: Use a compact combination unit of "convolution-batch normalization-activation"; Increase cross-layer skip connection to strengthen the transmission of shallow features to deep layers; Reduce the number of shortcut connections by 50% to reduce memory occupation; Under the premise of ensuring the feature extraction ability does not decrease, the inference time of single frame image is shortened by 25%; 4.2 Feature fusion method Use Bi-directional Feature Pyramid Network (BiFPN) structure: Transmit high-resolution features from bottom to top (focus on defect location positioning); Transmit high semantic features from top to bottom (focus on defect type identification); Use weighted fusion for cross-layer features to automatically increase the feature weight of key defect areas; Step 103, input the initial feature image into the improved YOLOv5s convolutional neural network model, output the part positioning area; based on the edge positioning algorithm of Zernike matrix, the sub-pixel edge analysis is carried out on the part positioning area, and the watch defect detection result is obtained; Specifically, in this embodiment, the part positioning area is subjected to Gaussian filtering, and the filter kernel size is dynamically adjusted according to the defect density in the area; The local histogram equalization is used to strengthen the edge features of the low contrast areas of the dial printing pattern and the metal substrate; Based on the principle of gradient direction consistency, the false edges caused by surface reflection and stains are removed, and the continuous and direction consistent true edge profile is retained, so as to obtain the watch defect detection result.

[0026] Specifically, 1.1 Model output post-processing mechanism; The part positioning area output by the improved YOLOv5s model is in the form of a bounding box (Bounding Box), which needs to be optimized through three levels of screening: Confidence filtering: set a dynamic confidence threshold (watch case parts ≥0.85, pointer class ≥0.8, dial class ≥0.75), remove low confidence prediction boxes, and preliminarily filter out invalid detection results; Non-maximum suppression (NMS): for candidate boxes with overlap degree exceeding 50%, the bounding box with the highest IoU (intersection over union) is retained, and the repeated labeling of the same part is eliminated, which is especially suitable for dense detection scenes of multi-pointer watches; Size verification: combined with the standard size range of watch parts (diameter φ20-60mm watch case, length 5-20mm pointer), filter out abnormal boxes that exceed the reasonable size range, and further reduce the false detection rate; 1.2 Fine calibration of positioning area; According to the structural characteristics of watch parts, a classification positioning strategy is adopted: Watch case positioning: the circularity of the rectangular bounding box output by the model is analyzed, and the elliptical profile of the outer edge of the watch case is fitted by the least square method, so as to correct the positioning deviation caused by inclined placement, so that the center positioning error is ≤±0.02mm; Pointer positioning: for the slender structure of hour hand, minute hand and second hand, the skeleton line in the bounding box is extracted, and the rotation center and tip position of the pointer are determined by endpoint detection, and the angle measurement accuracy is ±0.1°; Dial positioning: combined with the periodic characteristics of the printed scale, Hough transform is used to detect the center and radius of the dial, and compared with the standard CAD model, the concentricity deviation is controlled within 0.05mm; II. Implementation of sub-pixel edge positioning algorithm; 2.1 Edge detection preprocessing; To eliminate the interference of image noise on sub-pixel analysis, a multi-stage preprocessing procedure is adopted: Adaptive smoothing: Gaussian filtering is applied to the part positioning area, and the filter kernel size is dynamically adjusted according to the defect density in the area (3x3 kernel for defect-intensive areas and 5x5 kernel for smooth areas); Contrast enhancement: Local histogram equalization is used to enhance edge features, especially for low-contrast areas between printed patterns and metal substrates, to improve the edge signal-to-noise ratio by ≥20 dB; False edge suppression: Based on the consistency of gradient direction, false edges caused by surface reflection and stains are removed, and continuous and directionally consistent true edge profiles are preserved; 2.2 Zernike moment edge positioning implementation; Step-by-step sub-pixel edge extraction: Edge rough positioning: Canny operator is used to obtain pixel-level edge profile as the initial boundary for Zernike moment calculation, with an edge extraction completeness rate of ≥98%; Moment region division: A 3x3 pixel analysis window is defined around the rough edge, each window corresponding to an edge element, ensuring coverage of all potential defect areas; Zernike moment calculation: Selecting 8th order Zernike polynomial as the basis function, the moment value of the gray scale distribution in each window is solved, and the sub-pixel coordinates of the edge are located by the moment value extreme point; Edge fitting optimization: B-spline curve fitting is performed on discrete sub-pixel points to eliminate the influence of isolated noise points, with a fitting error of ≤0.05 pixels; 2.3 Multi-component edge feature extraction; Customized extraction strategy for different material characteristics of watch components: Metal watch case: Focus on extracting the outer edge and the profile of the lug mounting hole, and identifying defects such as deformation and notches through edge curvature changes, with a curvature measurement accuracy of 0.01 mm⁻¹; Glass dial: Using double-threshold edge detection to distinguish between printed scale edges and glass edges, eliminating edge breaks caused by glass reflection; Pointer shaft sleeve: Detecting the roundness error of the inner hole edge, and judging the concentricity of the shaft sleeve through the difference between the minimum circumscribed circle and the maximum inscribed circle, with a measurement accuracy of ≤0.002 mm; Three, detection result generation and quality control; 3.1 Defect identification and classification; Abnormal analysis based on edge features to achieve defect detection: Geometric deviation: By comparing the measured edge with the standard CAD model, identify defects such as watch case diameter out-of-tolerance (allowable range ±0.03 mm) and pointer length deviation (allowable range ±0.05 mm); Surface defect category: According to the edge continuity to judge the scratch (length ≥ 0.1mm), the concave (depth ≥ 0.02mm), the color difference, the stain and other surface problems are located through the gray level mutation area; Assembly defect category: Detect the relative position deviation of the pointer and the dial (allowable range ±0.1°), the verticality error of the watch hands; Step 104, acquiring the motion trajectory of the clock pointer through the sensor, combining the optical flow method and the Kalman filter to analyze the motion trajectory of the clock pointer, and obtaining the trajectory analysis result; Specifically, in the embodiment, the tip of the metal pointer and the center shaft sleeve are selected as double tracking points, and the midpoint of the skeleton line of the hollow pointer is extracted by contour analysis. The adaptive threshold segmentation algorithm is used to separate the pointer and the background, and the pyramid Lucas-Kanade optical flow algorithm is used to calculate the continuous frame images to obtain the trajectory analysis result.

[0027] Specifically, 4.1 Trajectory acquisition system deployment; 4.1.1 Hardware configuration and installation; High-speed imaging unit: 1200 million pixel global shutter camera, matched with 850nm infrared dot array light source (to avoid dial reflection interference), lens focal length 50mm, working distance 300mm, to ensure that the imaging resolution of the pointer motion area reaches 2μm / pixel.

[0028] 4.1.2 Data acquisition process; The pointer motion is collected in three stages: starting acceleration section (0-2 seconds), uniform speed running section (2-10 seconds), and deceleration stopping section (10-12 seconds), covering the full working condition of the clock; The sampling frequency of the uniform speed section is increased to 200 frames / second, ensuring that at least 5 frames of images correspond to each degree of rotation, and the trajectory details of high-speed moving components such as the second hand are captured completely; Before each batch of collection, a standard pointer (known motion accuracy) is used for calibration, the inherent delay of the system (≤1ms) is recorded, and compensation is made in the subsequent analysis.

[0029] 4.2 Optical flow trajectory extraction; 4.2.1 Pointer feature point selection; Dynamic selection of tracking points for different types of pointers: Metal pointer: Select the tip (the place with the maximum curvature) and the center shaft sleeve (circular feature) as double tracking points to improve the stability of the trajectory; Hollow pointer: Extract the midpoint of the skeleton line through contour analysis to ensure that the feature point does not move out of the pointer area; Adaptive threshold segmentation algorithm is used to separate the pointer and the background, and the tracking point positioning accuracy is ≤1 pixel (corresponding to 2μm).

[0030] 4.2.2 Optical flow field calculation and optimization; The pyramid Lucas-Kanade optical flow algorithm is used for continuous frame images: The initial window is set to 15x15 pixels (covering the pointer feature point and surrounding texture), and the number of pyramid layers is 5 (balancing calculation speed and tracking robustness); The consistency of the optical flow vector is checked, and abnormal vectors (deviation exceeding 3σ) caused by pointer reflection flicker are removed, and effective trajectory points with a confidence level of ≥95% are retained; For the rotation motion characteristics of the pointer, polar coordinate conversion is used to convert the trajectory points in the Cartesian coordinate system to "angle-radius" coordinates, simplifying the subsequent uniformity analysis.

[0031] 4.3 Kalman filter trajectory optimization; 4.3.1 Filter model design; State equation: based on the uniform rotation motion model of the pointer, the state vector includes angle position, angular velocity, and angular acceleration, and the model parameters are initialized by the first 30 frames of trajectory data; Observation equation: fuse the angle measurement value output by the optical flow method and the speed feedback of the encoder, and dynamically adjust the observation noise weight (increase the encoder weight at high speed, and increase the optical flow measurement weight at low speed).

[0032] 4.3.2 Trajectory analysis index; Uniformity error: calculate the standard deviation of the angular velocity in the uniformity section (5-8 seconds), and the allowable range is ≤0.5° / s (corresponding to a clock daily difference of ≤2 seconds); Stutter detection: when the angular velocity change of 3 consecutive frames exceeds 5° / s, it is determined to be a stutter defect, and the angle position (accuracy ±0.1°) is recorded; Eccentricity: fit a circle through the tracking points of the shaft sleeve, calculate the deviation of the center of the circle from the rotation center, and the allowable range is ≤0.01mm (to avoid radial runout when the pointer rotates).

[0033] 4.4 Trajectory analysis result output; Recorded in a structured data format: Trajectory visualization: generate a two-dimensional trajectory graph of the pointer motion (superimposed on the dial image), and label the normal section (green), the stutter section (red), and the eccentric region (yellow) with different colors. Quantitative index table: contains 12 key parameters such as average angular velocity, maximum speed deviation, stutter frequency and position, eccentricity, etc., with data accuracy retained to 4 decimal places.

[0034] Step 105, generate a detection report according to the trajectory analysis result and the clock defect detection result, mark the defect position and recommend the polishing process parameters.

[0035] Specifically, in this embodiment, a mapping table is established according to historical process data, a polishing effect is predicted through a random forest model, and a rule base parameter is dynamically adjusted within a range of 10%.

[0036] Specifically, 5.1 Multi-source data fusion and report generation 5.1.1 Data integration framework Establish a defect database: associate image detection results (defect type, location, size) and trajectory analysis data (motion abnormality parameters), and realize full life cycle traceability through the unique ID of the part (laser marking number).

[0037] Data verification rules: when the defect detection confidence is greater than or equal to 90% and the spatial overlap degree of trajectory abnormality and defect position is greater than or equal to 80%, it is determined as a certain defect; otherwise, it is marked as "to be reviewed" (manual confirmation is required).

[0038] 5.1.2 Report content and format Basic information area: contains detection time (accurate to milliseconds), part model, production batch, equipment number, detection personnel ID, etc.

[0039] Defect details area: Defect list: sorted by severity (critical defect → serious defect → minor defect), each containing type ("case scratch" "pointer lag"), location coordinates (polar coordinates based on case center, accuracy ± 0.01mm), size parameters (length / area / angle), determination standard (reference to watch industry standard QB / T1249-2021).

[0040] Defect image: labeled multispectral fusion image (marking defect area bounding box and zoomed image), trajectory abnormality segment screenshot (annotated timestamp).

[0041] Comprehensive judgment area: automatically rated according to the number and severity of defects (A level: no defects; B level: minor defects can be repaired; C level: serious defects need to be reworked; D level: scrap).

[0042] 5.2 Defect position marking and visualization Coordinate system: use the outer circle of the case to fit the center as the origin, establish a polar coordinate system (angle 0°-360°, radius 0-30mm), all defect positions are converted to coordinates in this coordinate system, which is convenient for subsequent polishing equipment positioning.

[0043] Marking method: superimpose defect markers on the three-dimensional model of the part: Surface defects: marked with a red solid circle (diameter proportional to defect size), with defect code ("SC01" representing case scratch) marked beside.

[0044] Motion defect: Abnormal trajectory segment is marked with a blue dashed line, and the arrow indicates the direction of the stall.

[0045] Support export DXF format marker file, directly interface with the path planning system of CNC polishing equipment.

[0046] 5.3 Polishing process parameter recommendation; 5.3.1 Parameter recommendation logic; Rule base based on defect type and size + machine learning hybrid model: Rule base basic parameters: According to historical process data to establish mapping table (0.1-0.3mm shell scratch corresponds to 5000# grinding wheel, 1500rpm speed).

[0047] Machine learning optimization: Predict polishing effect through random forest model (input defect parameters, material hardness, output pressure compensation value), dynamically adjust rule base parameters within ±10% range.

[0048] 5.3.2 Recommended parameter output; Generate an independent process card for each repairable defect: Equipment parameters: grinding wheel type (800#-5000#), spindle speed (1000-3000rpm), feed speed (0.01-0.1mm / s).

[0049] Operation parameters: polishing pressure (0.1-0.5N, dynamically adjusted according to material thickness), polishing path (spiral line / reciprocal line, selected based on defect shape), polishing times (1-3 times, determined by defect depth).

[0050] Its beneficial effects are: 1. Compared with traditional manual inspection or single visible light imaging method, the detection accuracy is improved, and the false detection rate is reduced. At the same time, the whole process realizes automatic detection, greatly reduces the dependence on manual experience, and improves the detection efficiency. 2. Non-contact detection of internal gear meshing degree, balance wheel runout and other key structure parameters of watches, avoiding the efficiency loss and product damage risk caused by traditional disassembly detection. 3. The system can output watch quality score and defect repair suggestion, assisting enterprises to realize quality grading, process parameter adjustment and production process control, and improve the overall product qualification rate.

[0051] Please refer to Figure 2 In the watch production quality detection method based on machine vision, the multispectral image is collected, the surface reflection is eliminated through the polarization filter, the defect features are enhanced through the multispectral fusion technology, and the initial feature image is obtained, including the following steps: Step 201, using a multi-spectral image sensor and an adjustable angle light source array, multi-angle and multi-band image acquisition is performed on the watch sample, the multi-spectral image sensor at least includes ultraviolet, visible light and near-infrared bands, and a multi-spectral image is obtained; Step 202, based on the polarization state decomposition of the Stokes vector, the optimal polarization angle of the multi-spectral image is calculated, the polarization image is fused, and a first multi-spectral image is obtained; Step 203, the images of different angle light sources in the first multi-spectral image are fused by a weighted least squares algorithm, and the weight coefficient is adaptively adjusted by a maximum entropy criterion, and a second multi-spectral image is obtained; Step 204, using an improved NSCT non-subsample contourlet transform, using adaptive weighted average in low-frequency subbands and Laplace energy criterion in high-frequency subbands, illumination equalization based on Retinex theory is performed on the second multi-spectral image, and an initial feature image is obtained.

[0052] The above describes the embodiment of the watch production quality detection method based on machine vision of the application, please refer to Figure 3 The watch production quality detection system based on machine vision comprises the following modules: A multi-spectral image acquisition module is used to acquire multi-spectral images, eliminate surface reflection through a polarization filter, enhance defect features by using multi-spectral fusion technology, and obtain an initial feature image; A network model establishment module is used to establish an improved YOLOv5s convolutional neural network model based on a YOLOv5s convolutional neural network model, fuse dual-channel data of visible light and infrared images in the input layer, and increase an SPP-F spatial pyramid pooling layer in the network structure. A watch defect detection module is used to input the initial feature image into the improved YOLOv5s convolutional neural network model, output a part positioning area, perform sub-pixel edge analysis on the part positioning area based on a Zernike moment edge positioning algorithm, and obtain a watch defect detection result. A watch trajectory analysis module is used to acquire a watch pointer motion trajectory through a sensor, analyze the watch pointer motion trajectory by combining an optical flow method and a Kalman filter, and obtain a trajectory analysis result. A detection report generation module is used to generate a detection report according to the trajectory analysis result and the watch defect detection result, mark a defect position, and recommend polishing process parameters.

[0053] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above-mentioned embodiments, and the above-mentioned embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Various changes and improvements can be made to the present application without departing from the spirit and scope of the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.

Claims

1. A method for detecting the production quality of a timepiece based on machine vision, characterized in that, The watch production quality detection method comprises the following steps: Collecting a multi-spectral image, eliminating surface reflection through a polarization filter, enhancing defect features using multi-spectral fusion technology, and obtaining an initial feature image; Based on the YOLOv5s convolutional neural network model, the dual-channel data of visible light and infrared images are fused at the input layer, and an SPP-F spatial pyramid pooling layer is added to the network structure to obtain an improved YOLOv5s convolutional neural network model; The initial feature image is input into the improved YOLOv5s convolutional neural network model, and a part positioning area is output; the part positioning area is subjected to sub-pixel edge analysis based on a Zernike matrix edge positioning algorithm to obtain a watch defect detection result; The trajectory analysis result is obtained by collecting the watch pointer motion trajectory through a sensor and analyzing the watch pointer motion trajectory in combination with an optical flow method and a Kalman filter; A detection report is generated according to the trajectory analysis result and the watch defect detection result, the defect position is marked, and polishing process parameters are recommended.

2. The machine vision-based timepiece production quality inspection method according to claim 1, characterized in that, The collection of a multi-spectral image, the elimination of surface reflection through a polarization filter, the enhancement of defect features using multi-spectral fusion technology, and the obtaining of an initial feature image comprise: Multi-angle and multi-band image collection of a watch sample is performed using a multi-spectral image sensor and an adjustable-angle light source array, the multi-spectral image sensor at least including ultraviolet, visible light, and near-infrared bands, and a multi-spectral image is obtained; Based on polarization state decomposition of a Stokes vector, the best polarization angle of the multi-spectral image is calculated, polarization images are fused, and a first multi-spectral image is obtained; Different-angle light source images in the first multi-spectral image are fused through a weighted least squares algorithm, and the weight coefficient is adaptively adjusted through a maximum entropy criterion to obtain a second multi-spectral image; Using an improved NSCT non-subsample contourlet transform, adaptive weighted averaging is used in a low-frequency subband, and Laplace energy and criterion are used in a high-frequency subband, illumination equalization of the second multi-spectral image is performed based on Retinex theory, and an initial feature image is obtained.

3. The machine vision-based timepiece production quality inspection method according to claim 1, characterized in that, The YOLOv5s convolutional neural network model, the dual-channel data of visible light and infrared images are fused at the input layer, and an SPP-F spatial pyramid pooling layer is added to the network structure to obtain an improved YOLOv5s convolutional neural network model, comprising: The spatial deviation of the two types of images is corrected through coordinate mapping, the features at the same physical position are aligned at the pixel level, and the deviation is within 1 pixel; A channel attention mechanism is introduced to dynamically allocate weights to the feature maps of the visible light channel and the infrared channel; The fused feature maps are subjected to dimension integration through a 3x3 convolutional layer, and the dual-channel information is compressed into a single-channel feature map.

4. The machine vision-based timepiece production quality inspection method according to claim 1, characterized in that, The YOLOv5s convolutional neural network model, the dual-channel data of visible light and infrared images are fused at the input layer, and an SPP-F spatial pyramid pooling layer is added to the network structure to obtain an improved YOLOv5s convolutional neural network model, further comprising: Four sizes of pooling kernels are used, respectively corresponding to the large-scale contour features and the tiny defect details of the watch parts; The number of multi-scale feature channels after pooling is halved by convolution, and the SPP-F layer is used to capture large-scale contour features of the shell edge, medium-scale features of the pointer assembly, and small-scale defects of the micro-scratch.

5. The machine vision-based timepiece production quality inspection method according to claim 1, characterized in that, The initial feature image is input into the improved YOLOv5s convolutional neural network model, and a part positioning area is output; a sub-pixel edge analysis is performed on the part positioning area based on a Zernike moment edge positioning algorithm, and a watch defect detection result is obtained, including: The part positioning area is subjected to Gaussian filtering, and the filter kernel size is dynamically adjusted according to the defect density in the area; The edge features of the low-contrast areas of the dial printing pattern and the metal base are enhanced through local histogram equalization; Based on the gradient direction consistency principle, false edges caused by surface reflection and stains are removed, and continuous and directionally consistent true edge profiles are retained, to obtain the watch defect detection result.

6. The machine vision-based timepiece production quality inspection method according to claim 1, characterized in that, The sensor collects the watch pointer motion trajectory, and the optical flow method and Kalman filter are used to analyze the watch pointer motion trajectory, to obtain a trajectory analysis result, including: The tip and central shaft sleeve of the metal pointer are selected as double tracking points, and the skeleton line midpoint of the hollow pointer is extracted through contour analysis; An adaptive threshold segmentation algorithm is used to separate the pointer from the background, and a pyramid Lucas-Kanade optical flow algorithm is used to calculate the continuous frame images, to obtain the trajectory analysis result.

7. The machine vision-based timepiece production quality inspection method according to claim 1, characterized in that, A detection report is generated according to the trajectory analysis result and the watch defect detection result, the defect position is marked, and the polishing process parameters are recommended, including: A mapping table is established according to historical process data, the polishing effect is predicted through a random forest model, and the parameters of the rule base are dynamically adjusted within a range of 10%.

8. A machine vision-based watch production quality detection system, characterized in that, The watch production quality detection method includes the following modules: A multispectral image acquisition module is used to acquire multispectral images, eliminate surface reflection through a polarizing filter, enhance defect features using multispectral fusion technology, and obtain an initial feature image; A network model establishment module is used to establish an improved YOLOv5s convolutional neural network model based on a YOLOv5s convolutional neural network model, fuse dual-channel data of visible light and infrared images at the input layer, and add an SPP-F spatial pyramid pooling layer in the network structure; A watch defect detection module is used to input the initial feature image into the improved YOLOv5s convolutional neural network model, output a part positioning area, and perform sub-pixel edge analysis on the part positioning area based on a Zernike moment edge positioning algorithm, to obtain a watch defect detection result; A watch trajectory analysis module is used to collect the watch pointer motion trajectory through a sensor, and analyze the watch pointer motion trajectory using an optical flow method and a Kalman filter, to obtain a trajectory analysis result; A detection report generation module is used to generate a detection report according to the trajectory analysis result and the watch defect detection result, mark the defect position, and recommend polishing process parameters.

9. The machine vision-based watch production quality inspection system of claim 8, wherein, The watch trajectory analysis module includes the following sub-modules: An analysis sub-module is used to select the tip and central shaft sleeve of the metal pointer as double tracking points, and extract the skeleton line midpoint of the hollow pointer through contour analysis; An adaptive threshold segmentation algorithm is used to separate the pointer from the background, and a pyramid Lucas-Kanade optical flow algorithm is used to calculate the continuous frame images, to obtain the trajectory analysis result. The computing submodule is used for separating the pointer from the background by using an adaptive threshold segmentation algorithm, and is used for calculating the continuous frame images by using a pyramid Lucas-Kanade optical flow algorithm to obtain a trajectory analysis result.

10. The machine vision-based watch production quality inspection system according to claim 8, wherein, The detection report generation module comprises the following submodules: The adjusting submodule is used for establishing a mapping table according to historical process data, predicting a polishing effect by using a random forest model, and dynamically adjusting parameters in a rule library within a range of 10%.

Citation Information

Patent Citations

  • Visual technology-based clock spare and accessory part quality detection method

    CN117132506A

  • Watch case vacuum coating defect detection method and system based on image processing

    CN118628500A

  • Automatic detection method for travel time accuracy of clock based on machine vision

    CN119540192A

  • Watch component defect detection method and device, computer equipment and storage medium

    CN119810033A

  • Defect layer detection method and system based on light field camera and detection production line

    WO2022126871A1