Automated Detection Method for the Timekeeping Accuracy of Clocks and Watches Based on Machine Vision
Through machine vision technology, combined with high-resolution cameras and image processing algorithms, the clock images and video streams are captured and analyzed in real time, and the artificial error and environmental impact problems in traditional detection methods are solved, achieving efficient and accurate automated detection of clocks.
Patent Information
- Application Number
- CN202411642291.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-11-18
AI Technical Summary
Traditional clock time detection methods rely on manual operation, have large subjective errors and low degree of automation, cannot adapt to mass production needs, and cannot track the impact of environmental factors on time accuracy in real time.
Using machine vision technology, images and video streams are captured through high-resolution cameras, combined with Hough transformation, image segmentation, optical flow method and Kalman filter, static and dynamic error indexes are extracted, and the time travel error of clocks is comprehensively analyzed.
It realizes efficient and accurate detection of watch time travel errors, reduces human errors, can automatically screen in mass production, comprehensively evaluate the impact of environmental factors on time travel accuracy, and improves detection efficiency and accuracy.
Smart Images

Figure CN119540192B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and in particular to an automated detection method for the timekeeping accuracy of clocks and watches based on machine vision. Background Art
[0002] With the continuous improvement of the demand for time accuracy in modern society, the accuracy of clocks and watches as timekeeping devices has attracted much attention. Whether it is a wristwatch in daily life or a precision timekeeping device in the industrial field, accurate time display not only affects personal life but also plays a crucial role in multiple industries. In the fields of rapidly developing industrial production, aerospace, medical equipment, etc., the accuracy requirements for timekeeping devices are becoming increasingly strict. However, traditional manual detection methods are inefficient and have large errors, and cannot meet the current high-efficiency and accurate detection requirements, which has promoted the research and development of detection methods for the timekeeping accuracy of clocks and watches based on automation technology.
[0003] Traditional clock and watch timekeeping detection methods mostly use mechanical or electronic timing devices, and record the timekeeping deviation of clocks and watches through manual operation. These methods have significant deficiencies. In the manual detection process, it depends on the experience and judgment of the operator, and subjective errors are easily generated, which cannot ensure the accuracy of detection. Secondly, traditional methods are usually limited to the static analysis of the timekeeping of clocks and watches, and cannot track the error situation of clocks and watches during dynamic operation, especially ignoring the potential impact of environmental factors (such as temperature, humidity, vibration, etc.) on the timekeeping accuracy of clocks and watches. In addition, the automation level of traditional detection methods is low, and they cannot meet the needs of large-scale clock and watch detection in a batch production environment. The detection efficiency is low and it is difficult to meet the requirements of industrial production. Therefore, there is an urgent need for a solution based on machine vision and automation technology to improve the efficiency and accuracy of clock and watch timekeeping detection. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the present invention provides an automated detection method for the timekeeping accuracy of clocks and watches based on machine vision, which solves the problems in the above background art.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: An automated detection method for the accuracy of clock running time based on machine vision, comprising the following steps: S1. Real-time capture of the target clock image and video stream through a high-resolution camera, and preprocess the captured target clock image and video stream; S2. Extract features and calculate the angle of the preprocessed target clock image through the Hough transform and image segmentation technology, and perform feature matching with the standard dial image to obtain the static error index; S3. Perform dynamic tracking on the preprocessed video stream through the optical flow method and the Kalman filter, analyze the influence of environmental factors on the clock running time error, and obtain the dynamic error index; S4. Comprehensively analyze the static error index and the dynamic error index to obtain the clock running time error index, compare the clock running time error index with the set error threshold, and judge the accuracy of the clock running time.
[0006] Further, the specific process of preprocessing the captured target clock image and video stream is as follows: Perform color space conversion on the captured target clock image, convert the RGB color space to a grayscale image, and perform denoising processing on the image; Enhance the clock edge features through edge detection, and extract the effective image area of the clock; Perform frame extraction and geometric correction on the video stream.
[0007] Further, the specific process of extracting features and calculating the angle of the preprocessed target clock image through the Hough transform and image segmentation technology is as follows: Separate the dial and pointer parts of the preprocessed clock image through image segmentation technology, identify and extract the circular features, center position and radius of the clock in the image through the Hough transform; Identify the pointer edge through the edge detection method, and mark the pointer to obtain the angle information of the pointer, including the pointer angle, time scale position and corresponding angle value.
[0008] Further, the specific process of performing feature matching with the standard dial image to obtain the static error index is as follows: Calculate the difference between the pointer angle extracted from the preprocessed clock image and the standard angle of the corresponding pointer in the standard dial image; Compare the calculated angle difference with the preset threshold to obtain the static error index.
[0009] Further, the specific process of performing dynamic tracking on the preprocessed video stream through the optical flow method and the Kalman filter, and analyzing the influence of environmental factors on the clock running time error is as follows: Track the pointer position of each frame in the video stream through the optical flow method, calculate the motion vector of the pointer in each frame of the image, and extract the dynamic position information of the pointer; Smooth the dynamic position information of the pointer obtained by tracking through the optical flow method through the Kalman filter, compare the smoothed dynamic pointer trajectory with the theoretical pointer motion trajectory, and obtain the real-time dynamic error value of the pointer; Analyze the influence of environmental factors on the dynamic error, evaluate the influence of environmental changes on the clock running time accuracy, and obtain the environmental correction factor.
[0010] Further, the specific process of obtaining the dynamic error index is as follows: The real-time dynamic error value of the pointer is calculated based on the actually measured pointer displacement and the displacement that the pointer should have theoretically; the real-time dynamic error value of the pointer is corrected based on the environmental correction factor, and the dynamic error index is calculated based on the corrected real-time dynamic error value of the pointer.
[0011] Further, the specific process of comprehensively analyzing the static error index and the dynamic error index to obtain the timekeeping error index of the clock is as follows: The static error index and the dynamic error index are weighted and calculated according to a predetermined weight to generate a comprehensive error value; statistical analysis is performed on the comprehensive error value to evaluate its fluctuation range and trend, and the timekeeping error index of the clock is obtained.
[0012] Further, the specific process of judging the timekeeping accuracy of the clock is as follows: The timekeeping error index of the clock is compared with a preset error threshold; if the timekeeping error index of the clock is less than or equal to the preset error threshold, it means that the clock keeps time accurately; if the timekeeping error index of the clock is greater than the preset error threshold, it means that the clock has a timekeeping error.
[0013] The present invention has the following beneficial effects:
[0014] (1) The automatic detection method for the timekeeping accuracy of a clock based on machine vision captures the images and video streams of the target clock in real time through a high-resolution camera, provides high-definition raw data, helps improve the accuracy of subsequent processing, improves the quality of the images, makes the feature extraction of the clock more accurate and reliable, and at the same time reduces noise and distortion. Through the Hough transform and image segmentation techniques, the dial and the pointer of the clock can be accurately identified, and the circular features and the angular information of the clock pointer in the target image can be extracted. By performing feature matching with the standard dial image, the static error index is obtained, which helps detect the timekeeping accuracy of the clock in a stationary state, provides a basis for subsequent dynamic error analysis, and ensures the basic accuracy of the clock without environmental interference.
[0015] (2) The automatic detection method for the running accuracy of a clock based on machine vision can effectively capture the movement trajectory of the clock hands in the video stream through the optical flow method and the Kalman filter, and extract the dynamic position information of the hands. By smoothing the movement trajectory with the Kalman filter, the influence of noise on the detection result can be eliminated, and a more accurate real-time dynamic error value can be obtained. By analyzing the influence of environmental factors on the running accuracy in combination with the environmental correction factor, the detection system can more comprehensively and dynamically evaluate the running accuracy of the clock in the actual use environment. By comprehensively analyzing the static error index and the dynamic error index, the overall running accuracy of the clock can be comprehensively evaluated. By comparing the comprehensively obtained running error index with the set error threshold, it can be quickly determined whether the running of the clock meets the standard. This ensures the accuracy and efficiency of the system, and can realize automatic screening during mass production or maintenance, reducing the possibility of human misjudgment.
[0016] Of course, it is not necessary for any product implementing the present invention to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flowchart of the automatic detection method for the running accuracy of a clock based on machine vision according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] The embodiment of the present application solves the problem of difficult high-precision and real-time monitoring in the process of detecting the running error of a clock through the automatic detection method for the running accuracy of a clock based on machine vision.
[0019] The general idea for the problems in the embodiment of the present application is as follows:
[0020] Real-time capture the target clock image and video stream through a high-resolution camera, and preprocess the captured target clock image and video stream.
[0021] Extract features and calculate angles for the preprocessed target clock image through the Hough transform and image segmentation technology, and perform feature matching with the standard dial image to obtain the static error index.
[0022] Perform dynamic tracking on the preprocessed video stream through the optical flow method and the Kalman filter, analyze the influence of environmental factors on the running error of the clock, and obtain the dynamic error index.
[0023] Comprehensively analyze the static error index and the dynamic error index to obtain the running error index of the clock, and compare the running error index of the clock with the set error threshold to judge the running accuracy of the clock.
[0024] Please refer to Figure 1, an embodiment of the present invention provides a technical solution: an automated detection method for the running accuracy of a clock based on machine vision, including the following steps: S1. Real-time capture of the target clock image and video stream by a high-resolution camera, and preprocess the captured target clock image and video stream; S2. Extract features and calculate the angle of the preprocessed target clock image through the Hough transform and image segmentation technology, and perform feature matching with the standard dial image to obtain the static error index; S3. Perform dynamic tracking on the preprocessed video stream through the optical flow method and Kalman filter, analyze the influence of environmental factors on the clock running error, and obtain the dynamic error index; S4. Comprehensively analyze the static error index and the dynamic error index to obtain the clock running error index, compare the clock running error index with the set error threshold, and judge the running accuracy of the clock.
[0025] In this implementation scheme, S1. Image and video stream capture and preprocessing: High-resolution camera: Used to capture the image and video stream of the target clock. High resolution can ensure that the captured image has sufficient details for subsequent processing. S2. Feature extraction and static error calculation: Hough transform: A technique used to identify geometric shapes (such as circles) in an image, which can accurately extract the circular features of the clock dial and hands. Image segmentation: Separate different parts of the clock image (such as the dial and hands) for independent analysis of each part. Static error index: By comparing the current pointer position of the clock with the pointer position of the standard dial, calculate the angular difference between the two to determine the running error of the clock under static conditions. S3. Dynamic tracking and error analysis: Optical flow method: A technique used to detect motion in an image, which tracks the dynamic motion of the clock hands by analyzing the changes between video frames to obtain the motion trajectory of the hands. Kalman filter: Used to smooth the motion data obtained by the optical flow method and reduce the influence of noise to obtain a more accurate motion trajectory of the hands. Dynamic error index: Calculate the error of the clock under dynamic conditions according to the difference between the actual motion trajectory and the theoretical motion trajectory of the pointer in the video stream. S4. Comprehensive analysis and accuracy judgment: Clock running error index: Combine the static error index and the dynamic error index to comprehensively evaluate the overall running accuracy of the clock. Error threshold: A pre-set standard used to judge whether the error of the clock is within an acceptable range. If the error index exceeds the threshold, it indicates that there is a problem with the inaccurate running of the clock.
[0026] Specifically, the specific process of preprocessing the captured target clock image and video stream is as follows: Perform color space conversion on the captured target clock image, convert the RGB color space to a grayscale image, and perform denoising processing on the image; Enhance the clock edge features through edge detection and extract the effective image area of the clock; Perform frame extraction and geometric correction on the video stream.
[0027] In this implementation scheme, color space conversion: converting the RGB color space to a grayscale image: RGB is a combination of the three colors red, green, and blue. Each pixel in an RGB image contains three color channels. A grayscale image only contains luminance information (i.e., a black-and-white image). By converting the RGB image to a grayscale image, the complexity of image processing is simplified, important structural information is retained, which is beneficial for subsequent feature extraction and analysis. Denoising processing: During the image capture process, noise may exist in the image due to factors such as lighting conditions or sensor noise. Denoising processing (such as using Gaussian filtering, mean filtering, etc.) aims to remove random noise in the image, maintain the clarity of the image, and improve the accuracy of subsequent analysis. Edge detection and feature enhancement: Edge detection: It is a technique used to identify the edges of objects in an image. By detecting rapid changes in image luminance, key features such as the clock outline and hands can be extracted. In this process, commonly used edge detection algorithms include the Sobel operator and the Canny edge detection. The enhancement of edge features helps to accurately identify the positions of the dial and hands subsequently. Extracting the effective image region: The image of the clock usually contains some irrelevant background information. Extracting the effective image region of the clock can reduce the computational amount and improve the accuracy of analysis. This step focuses the image processing on the part containing the dial and hands by identifying the clock outline, thereby excluding unnecessary background interference. Frame extraction and geometric correction: Frame extraction: Extracting single-frame images from the video stream at fixed time intervals for analysis. This process ensures that there is a corresponding image available for processing at each time point in the video stream. Geometric correction: Due to the shooting angle, position of the camera, or lens distortion, the captured clock image may be distorted or deformed. Through geometric correction techniques (such as perspective transformation and correction algorithms), the true shape and size of the image can be restored, ensuring the accuracy of subsequent feature extraction and error calculation.
[0028] Specifically, the specific process of feature extraction and angle calculation for the preprocessed target clock image through the Hough transform and image segmentation technology is as follows: The preprocessed clock image is separated into the dial and hand parts through image segmentation technology, and the circular features, the center position and radius of the clock in the image are identified and extracted through the Hough transform; the edge of the hand is identified through the edge detection method, and the hand is marked to obtain the angle information of the hand, including the hand angle, the time scale position, and the corresponding angle value.
[0029] In this implementation scheme, image segmentation is to divide an image into several regions with the same attributes. For the processing of clock images, image segmentation is used to separate different parts of the clock, especially to separate the dial part from the pointer part. This process helps to analyze the characteristics of each part separately. Threshold-based segmentation can distinguish the outline of the dial and the outline of the pointer from the preprocessed image, ensuring more accurate subsequent feature extraction. The Hough Transform is a technique used to detect geometric shapes in an image. In clock image processing, the Hough Transform is often used to identify circular features, that is, the dial of the clock. Through the Hough circle transform, the circular edge corresponding to the clock dial can be found in the image, and then the center position and radius of the clock can be extracted. This provides a basis for determining the geometric structure of the clock and the position of the pointer relative to the dial. Edge detection is a technique for identifying the edges of objects by detecting regions with large changes in brightness in an image. In a clock image, the edge of the pointer usually shows a sharp change in brightness. By using an edge detection method (such as the Canny edge detection algorithm), the edge contour of the pointer can be accurately identified, thus precisely locating the position of the pointer. The purpose of this step is to provide a reference for the subsequent calculation of the pointer angle. After identifying the edge of the pointer, the next step is to mark the pointer, that is, to determine the starting point and ending point of the pointer. In a clock with a circular dial, the position of the pointer can be represented by its relative angle to the center of the clock. Pointer angle calculation is based on geometric relationships. The line connecting the end point of the pointer to the center of the dial is taken as a vector, and the angle between this vector and the fixed time scale (usually the 12 o'clock position) is calculated to obtain the current angle information of the pointer. This angle information includes the pointer angle (the specific positions of the minute hand, hour hand, and second hand), the time scale positions (such as the 3 o'clock, 6 o'clock, etc. hour scales), and the corresponding angle values (the angle from the center of the clock to the scale, usually expressed in degrees). Calculate the error by combining the dial characteristics: After obtaining the angle information of the pointer, these angle values can be compared with the ideal time on the standard clock dial to calculate the static error index of the pointer. For example, when the hour hand should point to the 90-degree position at 3 o'clock, it can be judged whether there is an error in the actual position of the pointer through angle calculation.
[0030] Specifically, the specific process of obtaining the static error index by feature matching with the standard dial image is as follows: Calculate the difference between the pointer angle extracted from the preprocessed clock image and the standard angle of the corresponding pointer in the standard dial image; Compare the calculated angle difference with a preset threshold to obtain the static error index.
[0031] In this implementation scheme, the calculation formula for the pointer angle difference: Δθ i = θ measured,i - θ standard,i ; Δθ i : The angle difference of the i-th pointer (hour hand, minute hand, second hand). θmeasured,i : The actually measured angle of the i-th pointer. θ standard,i : The standard angle that the i-th pointer should have on the standard dial. To determine whether the error is within the acceptable range, the calculated angle difference needs to be compared with a preset threshold. If the error exceeds the threshold, the error is recorded as a significant error. θ threshold : The preset angle error threshold, representing the maximum allowable error range. The formula for the static error index is as follows: Where, E static : The cumulative static error index. T: The total observation time. Δθ i (t): The instantaneous angle error of the i-th pointer at time t. W time (t): The time weighting factor, used to consider the influence of errors at different times (set different weights according to the running time of the clock or the detection time period).
[0032] Specifically, the dynamic tracking of the preprocessed video stream is performed by the optical flow method and the Kalman filter. The specific process of analyzing the influence of environmental factors on the clock running error is as follows: The position of the pointer in each frame of the video stream is tracked by the optical flow method, the motion vector of the pointer in each frame image is calculated, and the dynamic position information of the pointer is extracted; the dynamic position information of the pointer obtained by tracking with the optical flow method is smoothed by the Kalman filter, the smoothed dynamic pointer trajectory is compared with the theoretical pointer motion trajectory, and the real-time dynamic error value of the pointer is obtained; the influence of environmental factors on the dynamic error is analyzed, the influence of environmental changes on the clock running accuracy is evaluated, and the environmental correction factor is obtained.
[0033] In this implementation, the optical flow method is used to track the movement of the pointer: The optical flow method is an image-based motion detection technique used to estimate the motion of objects in an image. The specific process is as follows: Tracking the pointer position in each frame of the image: The optical flow method analyzes each frame of the video stream to track the position change of the pointer in the image. Each frame can be regarded as a static image, and the optical flow method calculates the motion direction and speed of the pointer by detecting the change in image brightness. Calculating the motion vector: Based on the change in the pointer position between frames, the optical flow method calculates the motion vector of the pointer. This vector represents the moving direction and distance of the pointer in the image, reflecting the dynamic position information of the pointer. Smoothing processing with the Kalman filter: The Kalman filter is a recursive algorithm used to smooth signals and suppress noise. It updates the predicted value by comparing the prediction of the system state with the measurement, thereby optimizing the measured pointer position information. The specific steps are as follows: Smoothing the pointer trajectory: The Kalman filter processes the pointer motion vector obtained by the optical flow method to reduce errors caused by noise or image jitter and obtain a smooth pointer motion trajectory. Comparing with the theoretical trajectory: The smoothed pointer trajectory is compared with the theoretically standard pointer motion trajectory, and the difference part is the real-time dynamic error value. This error reflects the deviation between the actual motion of the pointer and the theoretical motion trajectory during the actual movement process. Obtaining the environmental correction factor: Analyzing the influence of environmental factors: Environmental factors, such as temperature, humidity, and light changes, may affect the motion trajectory of the clock pointer. For example, temperature changes may cause the expansion or contraction of metal parts, thereby affecting the motion accuracy of the pointer. Evaluating the environmental correction factor: Based on the analysis of environmental factors, evaluate the influence of these changes on the pointer motion and calculate the environmental correction factor. The environmental correction factor is used to compensate for the influence of the environment on the pointer motion to ensure more accurate calculation of the clock running error.
[0034] Specifically, the specific process of obtaining the dynamic error index is as follows: The real-time dynamic error value of the pointer is calculated based on the actually measured pointer displacement and the displacement that the pointer should have theoretically; the real-time dynamic error value of the pointer is corrected based on the environmental correction factor, and the dynamic error index is calculated based on the corrected real-time dynamic error value of the pointer.
[0035] In this implementation, the calculation formula of the dynamic error index is as follows: Parameter explanation, D dynamic (t): The dynamic error index at time t, reflecting the running accuracy of the clock at this time. N: The number of frames in the time period used for calculation, that is, the total number of pointer motion vector data extracted by the optical flow method, Δd i (t): In the i-th frame at time t, the real-time dynamic error value of the pointer. It can be calculated according to the following formula: Δd i (t) = d measured,i (t) - dtheoretical,i where: d measured,i (t): the actually measured pointer displacement in the i-th frame. d theoretical,i : the displacement that the pointer should have theoretically. K env (t): the environmental correction factor, which changes with time t and is used to adjust the dynamic error of the pointer to consider the influence of the environment.
[0036] Specifically, the specific process of obtaining the timekeeping error index of the clock by comprehensively analyzing the static error index and the dynamic error index is as follows: The static error index and the dynamic error index are weighted and calculated according to a predetermined weight to generate a comprehensive error value; statistical analysis is performed on the comprehensive error value to evaluate its fluctuation range and trend, and the timekeeping error index of the clock is obtained.
[0037] In this implementation scheme, the static error index (E static ) and the dynamic error index (E dynamic ) are weighted and calculated to generate the timekeeping error index (E total ) of the clock. The formula for weighted calculation is as follows: E total = w s ·E static + w d ·E dynamic ; where: E total : the timekeeping error index of the clock, which reflects the comprehensive error performance of the clock's timekeeping. w s : the weight of the static error index, indicating the importance of this index in the comprehensive error value. E static : the static error index. w d : the weight of the dynamic error index, indicating the importance of this index in the comprehensive error value. E dynamic : the dynamic error index. The weights w s and w d should be adjusted according to the requirements of the specific application scenario and the importance evaluation of the static and dynamic errors, and usually satisfy w s + w d = 1. The weighted calculation enables the comprehensive consideration of the influences of the static and dynamic errors, thus more comprehensively reflecting the accuracy of the clock. The static error index provides an error evaluation at a specific moment, while the dynamic error index considers the real-time nature of the pointer movement and the influence brought by environmental changes. Statistical analysis helps to understand the stability and accuracy of the clock during long-term operation through the evaluation of the fluctuation range and trend. This analysis can reveal potential sources of deviation and improvement directions.
[0038] Specifically, the specific process of judging the timekeeping accuracy of a clock is as follows: Compare the timekeeping error index of the clock with a preset error threshold; if the timekeeping error index of the clock is less than or equal to the preset error threshold, it indicates that the clock keeps accurate time; if the timekeeping error index of the clock is greater than the preset error threshold, it indicates that the clock has a timekeeping error.
[0039] In this implementation plan, the timekeeping error index of the clock is an indicator obtained by comprehensively evaluating static and dynamic errors, which reflects the overall operation accuracy of the clock under specific conditions. The lower this index, the more accurate the timekeeping of the clock. Set the error threshold. The preset error threshold is determined based on industry standards, product requirements, or laboratory test data, indicating the maximum error range allowed for the clock under normal operating conditions. This threshold should be fully verified to ensure its rationality and applicability in practical applications. The timekeeping error index of the clock is less than or equal to the preset error threshold, which means that the timekeeping error of the clock is within an acceptable range and meets the predetermined performance standards. At this time, it can be judged that the clock keeps accurate time, indicating that its internal mechanism and functional state are good and suitable for continued use or sales. The timekeeping error index of the clock is greater than the preset error threshold, which means that the timekeeping error of the clock exceeds the acceptable range and there is an obvious timekeeping error. At this time, the clock needs to be further inspected and adjusted to eliminate potential faults or error causes to ensure that its performance meets the standard requirements. Through clear judgment criteria, quality control can be effectively carried out to ensure the accuracy of the products leaving the factory and reduce customer complaints and after-sales service costs.
[0040] In summary, this application has at least the following effects:
[0041] An automated detection method for the timekeeping accuracy of a clock based on machine vision captures real-time images and video streams of the target clock through a high-resolution camera and performs preprocessing. It extracts the features of the clock dial and hands through the Hough transform and image segmentation techniques, calculates the hand angles, and matches them with the standard dial image to obtain the static error index. It dynamically tracks the movement trajectory of the hands through the optical flow method and the Kalman filter, analyzes the influence of environmental factors on the timekeeping error, and obtains the dynamic error index. Finally, by comprehensively analyzing the static and dynamic errors, it calculates the timekeeping error index of the clock and compares it with the error threshold to judge the timekeeping accuracy of the clock. This method can automatically and accurately detect the timekeeping error of the clock, improve the detection efficiency, reduce human errors, and comprehensively analyze the influence of environmental factors on the timekeeping accuracy of the clock.
[0042] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0043] The present invention is described with reference to the flowcharts and / or block diagrams of systems, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0044] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0045] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0046] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present invention.
[0047] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.
Claims
1. An automated detection method for the running accuracy of a clock based on machine vision, characterized in that, It includes the following steps: S1. Real-time capture the target clock image and video stream through a high-resolution camera, and preprocess the captured target clock image and video stream; S2. Extract features and calculate the angle of the preprocessed target clock image through the Hough transform and image segmentation technology, and perform feature matching with the standard dial image to obtain the static error index; S3. Perform dynamic tracking on the preprocessed video stream through the optical flow method and Kalman filter, analyze the influence of environmental factors on the clock running error, and obtain the dynamic error index; S4. Comprehensively analyze the static error index and the dynamic error index to obtain the clock running error index, compare the clock running error index with the set error threshold, and judge the accuracy of the clock running; The specific process of performing dynamic tracking on the preprocessed video stream through the optical flow method and Kalman filter, analyzing the influence of environmental factors on the clock running error, and obtaining the dynamic error index is as follows: Track the pointer position of each frame in the video stream through the optical flow method, calculate the motion vector of the pointer in each frame of the image, and extract the dynamic position information of the pointer; Smooth the dynamic position information of the pointer obtained by tracking through the optical flow method by the Kalman filter, compare the smoothed dynamic pointer trajectory with the theoretical pointer motion trajectory, and obtain the real-time dynamic error value of the pointer; Evaluate the influence of environmental changes on the clock running accuracy, and obtain the environmental correction factor; Correct the real-time dynamic error value of the pointer based on the environmental correction factor, and calculate the dynamic error index based on the corrected real-time dynamic error value of the pointer.
2. The automatic detection method for the running accuracy of a clock based on machine vision according to claim 1, characterized in that: The specific process of preprocessing the captured target clock image and video stream is as follows: Perform color space conversion on the captured target clock image, convert the RGB color space to a grayscale image, and perform denoising processing on the image; Enhance the clock edge features through edge detection, and extract the effective image area of the clock; Perform frame extraction and geometric correction on the video stream.
3. The automated detection method for the running accuracy of a clock based on machine vision according to claim 2, characterized in that: The specific process of extracting features and calculating the angle of the preprocessed target clock image through the Hough transform and image segmentation technology is as follows: Separate the dial and pointer parts of the preprocessed clock image through image segmentation technology, and identify and extract the circular features, the center position and radius of the clock in the image through the Hough transform; Identify the pointer edge through the edge detection method, and mark the pointer to obtain the angle information of the pointer, including the pointer angle, the time scale position and the corresponding angle value.
4. The automated detection method for the running accuracy of a clock based on machine vision according to claim 3, characterized in that: The specific process of performing feature matching with the standard dial image to obtain the static error index is as follows: Calculate the difference between the pointer angle extracted from the preprocessed clock image and the standard angle of the corresponding pointer in the standard dial image; Compare the calculated angle difference with the preset threshold to obtain the static error index.
5. The automated detection method for the running accuracy of a clock based on machine vision according to claim 4, wherein: The specific process of comprehensively analyzing the static error index and the dynamic error index to obtain the clock running error index is as follows: Perform weighted calculation on the static error index and the dynamic error index according to the predetermined weight to generate a comprehensive error value; Perform statistical analysis on the comprehensive error value, evaluate its fluctuation range and trend, and obtain the clock running error index.
6. The automatic detection method for the running accuracy of a clock based on machine vision according to claim 5, characterized in that: The specific process of judging the accuracy of the clock running is as follows: Compare the clock running time error index with a preset error threshold; If the clock running time error index is less than or equal to the preset error threshold, it means the clock is running accurately; If the clock running time error index is greater than the preset error threshold, it means the clock has a running time error.
Citation Information
Patent Citations
Clock Accuracy Determining Method And Clock Accuracy Determining Device
CN104867503A
Driver fatigue detection method and device based on steering wheel image
CN106874900A