Reading method, device, equipment and storage medium of experimental instrument

Through deep learning object detection and semantic segmentation technology, the identification of instrument wire jacks and pointer positions is solved, the problem of inaccurate instrument readings is achieved, automated readings in complex environments are achieved, and the accuracy and robustness of readings are improved.

CN114743190BActive Publication Date: 2025-07-04安徽文香科技股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210419060.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-20
Publication Date
2025-07-04
Estimated Expiration
2042-04-20

AI Technical Summary

Technical Problem

In the prior art In physical and electrical experiments, the instrument readings are inaccurate and difficult to automatically score in complex environments, especially when the instrument is blocked or mirror-reflected, the traditional image processing method is not effective.

Method used

Deep learning methods are used to identify the wire jacks and pointer positions of the instrument using object detection and semantic segmentation technology, and the reading is determined through slope calculation to avoid the impact of scale occlusion and reflection.

Benefits of technology

Accurate and automated reading of instrument readings in complex environments reduces calculation errors and improves the accuracy and robustness of readings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114743190B_ABST
    Figure CN114743190B_ABST
Patent Text Reader

Abstract

The present invention provides a reading method, device, equipment and storage medium for experimental instruments. The reading method for experimental instruments includes: acquiring an image of an experimental instrument; identifying the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point and the position information of the axis marking point of the experimental instrument in the image of the experimental instrument by using a target detection method; determining a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determining a second slope based on the position information of the pointer marking point and the position information of the axis marking point; and determining the reading of the experimental instrument based on the first slope and the second slope. The reading method for experimental instruments of the present invention not only overcomes the cumbersome direct reading, but also overcomes the problem of inaccurate traditional intelligent reading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent meter reading, and particularly relates to a reading method, device, equipment and storage medium for an experimental meter. Background Art

[0002] Currently, the scoring methods for physical electricity experiments are all subjectively scored by teachers according to certain key operation steps and scoring points. The scoring of the key steps in physical electricity experiment operations involves whether the readings of voltmeters and ammeters are correct, and a large number of professional subject teachers are required to verify the experimental results of students one by one, resulting in a huge workload for teachers.

[0003] To overcome the above drawbacks, those skilled in the art have tried to use computer vision technology to design an instrument reading method based on artificial intelligence. However, most of the existing technologies focus on industrial fields such as electric power, petroleum, and chemical industry. In addition, traditional image processing methods, for example, the prior art discloses that by binarizing an image, the area and centroid of each pixel block are obtained, so as to obtain the centroid of the scale line, and the center point of the pointer's movement is obtained by least squares fitting based on the scale centroid. However, in the actual application environment, there may be partial occlusion of the instrument and reflection on the instrument mirror surface, resulting in the scale line and the pointer being occluded or unclear, and the centroid of all scale lines cannot be obtained, resulting in a fitting error of the center point of the pointer's movement.

[0004] Therefore, the quality of the results of traditional image processing methods depends particularly on the quality of the image. To obtain good results, the image must be clear, and often the ideal effect cannot be achieved in the actual application environment. In addition, there is less research on the field of intelligent reading of experimental instruments in the prior art. Summary of the Invention

[0005] Embodiments of the present invention overcome the problem of inaccurate reading of experimental instruments in teaching experiments, and thus provide a reading method, device, equipment and storage medium for experimental instruments.

[0006] To solve the above problems, the present invention provides a reading method for an experimental instrument, including:

[0007] Obtain an image of the experimental instrument;

[0008] Use the target detection method to identify the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point, and the position information of the axis marking point of the experimental instrument in the image of the experimental instrument;

[0009] Determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the position information of the pointer marking point and the position information of the axis marking point;

[0010] Determine the reading of the experimental instrument based on the first slope and the second slope.

[0011] In some embodiments, determining the reading of the experimental instrument based on the first slope and the second slope includes:

[0012] Determine the current angle between the pointer and the line connecting at least two wire jacks based on the first slope and the second slope;

[0013] Determine the reading of the experimental instrument based on the current angle.

[0014] In some embodiments, determining the reading of the experimental instrument based on the current angle includes:

[0015] Read the first angle between the pointer and the line connecting at least two wire jacks when the pointer is at the minimum scale line, and read the second angle between the pointer and the line connecting at least two wire jacks when the pointer is at the maximum scale line, and read the range of the experimental instrument;

[0016] Determine the first absolute value of the difference between the current angle and the first angle, and determine the second absolute value of the difference between the first angle and the second angle, and determine the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

[0017] In some embodiments, obtaining the experimental instrument image includes:

[0018] Obtain the experimental bench image collected by the camera arranged above the physical electrical experiment bench;

[0019] Perform target detection and image segmentation processing on the experimental bench image in sequence to segment one or more experimental instrument images from the experimental bench image.

[0020] In the above solution, obtaining the experimental instrument image includes: The experimental instrument includes at least one of a voltmeter and an ammeter.

[0021] An embodiment of the present invention further provides a reading device for an experimental instrument, including:

[0022] An image acquisition module, configured to acquire an experimental instrument image;

[0023] A target detection module, configured to identify the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point, and the position information of the axis marking point of the experimental instrument in the experimental instrument image by using a target detection method;

[0024] A slope determination module, configured to determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the position information of the pointer marking point and the position information of the axis marking point;

[0025] An instrument reading determination module for determining the reading of an experimental instrument based on a first slope and a second slope.

[0026] Optionally, an embodiment of the present invention further provides a method for reading the experimental instrument, including:

[0027] Obtain an image of the experimental instrument;

[0028] Use the image semantic segmentation method to identify the pointer area information in the experimental instrument image;

[0029] Use the object detection method to identify the position information of the first wire jack and the position information of the second wire jack of the experimental instrument in the experimental instrument image;

[0030] Determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the pointer area information in the experimental instrument image;

[0031] Determine the reading of the experimental instrument based on the first slope and the second slope.

[0032] In some embodiments, determining the second slope based on the pointer area information in the experimental instrument image includes:

[0033] Output the position information of each pixel of the pointer;

[0034] Determine the second slope based on the position information of the two end-point pixels of the pointer.

[0035] In some embodiments, determining the second slope based on the pointer area information in the experimental instrument image includes:

[0036] Output the position information of each pixel of the pointer;

[0037] Determine the second slope based on the position information of any two pixels of the pointer along the extending direction of the pointer.

[0038] In some embodiments, determining the reading of the experimental instrument based on the first slope and the second slope includes:

[0039] Determine the current angle between the pointer and the connection line of at least two wire jacks based on the first slope and the second slope;

[0040] Determine the reading of the experimental instrument based on the current angle.

[0041] In some embodiments, determining the reading of the experimental instrument based on the current angle includes:

[0042] Read a first included angle between the pointer and the connection lines of at least two wire jacks when the reading pointer is at the minimum scale line, and a second included angle between the pointer and the connection lines of at least two wire jacks when the reading pointer is at the maximum scale line, and read the range of the experimental instrument.

[0043] Determine a first absolute value of the difference between the current included angle and the first included angle, and determine a second absolute value of the difference between the first included angle and the second included angle, and determine the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

[0044] In some embodiments, obtaining an image of the experimental instrument includes:

[0045] Obtain an image of the experimental table collected by a camera disposed above the physical electrical experimental table;

[0046] Perform target detection and image segmentation processing on the experimental table image in sequence to segment one or more experimental instrument images from the experimental table image.

[0047] In the above solution, obtaining an image of the experimental instrument includes: The experimental instrument includes at least one of a voltmeter and an ammeter.

[0048] Optionally, an embodiment of the present invention further provides a method for reading the reading of an experimental instrument, including:

[0049] An image acquisition module, configured to acquire an image of the experimental instrument;

[0050] An image semantic segmentation module, configured to use to identify the pointer area information in the experimental instrument image;

[0051] A target detection module, configured to use target detection to identify the position information of the first wire jack and the position information of the second wire jack of the experimental instrument in the experimental instrument image;

