Installation error correction method, system and readable storage medium in machine vision measurement
By imaging standard cuboid parts and fitting the stage plane equation, the problem of telecentric lens imaging size distortion caused by installation errors in machine vision measurement is solved, achieving the stability and reliability of high-precision measurement.
Patent Information
- Application Number
- CN202210351449.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-04-02
AI Technical Summary
In machine vision measurement, ordinary industrial lenses have problems such as inconsistent magnification, large lens distortion, inaccurate size measurement caused by parallax, and imaging size distortion caused by telecentric lens installation errors.
By using standard cuboid parts for imaging, measure the length of the virtual long side and perform straight line fitting, calculate the angle between the actual long side and the reference coordinate system, fit the stage plane equation, and adjust the stage and camera positions to correct the installation. error.
Accurately estimate the installation inclination error between the camera lens and the stage, correct the image size distortion of the telecentric lens, and improve the stability and reliability of high-precision measurement.
Smart Images

Figure CN114935309B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision, and more specifically, to a method, system and readable storage medium for correcting installation errors in machine vision measurement. Background Art
[0002] With the widespread application of machine vision systems in the field of precision inspection, ordinary industrial lenses are difficult to meet inspection requirements. When using ordinary lenses for dimensional measurement, the following problems may occur:
[0003] 1) The magnification is different because the objects being measured are not in the same measuring plane;
[0004] 2) Large lens distortion;
[0005] 3) Parallax, that is, when the object distance increases, the magnification of the object also changes;
[0006] 4) The resolution of the lens is not high;
[0007] 5) The uncertainty of the image edge position due to the geometric characteristics of the visual light source.
[0008] Telecentric lenses can be used in high-precision measurement, metrology, etc. due to their unique optical properties: high resolution, ultra-wide depth of field, ultra-low distortion, and unique parallel optical path design.
[0009] However, when telecentric lenses are used for high-precision measurement, there are still the following problems. Figure 1 and Figure 2 , Figure 1 This is a schematic diagram of the stage installation error. Figure 2 Camera imaging of the workpiece under the telecentric lens with installation error:
[0010] 1) Due to manual installation problems, it is difficult to ensure that the loading platform is completely perpendicular to the lens optical path, resulting in distortion of the size of the object being photographed;
[0011] 2) When the workpiece has thickness and is placed on an inclined loading platform and backlit to obtain the edge of the workpiece, shadows are formed on the top and bottom of the workpiece, causing obstruction and resulting in dimensional distortion.
[0012] Therefore, how to design an installation error correction method to eliminate the installation error during high-precision measurement is a technical problem that technical personnel in this field need to solve. Summary of the invention
[0013] In view of the above problems, an object of the present invention is to provide a method, system and readable storage medium for correcting installation errors in machine vision measurement, which can correct the imaging size distortion of a telecentric lens caused by installation errors.
[0014] A first aspect of the present invention provides a method for correcting installation errors in machine vision measurement, comprising the following steps:
[0015] S1, after the standard rectangular parallelepiped is mounted on the loading platform, the standard rectangular parallelepiped is imaged by a camera;
[0016] S2, measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation;
[0017] S3, calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard cuboid;
[0018] S4, according to the straight line equation and the angle, calculating the direction vector of the actual long side in the reference coordinate system;
[0019] S5, after changing the position of the standard cuboid, repeating steps S1 to S4, obtaining N direction vectors of the actual long sides, and fitting the stage plane equation, wherein N is an integer greater than 1;
[0020] S6, correcting the error according to the stage plane equation.
[0021] In this solution, the standard rectangular parallelepiped member satisfies:
[0022]
[0023] Wherein, L is the actual long side length, H is the actual height, and θ is the installation inclination angle.
[0024] In this solution, step S6 is specifically as follows:
[0025] The position of the stage and / or camera is adjusted according to the stage plane equation.
[0026] In this solution, step S6 is specifically as follows:
[0027] The measurement result is corrected according to the stage plane equation.
[0028] In this solution, the fitting of the stage plane equation is specifically to fit the stage plane equation using the least squares method.
[0029] The second aspect of the present invention further provides a system for correcting installation errors in machine vision measurement, comprising a memory and a processor, wherein the memory comprises a program for correcting installation errors in machine vision measurement, and when the program for correcting installation errors in machine vision measurement is executed by the processor, the following steps are implemented:
[0030] S1, after the standard rectangular parallelepiped is mounted on the loading platform, the standard rectangular parallelepiped is imaged by a camera;
[0031] S2, measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation;
[0032] S3, calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard cuboid;
[0033] S4, according to the straight line equation and the angle, calculating the direction vector of the actual long side in the reference coordinate system;
[0034] S5, after changing the position of the standard cuboid, repeating steps S1 to S4, obtaining N direction vectors of the actual long sides, and fitting the stage plane equation, wherein N is an integer greater than 1;
[0035] S6, correcting the error according to the stage plane equation.
[0036] In this solution, the standard rectangular parallelepiped member satisfies:
[0037]
[0038] Where L is the actual long side length, H is the actual height, and θ is the installation inclination angle.
[0039] In this solution, step S6 is specifically as follows:
[0040] The position of the stage and / or camera is adjusted according to the stage plane equation.
[0041] In this solution, the fitting of the stage plane equation is specifically to fit the stage plane equation using the least squares method.
[0042] A third aspect of the present invention provides a computer-readable storage medium, which includes a program for a method for correcting installation errors in machine vision measurement of a machine. When the program for correcting installation errors in machine vision measurement is executed by a processor, the steps of a method for correcting installation errors in machine vision measurement as described in any one of the above items are implemented.
[0043] The present invention discloses a method and system for correcting installation errors in machine vision measurement and a readable storage medium, including mounting a standard rectangular block on a loading platform, imaging the standard rectangular block with a camera; measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation; calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard rectangular block; obtaining the direction vector of the actual long side in the reference coordinate system according to the straight line equation and the angle; calculating again after changing the position of the standard rectangular block to obtain the direction vectors of N actual long sides, fitting the stage plane equation; and correcting the error according to the stage plane equation. The present invention uses standard rectangular blocks placed in different positions (flat on the stage, rotated and placed in several positions) for visual inspection and measurement, and according to a set of 2D image data obtained, a method for converting mathematical calculations into 3D spatial positions is performed to accurately estimate the installation inclination error between the camera lens and the stage, correct the imaging size distortion of the telecentric lens caused by the above-mentioned installation error, and make the high-precision measurement results more stable and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of the stage installation error is shown;
[0045] Figure 2 The camera imaging of the workpiece under the telecentric lens with mounting errors is shown;
[0046] Figure 3 A flow chart of a method for correcting installation errors in machine vision measurement of the present application is shown;
[0047] Figure 4 A block diagram of a system for correcting installation errors in machine vision measurement according to the present invention is shown;
[0048] Figure 5 A schematic projection diagram of a standard rectangular parallelepiped is shown. DETAILED DESCRIPTION
[0049] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0051] Figure 3A flow chart of a method for correcting installation errors in machine vision measurement of the present application is shown.
[0052] like Figure 3 As shown, the present application discloses a method for correcting installation errors in machine vision measurement, comprising the following steps:
[0053] S302, after the standard rectangular parallelepiped is mounted on the loading platform, an image of the standard rectangular parallelepiped is taken with a camera;
[0054] S304, measuring the length of the virtual long side in the image after imaging, and performing straight line fitting on the virtual long side to obtain a straight line equation;
[0055] S306, calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard cuboid;
[0056] S308, calculating the direction vector of the actual long side in the reference coordinate system according to the straight line equation and the included angle;
[0057] S310, after changing the position of the standard cuboid, repeat steps S302 to S308 to obtain N direction vectors of the actual long sides, and fit the stage plane equation, where N is an integer greater than 1;
[0058] S312, correcting the error according to the stage plane equation.
[0059] It should be noted that in the embodiment of the present application, the camera coordinate system is used as the three-dimensional space reference coordinate system, the parallel optical path direction of the telecentric lens is the Z-axis direction, and the X and Y directions of the imaged image are the X and Y-axis directions. The plane of the loading platform in the reference coordinate system is represented by the point method. The loading platform can be represented as the XOY plane of the reference coordinate system rotating around the origin, that is, the normal vector of the loading platform is the Z-axis of the reference coordinate system, and the loading platform plane can be represented as: A0x+B0y+C0z=0. That is, the normal vector of the loading platform plane: The angle between it and the XOY plane of the reference coordinate system is:
[0060] It should be noted that the standard cuboid is arbitrarily rotated and placed in N positions on the stage, and the image in the camera is: the projection of the standard cuboid on the XOY plane of the reference three-dimensional coordinate system (such as Figure 2 As shown). At position i, the long side in the image after imaging is called the virtual long side, and its length is L′ i At the same time, a straight line fitting is performed on the edge line of the virtual long side, and the equation of the fitting line is obtained as follows:
[0061] a i x+bi y+c i =0;
[0062] That is, the direction vector of the straight line is:
[0063]
[0064] It should be noted that for position i, the angle between the actual long side length L of the standard cuboid and the XOY plane of the reference coordinate system is θ i ,like Figure 5 As shown, according to the virtual long side L′ i The projection in the direction of the actual long side L shows that:
[0065] L′ i =L cosθ i +H sinθ i ;
[0066] Solve for the angle
[0067] It can be understood that from the above steps, at position i, the direction vector of the actual long side L of the standard cuboid in the reference three-dimensional coordinate system space is Its projection vector on the XOY plane The angle is θ i .Right now:
[0068]
[0069] According to N positions Fitting the stage plane equation. Because the standard rectangular block is placed on the stage, the direction vector of its long side is always on the stage plane, and each direction vector can be regarded as two points, the starting point and the end point, the starting point is (0, 0), and there are N end points, all of which are on the stage plane, so the plane equation of the stage plane in the reference coordinate system can be obtained by fitting the plane through N+1 points.
[0070] After obtaining the stage plane equation, the stage or the imaging image can be adjusted to correct the installation error in machine vision measurement.
[0071] An embodiment of the present invention provides a method for correcting installation errors in machine vision measurement. The method uses standard rectangular blocks placed in different positions (placed flat on a stage and rotated to several positions) to perform visual inspection and measurement. Based on a set of 2D image data obtained, a method for converting the data into 3D spatial positions through mathematical calculations is performed to accurately estimate the installation inclination error between the camera lens and the stage, correct the distortion of the telecentric lens imaging size caused by the above-mentioned installation error, and make the high-precision measurement results more stable and reliable.
[0072] According to an embodiment of the present invention, the standard cuboid part satisfies:
[0073]
[0074] wherein, L is the actual long side length, H is the actual height, and θ is the installation inclination angle.
[0075] It should be noted that the length of the standard workpiece = L, and the height = H. It is necessary to ensure that: (For example, if the installation inclination angle θ can be ensured to be within 20°, it is necessary to ensure that L / H of the standard block < tan(70°), that is, L < 2.75H, and the size of the standard block is limited according to the actual situation).
[0076] According to an embodiment of the present invention, the position of the stage and / or the camera is adjusted according to the stage plane equation.
[0077] It should be noted that after obtaining the stage plane equation, the difference between the stage and the XOY plane of the reference coordinate system can be known, and the installation error of the stage can be corrected by adjusting the angles of each orientation of the stage.
[0078] According to an embodiment of the present invention, the measurement result is corrected according to the stage plane equation.
[0079] It can be understood that after calculating the stage plane equation, taking the coefficient matrix of the stage plane equation as the correction matrix, and correcting the plane equation of the photographed measurement image of the object to be measured, a measurement image consistent with the actual measurement value can be obtained, achieving the effect of correcting the wrong measurement result caused by the installation error. When measuring thin sheet-like workpieces, the 3D spatial position of the stage can be calculated by using projection transformation through the 2D image position of the camera, and then the measurement result can be calculated.
[0080] According to an embodiment of the present invention, the fitting of the stage plane equation is specifically to fit the stage plane equation by the least squares method.
[0081] It can be understood that the method of fitting a plane with discrete points is a conventional method, such as the least squares method, which minimizes the distance residuals of each point to the plane.
[0082] According to an embodiment of the present invention, the length of the virtual long side in the image after measurement imaging is specifically:
[0083] In the image after measurement imaging, the two side lines of the virtual long side are fitted, and by measuring the distance between the side lines, the length of the virtual long side is obtained.
[0084] It should be noted that, considering that there may be a large error by directly measuring the distance between the two endpoints of the virtual long side, this embodiment adopts fitting the side straight line where the two endpoints of the virtual long side are located. Since a standard rectangular parallelepiped is used, the side straight line is perpendicular to the virtual long side; then the distance between the two side straight lines is calculated to obtain the length of the virtual long side. This method can reduce the error compared to directly measuring the endpoint distance.
[0085] Figure 4 A block diagram of a system for correcting installation errors in machine vision measurement according to the present invention is shown.
[0086] like Figure 4 As shown, the present invention discloses a system 4 for correcting installation errors in machine vision measurement, including a memory 41 and a processor 42. The memory 41 includes a program for correcting installation errors in machine vision measurement. When the program for correcting installation errors in machine vision measurement is executed by the processor 42, the following steps are implemented:
[0087] S1, after the standard rectangular parallelepiped is mounted on the loading platform, the standard rectangular parallelepiped is imaged by a camera;
[0088] S2, measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation;
[0089] S3, calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard cuboid;
[0090] S4, according to the straight line equation and the angle, calculating the direction vector of the actual long side in the reference coordinate system;
[0091] S5, after changing the position of the standard cuboid, repeating steps S1 to S4, obtaining N direction vectors of the actual long sides, and fitting the stage plane equation, wherein N is an integer greater than 1;
[0092] S6, correcting the error according to the stage plane equation.
[0093] It should be noted that in the embodiment of the present application, the camera coordinate system is used as the three-dimensional space reference coordinate system, the parallel optical path direction of the telecentric lens is the Z-axis direction, and the X and Y directions of the imaged image are the X and Y-axis directions. The plane of the loading platform in the reference coordinate system is represented by the point method. The loading platform can be represented as the XOY plane of the reference coordinate system rotating around the origin, that is, the normal vector of the loading platform is the Z-axis of the reference coordinate system, and the loading platform plane can be represented as: A0x+B0y+C0z=0. That is, the normal vector of the loading platform plane: The angle between it and the XOY plane of the reference coordinate system is:
[0094] It should be noted that the standard cuboid is arbitrarily rotated and placed in N positions on the stage, and the image in the camera is: the projection of the standard cuboid on the XOY plane of the reference three-dimensional coordinate system (such as Figure 2 As shown). At position i, the long side in the image after imaging is called the virtual long side, and its length is measured as L′ i At the same time, a straight line fitting is performed on the edge line of the virtual long side, and the equation of the fitting line is obtained as follows:
[0095] a i x+b i y+c i =0;
[0096] That is, the direction vector of the straight line is:
[0097]
[0098] It should be noted that for position i, the angle between the actual long side length L of the standard cuboid and the XOY plane of the reference coordinate system is θ i ,like Figure 5 As shown, according to the virtual long side L′ i The projection in the direction of the actual long side L shows that:
[0099] L′ i =L cosθ i +H sinθ i ;
[0100] Solve for the angle
[0101] It can be understood that from the above steps, at position i, the direction vector of the actual long side L of the standard cuboid in the reference three-dimensional coordinate system space is Its projection vector on the XOY plane The angle is θ i .Right now:
[0102]
[0103] According to N positions Fitting the stage plane equation. Because the standard rectangular block is placed on the stage, the direction vector of its long side is always on the stage plane, and each direction vector can be regarded as two points, the starting point and the end point, the starting point is (0, 0), and there are N end points, all of which are on the stage plane, so the plane equation of the stage plane in the reference coordinate system can be obtained by fitting the plane through N+1 points.
[0104] After obtaining the equation of the stage plane, the stage or the imaging image can be adjusted to correct the installation error in machine vision measurement.
[0105] A method for correcting installation error in machine vision measurement provided by an embodiment of the present invention uses a standard cuboid block placed in different positions (lying flat on the stage and rotated to several positions) for visual detection and measurement, and converts a set of 2D image data obtained through mathematical calculations into 3D spatial positions, accurately estimating the installation inclination error between the camera lens and the stage, correcting the distortion of the imaging size of the telecentric lens caused by the above installation error, and making the high-precision measurement results more stable and reliable.
[0106] According to an embodiment of the present invention, the standard cuboid part satisfies:
[0107]
[0108] Wherein, L is the actual long side length, H is the actual height, and θ is the installation inclination angle.
[0109] It should be noted that the length of the standard workpiece = L, and the height = H. It is necessary to ensure: (For example, if the installation inclination angle θ can be ensured to be within 20°, then it is necessary to ensure that L / H of the standard block < tan(70°), that is, L < 2.75H, and the size of the standard block is limited according to the actual situation).
[0110] According to an embodiment of the present invention, the position of the stage and / or the camera is adjusted according to the equation of the stage plane.
[0111] It should be noted that after obtaining the equation of the stage plane, the difference between the stage and the XOY plane of the reference coordinate system can be known, and by adjusting the angles of each orientation of the stage, the installation error of the stage can be corrected.
[0112] According to an embodiment of the present invention, the measurement result is corrected according to the equation of the stage plane.
[0113] It can be understood that after calculating the equation of the stage plane, taking the coefficient matrix of the equation of the stage plane as the correction matrix, and correcting the plane equation of the photographed measurement image of the object to be measured, a measurement image consistent with the actual measurement value can be obtained, achieving the effect of correcting the wrong measurement result caused by the installation error. When measuring thin sheet-like workpieces, the 3D spatial position of the stage can be calculated through the 2D image position of the camera by using projective transformation, and then the measurement result can be calculated.
[0114] According to an embodiment of the present invention, the fitting of the equation of the stage plane is specifically to fit the equation of the stage plane by the least square method.
[0115] It can be understood that the method of fitting a plane with discrete points is a conventional method, such as the least square method, which minimizes the residual distance from each point to the plane.
[0116] According to an embodiment of the present invention, the length of the virtual long side in the image after measuring the imaging is specifically:
[0117] According to the measured image, two side straight lines of the virtual long side are fitted, and the length of the virtual long side is obtained by measuring the distance between the side straight lines.
[0118] It should be noted that, considering that there may be a large error by directly measuring the distance between the two endpoints of the virtual long side, this embodiment adopts fitting the side straight line where the two endpoints of the virtual long side are located. Since a standard rectangular parallelepiped is used, the side straight line is perpendicular to the virtual long side; then the distance between the two side straight lines is calculated to obtain the length of the virtual long side. This method can reduce the error compared to directly measuring the endpoint distance.
[0119] A third aspect of the present invention provides a computer-readable storage medium, which includes a program for a method for correcting installation errors in machine vision measurement of a machine. When the program for correcting installation errors in machine vision measurement is executed by a processor, the steps of a method for correcting installation errors in machine vision measurement as described in any one of the above items are implemented.
[0120] The present invention discloses a method and system for correcting installation errors in machine vision measurement and a readable storage medium, including mounting a standard rectangular block on a loading platform, imaging the standard rectangular block with a camera; measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation; calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard rectangular block; obtaining the direction vector of the actual long side in the reference coordinate system according to the straight line equation and the angle; calculating again after changing the position of the standard rectangular block to obtain the direction vectors of N actual long sides, fitting the stage plane equation; and correcting the error according to the stage plane equation. The present invention uses standard rectangular blocks placed in different positions (flat on the stage, rotated and placed in several positions) for visual inspection and measurement, and according to a set of 2D image data obtained, a method for converting mathematical calculations into 3D spatial positions is performed to accurately estimate the installation inclination error between the camera lens and the stage, correct the imaging size distortion of the telecentric lens caused by the above-mentioned installation error, and make the high-precision measurement results more stable and reliable.
[0121] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0122] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0123] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0124] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0125] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A method for correcting installation errors in machine vision measurement, characterized in that: The following steps are involved: S1, after the standard rectangular parallelepiped is mounted on the loading platform, the standard rectangular parallelepiped is imaged by a camera; S2, measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation; S3, calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard cuboid; S4, according to the straight line equation and the angle, calculating the direction vector of the actual long side in the reference coordinate system; S5, after changing the position of the standard cuboid, repeating steps S1 to S4, obtaining N direction vectors of the actual long sides, and fitting the stage plane equation, wherein N is an integer greater than 1; S6, correcting the error according to the stage plane equation; The standard rectangular parallelepiped member satisfies: Wherein, L is the actual long side length, H is the actual height, and θ is the installation inclination angle; The step S6 is specifically as follows: Correcting the measurement result according to the stage plane equation; The angle between the actual long side of the standard cuboid in step S3 and the XOY plane of the reference coordinate system is: Among them, θ i is the angle between the actual long side length and the XOY plane of the reference coordinate system, L is the actual long side length, H is the actual height, L′ i is the length of the virtual long side at position i; The length of the virtual long side in the image after measuring imaging is specifically: According to the measured image, two side straight lines of the virtual long side are fitted, and the length of the virtual long side is obtained by measuring the distance between the side straight lines.
2. The method for correcting installation errors in machine vision measurement according to claim 1, characterized in that: The step S6 is specifically as follows: The position of the stage and / or camera is adjusted according to the stage plane equation.
3. The method for correcting installation errors in machine vision measurement according to claim 1, characterized in that: The fitting of the stage plane equation is specifically to fit the stage plane equation using the least squares method.
4. A system for correcting installation errors in machine vision measurement, characterized in that: The invention comprises a memory and a processor, wherein the memory comprises a program of a method for correcting errors in machine vision measurement, and when the program of correcting errors in machine vision measurement is executed by the processor, the following steps are implemented: S1, after the standard rectangular parallelepiped is mounted on the loading platform, the standard rectangular parallelepiped is imaged by a camera; S2, measuring the length of the virtual long side in the image after imaging, and performing a straight line fitting on the virtual long side to obtain a straight line equation; S3, calculating the angle between the actual long side and the XOY plane of the reference coordinate system according to the length of the virtual long side and the length of the actual long side of the standard cuboid; S4, according to the straight line equation and the angle, calculating the direction vector of the actual long side in the reference coordinate system; S5, after changing the position of the standard cuboid, repeating steps S1 to S4, obtaining N direction vectors of the actual long sides, and fitting the stage plane equation, wherein N is an integer greater than 1; S6, correcting the error according to the stage plane equation; The standard rectangular parallelepiped member satisfies: Wherein, L is the actual long side length, H is the actual height, and θ is the installation inclination angle; The step S6 is specifically as follows: Correcting the measurement result according to the stage plane equation; The angle between the actual long side of the standard cuboid in step S3 and the XOY plane of the reference coordinate system is: Where L is the actual length of the long side, H is the actual height, and L′ i is the length of the virtual long side at position i; The length of the virtual long side in the image after measuring imaging is specifically: According to the measured image, two side straight lines of the virtual long side are fitted, and the length of the virtual long side is obtained by measuring the distance between the side straight lines.
5. The machine vision measurement installation error correction system according to claim 4, characterized in that: The step S6 is specifically as follows: The position of the stage and / or camera is adjusted according to the stage plane equation.
6. The machine vision measurement installation error correction system according to claim 4, characterized in that: The fitting of the stage plane equation is specifically to fit the stage plane equation using the least squares method.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a program for a method for correcting installation errors in machine vision measurement. When the program for correcting installation errors in machine vision measurement is executed by a processor, the steps of a method for correcting installation errors in machine vision measurement as described in any one of claims 1 to 3 are implemented.
