A method and system for measuring the size of a rotary body based on binocular vision
By using Zhang Zhengyou calibration method and edge detection algorithm based on binocular vision, the problems of incomplete image overlap and weak reflective texture in the measurement of rotating bodies are solved, realizing high-precision measurement of the size of rotating bodies, which is applicable to rotating bodies of various materials and textures.
Patent Information
- Application Number
- CN202411526585.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-30
AI Technical Summary
When measuring rotating bodies using existing binocular vision, incomplete image overlap leads to the loss of depth information. Reflective and weakly textured areas reduce matching accuracy, and existing solutions mistakenly identify width as diameter, resulting in large measurement errors and insufficient accuracy.
A binocular vision-based method for measuring the dimensions of a rotating body is adopted. The camera is precisely calibrated using the Zhang Zhengyou calibration method. By combining edge detection and cross-correlation algorithms, the contour coordinates of the rotating body are obtained, and the axis coordinates and radius are calculated.
It improves the accuracy and robustness of rotating body size measurement, is applicable to rotating bodies of different materials and textures, reduces measurement errors, and enhances the applicable measurement scenarios, especially in cases of uneven lighting or indistinct textures, it can still obtain high-precision results.
Smart Images

Figure CN119879721B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of size measurement, in particular to a rotary body size measurement method and system based on binocular vision. BACKGROUND
[0002] With the rapid development of modern industry, the demand for precision manufacturing and high-quality products is increasing, and the size measurement technology of rotary body workpieces has become a key link in manufacturing industry. The size precision of rotary body workpieces such as shafts, cylinders, and rollers directly affects the performance and service life of mechanical equipment. Therefore, high-precision and high-efficiency measurement technology is of great significance to ensure product quality, reduce costs, and improve market competitiveness.
[0003] In traditional industrial production, the measurement of rotary body size usually relies on manual operation or simple mechanical devices. Although these methods are simple to operate, their limitations gradually appear as production scales expand and precision requirements increase. Not only are they inefficient, but also their precision is limited, which cannot meet the high requirements of modern industrial production for precision and efficiency. To address these challenges, the industry has begun to seek more advanced measurement technology. With the rapid development of computer vision technology, image-based measurement methods have gradually become a research hotspot. These methods use cameras to capture images of objects and extract size information through image processing technology, with the advantages of non-contact, fast speed, high automation, etc. Using binocular stereo vision to measure rotary body workpieces can overcome some limitations of monocular vision systems, such as the lack of depth information. Binocular stereo vision simulates the way humans observe objects with two eyes, using two cameras to capture images from different angles to obtain size information of the object.
[0004] However, during the process of collecting rotary body images by double cameras, the actual images collected by the two cameras do not completely overlap, which leads to the inability to find pixel points in the non-overlapping part during subsequent multi-image pixel point matching, resulting in the loss of rotary body depth information and increasing the rotary body size measurement error. In addition, the rotary body itself has reflective and weak texture areas, which further reduces the matching accuracy and increases the rotary body size measurement error. Furthermore, existing measurement schemes usually directly take the width of the rotary body collected by the double cameras as the diameter of the rotary body, which is not the case based on visual principles. In summary, the rotary body size measurement error is large and the precision is insufficient. SUMMARY
[0005] In order to solve the problems in the prior art that in the process of collecting the image of the rotary body through the double cameras, the actual images collected by the two cameras are not completely coincident, resulting in that the pixel points in the non-coincident part cannot be found when the pixel points of multiple images are matched subsequently, the depth information of the rotary body is lost, the rotary body size measurement error is increased, in addition, the rotary body itself has a reflection and a weak texture area, which further reduces the matching precision and increases the rotary body size measurement error, in addition, the rotary body width collected by the double cameras is directly taken as the rotary body diameter in the prior measurement scheme, but based on the visual principle, it is not the case, and the rotary body size measurement error is large and the precision is insufficient, the present application provides a rotary body size measurement method and system based on binocular vision.
[0006] The technical scheme provided by the embodiment of the present application is as follows:
[0007] The first aspect
[0008] The rotary body size measurement method based on binocular vision provided by the embodiment of the present application comprises:
[0009] S1: acquiring a rotary body to be measured;
[0010] S2: collecting a first image of the rotary body to be measured, a first contour point and a second contour point of the rotary body to be measured on a rotary body plane perpendicular to the diameter of the rotary body to be measured through a first camera, and collecting a second image of the rotary body to be measured, a third contour point and a fourth contour point of the rotary body plane through a second camera;
[0011] S3: establishing a binocular imaging model of the rotary body to be measured based on the first contour point, the second contour point, the third contour point and the fourth contour point;
[0012] S4: calibrating the first camera and the second camera using Zhang Zhengyou calibration method to correct the first image and the second image under the condition of aligning the imaging planes of the first camera and the second camera;
[0013] S5: determining the contour coordinates of the rotary body to be measured based on the corrected first image and the second image in combination with an edge detection algorithm and a cross-correlation algorithm;
[0014] S6: calculating the axis coordinates of the rotary body to be measured and the radius of the rotary body to be measured according to the contour coordinates of the rotary body to be measured.
[0015] The second aspect
[0016] The rotary body size measurement system based on binocular vision provided by the embodiment of the present application comprises:
[0017] A processor;
[0018] A memory, the memory storing computer readable instructions, the computer readable instructions being executed by a processor to implement the method for measuring the size of a rotary body based on binocular vision according to the first aspect.
[0019] The third aspect
[0020] The embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method for measuring the size of a rotary body based on binocular vision according to the first aspect.
[0021] The technical scheme provided by the embodiment of the present application has at least the following beneficial effects:
[0022] In the present application, complete rotary body contour information is obtained through multi-view shooting of a binocular camera, the camera optical center origin is focused on the contour feature point collection of the rotary body instead of the surface texture, the error caused by the visual angle shielding is effectively compensated, the influence of the reflection and weak texture area of the rotary body itself on the measurement accuracy is avoided, and the size measurement accuracy is improved. In the pixel point matching process, the Zhang Zhengyou calibration method is introduced, the pixel-by-pixel matching process in the binocular algorithm is skipped, the camera is accurately calibrated by using the Zhang Zhengyou calibration method, and the image is corrected. The contour coordinates of the rotary body are accurately extracted by combining the edge detection algorithm and the cross-correlation algorithm after the corrected image, and the accuracy and efficiency of the feature point matching are significantly improved. Based on the obtained contour coordinates of the rotary body to be measured, the size of the rotary body to be measured including the axis coordinates of the rotary body to be measured and the radius of the rotary body to be measured can be accurately calculated, high-precision measurement results can be obtained even in the case of uneven light or unobvious surface texture, the method has good robustness, is suitable for rotary bodies of different materials, colors and textures, increases the measurement application scenarios, and improves the rotary body measurement accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creating any inventive labor.
[0024] Figure 1 A flowchart of a method for measuring the size of a rotary body based on binocular vision is provided for the embodiment of the present application.
[0025] Figure 2 A process diagram of monocular camera imaging is provided for the embodiment of the present application.
[0026] Figure 3 An equivalent diagram of monocular camera imaging is provided for the embodiment of the present application.
[0027] Figure 4 A process diagram of binocular camera imaging is provided for an embodiment of the present application.
[0028] Figure 5 An equivalent diagram of binocular camera imaging is provided for an embodiment of the present application.
[0029] Figure 6 A epipolar geometry diagram is provided for an embodiment of the present application.
[0030] Figure 7 A structure diagram of a rotary body size measurement system based on binocular vision is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the present application will be described below with reference to the drawings.
[0032] In the embodiments of the present application, the words such as "example", "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "example" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.
[0033] To make the technical problems, technical solutions and advantages of the present application clearer, the following will be described in detail with reference to the drawings and specific embodiments.
[0034] Reference is made to the accompanying drawings Figure 1 , which shows a flow diagram of a rotary body size measurement method based on binocular vision provided by an embodiment of the present application.
[0035] Reference is made to the accompanying drawings Figure 2 , which shows a process diagram of monocular camera imaging provided by an embodiment of the present application.
[0036] Figure 2 In the embodiments of the present application, O 2, the second camera is selected as a monocular camera for rotary body image acquisition, Figure 2 In the embodiments of the present application, 1, 2 and 3 correspond to the rotary body to be measured, the camera imaging plane and the second camera respectively, and the measurement error problem existing in monocular camera measurement is shown. The rotary body to be measured is regarded as a cylinder, and the camera is used to observe the outer contour points of the rotary body to be measured on different cross sections on the imaging plane r 1 and r 2, wherein the object is projected onto a two-dimensional plane, which is represented by a grid in the figure, and this plane is also called a projection plane or a view plane, which is parallel to the bottom of the object. The rays connect 3D The point on the object and the projection center, the ray passes through the projection plane, forming the projection of the object on the two-dimensional plane. The imaging process of a single camera is as follows: the revolving body is regarded as a cylinder, and the axis thereof is perpendicular to the ground. A vertical axis section of the revolving body is taken, and the section is perpendicular to the axis of the revolving body and can be regarded as a circle. When the light passes through the revolving body and enters the lens of the camera, a series of pixel points are formed on the imaging surface of the camera. The image points constitute the projection of the revolving body on the imaging surface. For a vertical axis section of the revolving body, a section of pixel points can be obtained on the imaging surface of the camera, and the two ends of the pixel points are the outer contour projection points. According to the pinhole imaging model, the outer contour projection points on the imaging surface are not the outermost edge points on the section of the revolving body, but the imaging points corresponding to the two light rays tangent to the section circle and passing through the camera optical center.
[0037] Reference is made to the accompanying drawings Figure 3 which show an equivalent schematic diagram of monocular camera imaging provided by an embodiment of the present application.
[0038] Figure 3 In the drawings, R is the true diameter of the section circle, but the projection size corresponding to the outer contour projection point on the imaging surface is E . Using the outer contour projection point to estimate the diameter or width of the revolving body will introduce an error, which is related to the shooting distance and the diameter of the revolving body, and is difficult to decouple. The outer contour projection point cannot be used to estimate the diameter or width of the revolving body in monocular vision, and additional information needs to be introduced for estimation. According to the pinhole imaging model, the outer contour projection point on the imaging surface is not the outermost edge point on the section of the revolving body, but the imaging point corresponding to the two light rays tangent to the section circle and passing through the camera optical center, wherein, R is the true diameter of the section circle, but the projection size corresponding to the outer contour projection point on the imaging surface is E , A , B , C , D represents the outer contour point observed by the camera.
[0039] An embodiment of the present application provides a revolving body size measurement method based on binocular vision, which can be realized by a revolving body size measurement device based on binocular vision. The revolving body size measurement device based on binocular vision can be a terminal or a server. The processing flow of the revolving body size measurement method based on binocular vision can include the following steps:
[0040] S1: obtaining a revolving body to be measured.
[0041] Reference is made to the accompanying drawings Figure 4 which show a process schematic diagram of binocular camera imaging provided by an embodiment of the present application.
[0042] Figure 4 In the figure, two images represent the observation results of the same cylinder by the first camera and the second camera respectively, O 1 and O 2 are the optical centers of the first camera and the second camera respectively, the grid in each image represents the imaging plane of the camera, the projection of the cylinder is displayed on the plane, the projections of the cylinder on the two imaging planes present different visual angles, and the line connecting the optical centers of the two cameras is called the baseline, l 1 and l 2, r 1 and r 2 are the outline points of the measured rotating body collected by the first camera and the second camera respectively.
[0043] S2: collecting the first outline point, the second outline point and the first image of the measured rotating body on the rotating body plane perpendicular to the diameter of the measured rotating body by the first camera, and collecting the third outline point, the fourth outline point and the second image of the rotating body by the second camera.
[0044] The first camera is one of the two cameras used to obtain the image of the measured rotating body, which is responsible for collecting the first outline point, the second outline point and the first image of the entire rotating body, and the second camera is the other camera in the binocular vision measurement system, which works in cooperation with the first camera and is responsible for collecting the third outline point, the fourth outline point and the second image of the rotating body, the first and second outline points are collected by the first camera, and the third and fourth outline points are collected by the second camera, which are the boundary points of the rotating body on a certain plane, and the subsequent contour calculation depends on the positions of the outline points.
[0045] It should be noted that the images of the rotating body are collected from different angles by the two cameras in the binocular vision system to obtain multiple outline points, which can provide a stereoscopic visual angle, and the contour information under different visual angles is recorded by the first image and the second image respectively, so that the three-dimensional model of the rotating body can be more accurately constructed, compared with monocular vision measurement, the binocular system can eliminate the problem of missing depth information caused by a single angle, and more accurate spatial coordinates and geometric size measurement can be provided, and the measurement accuracy and robustness are improved by the double visual angle imaging mode.
[0046] Reference is made to the attached Figure 5 , which shows an equivalent schematic diagram of the binocular camera imaging provided by the embodiment of the application.
[0047] Figure 5 In the figure, in the plane of the imaging surface of the first camera, that is, the plane where the outline points l 1 and l 2 are connected, the B , Cextreme points on the corresponding imaging plane , two rays of light converging at the camera optical center through the extreme points corresponding to s1 and s2 in Figure 5 respectively, the angle bisectors of the circle, on the second camera imaging plane, A , D extreme points on the corresponding imaging plane , two rays of light converging at the camera optical center through the extreme points the intersection of the tangents to the circle, O denotes the intersection of the two angle bisectors, , corresponding to s3 and s4 in Figure 5 respectively, b denotes the distance between the two camera optical centers, and denote the horizontal coordinate values of the optical centers of the first and second cameras on their respective pixel planes, the angle bisectors of the circle, denotes the internal parameter focal length of the camera, , are the extreme point pixel horizontal coordinate values, more specifically, with the second camera optical center as the origin of the coordinate system, with the direction of the line connecting the two camera optical centers as the direction as the axis, and with the direction perpendicular to the as the axis, a plane coordinate system is established, and these points can be expressed as:
[0048] where, for any point in space, when this point is photographed from different angles by two cameras, its projections on the imaging planes of the two cameras must satisfy this mathematical relationship, which is determined by the geometric configuration and internal parameters of the cameras.
[0049] S3: Establish a binocular imaging model of the to-be-measured rotating body based on the first extreme point, the second extreme point, the third extreme point, and the fourth extreme point.
[0050] wherein the binocular imaging model is a three-dimensional model constructed based on different perspective images obtained by two cameras, and the binocular imaging model can reconstruct the three-dimensional structure of the to-be-measured object by combining the geometric positions of the cameras and the photographed images with the principle of stereovision.
[0051] It should be noted that by using an accurate geometric modeling method, a binocular imaging model is established, which provides a solid foundation for subsequent three-dimensional reconstruction and accurate measurement. By connecting the camera optical center and the contour point, and projecting these lines on the imaging plane of the camera, the complex three-dimensional space relationship is effectively converted into a two-dimensional geometric problem that can be processed.
[0052] In a possible implementation, S3 specifically includes sub-steps S301-S305.
[0053] S301: respectively connecting the first camera optical center and the first contour point and the second contour point to obtain the first connecting line and the second connecting line, and respectively connecting the second camera optical center and the third contour point and the fourth contour point to obtain the third connecting line and the fourth connecting line.
[0054] The first camera optical center refers to the optical center of the first camera, which is a reference point when measured from the perspective of the first camera. All contour point connecting lines are associated with the optical center. The second camera optical center is the imaging reference point from the perspective of the second camera. All contour points and camera imaging planes are associated with the point. The first connecting line refers to the straight line between the first camera optical center and the first contour point. The second connecting line refers to the straight line between the first camera optical center and the second contour point. They represent the projection path of the contour of the rotary body on the imaging plane of the first camera, which is used to calculate the imaging coordinates and spatial position. The third connecting line is the straight line between the second camera optical center and the third contour point. The fourth connecting line is the straight line between the second camera optical center and the fourth contour point. These connecting lines are used to describe the contour projection of the rotary body from the perspective of the second camera.
[0055] S302: respectively outputting the intersection points of the first connecting line and the second connecting line with the first camera imaging plane as the first outer contour point and the second outer contour point, and respectively outputting the intersection points of the third connecting line and the fourth connecting line with the second camera imaging plane as the third outer contour point and the fourth outer contour point.
[0056] The first camera imaging plane is the plane on which the photosensitive element of the first camera is located. The light rays form an image after passing through the camera lens to this plane. The second camera imaging plane is similar to the first camera imaging plane, which is the plane on which the photosensitive element of the second camera is located. The first outer contour point and the second outer contour point are the external contour points obtained by the intersection of the first connecting line and the second connecting line with the first camera imaging plane. The third outer contour point and the fourth outer contour point are the external contour points generated by the intersection of the third connecting line and the fourth connecting line with the second camera imaging plane.
[0057] S303: taking the second camera optical center as the origin of the coordinate system, the connecting line direction of the first camera optical center and the second camera optical center as the extension direction of the y axis, and a straight line perpendicular to the y axis as the x axis to establish a plane coordinate system.
[0058] wherein the planar coordinate system is a two-dimensional coordinate system based on x axis and y axis, the origin of the coordinate system is the second camera optical center, y axis is the direction of the line connecting the first camera optical center and the second camera optical center, x axis is a straight line perpendicular to y axis.
[0059] S304: determining coordinate information in the planar coordinate system, wherein the coordinate information comprises the first camera optical center coordinate, the second camera optical center coordinate, the first contour point coordinate, the second contour point coordinate, the third contour point coordinate and the fourth contour point coordinate.
[0060] S305: establishing a binocular imaging model according to the coordinate information:
[0061] wherein, and respectively represent the horizontal coordinate values of the first camera optical center and the second camera optical center in the imaging plane, respectively represent the horizontal coordinate values of the first contour point, the second contour point, the third contour point and the fourth contour point in the imaging plane, represents the camera focal length of the first camera and the second camera, b represents the binocular camera baseline representing the distance from the first camera optical center to the second camera optical center, respectively represent the first connecting line connecting the first camera optical center and the first contour point , the second connecting line connecting the first camera optical center and the first contour point , the third connecting line connecting the second camera optical center and the third contour point , and the fourth connecting line connecting the second camera optical center and the fourth contour point , and respectively represent the horizontal and vertical coordinates of the connecting line in the planar coordinate system.
[0062] It should be noted that the coordinate system of the binocular imaging system is accurately constructed by geometric modeling. This process first obtains the connecting line by connecting the camera optical center and the contour point, then determines the position of the contour point on the imaging plane, and establishes a two-dimensional planar coordinate system through the camera optical center and the camera imaging plane. Such a geometric modeling method can effectively convert the three-dimensional contour point in space into a two-dimensional coordinate, ensuring the accuracy of the subsequent imaging model and the accuracy of the measurement results.
[0063] Reference is made to the accompanying drawings that show a schematic diagram of the epipolar geometry according to an embodiment of the present application. Figure 6 , shows a schematic diagram of the epipolar geometry according to an embodiment of the present application.
[0064] Figure 6 In the above, after obtaining the internal and external parameters of the two cameras through calibration, due to installation and manufacturing errors, the relative positions of the two cameras are not in the same plane but have a certain angle, and the imaging satisfies the epipolar geometry constraint, wherein 、 is the optical center of the left and right cameras, 、 is the imaging plane of the left and right cameras, is a point in the world coordinate system, is the imaging point in the pixel plane , the epipole is the intersection of the baseline and the pixel plane , and at this time the plane composed of them is called the epipolar plane, through the epipolar geometry principle, the pixel point in the left view can be mapped to the epipolar line in the right view, which greatly reduces the range of searching for the corresponding homonymous point . However, the calculation amount of each pixel corresponding to the epipolar line is still large, in fact, the two epipolar lines and are located in the same epipolar plane and share the same epipolar constraint condition. With the rotation of the epipolar plane, all view pixels can be represented by a certain epipolar line. By rearranging the pixels on the epipolar line, the pixels on the same epipolar line are located in the same row, and the pixel p 1 in the left view is directly associated with the homonymous candidate pixel in the right view by using the row number, and these candidate pixels only differ in the column coordinates. This process is the epipolar line correction, which avoids the pixel-by-pixel calibration and greatly improves the calibration efficiency. The binocular vision system is converted to an ideal configuration, and the imaging planes of the two cameras are coplanar and vertically aligned. After correction, the projections of the points in the scene in the two cameras will appear on the same row. Through this calibration, the accurate pixel coordinate conversion relationship of the images collected by different cameras is obtained, and then the collected images are rectified, and the measurement accuracy of the size of the rotary body is improved.
[0065] S4: calibrate the first camera and the second camera using Zhang Zhengyou's calibration method to rectify the first image and the second image under the condition that the imaging planes of the first camera and the second camera are aligned.
[0066] Among them, Zhang Zhengyou calibration method is one of the classic methods for camera calibration, which is proposed by Chinese scientist Zhang Zhengyou. This method calculates the internal parameters (such as focal length, principal point position, distortion coefficient, etc.) and external parameters (such as the position and attitude of the camera in the world coordinate system) of the camera by shooting the image of the known structure (such as the chessboard), so as to accurately calibrate the camera. Through Zhang Zhengyou calibration method, the geometric parameters of the camera are obtained, the imaging plane of the camera is aligned, and the image is corrected, which provides an accurate basis for subsequent image processing and dimension measurement.
[0067] In a possible implementation, S4 specifically includes sub-steps S401-S404:
[0068] S401: Single target calibration is performed on the first camera and the second camera respectively to obtain camera internal parameters, wherein the camera internal parameters include focal length, optical center coordinates and distortion coefficient.
[0069] S402: A first camera epipolar line located in the imaging plane of the first camera and a second epipolar line located in the imaging plane of the second camera are obtained respectively.
[0070] Among them, the first camera epipolar line is a straight line formed on the imaging plane of the first camera. The epipolar line is an important concept in binocular stereo vision, which represents the projection path of the disparity information corresponding to a certain point in another camera image. The second camera epipolar line is a straight line formed on the imaging plane of the second camera, which is also related to the disparity information and is the projection of the contour point obtained by the second camera view on the imaging plane.
[0071] S403: The pixel points of the first epipolar line are mapped to the second epipolar line, and the pixel points of the first epipolar line are rearranged so that the pixel points of the first epipolar line and the second epipolar line are located on the same straight line, so as to align the imaging plane of the first camera and the imaging plane of the second camera.
[0072] S404: Image correction is performed on the first image and the second image according to the camera internal parameters and the rearranged pixel points.
[0073] It should be noted that, first, the internal parameters of the camera, including focal length, optical center coordinates and distortion coefficient, are obtained through single target calibration. These parameters can correct the perspective deformation and lens distortion of the camera. Then, the imaging planes of the two cameras are aligned using the epipolar line correction method, so as to ensure that the images under two views can be accurately corresponding on the same plane. Such correction steps greatly improve the image alignment accuracy of the binocular vision system, making the subsequent three-dimensional reconstruction and dimension measurement more accurate and reliable.
[0074] In a possible implementation, the first camera epipolar line is a line connecting a first imaging point of the to-be-measured point on the first camera imaging plane and a first epipole, and the second camera epipolar line is a line connecting a second imaging point of the to-be-measured point on the second camera imaging plane and a second epipole, where the first epipole and the second epipole are intersection points of the baseline and the first camera imaging plane and the second camera imaging plane, respectively.
[0075] S5: determining the to-be-measured rotary body contour coordinates based on the corrected first image and the second image by combining the edge detection algorithm and the cross-correlation algorithm.
[0076] The edge detection algorithm is an algorithm for extracting the edges of an object from an image, which can identify the significant gray level changes in the image, which usually represent the boundaries of the object, the cross-correlation algorithm is an algorithm for comparing the similarity of two sequences or signals, which evaluates the similarity of two images or image regions by comparing the positional relationship of different pixels or contour points in the image, and the to-be-measured rotary body contour coordinates are the coordinate points of the external contour of the rotary body determined by the edge detection and cross-correlation algorithm, which are used to accurately describe the shape of the rotary body and provide data support for subsequent size measurement and three-dimensional reconstruction.
[0077] It should be noted that by combining the edge detection algorithm and the cross-correlation algorithm, the contour coordinates of the rotary body are accurately extracted from the corrected image, the edge detection algorithm effectively identifies the boundaries of the rotary body, and the cross-correlation algorithm ensures accurate matching of the corresponding contour points from the images taken from different visual angles, which greatly improves the accuracy of contour extraction and ensures the consistency of images taken from different visual angles in three-dimensional space.
[0078] In a possible implementation, S5 specifically includes sub-steps S501 and S506:
[0079] S501: performing edge contour extraction on the corrected first image and the second image by the edge detection algorithm, where the edge detection algorithm includes a structure forest algorithm.
[0080] The structure forest algorithm is a high-level algorithm for edge detection, which identifies structural features in the image through machine learning methods and extracts edges. The structure forest algorithm can accurately extract edge information in complex images and is more robust and accurate than traditional edge detection algorithms.
[0081] S502: retaining the edge contour whose intensity is greater than a preset edge contour intensity.
[0082] The edge profile intensity refers to the intensity or contrast of the edge recognized by the edge detection algorithm in the image. The higher the edge profile intensity, the more significant the gray scale change in the image, which generally indicates that the profile is more obvious and clear. The preset edge profile intensity is a threshold set by the user according to the measurement requirement, representing the minimum intensity of the reserved edge profile. Only the edge profile with an intensity higher than the preset value will be reserved and further processed.
[0083] It should be noted that the size of the preset edge profile intensity can be set by the person skilled in the art according to actual needs, which is not limited in the present application.
[0084] S503: Extract the first image centroid and the second image centroid from the reserved image edge profile, and calculate the first distance sequence from the first image centroid to the edge points of the edge profile and the second distance sequence from the second image centroid to the edge points of the edge profile, respectively.
[0085] The first image centroid refers to the centroid in the corrected first image, and the second image centroid refers to the centroid in the second image. The first distance sequence is a sequence composed of distances from the first image centroid to all edge profile points in the first image, and the second distance sequence is a sequence composed of distances from the second image centroid to all edge profile points in the second image, which reflects the profile shape of the revolution body in the second image.
[0086] S504: Select a standard revolution body, and take the distance sequence of the standard revolution body as a standard distance sequence, wherein the standard revolution body is a revolution body with known shape and known revolution body parameters.
[0087] S505: Calculate the cross-correlation coefficient between the first distance sequence and the second distance sequence and the standard distance sequence, respectively.
[0088] The standard distance sequence is a set of distances from the centroid of the standard revolution body to the edge profile points. The cross-correlation coefficient is a statistical index for measuring the similarity of two sequences. It compares the correlation of two sequences to obtain their matching degree.
[0089] S506: Select the image to which the distance sequence with the highest cross-correlation coefficient of the standard distance sequence belongs as the target image, and output the edge profile coordinates corresponding to the target image as the profile coordinates of the revolution body to be measured.
[0090] The target image is the best image selected from the corrected first image or second image, the image most consistent with the standard rotary body shape is determined by calculating the highest correlation coefficient of the distance sequence with the standard distance sequence, which is called the target image, the edge contour coordinates are a set of specific coordinate points of the rotary body boundary in the image, the external shape of the rotary body to be measured can be obtained by extracting the contour coordinates in the target image, and then used for accurate size calculation.
[0091] It should be noted that the high-quality contour is extracted by the edge detection algorithm, and the distance sequence analysis of the centroid and the edge point can effectively capture the geometric features of the rotary body. In addition, by comparing the cross-correlation coefficient with the standard distance sequence, the most matched target image is selected to ensure the accuracy and reliability of the contour information. The whole process accurately and stably extracts the contour coordinates of the rotary body, which provides a solid foundation for subsequent size calculation and modeling, especially in complex scenes.
[0092] S6: Calculate the rotary body axis coordinate and the rotary body radius to be measured according to the contour coordinates of the rotary body to be measured.
[0093] The rotary body axis coordinate to be measured is the coordinate of the center point of the rotary body to be measured, which is calculated by algebraic or geometric method under the binocular imaging model, representing the axis position of the rotary body. The radius of the rotary body is an important parameter for describing the size of the object, which is calculated based on the binocular imaging model and combined with the contour information of the rotary body.
[0094] It should be noted that the axis coordinate and the radius of the rotary body to be measured are accurately calculated by the binocular imaging model combined with algebraic or geometric method.
[0095] In one possible implementation, the axis coordinate and the radius of the rotary body to be measured are calculated by algebraic method or geometric method based on the binocular imaging model.
[0096] In one possible implementation, the axis coordinate and the radius of the rotary body to be measured are calculated by algebraic method, which specifically includes:
[0097] Set the unknown circle center coordinate.
[0098] Arbitrarily assume a circle center position , radius . For each straight line, the distance from the circle center to the tangent line is calculated using the point-to-line distance formula, which is equal to the radius:
[0099] wherein, represents the radius of any circle, denotes a slope of a straight line, denotes a intercept of a straight line.
[0100] The interval distances between the unknown parameter circle center coordinates and the first connecting line, the second connecting line, the third connecting line and the fourth connecting line are calculated respectively.
[0101] The difference between the interval distance square and the radius of the to-be-measured rotary body is calculated.
[0102] An error function is established based on the difference:
[0103] wherein, denotes the unknown parameter circle center coordinates, denotes the radius of the to-be-measured rotary body, denotes the error function about , and denote the straight line slope and the straight line intercept of the first connecting line respectively.
[0104] The error function is solved with the goal of minimizing the error function value, and the minimum error function value obtained by the solving is output.
[0105] The unknown parameter circle center coordinates under the minimum error function value are calculated.
[0106] The calculated unknown parameter circle center coordinates are taken as the to-be-measured rotary body axis coordinates and output.
[0107] The to-be-measured rotary body axis coordinates are substituted into the error function to obtain the radius of the to-be-measured rotary body.
[0108] In a possible implementation, the to-be-measured rotary body axis coordinates and the to-be-measured rotary body radius are calculated by a geometric method, specifically:
[0109] S601: The first angle bisector between the first connecting line and the second connecting line and the second angle bisector of the third connecting line and the fourth connecting line are calculated respectively.
[0110] The first angle bisector is the angle bisector between the first connecting line and the second connecting line, the angle bisector refers to a line segment that uniformly divides two angles, and the second angle bisector is the angle bisector between the third connecting line and the fourth connecting line, which plays the same role as the first angle bisector, only the perspective from the second camera, representing the geometric midpoint of the two contour points.
[0111] S602: The intersection coordinates of the first angle bisector and the second angle bisector are calculated.
[0112] The intersection coordinates refer to the coordinates of the intersection point of the first angle bisector and the second angle bisector.
[0113] S603: The intersection coordinates are taken as the to-be-measured rotary body axis coordinates and output.
[0114] S604: Substitute the axis coordinates of the to-be-measured rotary body into the first connecting line, the second connecting line, the third connecting line or the fourth connecting line to obtain the radius of the to-be-measured rotary body.
[0115] It should be noted that the connecting line between the optical center of the two cameras and the contour point provides an intuitive and effective way to determine the axis coordinates of the rotary body through the geometric relationship of the intersection point of the angle bisector, which does not depend on complex mathematical formulas, but is based on simple and robust geometric characteristics, so that the calculation process is fast and efficient, and then the axis coordinates are further substituted into the connecting line to solve the radius of the rotary body. The whole process simplifies the complex three-dimensional calculation and ensures the accuracy, which is very suitable for the rapid measurement demand in practical application.
[0116] The technical scheme provided by the embodiment of the application brings at least the following beneficial effects:
[0117] In the present application, complete rotary body contour information is obtained through multi-view shooting of binocular cameras, and the camera optical center origin is focused on the collection of contour feature points of the rotary body rather than the surface texture, effectively compensating for the error caused by the angle of view shielding, avoiding the influence of the reflection and weak texture area of the rotary body itself on the measurement accuracy, and improving the size measurement accuracy. In the pixel point matching process, Zhang Zhengyou calibration method is introduced, which skips the pixel-by-pixel matching process in the binocular algorithm, accurately calibrates the camera by using Zhang Zhengyou calibration method, and corrects the image. The contour coordinates of the rotary body are accurately extracted by combining the edge detection algorithm and the cross-correlation algorithm after the corrected image, which significantly improves the accuracy and efficiency of feature point matching. Based on the obtained contour coordinates of the to-be-measured rotary body, the size of the to-be-measured rotary body including the axis coordinates of the to-be-measured rotary body and the radius of the to-be-measured rotary body can be accurately calculated. Even in the case of uneven light or unobvious surface texture, high-precision measurement results can still be obtained, which has good robustness, is suitable for rotary bodies of different materials, colors and textures, increases the measurement application scene, and improves the rotary body measurement accuracy.
[0118] Reference is made to the accompanying drawings Figure 7 The accompanying drawings show a structure schematic diagram of a rotary body size measurement system based on binocular vision provided by the embodiment of the application.
[0119] The application further provides a rotary body size measurement system 20 based on binocular vision, which is applied to the above-mentioned rotary body size measurement method based on binocular vision and comprises:
[0120] A processor 201.
[0121] A memory 202, the memory 202 stores computer readable instructions, and the computer readable instructions are executed by the processor 201 to realize the rotary body size measurement method based on binocular vision as in the method embodiment.
[0122] The rotary body size measurement system 20 based on binocular vision provided by the present application can execute the rotary body size measurement method based on binocular vision described above, and achieve the same or similar technical effects. To avoid repetition, the present application will not be described again.
[0123] The technical scheme provided by the embodiment of the present application brings at least the following beneficial effects:
[0124] In the present application, complete rotary body contour information is obtained through multi-view shooting of the binocular camera, and the camera optical center origin is focused on the contour feature point collection of the rotary body instead of the surface texture, effectively compensating for the error caused by the view angle shielding, avoiding the influence of the reflection and weak texture area of the rotary body itself on the measurement accuracy, and improving the size measurement accuracy. In the pixel point matching process, Zhang Zhengyou calibration method is introduced, which skips the pixel-by-pixel matching process in the binocular algorithm, uses Zhang Zhengyou calibration method to accurately calibrate the camera, and corrects the image. Combined with the edge detection algorithm and the cross-correlation algorithm, the contour coordinates of the rotary body are accurately extracted, and the accuracy and efficiency of the feature point matching are significantly improved. Based on the obtained contour coordinates of the rotary body to be measured, the rotary body size including the rotary body axis coordinates and the rotary body radius to be measured can be accurately calculated, even in the case of uneven light or unobvious surface texture, high-precision measurement results can still be obtained, and the present application has good robustness, is suitable for rotary bodies of different materials, colors and textures, increases the measurement application scenarios, and improves the rotary body measurement accuracy.
[0125] It should be understood that the processor in the embodiment of the present application can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), ready-to-program gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0126] It should also be understood that the memory in the embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM) used as external cache. By way of example, and not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0127] The above-described embodiments can be implemented in whole or in part by software, hardware (such as a circuit), firmware, or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (for example, infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0128] It should be understood that the term "and / or" herein merely describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it, but it can also represent an "and / or" relationship, which can be understood in the context before and after it.
[0129] In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or the like means any combination of the items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0130] It should be understood that in various embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0131] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0132] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the devices, apparatuses and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0133] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0134] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0135] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.
[0136] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0137] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the method for measuring the size of a rotary body based on binocular vision.
[0138] The computer readable storage medium provided by the present application can realize the steps and effects of the method for measuring the size of a rotary body based on binocular vision, and the present application will not be described again to avoid repetition.
[0139] The technical solutions provided by the embodiment of the present application have at least the following beneficial effects:
[0140] In the present application, complete rotary body contour information is obtained through multi-view shooting of a binocular camera, the camera optical center origin is focused on the contour feature point collection of the rotary body instead of the surface texture, the error caused by the view angle shielding is effectively compensated, the influence of the reflection and weak texture area of the rotary body itself on the measurement accuracy is avoided, and the size measurement accuracy is improved. In the pixel point matching process, Zhang Zhengyou calibration method is introduced, the pixel-by-pixel matching process in the binocular algorithm is skipped, the camera is accurately calibrated by using the Zhang Zhengyou calibration method, the image is corrected, the contour coordinates of the rotary body are accurately extracted by combining the edge detection algorithm and the cross-correlation algorithm after the corrected image, and the accuracy and efficiency of the feature point matching are significantly improved. Based on the obtained contour coordinates of the rotary body to be measured, the size of the rotary body to be measured including the axis coordinates of the rotary body to be measured and the radius of the rotary body to be measured can be accurately calculated, high-precision measurement results can be obtained even in the case of uneven light or unobvious surface texture, the present application has good robustness, is suitable for rotary bodies of different materials, colors and textures, increases the measurement application scenarios, and improves the rotary body measurement accuracy.
[0141] The above merely illustrates the specific embodiments of the present application, and the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0142] The following points need to be explained:
[0143] (1) The drawings of the embodiments of the present application only involve the structures involved in the embodiments of the present application, and other structures can refer to the usual design.
[0144] (2) In order to be clear, the thickness of the layer or region is enlarged or reduced in the drawings used to describe the embodiments of the present application, that is, the drawings are not drawn according to the actual proportion. It can be understood that when an element such as a layer, a film, a region or a substrate is referred to as being located "on" or "under" another element, the element can be "directly" located on or under another element or there can be an intermediate element.
[0145] (3) In the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other to obtain new embodiments.
[0146] The above merely illustrates the specific embodiments of the present application, and the protection scope of the present application is not limited thereto, and the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of measuring the size of a gyratory body based on binocular vision, characterized by, The method comprises the following steps: S1: acquiring a to-be-measured rotary body; S2: acquiring, by a first camera, a first profile point, a second profile point and a first image of the to-be-measured rotary body on a rotary body plane perpendicular to a diameter of the to-be-measured rotary body, and acquiring, by a second camera, a third profile point, a fourth profile point and a second image of the to-be-measured rotary body on the rotary body plane; S3: establishing a binocular imaging model of the to-be-measured rotary body based on the first profile point, the second profile point, the third profile point and the fourth profile point; The S3 specifically comprises: S301: connecting a first camera optical center with the first profile point and the second profile point respectively to obtain a first connecting line and a second connecting line, and connecting a second camera optical center with the third profile point and the fourth profile point respectively to obtain a third connecting line and a fourth connecting line; S302: outputting, as a first outer profile point and a second outer profile point, an intersection of the first connecting line and the second connecting line with an imaging plane of the first camera respectively, and outputting, as a third outer profile point and a fourth outer profile point, an intersection of the third connecting line and the fourth connecting line with an imaging plane of the second camera respectively; S303: taking the second camera optical center as the coordinate system origin, the direction of the line connecting the first camera optical center and the second camera optical center as the extension direction of the x-axis, and a straight line perpendicular to the x-axis as the y-axis to establish a plane coordinate system; y y x S304: determining coordinate information in the plane coordinate system, wherein the coordinate information comprises a first camera optical center coordinate, a second camera optical center coordinate, a first outer profile point coordinate, a second outer profile point coordinate, a third outer profile point coordinate and a fourth outer profile point coordinate; S305: establishing a binocular imaging model according to the coordinate information: wherein, and respectively represent the horizontal coordinate value of the first camera optical center and the second camera optical center in the imaging plane, respectively represent the horizontal coordinate value of the first outer contour point, the second outer contour point, the third outer contour point and the fourth outer contour point in the imaging plane, represents the camera focal length of the first camera and the second camera, represents the binocular camera baseline representing the distance from the first camera optical center to the second camera optical center, respectively represent the first connecting line obtained by connecting the first camera optical center and the first outer contour point , the second connecting line obtained by connecting the first camera optical center and the first outer contour point , the third connecting line obtained by connecting the second camera optical center and the third outer contour point , and the fourth connecting line obtained by connecting the second camera optical center and the fourth outer contour point , and respectively represent the horizontal and vertical coordinates of the connecting line in the plane coordinate system. S4: calibrating the first camera and the second camera by using Zhang Zhengyou calibration method to correct the first image and the second image in the case of aligning imaging planes of the first camera and the second camera; S5: determining a to-be-measured rotary body profile coordinate based on the corrected first image and the second image by combining an edge detection algorithm and a cross-correlation algorithm; S6: calculating a to-be-measured rotary body axis coordinate and a to-be-measured rotary body radius according to the to-be-measured rotary body profile coordinate.
2. The binocular vision-based measurement method of a rotary body according to claim 1, characterized in that, The S4 specifically comprises: S401: performing single target calibration on the first camera and the second camera respectively to obtain camera internal parameters, wherein the camera internal parameters comprise a focal length, an optical center coordinate and a distortion coefficient; S402: acquiring a first camera epipolar line located on a first camera imaging plane and a second epipolar line located on a second camera imaging plane respectively; S403: mapping pixel points of the first epipolar line to the second epipolar line, rearranging the pixel points of the first epipolar line so that the pixel points of the first epipolar line and the second epipolar line are located on the same straight line to align the first camera imaging plane and the second camera imaging plane; S404: correcting the first image and the second image according to the camera internal parameters and the rearranged pixel points.
3. The dual-vision based measurement method of a rotary body according to claim 2, wherein, The first camera epipolar line is a connecting line of a first imaging point of a to-be-measured point on the first camera imaging plane and a first epipole, and the second camera epipolar line is a connecting line of a second imaging point of the to-be-measured point on the second camera imaging plane and a second epipole, wherein the first epipole and the second epipole are intersections of a base line and the first camera imaging plane and the second camera imaging plane respectively.
4. The dual-vision-based rotary body sizing method according to claim 2, characterized in that, The S5 specifically comprises: S501: performing edge contour extraction on the corrected first image and the second image by an edge detection algorithm, wherein the edge detection algorithm comprises a structure forest algorithm; S502: retaining edge contours with edge contour intensity greater than a preset edge contour intensity; S503: extracting a first image centroid and a second image centroid from the retained image edge contours, and calculating a first distance sequence from the first image centroid to edge points of the edge contour to which the first image centroid belongs and a second distance sequence from the second image centroid to edge points of the edge contour to which the second image centroid belongs; S504: selecting a standard revolution body, and taking a distance sequence of the standard revolution body as a standard distance sequence, wherein the standard revolution body is a revolution body with known shape and known revolution body parameters; S505: calculating cross-correlation coefficients between the first distance sequence and the second distance sequence and the standard distance sequence, respectively; S506: selecting an image to which a distance sequence with the highest cross-correlation coefficient with the standard distance sequence belongs as a target image, and taking edge contour coordinates corresponding to the target image as the profile coordinates of the to-be-measured revolution body and outputting the profile coordinates.
5. The binocular vision-based measurement method of a rotary body according to claim 1, wherein, The S6 specifically comprises: According to the binocular imaging model, calculating the to-be-measured revolution body axis coordinates and the to-be-measured revolution body radius by an algebraic method or calculating the to-be-measured revolution body axis coordinates and the to-be-measured revolution body radius by a geometric method.
6. The binocular vision-based measurement method of a rotary body according to claim 5, wherein, The calculation of the to-be-measured revolution body axis coordinates and the to-be-measured revolution body radius by the algebraic method specifically comprises: setting a parameter-unknown circle center coordinate; calculating interval distances of the parameter-unknown circle center coordinate and the first connecting line, the second connecting line, the third connecting line and the fourth connecting line, respectively; calculating a difference between the interval distance square and the to-be-measured revolution body radius; establishing an error function based on the difference; wherein, denotes the unknown parameter of the center coordinate of the circle, denotes the radius of the body to be measured, denotes the error function of denote the slope and the intercept of the straight line of the first line, respectively. solving the error function with the objective of minimizing the error function value, and outputting a minimum error function value obtained by the solving; calculating the parameter-unknown circle center coordinate under the minimum error function value; outputting the calculated parameter-unknown circle center coordinate as the to-be-measured revolution body axis coordinates; substituting the to-be-measured revolution body axis coordinates into the error function to obtain the to-be-measured revolution body radius.
7. The binocular vision-based measurement method of a rotary body according to claim 5, wherein, The calculation of the to-be-measured revolution body axis coordinates and the to-be-measured revolution body radius by the geometric method specifically comprises: S601: calculating a first angle bisector between the first connecting line and the second connecting line and a second angle bisector between the third connecting line and the fourth connecting line, respectively; S602: calculating intersection point coordinates of the first angle bisector and the second angle bisector; S603: outputting the intersection point coordinates as the to-be-measured revolution body axis coordinates; S604: substituting the to-be-measured revolution body axis coordinates into the first connecting line, the second connecting line, the third connecting line or the fourth connecting line to obtain the to-be-measured revolution body radius.
8. A system for measuring the size of a rotating body based on binocular vision, characterized in that, It comprises: a processor; a memory having computer readable instructions stored thereon, wherein the computer readable instructions are executed by the processor to implement the binocular vision-based revolution body size measurement method according to any one of claims 1 to 7.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The program, when executed by the processor, implements the method for measuring the size of a gyratory body based on binocular vision according to any one of claims 1 to 7.
Citation Information
Patent Citations
Projection image automatic correction method and system based on binocular vision
CN110830781A
Additive component three-dimensional contour reconstruction method and system based on light field imaging
CN117237546A