[0052] A slope determination module, configured to determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the pointer area information in the experimental instrument image;

[0053] An instrument reading determination module, configured to determine the reading of the experimental instrument based on the first slope and the second slope.

[0054] An embodiment of the present invention further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the above method for reading the reading of the experimental instrument is implemented.

[0055] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method for reading the reading of the experimental instrument is implemented.

[0056] As can be seen, the present invention provides a method for reading the readings of an experimental instrument. The present invention uses a deep learning method and directly identifies the position of the pointer center point and the position of the wire socket using an object detection method, avoiding the situation where the scale line is blocked and the position of the pointer center point cannot be fitted, and no additional calculation is required. The position of the pointer center point obtained by the object detection algorithm avoids the calculation error caused by additional calculation. The baseline is obtained by identifying the position of the wire socket, and the straight line connected by the wire interface is the baseline, thus solving the problem that it is difficult to determine the baseline due to reasons such as light and poor image quality.

[0057] In addition, according to the method for reading the readings of an experimental instrument of the present invention, semantic segmentation is used to directly identify the covered area of the pointer, which means that the output of the model is the line segment of the pointer, and there is no need to solve the problem of filtering out irrelevant line segments. Moreover, the deep learning method has excellent robustness. The object detection and semantic segmentation models are both trained on a large number of images collected in a complex environment, and good results can also be obtained when there are partial occlusions or reflections in the images. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0059] Figure 1 It is an exemplary flowchart of the method for reading the readings of an experimental instrument in an embodiment of the present invention;

[0060] Figure 2 It is a schematic diagram of an implementation manner for determining the current angle between the pointer and the connection line of the wire sockets in an embodiment of the present invention;

[0061] Figure 3 It is a schematic diagram of another implementation manner for determining the current angle between the pointer and the connection line of the wire sockets in an embodiment of the present invention;

[0062] Figure 4 It is a schematic structural diagram of a reading device for an experimental instrument in an embodiment of the present invention;

[0063] Figure 5 It is a flowchart of another specific example of the method for reading the readings of an experimental instrument in an embodiment of the present invention;

[0064] Figure 6 It is a schematic diagram of an image of the pointer area of an experimental instrument for the method for reading the readings of an experimental instrument in an embodiment of the present invention;

[0065] Figure 7 It is a schematic diagram of another implementation manner for determining the current included angle between the pointer and the wire jack connection line in the embodiment of the present invention;

[0066] Figure 8 It is another structural schematic diagram of the reading device of the experimental instrument in the embodiment of the present invention. Detailed implementation manners

[0067] Next, the technical solution of the present invention will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0068] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0069] As Figure 1 shown, the embodiment of the present invention can specifically provide a reading method for an experimental instrument, and the method includes but is not limited to one or more of the following steps:

[0070] Step S10, obtaining an image of the experimental instrument;

[0071] Step S20, using a target detection method to identify the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point, and the position information of the axis marking point of the experimental instrument in the image of the experimental instrument;

[0072] Step S30, determining a first slope (i.e., the baseline slope) based on the position information of the first wire jack and the position information of the second wire jack, and determining a second slope (i.e., the pointer pointing slope) based on the position information of the pointer marking point and the position information of the axis marking point;

[0073] Step S40, determining the reading of the experimental instrument based on the first slope and the second slope.

[0074] In step S10, first, a camera arranged directly above the physical electrical experiment table is used to collect the operation information of the student's physical electrical experiment operation in real time to obtain an image of the experiment table, and the image of the experiment table is sequentially subjected to target detection and image segmentation processing to segment one or more images of the experimental instrument from the image of the experiment table. The experimental instrument can be at least one of a voltmeter and an ammeter.

[0075] In step S20, using the target detection method, identify as Figure 2The positions of the pointer marking point p, the axis marking point s, and the positions of the wire jacks a, b, and c shown therein. Among them, the negative wire jack (for example, wire jack a) among the wire jacks a, b, and c is the first wire jack, and at least one of the wire jacks b and c is the second wire jack. The axis marking point s and the pointer marking point p are respectively the two ends of the pointer. Optionally, as Figure 3 shown therein, the axis marking point s1 and the pointer marking point p1 can also be any two positions on the pointer other than the two ends of the pointer. Compared with the prior art, the determination of the marking points in this application does not require additional calculations, avoiding calculation errors caused by additional calculations.

[0076] In step S30, as Figure 2 or Figure 3 shown therein, based on the principle that two points determine a straight line, the baseline l1 is determined by fitting the connection line between at least two of the wire jacks a, b, and c, and the slope of the baseline l1, that is, the first slope k1, is determined. Based on the same principle, as Figure 2 shown therein, based on the pointer marking point p and the axis marking point s, the pointer pointing straight line t1 is fitted and the slope of the pointer pointing straight line t1, that is, the second slope k2, is determined. Or, as Figure 3 shown therein, based on the pointer marking point p1 and the axis marking point s1, the pointer pointing straight line t1 is fitted and the slope of the pointer pointing straight line t1, that is, the second slope k2, is determined. Compared with the prior art, it overcomes the problem that it is difficult to determine the baseline due to poor image quality, which ultimately leads to an inaccurate baseline.

[0077] In step S40, determining the reading of the experimental instrument based on the first slope and the second slope includes: determining the current included angle between the pointer and the connection line of at least two wire jacks based on the first slope and the second slope; determining the reading of the experimental instrument based on the current included angle. Determining the reading of the experimental instrument based on the current included angle includes: reading the first included angle between the pointer and the connection line of at least two wire jacks when the pointer is at the minimum scale line, reading the second included angle between the pointer and the connection line of at least two wire jacks when the pointer is at the maximum scale line, and reading the range of the experimental instrument; determining the first absolute value of the difference between the current included angle and the first included angle, and determining the second absolute value of the difference between the first included angle and the second included angle, and determining the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

[0078] Specifically, as Figure 2 or Figure 3 shown therein, first, the turning angle γ from the baseline to the pointer pointing straight line is determined by the first slope k1 and the second slope k2, that is:

[0079]

[0080] If the second slope k2 does not exist, the steering angle γ is 90°. The steering angle mentioned here can also be referred to as the included angle, which is the same in the following text.

[0081] Meanwhile, as Figure 2 or Figure 3 shown in, the minimum steering angle α and the maximum steering angle β are calculated based on the pointer pointing lines m1 and n1 when the pointer is located at the minimum scale and the maximum scale respectively. Finally, the reading of the pointer is determined through the three steering angles α, β, and γ and the range of the experimental instrument, that is:

[0082]

[0083] As Figure 4 shown in, according to an embodiment of the present invention, there is provided an experimental instrument reading device 1, including:

[0084] An image acquisition module 10 for acquiring an experimental instrument image;

[0085] A target detection module 20 for identifying the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point, and the position information of the axis marking point of the experimental instrument in the experimental instrument image by using a target detection method;

[0086] A slope determination module 30 for determining a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determining a second slope based on the position information of the pointer marking point and the position information of the axis marking point;

[0087] An instrument reading determination module 40 for determining the reading of the experimental instrument based on the first slope and the second slope.

[0088] Among them, the image acquisition module 10 includes a camera arranged directly above the physical electrical experiment table. In the experiment, the image acquisition module 10 first uses the camera arranged directly above the physical electrical experiment table to collect the operation information of the students' physical electrical experiment operations in real time to obtain the experiment table image, and sequentially performs target detection and image segmentation processing on the experiment table image to segment one or more experimental instrument images from the experiment table image. The experimental instrument can be at least one of a voltmeter and an ammeter.

[0089] Among them, the target detection module 20 can identify at least two wire jacks of the experimental instrument, where the negative wire jack is the first wire jack, and the remaining wire jacks are the second wire jacks. The axis marking point and the pointer marking point are respectively the two endpoints of the pointer. In addition, the axis center marking point and the pointer marking point can also be any two positions on the pointer other than the two endpoints of the pointer. Compared with the prior art, the target detection module 20 does not require additional calculations for determining the marking points, avoiding calculation errors caused by additional calculations.

