CN114018289A - Level detection method and device - Google Patents

Level detection method and device Download PDF

Info

Publication number
CN114018289A
CN114018289A CN202111311993.0A CN202111311993A CN114018289A CN 114018289 A CN114018289 A CN 114018289A CN 202111311993 A CN202111311993 A CN 202111311993A CN 114018289 A CN114018289 A CN 114018289A
Authority
CN
China
Prior art keywords
level
edge point
coordinate
target direction
bubble image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111311993.0A
Other languages
Chinese (zh)
Other versions
CN114018289B (en
Inventor
郝存明
霍占奎
李洪波
李玉霞
张田龙
雷志伟
宫哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute Of Applied Mathematics Hebei Academy Of Sciences
Original Assignee
Institute Of Applied Mathematics Hebei Academy Of Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute Of Applied Mathematics Hebei Academy Of Sciences filed Critical Institute Of Applied Mathematics Hebei Academy Of Sciences
Priority to CN202111311993.0A priority Critical patent/CN114018289B/en
Publication of CN114018289A publication Critical patent/CN114018289A/en
Application granted granted Critical
Publication of CN114018289B publication Critical patent/CN114018289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the technical field of intelligent detection, and provides a level detection method and a level detection device, wherein the level detection method comprises the following steps: obtaining a first picture of the level under an absolute horizontal condition; the first picture comprises a first bubble image; determining first edge point coordinates of the first bubble image in the target direction; the first edge point coordinate is the coordinate of an edge point of the first bubble image in the target direction; the target direction is the positive direction or the negative direction of the Y axis of the picture coordinate system; in the picture coordinate system, the absolute value of the first edge point coordinate is greater than the absolute value of the coordinate of the first bubble image center point in the target direction; obtaining a second picture of the level at the first inclination angle; the second picture includes a second bubble image. Through the technical scheme, the problems of high labor intensity and low detection efficiency of level detection workers in the related technology are solved.

Description

Level detection method and device
Technical Field
The invention relates to the technical field of intelligent detection, in particular to a method and a device for detecting a level gauge.
Background
The bubble level meter is used for checking whether a machine installation surface or a flat plate is horizontal or not and measuring the inclination direction and the angle, and is widely applied to road engineering, mechanical measurement, construction engineering, industrial platforms, oil exploration, military industry, ships and other conditions needing inclination angles or horizontality under a gravity reference system. The center of the seat surface is provided with a glass tube with a longitudinal round curve shape, the tube is filled with ether or alcohol, and a small bubble is left and is always positioned at the highest point in the tube. The glass tube is provided with scale divisions at both ends of the bubble. Generally, when a machine is installed in a factory, the sensitivity of a common bubble level gauge is 0.01mm/m, 0.02mm/m, 0.04mm/m, 0.05mm/m, 0.1mm/m, 0.3mm/m, 0.4mm/m and the like, namely, the level gauge is placed on a straight gauge or a flat plate with the length of 1m, and when the height difference of the straight gauge or the flat plate with the length of 1m is h mm (different h corresponds to different sensitivity), bubbles have a scale difference.
The level is a measuring instrument, and the accuracy of the level needs to be strictly checked when the level is delivered from a factory. At present, factory detection of the level mostly depends on manual work, and detection efficiency is low.
Disclosure of Invention
The invention provides a method and a device for detecting a level, which solve the problems of high labor intensity and low detection efficiency of level detection in the related technology.
The technical scheme of the invention is as follows:
in a first aspect, a level detection method includes:
obtaining a first picture of the level under an absolute horizontal condition; the first picture comprises a first bubble image;
determining first edge point coordinates of the first bubble image in the target direction; the first edge point coordinate is the coordinate of an edge point of the first bubble image in the target direction; the target direction is the positive direction or the negative direction of the Y axis of the picture coordinate system; in the picture coordinate system, the absolute value of the first edge point coordinate is greater than the absolute value of the coordinate of the first bubble image center point in the target direction;
obtaining a second picture of the level at the first inclination angle; the second picture comprises a second bubble image;
determining second edge point coordinates of the second bubble image in the target direction; the second edge point coordinate is the coordinate of the edge point of the second bubble image in the target direction; in the picture coordinate system, the absolute value of the second edge point coordinate is greater than the absolute value of the coordinate of the second bubble image center point in the target direction;
calculating the difference value of the first edge point coordinate and the second edge point coordinate in the target direction to determine the moving distance of the bubble in the target direction, wherein the moving distance is the first moving distance;
and comparing the first moving distance with a first set distance, and using the comparison result for detecting the precision of the level in the target direction.
In a second aspect, a level detection apparatus, comprising:
the water level direction changing mechanism is used for driving the water level to rotate;
and the image acquisition device is used for acquiring the picture of the level.
In a third aspect, a method of testing a level detection apparatus, comprising:
controlling the level orientation change mechanism to enable the level to be in an absolute horizontal condition;
shooting by using the image acquisition device to obtain a first picture of the level under the absolute horizontal condition; the first picture comprises a first bubble image;
determining first edge point coordinates of the first bubble image in the target direction; the first edge point coordinate is the coordinate of an edge point of the first bubble image in the target direction; the target direction is the positive direction or the negative direction of the Y axis of the picture coordinate system; in the picture coordinate system, the absolute value of the first edge point coordinate is greater than the absolute value of the coordinate of the first bubble image center point in the target direction;
controlling the azimuth change mechanism of the level to rotate, and enabling the inclination angle of the level to be a first inclination angle;
shooting by using the image acquisition device to obtain a second picture of the level at the first inclination angle; the second picture comprises a second bubble image;
determining second edge point coordinates of the second bubble image in the target direction; the second edge point coordinate is the coordinate of the edge point of the second bubble image in the target direction; in the picture coordinate system, the absolute value of the second edge point coordinate is greater than the absolute value of the coordinate of the second bubble image center point in the target direction;
calculating the difference value of the first edge point coordinate and the second edge point coordinate to determine the moving distance of the bubble in the target direction, wherein the moving distance is the first moving distance;
and comparing the first moving distance with a first set distance, and using the comparison result for detecting the precision of the level in the target direction.
In a fourth aspect, a level detection system comprises the level detection apparatus described above, and further comprises a processor for performing the steps of the level detection method described above.
The working principle and the beneficial effects of the invention are as follows:
the method for detecting the level comprises the steps of collecting a first picture of the level under an absolute horizontal condition and a second picture of the level under a first inclination angle; the first picture comprises a first bubble image, and the second picture comprises a second bubble image; then, obtaining the coordinates (namely the first edge point coordinates) of the first edge point of the first bubble image in the picture coordinate system and the coordinates (namely the second edge point coordinates) of the second edge point of the second bubble image in the picture coordinate system by an image processing method, obtaining a first moving distance according to the difference value of the first edge point coordinates and the second edge point coordinates, comparing the first moving distance with a first set distance, and using the comparison result in the precision detection of the water level: if the error of the first moving distance and the first set distance is within the set range, the level is qualified, otherwise, the level is unqualified.
The invention realizes the automatic detection of the level, reduces the manual detection burden and is beneficial to improving the detection efficiency.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a method of detecting a level according to the present invention;
FIG. 2 is a schematic diagram showing the relationship between the edge of the first bubble image and the fitting circle according to the present invention;
FIG. 3 is a schematic view of the apparatus of the present invention;
FIG. 4 is a schematic view of the structure of the arc-shaped rack and the first lead screw in the device of the present invention;
in the figure: the device comprises a base, a first lead screw, a rotating table, a 4 objective table, a light through hole 41, an image acquisition device 5, a first motor 6, a light source seat 7, a focusing frame 8, a driving mechanism 9, a second motor 91, a second lead screw 92, a second screw 93, a support rod 10, a hand wheel 11, a level 12, a focusing wheel 13, an arc-shaped rack 14, an arc-shaped guide rail 15, a first bubble image edge 20, a target arc section 21 and a fitting circle 22.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any inventive step, are intended to be within the scope of the present invention.
Example 1
As shown in fig. 1, the flow of the method for detecting a level according to the present embodiment includes:
obtaining a first picture of the level under an absolute horizontal condition; the first picture comprises a first bubble image;
determining first edge point coordinates of the first bubble image in the target direction; the first edge point coordinate is the coordinate of an edge point of the first bubble image in the target direction; the target direction is the positive direction or the negative direction of the Y axis of the picture coordinate system; in the picture coordinate system, the absolute value of the first edge point coordinate is greater than the absolute value of the coordinate of the first bubble image center point in the target direction;
obtaining a second picture of the level at the first inclination angle; the second picture comprises a second bubble image;
determining second edge point coordinates of the second bubble image in the target direction; the second edge point coordinate is the coordinate of the edge point of the second bubble image in the target direction; in the picture coordinate system, the absolute value of the second edge point coordinate is greater than the absolute value of the coordinate of the second bubble image center point in the target direction;
calculating the difference value of the first edge point coordinate and the second edge point coordinate in the target direction to determine the moving distance of the bubble in the target direction, wherein the moving distance is the first moving distance;
and comparing the first moving distance with a first set distance, and using the comparison result for detecting the precision of the level in the target direction.
In the method for detecting the level provided by the embodiment, a first picture of the level under an absolute horizontal condition and a second picture of the level under a first inclination angle are acquired; the first picture comprises a first bubble image, and the second picture comprises a second bubble image; then, obtaining the coordinates (namely the first edge point coordinates) of the first edge point of the first bubble image in the picture coordinate system and the coordinates (namely the second edge point coordinates) of the second edge point of the second bubble image in the picture coordinate system by an image processing method, obtaining a first moving distance according to the difference value of the first edge point coordinates and the second edge point coordinates, comparing the first moving distance with a first set distance, and using the comparison result in the precision detection of the water level: if the error of the first moving distance and the first set distance is within the set range, the level is qualified, otherwise, the level is unqualified.
The embodiment realizes the automatic detection of the level, reduces the manual detection burden and is favorable for improving the detection efficiency.
Further, determining a first edge point coordinate of the first bubble image in the target direction specifically includes:
determining the edge of the first bubble image and the center coordinates of the template by adopting a template matching algorithm; the template center coordinate is the coordinate of the template center of the template in the picture coordinate system; the template is determined by a template matching algorithm;
setting an annular region of interest by taking the center of the template as the center of a circle, wherein the first bubble image is positioned in the annular region of interest;
taking a plurality of points at equal intervals on the outer ring of the annular region of interest as a plurality of starting points;
connecting any starting point with the center of the template to obtain a scanning line; wherein, the point where the scanning line intersects with the target arc segment at the edge of the first bubble image is a fitting point; the target arc segment is a segment of arc segment of the first bubble image in the target direction; the radian of the target arc section is a set radian;
performing circle fitting on the fitting points to obtain a fitting circle, coordinates (X0, Y0) of a center point of the fitting circle and a radius r;
obtaining a first edge point coordinate of the first bubble image in the target direction as (X0, r + Y0) according to the center point coordinate (X0, Y0) and the radius r of the fitting circle;
the method for determining the second edge point coordinate of the second bubble image in the target direction is the same as the method for determining the first edge point coordinate of the first bubble image in the target direction.
Taking the first bubble image as an example: firstly, the edge and template center coordinates of a first bubble image are obtained by adopting the existing OpenCV template matching algorithm, and the edge and template center coordinates of a second bubble image can be obtained by adopting the same method.
Then, setting an annular region of interest (ROI) with a fixed size by taking the center of the template as an origin, so that the first bubble image is positioned in the annular region of interest (ROI); setting a plurality of starting points at the outer edge of the annular ROI at equal intervals in radian, wherein each starting point makes a scanning line towards the center of the template to obtain a plurality of scanning lines; taking an arc section of the edge of the first bubble image in the target direction as a target arc section, taking the intersection points of the plurality of scanning lines and the target arc section as a plurality of fitting points, and performing fitting circle operation; the method for fitting the circle can be realized by adopting the existing method, and the least square method is adopted for fitting the circle in the implementation. Because the first edge point of the first bubble image in the target direction exists in the target arc segment, the target arc segment is fitted through the fitting circle, and the first edge point coordinate of the first bubble image in the target direction can be conveniently obtained according to the central point coordinate and the radius r of the fitting circle.
As shown in fig. 2, the schematic diagram of the position relationship between the edge of the first bubble image and the fitting circle is shown, the edge of the first bubble image is similar to an elliptical shape, the long axis direction of the edge of the first bubble image is parallel to the Y axis of the picture coordinate system, the target direction in the diagram is the positive direction of the Y axis of the picture coordinate system, and the starting radian and the ending radian of the target arc segment are determined according to the specific model of the level.
Example 2
On the basis of the above embodiment 1, the present embodiment further includes:
obtaining a second inclination angle; wherein, under the second inclination angle, a third picture shot by the level 12 meets a preset condition; the third picture comprises a third bubble image, and the edge point coordinate of the third bubble image in the target direction is a third edge point coordinate; the preset conditions include: the difference value of the third edge point coordinate and the first edge point coordinate in the target direction meets a second set distance;
and comparing the second inclination angle with the set angle, and using the comparison result for detecting the precision of the level 12 in the target direction.
On the basis of the above embodiment, the present embodiment may also record the inclination angle of the level 12, i.e., the second inclination angle, when the bubble image of the level 12 moves the third edge point coordinate from the first edge point coordinate; and comparing the second inclination angle with the first set angle, and if the difference value of the second inclination angle and the first set angle is within a set range, indicating that the level 12 is qualified, otherwise, indicating that the level is unqualified. This embodiment has increased the detection dimension of surveyor's level 12, is favorable to the accurate detection of surveyor's level 12.
The method for determining the coordinates of the third edge point of the third bubble image in the target direction is the same as the method for determining the coordinates of the first edge point of the first bubble image in the target direction, and is not repeated here.
Example 3
On the basis of the above embodiment, the present embodiment further includes:
obtaining a fourth picture of the level after the level returns to the absolute horizontal condition from the second inclination angle; the fourth picture includes a fourth bubble image;
determining fourth edge point coordinates of the fourth bubble image in the target direction; the fourth edge point coordinate is a coordinate of an edge point of the fourth bubble image in the target direction; in the picture coordinate system, the absolute value of the fourth edge point coordinate is greater than the absolute value of the coordinate of the fourth bubble image center point in the target direction;
calculating the difference value of the fourth edge point coordinate and the first edge point coordinate in the target direction to determine the moving distance of the bubble in the target direction, wherein the moving distance is a fourth moving distance;
and comparing the fourth moving distance with a fourth set distance, and using the comparison result for detecting the precision of the level 12 in the target direction.
On the basis of the above embodiment, the present embodiment may also be implemented by obtaining a current bubble image when the level 12 returns to the absolute horizontal condition from the second inclination angle, i.e., a fourth bubble image; and obtaining fourth edge point coordinates of the fourth bubble image in the target direction, calculating the moving distance of the fourth bubble image in the target direction according to the fourth edge point coordinates, and if the difference value between the moving distance and the fourth set distance is within the set range, indicating that the level 12 is qualified, otherwise, indicating that the level is unqualified. This embodiment further increases the detection dimensionality of the level 12, facilitating accurate detection of the level 12.
Example 4
As shown in fig. 3 to 4, the present embodiment further provides a level detecting device, including:
the water level direction changing mechanism is used for driving the water level to rotate;
and the image acquisition device 5 is used for acquiring pictures of the leveling instrument 12.
Wherein, spirit level position change mechanism includes:
a base 1;
the first motor 6 is arranged on the base 1;
the first lead screw 2 is arranged at the output end of the first motor 6;
the rotating table 3 is arranged on the upper side of the first lead screw 2, an arc-shaped rack 14 is arranged at the bottom of the rotating table 3, and the arc-shaped rack 14 is meshed with the first lead screw 2; a level 12 is provided on the turntable 3.
The working principle of the level detection device of the embodiment is as follows: the first motor 6 drives the first lead screw 2 to rotate, the meshing point of the first lead screw 2 and the arc-shaped rack 14 is constantly changed, and the arc-shaped rack 14 drives the rotating platform 3 to rotate, so that the leveling instrument 12 is positioned at different inclination angles; the image acquisition device 5 acquires an image of the bubble of the level 12 at a set inclination angle, and further detects the level 12 by image analysis.
The working process of the rotation of the rotating table 3 is as follows: assuming that the rotating table 3 is at an absolute horizontal position when the first lead screw 2 is engaged with the lowest point of the arc-shaped rack 14; along with the rotation of the first lead screw 2, the meshing point of the first lead screw 2 and the arc-shaped rack 14 moves leftwards, the first end of the rotating table 3 is lifted, and the lifting angle of the first end is increased along with the left movement of the meshing point; when the meshing point of the first lead screw 2 and the arc-shaped rack 14 moves to the leftmost end of the arc-shaped rack 14, the lifting angle of the first end of the rotating table 3 is the largest; at this time, the first lead screw 2 rotates in the opposite direction, the meshing point of the first lead screw 2 and the arc-shaped rack 14 gradually moves to the right, the lifting angle of the first end of the rotating table 3 gradually decreases, and when the first lead screw 2 is meshed with the lowest point of the arc-shaped rack 14, the rotating table 3 is in the absolute horizontal position again.
The first lead screw 2 continues to rotate, the meshing point of the first lead screw 2 and the rotating platform 3 is gradually lifted, the second end of the rotating platform 3 is gradually lifted, and when the meshing point of the first lead screw 2 and the arc-shaped rack 14 moves to the rightmost end of the arc-shaped rack 14, the lifting angle of the second end of the rotating platform 3 is the largest.
Further, still include arc guide rail 15, set up on base 1, the arc guide rail is two, and the both sides of revolving stage 3 set up respectively on two arc guide rails 15, and the both sides of revolving stage 3 respectively with two arc guide rail 15 sliding contact.
Through setting up arc guide rail 15 on base 1, when arc rack 14 drives and rotates platform 3 and rotate, the both sides of rotating platform 3 are along sliding along two arc guide rail 15 respectively, and arc guide rail 15 is favorable to improving the steady rotation of rotating platform 3 for rotating platform 3 provides the support.
Further, still include:
the light source seat 7 is arranged on the rotating table 3, and the light source seat 7 is used for placing a light source;
objective table 4, set up the upside at light source seat 7, objective table 4 is used for fixed spirit level 12, is provided with logical unthreaded hole 41 on objective table 4, leads to unthreaded hole 41 and the inside intercommunication of light source seat 7.
Through setting up the light source at 4 downside of objective table, the light that the light source sent shines on surveyor's level 12, when ambient light is more weak, plays the effect of light filling, is favorable to improving imaging quality to improve image analysis's the degree of accuracy.
Further, image acquisition device 5 passes through focusing frame 8 and sets up on base 1, and focusing frame 8 still is connected with actuating mechanism 9, and actuating mechanism 9 includes:
a second motor 91 provided on the base 1;
a second lead screw 92 provided at an output end of the second motor 91, a longitudinal direction of the second lead screw 92 being parallel to a longitudinal direction of the level 12;
and a second screw 93 engaged with the second lead screw 92, the second screw 93 being connected to the focus adjustment frame 8.
The second motor 91 rotates to drive the second lead screw 92 to rotate, and the second lead screw 92 drives the second nut 93 and the focusing frame 8 to move, so that the image acquisition device 5 moves in the length direction of the level 12. In this way, after the image acquisition of one end of the level 12 is completed, the second motor 91 rotates to drive the image acquisition device 5 to move, so as to acquire the image of the other end of the level 12. In the embodiment, the image acquisition at the two ends of the level 12 can be realized by using one image acquisition device 5, which is beneficial to saving the cost.
Further, still include:
the supporting rod 10 is arranged on the second nut 93, the focusing frame 8 is sleeved on the supporting rod 10, a threaded hole is formed in the side wall of the focusing frame 8, and the axial direction of the threaded hole is intersected with the axial direction of the supporting rod 10;
and the hand wheel 11 is arranged in the threaded hole by virtue of threads and used for locking the focusing frame 8.
In this embodiment, the height of the focusing frame 8 can be adjusted by sleeving the focusing frame 8 on the supporting rod 10 and arranging the supporting rod 10 on the second nut 93. The specific process is as follows: and loosening the hand wheel 11, enabling the focusing frame 8 to move relative to the supporting rod 10, moving the focusing frame 8 to a proper position, and then screwing the hand wheel 11 to fix the position of the focusing frame 8. In this embodiment, the image capturing device 5 is a camera, and the focusing frame 8 is further provided with a focusing wheel 13 for adjusting the focal length of the camera.
Example 5
The embodiment provides a testing method of a level detection device, which comprises the following steps:
controlling the level orientation change mechanism to enable the level to be in an absolute horizontal condition;
shooting by using the image acquisition device 5 to obtain a first picture of the level under the absolute horizontal condition; the first picture comprises a first bubble image;
determining first edge point coordinates of the first bubble image in the target direction; the first edge point coordinate is the coordinate of an edge point of the first bubble image in the target direction; the target direction is the positive direction or the negative direction of the Y axis of the picture coordinate system; in the picture coordinate system, the absolute value of the first edge point coordinate is greater than the absolute value of the coordinate of the first bubble image center point in the target direction;
controlling the azimuth change mechanism of the level to rotate, and enabling the inclination angle of the level to be a first inclination angle;
shooting by using the image acquisition device 5 to obtain a second picture of the level 12 at the first inclination angle; the second picture comprises a second bubble image;
determining second edge point coordinates of the second bubble image in the target direction; the second edge point coordinate is the coordinate of the edge point of the second bubble image in the target direction; in the picture coordinate system, the absolute value of the second edge point coordinate is greater than the absolute value of the coordinate of the second bubble image center point in the target direction;
calculating the difference value of the first edge point coordinate and the second edge point coordinate in the target direction to determine the moving distance of the bubble in the target direction, wherein the moving distance is the first moving distance;
and comparing the first moving distance with the first set distance, and using the comparison result for detecting the precision of the level 12 in the target direction.
Further, controlling the level orientation change mechanism to enable the level to be in an absolute level condition specifically comprises:
and controlling the first motor 6 to drive the first lead screw 2 to rotate until the first lead screw 2 is meshed with the lowest point of the arc-shaped rack 14 so as to meet the absolute horizontal condition.
Further, control the rotation of spirit level position change mechanism, make the inclination of spirit level be first inclination, specifically include:
and controlling the first motor 6 to drive the first lead screw 2 to rotate, so that the meshing point of the first lead screw 6 and the arc-shaped rack 14 is changed to meet the first inclination angle.
Example 6
This embodiment proposes a level detecting system including the level detecting apparatus in embodiment 4 described above, and a processor for executing the steps of the level detecting method in embodiment 1.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A level detection method, comprising:
obtaining a first picture of the level under an absolute horizontal condition; the first picture comprises a first bubble image;
determining first edge point coordinates of the first bubble image in the target direction; the first edge point coordinate is the coordinate of an edge point of the first bubble image in the target direction; the target direction is the positive direction or the negative direction of the Y axis of the picture coordinate system; in the picture coordinate system, the absolute value of the first edge point coordinate is greater than the absolute value of the coordinate of the first bubble image center point in the target direction;
obtaining a second picture of the level at the first inclination angle; the second picture comprises a second bubble image;
determining second edge point coordinates of the second bubble image in the target direction; the second edge point coordinate is the coordinate of the edge point of the second bubble image in the target direction; in the picture coordinate system, the absolute value of the second edge point coordinate is greater than the absolute value of the coordinate of the second bubble image center point in the target direction;
calculating the difference value of the first edge point coordinate and the second edge point coordinate in the target direction to determine the moving distance of the bubble in the target direction, wherein the moving distance is the first moving distance;
and comparing the first moving distance with a first set distance, and using the comparison result for detecting the precision of the level in the target direction.
2. The level detection method of claim 1, wherein determining first edge point coordinates of the first bubble image in the target direction comprises:
determining the edge of the first bubble image and the center coordinates of the template by adopting a template matching algorithm; the template center coordinate is the coordinate of the template center of the template in the picture coordinate system; the template is determined by a template matching algorithm;
setting an annular region of interest by taking the center of the template as the center of a circle, wherein the first bubble image is positioned in the annular region of interest;
taking a plurality of points at equal intervals on the outer ring of the annular region of interest as a plurality of starting points;
connecting any starting point with the center of the template to obtain a scanning line; wherein, the point where the scanning line intersects with the target arc segment at the edge of the first bubble image is a fitting point; the target arc segment is a segment of arc segment of the first bubble image in the target direction; the radian of the target arc section is a set radian;
performing circle fitting on the fitting points to obtain a fitting circle, coordinates (X0, Y0) of a center point of the fitting circle and a radius r;
obtaining a first edge point coordinate of the first bubble image in the target direction as (X0, r + Y0) according to the center point coordinate (X0, Y0) and the radius r of the fitting circle;
the method for determining the second edge point coordinate of the second bubble image in the target direction is the same as the method for determining the first edge point coordinate of the first bubble image in the target direction.
3. The level detection method of claim 1, further comprising:
obtaining a second inclination angle; under the second inclination angle, a third picture shot by the level meets a preset condition; the third picture comprises a third bubble image, and the edge point coordinate of the third bubble image in the target direction is a third edge point coordinate; the preset conditions include: the difference value of the third edge point coordinate and the first edge point coordinate meets a second set distance;
and comparing the second inclination angle with a set angle, and using the comparison result for detecting the precision of the level in the target direction.
4. The level detection method of claim 3, further comprising:
obtaining a fourth picture of the level after the level returns to the absolute horizontal condition from the second inclination angle; the fourth picture includes a fourth bubble image;
determining fourth edge point coordinates of the fourth bubble image in the target direction; the fourth edge point coordinate is a coordinate of an edge point of the fourth bubble image in the target direction; in the picture coordinate system, the absolute value of the fourth edge point coordinate is greater than the absolute value of the coordinate of the fourth bubble image center point in the target direction;
calculating the difference value of the fourth edge point coordinate and the first edge point coordinate in the target direction to determine the moving distance of the bubble in the target direction, wherein the moving distance is a fourth moving distance;
and comparing the fourth moving distance with a fourth set distance, and using the comparison result for detecting the precision of the level in the target direction.
5. A level detection device, comprising:
the water level direction changing mechanism is used for driving the water level to rotate;
and the image acquisition device (5) is used for acquiring pictures of the level (12).
6. The level detecting device of claim 5, wherein the level orientation changing mechanism comprises:
a base (1);
a first motor (6) arranged on the base (1);
the first lead screw (2) is arranged at the output end of the first motor (6);
the rotating table (3) is arranged on the upper side of the first lead screw (2), an arc-shaped rack (14) is arranged at the bottom of the rotating table (3), and the arc-shaped rack (14) is meshed with the first lead screw (2); the level (12) is arranged on the rotating table (3).
7. The level detecting device according to claim 6, further comprising:
arc guide rail (15), set up on base (1), arc guide rail (15) are two, the both sides that rotate platform (3) set up respectively two on arc guide rail (15), just the both sides that rotate platform (3) respectively with two arc guide rail (15) sliding contact.
8. The level detecting device according to claim 6, further comprising:
the light source seat (7) is arranged on the rotating table (3), and the light source seat (7) is used for placing a light source;
objective table (4), set up the upside of light source seat (7), objective table (4) are used for fixed spirit level (12), be provided with logical unthreaded hole (41) on objective table (4), logical unthreaded hole (41) with light source seat (7) inside intercommunication.
9. The level detecting device according to claim 6, wherein the image capturing means (5) is arranged on the base (1) by means of a focus mount (8), the focus mount (8) being further connected to a drive mechanism (9), the drive mechanism (9) comprising:
a second motor (91) arranged on the base (1);
a second screw (92) which is arranged at the output end of the second motor (91), and the length direction of the second screw (92) is parallel to the length direction of the level 12;
and the second screw nut (93) is meshed with the second lead screw (92), and the second screw nut (93) is connected with the focusing frame (8).
10. The level detecting device according to claim 9, further comprising:
the support rod (10) is arranged on the second nut (93), the focusing frame (8) is sleeved on the support rod (10), a threaded hole is formed in the side wall of the focusing frame (8), and the axial direction of the threaded hole is intersected with the axial direction of the support rod (10);
and the hand wheel (11) is arranged in the threaded hole by virtue of threads and is used for locking the focusing frame (8).
CN202111311993.0A 2021-11-08 2021-11-08 Level detection method and device Active CN114018289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111311993.0A CN114018289B (en) 2021-11-08 2021-11-08 Level detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111311993.0A CN114018289B (en) 2021-11-08 2021-11-08 Level detection method and device

Publications (2)

Publication Number Publication Date
CN114018289A true CN114018289A (en) 2022-02-08
CN114018289B CN114018289B (en) 2022-06-10

Family

ID=80062183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111311993.0A Active CN114018289B (en) 2021-11-08 2021-11-08 Level detection method and device

Country Status (1)

Country Link
CN (1) CN114018289B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116295534A (en) * 2023-04-23 2023-06-23 河北省科学院应用数学研究所 Bubble temperature drift detection method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106289325A (en) * 2016-09-23 2017-01-04 浙江大学 A kind of air-bubble level automatic checkout system
CN108534802A (en) * 2018-04-28 2018-09-14 中国计量大学 Pipe bubble based on image processing techniques deviates measuring method
CN108592948A (en) * 2018-04-28 2018-09-28 中国计量大学 A kind of pipe bubble offset method for automatic measurement
CN108613630A (en) * 2018-04-28 2018-10-02 中国计量大学 The two linear pipe bubbles based on image processing techniques deviate measuring method
CN108876860A (en) * 2018-04-28 2018-11-23 中国计量大学 A kind of image calibration method for pipe bubble offset measurement
CN110672040A (en) * 2019-09-24 2020-01-10 中国计量科学研究院 High-precision rotation angle measuring method based on vision
CN110987971A (en) * 2019-12-19 2020-04-10 太原理工大学 Crystal bubble detection device and method based on machine vision
CN211839085U (en) * 2020-03-06 2020-11-03 河北省科学院应用数学研究所 Machine vision detection device
CN112254744A (en) * 2020-10-23 2021-01-22 广州计量检测技术研究院 Bubble level meter calibration method, system, device and storage medium
CN113008267A (en) * 2021-01-05 2021-06-22 上海大学 System and method for detecting qualified limit inclination of level bar based on image processing technology

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106289325A (en) * 2016-09-23 2017-01-04 浙江大学 A kind of air-bubble level automatic checkout system
CN108534802A (en) * 2018-04-28 2018-09-14 中国计量大学 Pipe bubble based on image processing techniques deviates measuring method
CN108592948A (en) * 2018-04-28 2018-09-28 中国计量大学 A kind of pipe bubble offset method for automatic measurement
CN108613630A (en) * 2018-04-28 2018-10-02 中国计量大学 The two linear pipe bubbles based on image processing techniques deviate measuring method
CN108876860A (en) * 2018-04-28 2018-11-23 中国计量大学 A kind of image calibration method for pipe bubble offset measurement
CN110672040A (en) * 2019-09-24 2020-01-10 中国计量科学研究院 High-precision rotation angle measuring method based on vision
CN110987971A (en) * 2019-12-19 2020-04-10 太原理工大学 Crystal bubble detection device and method based on machine vision
CN211839085U (en) * 2020-03-06 2020-11-03 河北省科学院应用数学研究所 Machine vision detection device
CN112254744A (en) * 2020-10-23 2021-01-22 广州计量检测技术研究院 Bubble level meter calibration method, system, device and storage medium
CN113008267A (en) * 2021-01-05 2021-06-22 上海大学 System and method for detecting qualified limit inclination of level bar based on image processing technology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
喻婷等: "基于数学形态学的气泡水平尺自动检测***研究", 《机电工程》 *
盛伟等: "基于Canny边缘检测和加权最小二乘法的气泡水平仪实时检测方法", 《机电工程》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116295534A (en) * 2023-04-23 2023-06-23 河北省科学院应用数学研究所 Bubble temperature drift detection method and system
CN116295534B (en) * 2023-04-23 2023-08-18 河北省科学院应用数学研究所 Bubble temperature drift detection method and system

Also Published As

Publication number Publication date
CN114018289B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN109141295B (en) Device and method for measuring coaxiality error of multistage rotating body
CN107607059B (en) One-key type 3D contour measurement equipment and measurement calculation method thereof
CN106441370B (en) Full-automatic leveling rod calibrating device based on image recognition
US8520066B2 (en) Automated optical inspection system for the runout tolerance of circular saw blades
CN107121093A (en) A kind of gear measurement device and measuring method based on active vision
CN110672040A (en) High-precision rotation angle measuring method based on vision
CN105716528A (en) Oil pipe thread size parameter detection method and device
CN110470247B (en) Device and method for detecting coaxiality of inner and outer circular surfaces of part
CN207472217U (en) A kind of part parallelism detector
CN109447971A (en) A kind of cycloid gear molded line error is accurately extracted and crucial accuracy of form and position rapid analysis method
CN114018289B (en) Level detection method and device
CN111272111A (en) Eccentricity detection method and eccentricity detection device for lens
CN104132612B (en) A kind of leading screw dimensional parameters detection method and equipment
CN108195568A (en) Upper beam illumination testing apparatus centering self-test and calibration method
CN110470250B (en) Detection device and detection method for surface flatness of part
CN109931866A (en) A kind of tubing round thread dimensional parameters detection method and equipment
CN206177320U (en) Full automatic level chi calibrating device based on image recognition
CN113888651B (en) Dynamic and static visual detection system
CN112082577B (en) Level telescope focusing operation error calibrating device
CN115451821A (en) Calibration method and standard sample plate for cable insulation layer structure dimension tester
CN206514844U (en) Electronic level with instrument height real―time precision measurment function
CN117169118A (en) Non-contact type in-hole surface appearance detection device and method
CN111623709B (en) Image measuring instrument capable of automatically adjusting position of sample to be measured and measuring method
CN108050957B (en) Device and method for measuring shape error of lip curved surface of wave-shaped lip oil seal
CN219841914U (en) Full-automatic level bubble comprehensive parameter detector

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant