A calibration method of an automatic detection device of a pointer type instrument and a related device
By selecting dial and pointer images and using an automatic detection device for image recognition and deviation calculation, the error problem caused by manual reading is solved, and high-precision calibration of the pointer instrument detection device is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING BRIGHTY INSTR
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, calibration relies on manual reading of pointer-type instruments as a reference value, which makes it difficult to guarantee the accuracy of machine vision inspection devices and introduces human error.
By selecting dial and pointer images from a preset template library based on the pointer instrument type input by the user, determining the standard value, and using an automatic pointer instrument detection device to acquire and recognize the image, calculate the deviation between the recognized value and the standard value for calibration, and avoid errors introduced by manual reading.
It improves the accuracy and reliability of calibration results of pointer-type instrument automatic testing devices, reduces subjective errors caused by manual visual readings, and ensures the objectivity and repeatability of the calibration process.
Smart Images

Figure CN122134829A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of instrument calibration technology, and in particular to a calibration method and related apparatus for an automatic testing device for pointer-type instruments. Background Technology
[0002] With the continuous improvement of industrial automation and intelligent manufacturing, pointer instruments, as a fundamental instrument widely used in industrial production, equipment operation monitoring, and safety inspection, are facing increasingly higher requirements for inspection efficiency and accuracy. Traditional methods of inspecting pointer instruments by manual visual inspection are not only inefficient but also easily affected by factors such as human experience and visual fatigue, making it difficult to meet the demands of large-scale, standardized, and highly consistent inspections. Therefore, more and more companies are introducing machine vision-based automatic pointer instrument inspection devices to achieve automatic identification and judgment of instrument readings.
[0003] In existing technologies, the accuracy verification and calibration of automatic inspection devices using machine vision pointer instruments typically employs manual-assisted evaluation. Specifically, this involves manually reading the pointer instrument's reading and using this manual reading as a baseline value. This baseline is then compared with the reading obtained by the machine vision device to calculate the detection error and calibrate the automatic inspection device. However, since manual readings are not absolutely accurate, using them as a baseline introduces new uncertainties and fails to accurately reflect the actual precision of the machine vision inspection device. Summary of the Invention
[0004] In view of the above problems, this application provides a calibration method and related apparatus for an automatic testing device for pointer-type instruments, so as to improve the accuracy of the calibration results of the automatic testing device for pointer-type instruments. The specific solution is as follows:
[0005] The first aspect of this application provides a calibration method for an automatic testing device for pointer-type instruments, comprising:
[0006] Based on the type of pointer-type instrument input by the user, select dial image and pointer image from the preset template library and determine standard values. The dial image includes scale and scale value.
[0007] Set the dial image to a preset position and mark the corresponding pointer position on the dial image based on standard values;
[0008] Place the pointer image into the dial image, and make the pointer in the pointer image point to the corresponding pointer position marked on the dial image to obtain the pointer dial image;
[0009] Send the analog dial image to the printer for printing;
[0010] The recognition value is obtained after the automatic detection device for pointer instruments recognizes the printed pointer dial image;
[0011] The identification deviation is obtained based on the difference between the identified value and the standard value.
[0012] Optional, dial images include: dial images with chipped markings, partially obscured dial images, or dial images with stained backgrounds.
[0013] Optionally, the corresponding pointer position is marked on the dial image based on standard values, including:
[0014] Obtain the first angle of the lower limit scale of the dial image, the first scale value of the lower limit scale, the second angle of the upper limit scale, and the second scale value of the upper limit scale.
[0015] Based on the first angle, the second angle, the first scale value, and the second scale value, determine the corresponding angle of the standard value on the dial image, and mark the corresponding pointer position on the dial image based on the corresponding angle.
[0016] Optionally, the pointer image is placed into the dial image, and the pointer in the pointer image is positioned to point to the corresponding pointer position marked on the dial image, resulting in a pointer dial image, including:
[0017] Align the rotation center of the pointer image with the center of the dial image, and control the pointer in the pointer image to point to the corresponding pointer position marked on the dial image to obtain the pointer dial image.
[0018] Optional, the process for determining the standard value includes:
[0019] Obtain the range corresponding to the type of pointer-type instrument;
[0020] Determine multiple detection intervals within the measurement range;
[0021] For each detection interval: take one value in the detection interval and determine it as a standard value.
[0022] Optionally, for each detection interval: a value within the detection interval is selected and defined as a standard value, including:
[0023] For each detection interval: take one scale in the detection interval as the target scale, select a preset deviation ratio that has not been selected, and superimpose the deviation ratio on the scale value of the target scale to obtain a standard value. The preset deviation ratio is multiple values between -100% and 100%.
[0024] Optionally, the method further includes the following steps before sending the pointer dial image to the printer for printing:
[0025] Adjust the brightness of the pointer dial image based on the ambient light of the application scenario for pointer-type meters.
[0026] A second aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the calibration method of the pointer-type instrument automatic detection device described in the first aspect or any implementation thereof.
[0027] A third aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0028] The memory is used to store computer programs;
[0029] The processor is used to execute the computer program so that the electronic device can implement the calibration method of the pointer-type instrument automatic detection device described in the first aspect or any implementation thereof.
[0030] A fourth aspect of this application provides a computer storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to perform a calibration method for an automatic detection device of a pointer-type instrument as described in the first aspect or any implementation thereof.
[0031] By employing the above technical solution, compared with existing calibration methods that rely on manual reading of pointer instruments as reference values, this invention obtains a pointer dial image by sequentially selecting dial images, scale lines, pointers, and standard values from a preset template library based on the type of pointer instrument input by the user. An automatic pointer instrument detection device then performs image acquisition and image recognition on the pointer dial image to obtain the recognition value corresponding to the calibration point image. The deviation between the recognition value corresponding to the calibration point image and the standard value corresponding to the calibration point image is calculated to calibrate the automatic pointer instrument detection device. This avoids subjective errors introduced by manual visual reading and improves the accuracy of the calibration results of the automatic pointer instrument detection device. Attached Figure Description
[0032] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0033] Figure 1 A schematic flowchart illustrating a calibration method for an automatic testing device for pointer-type instruments provided in this application;
[0034] Figure 2A schematic diagram of the pointer style provided in this application;
[0035] Figure 3 A schematic diagram of a pointer dial with a standard value of 0.1 MPa provided for this application;
[0036] Figure 4 A schematic diagram of a pointer dial with a standard value of 0.198 MPa provided for this application;
[0037] Figure 5 A schematic diagram of a pointer dial with a standard value of 0.296 MPa provided for this application;
[0038] Figure 6 A schematic diagram of a pointer dial with a standard value of 0.394 MPa provided for this application;
[0039] Figure 7 A schematic diagram of a pointer dial with a standard value of 0.492 MPa provided for this application;
[0040] Figure 8 A schematic diagram of a pointer dial with a standard value of 0.59 MPa provided for this application;
[0041] Figure 9 A schematic block diagram of an electronic device provided in this application. Detailed Implementation
[0042] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0043] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0044] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0045] This application provides a calibration method for an automatic testing device for pointer-type instruments, such as... Figure 1 The method may include the following steps:
[0046] S101: Based on the type of pointer instrument input by the user, select a dial image and pointer image from a preset template library and determine a standard value. The dial image includes scale and scale value.
[0047] Optionally, in this embodiment, the user-inputted type information of the pointer instrument can be received first. The type of pointer instrument includes parameters such as instrument category, measuring range, nominal diameter, and scale distribution. A matching query can be performed in a preset template library based on the type of pointer instrument. The template library is a pre-established image and parameter database that stores dial images of various specifications and pointer images matching each dial image, and configures corresponding measuring range parameters and scale distribution data for each type of pointer instrument. The dial image is two-dimensional image data simulating the structure of a real pointer instrument dial, including scale lines and corresponding scale values. The scale lines represent the numerical distribution position, and the scale values represent the specific measured values. The pointer image is a pointer structure image matching the structure of the dial image, containing the pointer body and rotation center information, such as... Figure 2 The image shown is a pointer style diagram.
[0048] After selecting the dial image and pointer image, a standard value is determined based on the measurement range corresponding to the type of pointer instrument. Specifically, a value is selected within the measurement range according to preset rules as the standard value. This standard value is used to subsequently determine the pointer's pointing position in the dial image. The standard value can be selected as an integer or non-integer scale value, depending on the testing requirements, to verify the automatic detection device's ability to recognize different scale positions. This method ensures that the dial image, pointer image, and standard value are consistent in structural parameters and measurement range, providing an accurate basis for subsequent pointer pointing calculations and image generation, and improving the standardization and repeatability of the calibration process.
[0049] S102: Set the dial image to a preset position and mark the corresponding pointer position on the dial image based on the standard value;
[0050] Optionally, in this embodiment, the dial image is set at a preset position, and the corresponding pointer pointing position is marked on the dial image based on a standard value. Specifically, the dial image is first loaded into a preset position in the image processing area. The preset position is a fixed image coordinate region, and a polar coordinate system is established using the center of the dial image as the reference point for angle calculation. After the dial image is positioned, the scale values corresponding to the lower and upper limits of the range in the dial image and their angular positions in the image are read, thereby establishing a mapping relationship between scale values and angles. Subsequently, based on the proportional relationship between the standard value and the range, the corresponding angle of the standard value in the dial image is calculated using linear interpolation. The corresponding angle is obtained by converting the angle difference within the range interval with the scale value difference. After obtaining the corresponding angle, a radial positioning mark is generated in the direction of the corresponding angle, starting from the center of the dial image, thereby forming the pointer pointing position on the dial image. Preferably, the pointer pointing position can be pixel-level corrected to align the mark position with the center of the scale line, ensuring that the pointer image can accurately point to this position when rotated subsequently. By using the above method, the standard value can be mapped to a specific pointing position in the dial image through a clear angle calculation process, avoiding errors caused by manual estimation, thereby improving the pointer positioning accuracy and the repeatability of the calibration process.
[0051] S103: Place the pointer image into the dial image, and make the pointer of the pointer image point to the corresponding pointer position marked on the dial image to obtain the pointer dial image;
[0052] Optionally, in this embodiment, the pointer image is placed into the dial image, and the pointer in the pointer image is aligned with the pointer's position marked on the dial image to obtain a pointer dial image. Specifically, after marking the pointer's position, the coordinates of the center of the dial image are first obtained, and the rotation center of the pointer image is determined. The rotation center is the geometric center point around which the pointer rotates. Then, through image translation, the rotation center of the pointer image is moved to completely coincide with the center of the dial image, thereby establishing a unified rotation reference. After center alignment, the pointer image is rotated based on the angle value corresponding to the pointer's position, causing the pointer image to rotate around the rotation center to the direction of the pointer's position. The rotation transformation can be calculated using a two-dimensional rotation matrix, transforming the coordinates of each pixel in the pointer image according to the target angle to ensure that the image proportions are not distorted during rotation. After rotation, the pointer image and the dial image are overlaid to generate a pointer dial image containing the scale, scale value, and the position corresponding to the pointer's standard value. Preferably, after generating the pointer dial image, the position of the pointer tip is verified at the pixel level to ensure that it is consistent with the radial direction of the pointer's pointing position. This method allows the spatial position of the pointer to be entirely controlled by geometric calculations, avoiding errors from manual placement and thus improving the accuracy of the pointer dial image generation and the reliability of the calibration results.
[0053] S104: Send the pointer dial image to the printer for printing;
[0054] Optionally, in this embodiment, after generating the pointer dial image, the output parameters of the pointer dial image can be set first, including image resolution, physical size ratio, and page margin parameters, so that the printed size of the pointer dial image is consistent with the actual dial size of the pointer instrument. Preferably, the image resolution is set to no less than a preset resolution to ensure that the scale lines are clear, the scale values are identifiable, and the pointer edges are not blurred. Then, the image scaling ratio is locked, and automatic scaling or page adaptive adjustment is prohibited during printing to ensure that the circular structure and scale spacing of the dial image do not undergo geometric distortion. After being sent to the printer, a preset printing medium is used for output. The printing medium can be a paper material with low surface reflectivity to reduce glare interference during subsequent recognition. After printing, the printed pointer dial image is size-checked to confirm that the dial diameter, scale spacing, and pointer pointing position are consistent with the design parameters before being used as a calibration sample. By employing the above methods, the geometric proportions of the pointer dial image in physical space are kept consistent with the digital design, thereby ensuring that the subsequent automatic testing device for pointer instruments has a consistent calibration benchmark when performing identification in a real testing environment, improving the accuracy of calibration results and the feasibility of engineering implementation.
[0055] S105: Obtain the recognition value after the automatic detection device for pointer instruments recognizes the printed pointer dial image;
[0056] Optionally, in this embodiment, the printed pointer dial image can be fixed at the testing station, ensuring that its installation angle, height, and distance from the image acquisition device are consistent with the actual testing conditions of the pointer instrument, thereby guaranteeing that the calibration environment matches the actual testing environment. Subsequently, the automatic pointer instrument testing device is activated to acquire the pointer dial image. During acquisition, the light source brightness, exposure time, and focal length parameters are adjusted to ensure that the scale, scale values, and pointer outline in the dial image are clearly distinguishable. After image acquisition, the acquired image undergoes dial area positioning processing to determine the dial's outer contour and calculate the center position. Then, the pointer outline is extracted, and the pointer direction angle is calculated. Based on the pointer direction angle and the mapping relationship between the scale values and angles in the dial image, the corresponding numerical reading is calculated, thus obtaining the identification value. Preferably, multiple repeated identifications are performed on the pointer dial image corresponding to the same standard value, and the obtained identification values are recorded to reduce the impact of random errors on the calibration results. Through the above method, the identification value originates from the automatic identification results under the actual testing process, thereby providing an objective data basis for subsequent identification deviation calculation and improving the authenticity and reliability of the calibration process.
[0057] S106: Identification deviation is obtained based on the identification value and the standard value.
[0058] Optionally, in this embodiment, after obtaining the identification value, the identification value is matched with the corresponding standard value, and the difference between the two is calculated according to a preset error calculation rule. The identification deviation can be calculated using the formula "identification deviation equals identification value minus standard value" to obtain the numerical error of the current detection point. Preferably, the identification deviation is calculated for multiple pointer dial images corresponding to multiple standard values, and all identification deviations are statistically analyzed to obtain the maximum identification deviation, average identification deviation, and maximum absolute identification deviation, which are used to comprehensively evaluate the identification accuracy of the pointer instrument automatic detection device. Further, the identification deviation can be compared with a preset allowable error range. When the identification deviation exceeds the allowable error range, the abnormal result is recorded and used as the basis for subsequent algorithm optimization or equipment adjustment. After completing the identification deviation calculation for all detection points, the identification deviation data is stored to form a complete calibration record. Through the above method, a quantitative evaluation of the identification capability of the pointer instrument automatic detection device is achieved, making the calibration process form a closed-loop control, thereby improving the objectivity of the detection accuracy evaluation and the reliability of the calibration results.
[0059] In one embodiment, such as Figures 3-8 The image shown is a printed image of an analog clock face. The standard value for each analog clock face is located at the bottom of the image, while the recognition value is in the lower right corner. Specifically... Figure 3 The standard value is 0.1 MPa, while the identification value is 0.1006 MPa; Figure 4 The standard value is 0.198 MPa, while the identification value is 0.1990 MPa; Figure 5 The standard value is 0.296 MPa, while the identification value is 0.2967 MPa; Figure 6 The standard value is 0.394 MPa, while the recognition value is 0.3937 MPa; Figure 7 The standard value is 0.492 MPa, while the identification value is 0.4925 MPa; Figure 8 The standard value is 0.59 MPa, while the recognition value is 0.5894 MPa;
[0060] In one embodiment, the dial image includes: a dial image with chipped markings, a dial image with partial obscuration, or a dial image with background stains.
[0061] Specifically, in the pre-set template library, in addition to standard and complete dial images, various dial image samples simulating abnormal conditions under actual use are pre-constructed. Among them, the dial image with chipped scale is created by artificially adding local defects, color fading, or discontinuous edges to the scale lines or value areas, simulating the situation where the scale of an analog instrument becomes unclear due to wear during long-term use. The dial image with partial occlusion involves overlaying an occlusion layer on a local area of the dial image, such as simulating reflection occlusion, dust coverage, or external foreign objects obscuring the scale area, causing some scales or values to be obscured. The dial image with background stains involves adding randomly distributed noise, stain textures, or uneven color areas to the dial background area, simulating the impact of oil stains, water stains, or environmental pollution on the visual effect of the dial. During the calibration method, different types of dial images can be selected from the template library according to the detection requirements to generate analog dial images. The corresponding recognition values and recognition deviations are then obtained through printing and recognition processes, thereby verifying the recognition capability of the automatic analog instrument detection device under complex dial conditions.
[0062] From the above, it can be concluded that the calibration process in this embodiment can not only be applied to ideal working conditions, but also cover situations that may occur in actual applications, such as scale wear, occlusion interference, and background pollution, thereby improving the environmental adaptability and recognition robustness of the calibration method.
[0063] In one embodiment, the first angle of the lower limit scale of the dial image, the first scale value of the lower limit scale, the second angle of the upper limit scale, and the second scale value of the upper limit scale are obtained.
[0064] Based on the first angle, the second angle, the first scale value, and the second scale value, determine the corresponding angle of the standard value on the dial image, and mark the corresponding pointer position on the dial image based on the corresponding angle.
[0065] Specifically, after the dial image is loaded to a preset position, the center of the dial image is first located, and a polar coordinate system with the center as the origin is established. Then, the position of the lower limit scale in the image is identified, and the polar angle of that position relative to the center is calculated to obtain the first angle. Simultaneously, the first scale value corresponding to this lower limit scale is read. Next, the position of the upper limit scale in the image is identified, and its polar angle relative to the center is calculated to obtain the second angle. Simultaneously, the second scale value corresponding to this upper limit scale is read. Based on the angle difference between the first and second angles and the numerical difference between the first and second scale values, a linear mapping relationship between scale values and angles is established. Then, the standard value is substituted into the linear mapping relationship for conversion to obtain the corresponding angle of the standard value on the dial image. Specifically, the corresponding angle is equal to the first angle plus the ratio of the difference between the standard value and the first scale value to the difference between the second scale value and the first scale value, multiplied by the difference between the second and first angles. After obtaining the corresponding angle, a radial positioning mark is generated in the corresponding angular direction, starting from the center of the dial image, thus forming the pointer's pointing position.
[0066] From the above, it can be concluded that by using the above method, a clear mathematical mapping relationship is formed between the standard value and the image angle, avoiding errors in manual estimation, improving the accuracy of pointer position calculation and the repeatability of the calibration process.
[0067] In one embodiment, the rotation center of the pointer image is aligned with the center of the dial image, and the pointer position in the pointer image is controlled to obtain a pointer dial image.
[0068] Specifically, after determining the pointer's pointing position, the center coordinates of the dial image are first obtained and used as the rotation reference point. Then, the rotation center position of the pointer image is read; the rotation center is the geometric center point around which the pointer rotates, and this position can be predefined in the pointer image template. Through image translation operations, the rotation center of the pointer image is moved to completely coincide with the center of the dial image, ensuring that the pointer rotates around the center of the dial. After alignment, the angle value corresponding to the pointer's pointing position is obtained, and the pointer image is rotated based on this angle value, so that the pointer in the pointer image points to the pointer's pointing position along the radial direction of the dial image's center. The rotation process can use a two-dimensional rotation matrix to transform the coordinates of each pixel in the pointer image to ensure that the image proportions remain unchanged and the pointer edges are clear during rotation. After rotation, the pointer image is superimposed on the dial image to form a complete pointer dial image. Preferably, after superposition, the position of the pointer tip is verified to ensure that it is in the same radial direction as the pointer's pointing position.
[0069] From the above, it can be concluded that by using the above method, the pointer position is controlled entirely based on geometric calculations, which improves the pointer pointing accuracy and image synthesis consistency, thereby ensuring the accuracy of the subsequent recognition process and the reliability of the calibration results.
[0070] In one embodiment, the range corresponding to the type of pointer instrument is obtained;
[0071] Determine multiple detection intervals within the measurement range;
[0072] For each detection interval: take one value in the detection interval and determine it as a standard value.
[0073] Specifically, after obtaining the type of the pointer instrument, its corresponding measurement range is retrieved from the template library based on that type. The measurement range includes a lower limit and an upper limit. Then, multiple detection intervals are divided within the measurement range according to preset interval division rules. These intervals can be divided proportionally, such as uniformly dividing the entire range into several continuous intervals, or non-uniformly divided according to actual testing needs, making the detection intervals in key measurement areas denser. After completing the detection interval division, for each detection interval, a value is selected from within that interval as the corresponding standard value. The selected value can be located in the middle of the detection interval or at any preset position within the interval to cover different scale distributions. By determining standard values for multiple detection intervals, multiple pointer pointing samples at different positions can be generated across the entire measurement range to comprehensively verify the automatic detection device's recognition capability across the entire measurement range.
[0074] From the above, it can be concluded that by using the above method, the standard value is not limited to a single detection point, but is selected in a distributed manner throughout the entire measurement range, which improves the coverage and representativeness of the calibration process, thereby enhancing the comprehensiveness and reliability of the identification accuracy assessment.
[0075] In one embodiment, for each detection interval: a scale within the detection interval is used as the target scale, a preset deviation ratio that has not been selected is selected, and the deviation ratio is superimposed on the scale value of the target scale to obtain a standard value, wherein the preset deviation ratio is a plurality of values between -100% and 100%.
[0076] Specifically, after dividing the detection intervals, a scale is first selected as the target scale within each detection interval. The target scale is the actual scale position on the dial image within the detection interval, and the corresponding scale value is obtained. Then, an unselected deviation ratio is chosen from a preset set of deviation ratios. The deviation ratio represents the degree of offset relative to the target scale, and its value ranges from -100% to 100%. A negative deviation ratio indicates an offset to the left of the target scale, a positive value indicates an offset to the right of the target scale, and zero indicates that the standard value coincides with the target scale. The deviation ratio is converted to the minimum division interval of the target scale to obtain the actual offset, and this offset is superimposed on the scale value of the target scale to obtain a standard value. Preferably, different deviation ratios are selected in different detection intervals to avoid reusing the same offset method and ensure that the standard value is distributed diversely across detection intervals.
[0077] As can be concluded from the above, by using the above method, the standard value can not only cover the scale position of each detection interval, but also cover the continuous change position between scales, thereby improving the accuracy of the calibration method in detecting the subtle deflection of the pointer, and enhancing the comprehensiveness and accuracy of the calibration results.
[0078] In one embodiment, the brightness of the pointer dial image is adjusted based on the ambient brightness of the application scenario of the pointer-type instrument.
[0079] Specifically, after generating the pointer dial image, the corresponding ambient brightness parameters are obtained according to the application scenario of the pointer instrument. Application scenarios include indoor low-light environments, standard laboratory lighting environments, and outdoor high-light environments. Multiple brightness adjustment levels are preset according to different application scenarios, and the pointer dial image is adjusted based on these levels. Brightness adjustment can be achieved by linearly scaling the overall pixel grayscale value of the image, that is, proportionally enlarging or reducing the brightness value of each pixel according to a preset brightness coefficient, thereby forming pointer dial images under different brightness levels. Preferably, during the brightness adjustment process, the image contrast and color ratio are kept undistorted to ensure that the scale, scale values, and pointer outline remain clearly distinguishable. After brightness adjustment, the pointer dial images under different brightness levels can be printed or directly input into the pointer instrument automatic detection device for recognition, thereby obtaining recognition values under different ambient brightness conditions and further calculating the recognition deviation.
[0080] From the above, it can be concluded that the calibration process can cover the lighting conditions under different application scenarios, improve the recognition stability and environmental adaptability of the pointer instrument automatic detection device in complex lighting environments, and thus enhance the practicality and reliability of the calibration method.
[0081] This application also provides an electronic device in its embodiments. (See reference...) Figure 9 The diagram illustrates a structural schematic of an electronic device suitable for implementing the calibration method of the pointer-type instrument automatic testing device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 9 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0082] like Figure 9 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0083] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0084] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the pointer-type instrument automatic detection device calibration methods provided in this application.
[0085] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the calibration methods of the pointer-type instrument automatic detection device provided in this application.
[0086] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0088] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.
[0089] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A calibration method for an automatic testing device for pointer-type instruments, characterized in that, include: Based on the type of pointer-type instrument input by the user, a dial image and a pointer image are selected from a preset template library, and a standard value is determined. The dial image includes scales and scale values. Set the dial image at a preset position, and mark the corresponding pointer position on the dial image based on the standard value; Place the pointer image into the dial image, and make the pointer of the pointer image point to the position that the pointer is pointing to, to obtain a pointer dial image; Send the pointer dial image to the printer for printing; The identification value is obtained after the automatic detection device for pointer instruments identifies the printed pointer dial image; The identification deviation is obtained based on the identification value and the standard value.
2. The calibration method for the pointer-type instrument automatic testing device according to claim 1, characterized in that, The dial image includes: a dial image with chipped paint on the scale, a dial image with partial obscuration, or a dial image with background stains.
3. The calibration method for the pointer-type instrument automatic testing device according to claim 1, characterized in that, The step of marking the corresponding pointer position on the dial image based on the standard value includes: Obtain the first angle of the lower limit scale of the dial image, the first scale value of the lower limit scale, the second angle of the upper limit scale, and the second scale value of the upper limit scale; Based on the first angle, the second angle, the first scale value, and the second scale value, the corresponding angle of the standard value on the dial image is determined, and the corresponding pointer position is marked on the dial image based on the corresponding angle.
4. The calibration method for the pointer-type instrument automatic testing device according to claim 1, characterized in that, The step of placing the pointer image into the dial image and making the pointer in the pointer image point to the position pointed to by the pointer to obtain the pointer dial image includes: Align the rotation center of the pointer image with the center of the dial image, and control the pointer in the pointer image to point to the position it is pointing to, thus obtaining a pointer dial image.
5. The calibration method for the pointer-type instrument automatic testing device according to claim 1, characterized in that, The process of determining the standard value includes: Obtain the range corresponding to the type of the pointer-type instrument; Multiple detection intervals are defined within the range; For each detection interval: a value in the detection interval is determined as a standard value.
6. The calibration method for the pointer-type instrument automatic testing device according to claim 5, characterized in that, For each of the detection intervals: determining a value within the detection interval as a standard value includes: For each detection interval: take one scale in the detection interval as the target scale, select a preset deviation ratio that has not been selected, and superimpose the deviation ratio on the scale value of the target scale to obtain a standard value, wherein the preset deviation ratio is a plurality of values between -100% and 100%.
7. The calibration method for the pointer-type instrument automatic testing device according to claim 1, characterized in that, Before sending the pointer dial image to the printer for printing, the method further includes: The brightness of the pointer dial image is adjusted based on the ambient brightness of the application scenario of the pointer instrument.
8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the calibration method of the pointer-type instrument automatic testing device as described in any one of claims 1 to 7.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the calibration method of the pointer-type instrument automatic testing device as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the calibration method of the pointer-type instrument automatic testing device as described in any one of claims 1 to 7.