[0090] Among them, the slope determination module 30 determines the baseline by fitting the connection line between at least two of the wire jacks based on the principle that two points determine a straight line, and determines the slope of the baseline, that is, the first slope. Based on the same principle, the pointer pointing straight line is fitted based on the pointer marking point and the axis center marking point, and the slope of the pointer pointing straight line is determined, that is, the second slope. Compared with the prior art, the slope determination module 30 overcomes the problem that it is difficult to determine the baseline due to poor image quality, which ultimately leads to inaccurate baselines.

[0091] Among them, the instrument reading determination module 40 first determines the current included angle between the pointer and the connection line of at least two wire jacks based on the first slope and the second slope; then determines the reading of the experimental instrument based on the current included angle. Determining the reading of the experimental instrument based on the current included angle includes: reading the first included angle between the pointer and the connection line of at least two wire jacks when the pointer is at the minimum scale line, reading the second included angle between the pointer and the connection line of at least two wire jacks when the pointer is at the maximum scale line, and reading the range of the experimental instrument; determining the first absolute value of the difference between the current included angle and the first included angle, and determining the second absolute value of the difference between the first included angle and the second included angle, and determining the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

[0092] In addition, as Figure 5 shown, according to an embodiment of the present invention, a method for reading the experimental instrument is further provided, and the method includes but is not limited to one or more of the following steps:

[0093] Step S110, obtaining an image of the experimental instrument;

[0094] Step S120, identifying the pointer region information in the experimental instrument image by using the image semantic segmentation method;

[0095] Step S130, identifying the position information of the first wire jack and the position information of the second wire jack of the experimental instrument in the experimental instrument image by using the target detection method;

[0096] Step S140, determining the first slope based on the position information of the first wire jack and the position information of the second wire jack, and determining the second slope based on the pointer region information in the experimental instrument image;

[0097] Step S150, determine the reading of the experimental instrument based on the first slope and the second slope.

[0098] In step S110, first, a camera arranged directly above the physical electrical experiment table is used to collect the operation information of the student's physical electrical experiment operation in real time to obtain an experiment table image, and the experiment table image is sequentially subjected to object detection and image segmentation processing to segment one or more experimental instrument images from the experiment table image. The experimental instrument can be at least one of a voltmeter and an ammeter.

[0099] In step S120, as Figure 6 shown, using the image semantic segmentation method, obtain each pixel image of the pointer, that is, the pointer coverage area. Compared with the prior art, the pointer detection directly identifies the coverage area of the pointer using a semantic segmentation model, which is equivalent to the output of the model being the line segment of the pointer, without having to solve the problem of filtering out irrelevant line segments. Moreover, the deep learning method has excellent robustness. The object detection and semantic segmentation models are both trained on a large number of images collected in a complex environment, and good results can also be obtained when the image is partially occluded or reflected.

[0100] In step S130, as Figure 7 shown, using the object detection method, identify the positions of the wire jacks a', b' and c'. Among them, the negative wire jack (for example, wire jack a') among the wire jacks a', b' and c' is the first wire jack, and at least one of the wire jacks b' and c' is the second wire jack. Compared with the prior art, the present application does not require additional calculations for determining the marked points, avoiding calculation errors caused by additional calculations.

[0101] In step S140, as Figure 7 shown, based on the principle that two points determine a straight line, determine the baseline l2 by fitting the connection line between at least two of the wire jacks a', b' and c', and determine the slope of the baseline l2, that is, the first slope k1'. At the same time, in step S140, determining the second slope based on the pointer region information in the experimental instrument image includes: outputting the position information of each pixel of the pointer; determining the second slope based on the position information of the two end pixels of the pointer. In addition, the second slope can also be determined based on the position information of any two pixels of the pointer along the extension direction of the pointer. Specifically, based on as Figure 6Any two pixels on the pointer coverage area image shown in the figure are used to fit the pointer pointing line t2 and determine the slope of the pointer pointing line t2, that is, the second slope k2'. Among them, any two pointer pixels are preferably the two end pixels of the pointer. Compared with the prior art, directly fitting the pointer pointing line through the pixel points of the pointer simplifies the calculation process and reduces errors.

[0102] In step S150, determining the reading of the experimental instrument based on the first slope and the second slope includes: determining the current angle between the pointer and the connection line of at least two wire jacks based on the first slope and the second slope; determining the reading of the experimental instrument based on the current angle. Determining the reading of the experimental instrument based on the current angle includes: reading the first angle between the pointer and the connection line of at least two wire jacks when the pointer is at the minimum scale line, reading the second angle between the pointer and the connection line of at least two wire jacks when the pointer is at the maximum scale line, and reading the range of the experimental instrument; determining the first absolute value of the difference between the current angle and the first angle, and determining the second absolute value of the difference between the first angle and the second angle, and determining the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

[0103] Specifically, as Figure 7 shown in the figure, first, the steering angle γ' from the baseline to the pointer pointing line is determined by the first slope k1' and the second slope k2', that is:

[0104]

[0105] If the second slope k2' does not exist, the steering angle γ' is 90°. The steering angle mentioned here can also be called an included angle, and the same applies hereinafter.

[0106] At the same time, as Figure 7 shown in the figure, based on the pointer pointing lines m2 and n2 when the pointer is at the minimum scale and the maximum scale respectively, the minimum steering angle α' and the maximum steering angle β' are calculated. Finally, the reading of the pointer is determined through the three steering angles α', β' and γ' and the range of the experimental instrument, that is:

[0107]

[0108] As Figure 8 shown, according to an embodiment of the present invention, a reading device 2 for an experimental instrument is provided, including:

[0109] An image acquisition module 110, configured to acquire an image of the experimental instrument;

[0110] An image semantic segmentation module 120, configured to identify pointer area information in the experimental instrument image by using an image semantic segmentation method;

[0111] The target detection module 130 is configured to identify the position information of the first wire jack and the position information of the second wire jack of the experimental instrument in the experimental instrument image by using a target detection method.

[0112] The slope determination module 140 is configured to determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the pointer area information in the experimental instrument image.

[0113] The instrument reading determination module 150 is configured to determine the reading of the experimental instrument based on the first slope and the second slope.

[0114] Among them, the image acquisition module 110 includes a camera arranged directly above the physical electrical experiment table. During the experiment, the image acquisition module 110 first uses the camera arranged directly above the physical electrical experiment table to collect the operation information of the students' physical electrical experiment operations in real time to obtain the experiment table image, and sequentially performs target detection and image segmentation processing on the experiment table image to segment one or more experimental instrument images from the experiment table image. The experimental instrument can be at least one of a voltmeter and an ammeter.

[0115] Among them, the image semantic segmentation module 120 can directly obtain each pixel image of the pointer, that is, the pointer coverage area, by using an image semantic segmentation method. Compared with the prior art, the pointer detection uses a semantic segmentation model to directly identify the pointer coverage area, which is equivalent to the output of the model being the pointer segment, and there is no need to solve the problem of filtering out irrelevant straight line segments. Moreover, the deep learning method has excellent robustness. The target detection and semantic segmentation models are both trained on a large number of images collected in a complex environment, and good results can also be obtained when the image is partially occluded or reflected.

[0116] Among them, the target detection module 130 can identify at least two wire jacks of the experimental instrument, where the negative wire jack is the first wire jack, and the remaining wire jacks are the second wire jacks. At the same time, the target detection module 130 uses a semantic analysis method to obtain each pixel image of the pointer, that is, the pointer coverage area. Compared with the prior art, the pointer detection uses a semantic segmentation model to directly identify the pointer coverage area, which is equivalent to the output of the model being the pointer segment, and there is no need to solve the problem of filtering out irrelevant straight line segments. Moreover, the deep learning method has excellent robustness. The target detection and semantic segmentation models are both trained on a large number of images collected in a complex environment, and good results can also be obtained when the image is partially occluded or reflected.

[0117] Among them, the slope determination module 140 determines the baseline by fitting the connection line between at least two of the wire jacks based on the principle that two points determine a straight line, and determines the slope of the baseline, that is, the first slope. At the same time, the slope determination module 140 determines the second slope based on the pointer area information in the experimental instrument image, including: outputting the position information of each pixel of the pointer; determining the second slope based on the position information of the two end-point pixels of the pointer. In addition, the slope determination module 140 can also determine the second slope based on the position information of any two pixels of the pointer along the extension direction of the pointer. Compared with the prior art, the slope determination module 140 directly fits the pointer to the straight line through the pixel points of the pointer, simplifies the calculation process, and reduces errors.

[0118] Among them, the instrument reading determination module 150 first determines the current included angle between the pointer and the connection line of at least two wire jacks based on the first slope and the second slope; then determines the reading of the experimental instrument based on the current included angle. Determining the reading of the experimental instrument based on the current included angle includes: reading the first included angle between the pointer and the connection line of at least two wire jacks when the pointer is at the minimum scale line, reading the second included angle between the pointer and the connection line of at least two wire jacks when the pointer is at the maximum scale line, and reading the range of the experimental instrument; determining the first absolute value of the difference between the current included angle and the first included angle, and determining the second absolute value of the difference between the first included angle and the second included angle, and determining the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

[0119] In addition, according to an embodiment of the present invention, there is provided a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the method for reading the experimental instrument according to the embodiment of the present invention can be implemented.

[0120] Finally, one or more embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the method for reading the experimental instrument as described above is implemented. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical disks that can store program codes.

[0121] In the description of this specification, the descriptions with reference to terms such as "this embodiment", "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine or combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0122] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0123] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and simple improvements made to the substantial content of the present invention shall be included in the protection scope of the present invention.

Claims

1. A reading method for an instrument used in experiments, characterized in that, Including: Obtain an image of the experimental instrument; Use object detection to identify the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point, and the position information of the axis marking point of the experimental instrument in the image of the experimental instrument; Determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the position information of the pointer marking point and the position information of the axis marking point; Based on the first slope and the second slope, determine the current angle between the pointer and the line connecting at least two wire jacks through the following formula: Where γ represents the current angle, k1 represents the first slope, and k2 represents the second slope; Read the first angle between the pointer and the line connecting at least two wire jacks when the pointer is at the minimum scale line, and read the second angle between the pointer and the line connecting at least two wire jacks when the pointer is at the maximum scale line, and read the range of the experimental instrument; Determine the first absolute value of the difference between the current angle and the first angle, and determine the second absolute value of the difference between the first angle and the second angle, and determine the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

2. The reading method of the experimental instrument according to claim 1, wherein, The obtaining of the image of the experimental instrument includes: Obtain an image of the experimental table collected by a camera arranged above the physical electrical experimental table; Perform object detection and image segmentation processing on the experimental table image in sequence to segment one or more images of the experimental instrument from the experimental table image.

3. The method for reading the experimental instrument according to claim 1, wherein: The experimental instrument includes at least one of a voltmeter and an ammeter.

4. A reading device for an experimental instrument, characterized in that, Including: An image acquisition module for obtaining an image of the experimental instrument; An object detection module for using object detection to identify the position information of the first wire jack, the position information of the second wire jack, the position information of the pointer marking point, and the position information of the axis marking point of the experimental instrument in the image of the experimental instrument; A slope determination module for determining a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determining a second slope based on the position information of the pointer marking point and the position information of the axis marking point; An instrument reading determination module for determining the current angle between the pointer and the line connecting at least two wire jacks based on the first slope and the second slope through the following determination formula: Wherein, γ represents the current included angle, k1 represents the first slope, and k2 represents the second slope; and for reading the first included angle between the pointer and the connection line of at least two wire jacks when the pointer is located at the minimum scale line, and the second included angle between the pointer and the connection line of at least two wire jacks when the pointer is located at the maximum scale line, and reading the range of the experimental instrument; the instrument reading determination module is further configured to determine a first absolute value of the difference between the current included angle and the first included angle, and determine a second absolute value of the difference between the first included angle and the second included angle, and determine the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

5. A reading method for an experimental instrument, characterized in that, Including: Obtain an image of the experimental instrument; Use the image semantic segmentation method to identify the pointer area information in the image of the experimental instrument; Use the object detection method to identify the position information of the first wire jack and the position information of the second wire jack of the experimental instrument in the image of the experimental instrument; Determine the first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine the second slope based on the pointer area information in the image of the experimental instrument; Based on the first slope and the second slope, determine the current included angle between the pointer and the connection line of at least two wire jacks through the following formula: Wherein, γ′ represents the current included angle, k1′ represents the first slope, and k2′ represents the second slope; Read the first included angle between the pointer and the connection line of at least two wire jacks when the pointer is located at the minimum scale line, and the second included angle between the pointer and the connection line of at least two wire jacks when the pointer is located at the maximum scale line, and read the range of the experimental instrument; Determine a first absolute value of the difference between the current included angle and the first included angle, and determine a second absolute value of the difference between the first included angle and the second included angle, and determine the reading of the experimental instrument based on the ratio of the first absolute value to the second absolute value and the range.

6. The method for reading the experimental instrument according to claim 5, wherein: The determining the second slope based on the pointer area information in the image of the experimental instrument includes: Output the position information of each pixel of the pointer; Determine the second slope based on the position information of the two end pixels of the pointer.

7. The method for reading the experimental instrument according to claim 5, wherein: The determining the second slope based on the pointer area information in the image of the experimental instrument includes: Output the position information of each pixel of the pointer; Determine the second slope based on the position information of any two pixels of the pointer along the extension direction of the pointer.

8. The reading method of the experimental instrument according to any one of claims 5-7, characterized in that, The obtaining the image of the experimental instrument includes: Obtain an image of the experimental table collected by a camera arranged above the physical electrical experimental table; Perform object detection and image segmentation processing on the experimental table image in sequence to segment one or more images of the experimental instrument from the experimental table image.

9. The reading method of the experimental instrument according to any one of claims 5-7, characterized in that, The obtaining the image of the experimental instrument includes: The experimental instrument includes at least one of a voltmeter and an ammeter.

10. A reading device for an experimental instrument, characterized in that, Including: An image acquisition module for obtaining an image of the experimental instrument; An image semantic segmentation module, configured to identify pointer region information in the experimental instrument image by using an image semantic segmentation method; A target detection module, configured to identify position information of a first wire jack and position information of a second wire jack of the experimental instrument in the experimental instrument image by using a target detection method; A slope determination module, configured to determine a first slope based on the position information of the first wire jack and the position information of the second wire jack, and determine a second slope based on the pointer region information in the experimental instrument image; An instrument reading determination module, configured to determine a current angle between the pointer and a connection line of at least two wire jacks based on the first slope and the second slope through the following determination formula: where γ′ represents the current angle, k1′ represents the first slope, and k2′ represents the second slope; and configured to read a first angle between the pointer and a connection line of at least two wire jacks when the pointer is at the minimum scale line, and read a second angle between the pointer and a connection line of at least two wire jacks when the pointer is at the maximum scale line, and read the range of the experimental instrument; the instrument reading determination module is further configured to determine a first absolute value of a difference between the current angle and the first angle, and determine a second absolute value of a difference between the first angle and the second angle, and determine the reading of the experimental instrument based on a ratio of the first absolute value to the second absolute value and the range; 11. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the reading method of the experimental instrument according to any one of claims 1-3 or any one of claims 5-9 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the reading method of the experimental instrument according to any one of claims 1-3 or any one of claims 5-9 is implemented.

Citation Information

Patent Citations

  • Pointer type instrument reading method based on machine vision

    CN112488030A