Circle center positioning method and device, computer program product and electronic equipment

By acquiring the internal parameters of the imaging acquisition device and the image projection of the object to be measured, the target equation parameters and the conversion matrix are determined, and the problems of unstable and low efficiency of the center positioning in the prior art are solved, and an efficient and stable center positioning method is realized.

CN120070545APending Publication Date: 2025-05-30NIO TECH ANHUI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510125643.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art lacks an efficient and stable center positioning method, which cannot meet the high beat requirements during industrial production and manufacturing, and is easily affected by the accuracy of parameter calibration and image quality, and has poor stability.

Method used

By acquiring the internal parameters of the imaging acquisition device and the first target projection of the measured object in the image coordinate system, the target equation parameters are determined, and the target conversion matrix of the measured object is determined based on these parameters, and the position of the center of the measured object in the coordinate system of the imaging acquisition device is finally determined.

Benefits of technology

It realizes that the center positioning of the object to be measured can be efficiently and stably without using complex structured light imaging principles, and only a common two-dimensional industrial camera acquisition equipment is required, which improves the efficiency of industrial operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070545A_ABST
    Figure CN120070545A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of visual positioning, and particularly relates to a circle center positioning method and device, a computer program product and electronic equipment. The method comprises the following steps: acquiring a target positioning parameter; the target positioning parameters comprise an internal reference of the camera acquisition equipment and a first target projection of the measured object in an image coordinate system; determining a target equation parameter based on the target positioning parameter; the target equation parameter is a parameter of a quadric surface generalization equation corresponding to a second target projection of the measured object in a camera acquisition equipment coordinate system; determining a target conversion matrix of the measured object based on the target equation parameters; the target conversion matrix is a matrix for converting the circle center of the measured object from a camera acquisition equipment coordinate system to a target plane, and the target plane is the cross section of the measured object; determining the target position of the circle center of the measured object based on the target equation parameter and the target conversion matrix; the target position is the position of the circle center of the measured object in a camera acquisition equipment coordinate system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of visual positioning, and particularly relates to a method and device for centroid positioning, a computer program product, and an electronic device. Background Art

[0002] In an industrial environment, it is often necessary to locate the centroid of an object with circular features (such as a plug, a body hole, a nut, etc.) to better guide subsequent operations. For example, during the production and manufacturing of components, it is necessary to locate the centroid in a component (such as a steel plate) to precisely implement the production steps. Another example is that when covering a component, it is necessary to locate the centroid of the hole to better perform the covering. In existing solutions, positioning can usually be performed according to the imaging principle of structured light, but this method takes a long time and cannot meet the high-tempo requirements during production and manufacturing. Or, the parallax of two camera acquisition devices (such as cameras) can be used to perform three-dimensional reconstruction of a circular object to be measured, but this method is easily affected by the accuracy of parameter calibration and the image quality, and has poor stability. Therefore, there is an urgent need for an efficient and stable centroid positioning method. Summary of the Invention

[0003] In view of this, the embodiments of this application provide a method and device for centroid positioning, a computer program product, and an electronic device to solve the problem of the lack of an efficient and stable centroid positioning method in the prior art.

[0004] The first aspect of the embodiments of this application provides a method for centroid positioning, which may include:

[0005] Obtain target positioning parameters; the target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the object to be measured in the image coordinate system;

[0006] Based on the target positioning parameters, determine target equation parameters; the target equation parameters are the parameters of the general quadratic surface equation corresponding to the second target projection of the object to be measured in the camera acquisition device coordinate system;

[0007] Based on the target equation parameters, determine the target transformation matrix of the object to be measured; the target transformation matrix is a matrix for converting the centroid of the object to be measured from the camera acquisition device coordinate system to the target plane, and the target plane is the cross-section of the object to be measured;

[0008] Based on the target equation parameters and the target transformation matrix, determine the target position of the centroid of the object to be measured; the target position is the position of the centroid of the object to be measured in the camera acquisition device coordinate system.

[0009] The second aspect of the embodiments of this application provides a centroid positioning device, which may include:

[0010] A parameter acquisition module, configured to acquire target positioning parameters; the target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the object to be measured in the image coordinate system.

[0011] A parameter determination module, configured to determine target equation parameters based on the target positioning parameters; the target equation parameters are the parameters of the general quadratic surface equation corresponding to the second target projection of the object to be measured in the camera acquisition device coordinate system.

[0012] A matrix determination module, configured to determine a target transformation matrix of the object to be measured based on the target equation parameters; the target transformation matrix is a matrix for transforming the center of the object to be measured from the camera acquisition device coordinate system to the target plane, and the target plane is the cross-section of the object to be measured.

[0013] A position determination module, configured to determine the target position of the center of the object to be measured based on the target equation parameters and the target transformation matrix; the target position is the position of the center of the object to be measured in the camera acquisition device coordinate system.

[0014] In a third aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above center positioning methods are implemented.

[0015] In a fourth aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the steps of any of the above center positioning methods.

[0016] In a fifth aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is run, any of the above center positioning methods is executed.

[0017] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: The embodiments of the present application obtain target positioning parameters; the target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the object to be measured in the image coordinate system; based on the target positioning parameters, target equation parameters are determined; the target equation parameters are the parameters of the general quadratic surface equation corresponding to the second target projection of the object to be measured in the camera acquisition device coordinate system; based on the target equation parameters, a target transformation matrix of the object to be measured is determined; the target transformation matrix is a matrix for converting the center of the circle of the object to be measured from the camera acquisition device coordinate system to the target plane, and the target plane is the cross-section of the object to be measured; based on the target equation parameters and the target transformation matrix, the target position of the center of the circle of the object to be measured is determined; the target position is the position of the center of the circle of the object to be measured in the camera acquisition device coordinate system. The center positioning method of the embodiments of the present application does not need to use the complex structured light imaging principle, and only needs to use an ordinary two-dimensional industrial camera acquisition device to efficiently and stably complete the positioning of the center of the object to be measured, which helps to improve the efficiency of industrial operations. Description of the Drawings

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

[0019] Figure 1 Schematic diagram of the first projection of the first object in the image coordinate system;

[0020] Figure 2 Schematic diagram of the third projection of the second object on the second plane;

[0021] Figure 3 Flowchart of an embodiment of a center positioning method in the embodiments of the present application;

[0022] Figure 4 Structural diagram of an embodiment of a center positioning device in the embodiments of the present application;

[0023] Figure 5 Schematic block diagram of an electronic device in the embodiments of the present application. Detailed Embodiments

[0024] To make the objectives, features, and advantages of the present application more obvious and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the embodiments described below are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0025] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0026] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.

[0027] It should be further understood that the term "and / or" used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0028] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.

[0029] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0030] In an industrial environment, it is often necessary to locate the center of a circle of an object with circular features (such as a plug cover, a body hole, a nut, etc.) to better guide subsequent operations. For example, in the process of manufacturing parts, it is necessary to locate the center of a circle in a part (such as a steel plate) to accurately implement the production steps. Another example is that when covering a part, it is necessary to locate the center of a hole to better implement the covering. In the existing solutions, the location can usually be carried out according to the imaging principle of structured light, but this method takes a long time and cannot meet the high-tempo requirements during production and manufacturing. Or, the parallax of two imaging acquisition devices (such as cameras) can be used to perform three-dimensional reconstruction of a circular object to be measured, but this method is easily affected by the accuracy of parameter calibration and the image quality, and has poor stability. Therefore, there is an urgent need for an efficient and stable method for locating the center of a circle.

[0031] In view of this, the embodiments of the present application provide a method, a device, a computer program product, and an electronic device for locating the center of a circle, so as to solve the problem in the prior art that due to the lack of a method for locating the center of a circle that combines real-time performance and stability, the industrial operation efficiency is not high.

[0032] It should be noted that the execution subject of the method of the present application is an electronic device, which may specifically include, but is not limited to, imaging acquisition devices, desktop computers, workstations, notebooks, handheld computers, smart phones, tablet computers, and other computing devices.

[0033] As an example, the execution subject of the method of the present application may be an imaging acquisition device, such as a camera. When it is necessary to locate an object with circular features, the imaging acquisition device can be used to acquire an image of the object to be located. After that, the location of the center of the circle of the object can be carried out based on the image.

[0034] As an example, the execution subject of the method of the present application may be a desktop computer. When it is necessary to locate an object with circular features, an imaging acquisition device (such as a camera) can be used to acquire an image of the object to be located. After that, the desktop computer can obtain the image acquired by the camera and can carry out the location of the center of the circle of the object based on the image.

[0035] In the embodiments of the present application, an object with circular features that needs to be positioned can be referred to as the object to be measured; when positioning the object to be measured, first, according to the projection of the object to be measured in the image coordinate system (referred to as the first target projection) and the internal parameters of the camera acquisition device (specifically, the focal length), the projection of the object to be measured in the image coordinate system (referred to as the second target projection) can be determined; then, the general equation of the quadratic surface corresponding to the second target projection is obtained, and the parameters of the general equation of the quadratic surface corresponding to the second target projection (referred to as the target equation parameters) are obtained; then, based on the target equation parameters, a matrix (referred to as the target transformation matrix) for converting the center of the object to be measured from the camera acquisition device coordinate system to the target plane can be determined to achieve the positioning of the center of the object to be measured.

[0036] Here, the first target projection of the object to be measured in the image coordinate system and the internal parameters of the camera acquisition device can be determined as the target positioning parameters.

[0037] In a specific implementation manner of the embodiments of the present application, a pre-trained equation conversion model can be used to implement the process of determining the target equation parameters based on the target positioning parameters, thereby greatly improving the solution speed and better meeting the high-beat requirements in actual production.

[0038] In another specific implementation manner of the embodiments of the present application, a pre-trained matrix determination model can also be used to implement the process of determining the target transformation matrix based on the target equation parameters, thereby greatly improving the solution speed and better meeting the high-beat requirements in actual production.

[0039] The training processes of the equation conversion model and the matrix determination model will be introduced in detail below to better explain the functions of the above two models.

[0040] In the embodiments of the present application, the first initial model can be trained to obtain the equation conversion model in the embodiments of the present application. Among them, the first initial model can be any artificial intelligence model, specifically including but not limited to any artificial intelligence model such as a convolutional neural network, a recurrent neural network, a deep residual network, a deep belief network, etc., and the embodiments of the present application do not limit this.

[0041] Before training the first initial model, a training sample set (referred to as the first training sample set) for training the first initial model can be constructed, and then the first initial model can be trained using the first training sample set.

[0042] Specifically, in the embodiments of the present application, various common objects with circular features in industrial parts (such as plug covers, body holes, nuts, etc.) can be used as the first objects, and the first training sample set can be constructed based on each first object.

[0043] Specifically, various first training sample parameters of a preset first number can be obtained. The first training sample parameters may include the first projection of the first object in the image coordinate system and the internal parameters of the camera acquisition device. The specific value of the first number can be set according to actual needs, and the embodiments of the present application do not limit this.

[0044] In the embodiments of the present application, a camera acquisition device (such as a camera) can be used to collect images of each first object, so that the projection of each first object in the image coordinate system (referred to as the first projection) can be obtained; afterwards, the internal parameters of the camera acquisition device (specifically, the focal length) can be used to convert the first projection from the image coordinate system to the camera acquisition device coordinate system, and the projection of the first object in the camera acquisition device coordinate system (referred to as the second projection) can be obtained.

[0045] As an example, the first projection of the first object in the image coordinate system O-xyz (i.e., the imaging plane) can be as Figure 1 shown. This imaging plane is located on the negative direction of the z c -axis of the camera acquisition device coordinate system O c y c z c axis. c axis.

[0046] In the embodiments of the present application, the coordinates of the i-th point in the first projection in the image coordinate system can be expressed as (x i , y i , z i , 1), and the focal length of the camera acquisition device can be expressed as e. Then, the process of converting the first projection to the second projection can be expressed as:

[0047]

[0048] where (x ic , y ic , z ic , 1) are the coordinates of the i-th point in the second projection in the camera acquisition device coordinate system, that is, (x ic , y ic , z ic , 1) are the corresponding coordinates of (x i , y i , z i , 1) in the camera acquisition device coordinate system, and T 0 is the matrix for converting the first projection of the first object to the second projection (referred to as the first matrix of the first object).

[0049] After that, the second projection of the first object in the camera acquisition device coordinate system can be expressed in the form of the general equation of a conical surface. Specifically, the general equation of the conical surface corresponding to the second projection of the first object in the embodiments of the present application can be expressed as:

[0050] ax ic 2 +by ic 2 +cz ic 2 +2fy ic z ic +2gx ic z ic +2hx ic y ic +2ux ic +2vy ic +2wz ic +d = 0,

[0051] where a is the coefficient related to the x ic term, and a can affect the curvature of the second projection in the x c direction; b is the coefficient related to the y ic term, and b can affect the curvature of the second projection in the y c direction; c is the coefficient related to the z ic term, and c can affect the curvature of the second projection in the z c direction; f is the coefficient related to the cross-term y ic z ic and f can affect the curvature of the second projection in the y c plane and the z c plane; g is the coefficient related to the cross-term x ic z ic and g can affect the curvature of the second projection in the x c plane and the z c plane; h is the coefficient of the cross-term x ic y ic and h can affect the curvature of the second projection in the x c plane and the y c plane; u is the coefficient of the first-order term of x ic and u can affect the translation of the second projection in the x c axis direction; v is the coefficient of the first-order term of y ic and v can affect the translation of the second projection in the y c axis direction; w is the coefficient of the first-order term of z ic and w can affect the translation of the second projection in the z c axis direction; d is the constant term, and d can affect the distance between the conical surface and the origin. The above parameters together determine the geometric characteristics of the second projection.

[0052] In the embodiment of the present application, it is also necessary to convert the general equation of the conic surface corresponding to the second projection of the first object into the general equation of the quadric surface.

[0053] Specifically, the second matrix T of the first object can be used 1 , to convert the general equation of the conic surface corresponding to the second projection of the first object into the general equation of the quadratic conic surface; T 1 Specifically, it can be shown as the following formula:

[0054]

[0055] Where, l 1 , l 2 , l 3 , m 1 , m 2 , m 3 , n 1 , n 2 , n 3 are the respective parameters in the second matrix T of the first object 1 . Here, after converting the general equation of the conic surface corresponding to the second projection of the first object into the general equation of the quadric surface (x ic , y ic , z ic , 1), the corresponding coordinates are denoted as (x ic ′, y ic ′, z ic ′, 1). Then l 1 , l 2 , l 3 define the direction and length ratio of x ic ′ in O c -x c y c z c . m 1 , m 2 , m 3 define the direction and length ratio of y ic ′ in O c -x c y c z c . n 1 , n 2 , n 3 define the direction and length ratio of z ic ′ in O c -x c y c z c . And the general equation of the quadric surface corresponding to the second projection of the first object can be expressed as: λ 1x ic ′ 2 + λ 2 y ic ′ 2 + λ 3 z ic ′ 2 + 2(ul 1 + vm 1 + wn 1 )x ic ′ + 2(ul 2 + vm 2 + wn 2 )y ic ′ + 2(ul 3 + vm 3 + wn 3 )z ic ′ + d = 0,

[0056] wherein, the above λ 1 , λ 2 , λ 3 are the roots of the following equation:

[0057] λ 2 (a + b + c)+ λ(bc + ca + ab - f 2 - g 2 - h 2 )-(abc + 2fgh - af 2 - bg 2 - ch 2 ) = 0,

[0058] Here, each parameter in (λ j , l j , m j , n j , u, v, w) can be determined as the first equation parameters corresponding to the first object, where j ∈ [1, 3], and the first equation parameters are the parameters of the general quadratic surface equation corresponding to the second projection of the first object in the camera acquisition device coordinate system.

[0059] According to the above process, the first equation parameters corresponding to each first object can be determined. Then, based on each first training sample parameter and the corresponding first equation parameter, the first training sample set can be constructed.

[0060] After constructing the first training sample set, each first training sample parameter in the first training sample set can be used as an input, and the corresponding first equation parameter can be used as the expected output of the first initial model to train the first initial model; when the preset training stop condition is met, it can be determined that the training of the first initial model is completed, and the trained model can be determined as the equation conversion model in the embodiments of the present application.

[0061] Here, the training stop condition can be set according to actual needs, and the embodiments of the present application do not limit this; for example, the training stop condition can be that the accuracy rate of the second initial model is greater than or equal to a preset accuracy rate threshold; or for another example, the number of training iterations is greater than or equal to a preset iteration number threshold; both the accuracy rate threshold and the iteration number threshold here can be set according to actual needs, and the embodiments of the present application do not limit this.

[0062] After obtaining the equation conversion model, the equation conversion model can be applied to actual center - point positioning. Using the equation conversion model, it is possible to efficiently determine the parameters of the general quadratic surface equation corresponding to the projection of an object in the camera acquisition device coordinate system based on the projection of the object in the image coordinate system and the internal parameters of the camera acquisition device; through the inference of the equation conversion model, the cumbersome calculation process can be greatly simplified, the speed of center - point positioning can be improved, so as to better meet the requirements of the high beat of industrial production and empower production manufacturing.

[0063] In addition, the embodiments of the present application can also train a matrix determination model to further improve the efficiency of center - point positioning.

[0064] Specifically, the embodiments of the present application can perform model training on the second initial model to obtain the matrix determination model in the embodiments of the present application; among them, the second initial model can be any artificial intelligence model, specifically including but not limited to any artificial intelligence model such as a convolutional neural network, a recurrent neural network, a deep residual network, a deep belief network, etc., and the embodiments of the present application do not limit this.

[0065] Before performing model training on the second initial model, a training sample set (referred to as the second training sample set) for training the second initial model can be constructed.

[0066] In the embodiments of the present application, various common objects with circular features in industrial parts (such as plug covers, body holes, nuts, etc.) can be used as the second objects, and the second training sample set can be constructed based on each second object; it should be understood that the second objects and the first objects can be exactly the same objects, or partially the same objects, or completely different objects, and the embodiments of the present application do not limit this.

[0067] Specifically, various second training sample parameters of a preset second number can be obtained. The second training sample parameters may include second equation parameters of a second object, and the second equation parameters of the second object are parameters of a general quadratic surface equation corresponding to a second projection of the corresponding second object in the camera acquisition device coordinate system. The specific value of the second number can be set according to actual needs, and the embodiments of the present application do not limit this.

[0068] In the embodiments of the present application, a preset camera acquisition device can be used to collect images of the second object, and the second equation parameters of the second object can be determined with reference to the description above, which will not be elaborated here.

[0069] Specifically, the second equation parameters of the second object can be expressed as: (λ j ′,l j ′,m j ′,n j ′,u′,v′,w′).

[0070] In a specific implementation manner of the embodiments of the present application, if each second object and each first object are exactly the same objects, the second training sample set can be constructed based on the first training sample set. Specifically, when constructing the second training sample set, the first equation parameters of the first object can be obtained, and the first equation parameters of the first object are the second equation parameters of the second object in the second training sample set; then, a second transformation matrix corresponding to the second object can be determined based on the second equation parameters of the second object to construct the second training sample set.

[0071] In the embodiments of the present application, the plane where the second projection is located in the camera acquisition device coordinate system can be transformed to obtain a second plane, and the projection of the second object on this second plane (referred to as the third projection) is circular. This transformation process can be expressed as:

[0072]

[0073] Among them, (x ic ″,y ic ″,z ic ″,1) is the coordinate of the i-th point on the second projection of the second object in the camera acquisition device coordinate system, and (X,T,Z,1) is the coordinate corresponding to (x ic ″,y ic ″,z ic ″,1) in the second plane; here, the matrix for transforming the camera acquisition device coordinate system to the second plane is called the third matrix, that is, T 2 ′.

[0074] As an example, the second plane can be denoted as the plane Z = k, where k is a function parameterized by the geometric parameter (radius or diameter) of the second object. The third projection of the second object on the second plane can be as Figure 2 shown. The third projection is specifically a circle. Here, the third projection can be expressed as:

[0075]

[0076] After that, the second plane can be rotated based on the Z-axis to obtain the first plane; the first plane is the cross-section of the second object. This rotation process can be expressed as:

[0077]

[0078] where T 3 is the matrix for rotating the second plane to obtain the first plane. Here, this matrix can be called the fourth matrix.

[0079] In addition, referring to the process of constructing the first training sample set, based on the first projection and the second projection of the second object, the first matrix T 0 ' and the second matrix T 1 ' corresponding to the second object can be obtained; and according to the above process, based on the third projection and the fourth projection of the second object, the third matrix T 2 ' and the fourth matrix T 3 ' of the second object can be determined; based on the first matrix T 0 ', the second matrix T 1 ', the third matrix T 2 ', and the fourth matrix T 3 ' of the second object, the first transformation matrix T 4 ' corresponding to the second object can be determined; specifically, the calculation formula for the first transformation matrix T 4 ' of the second object is:

[0080] T 4 ' = T 0 ' T 1 ' T 2 ' T 3 ',

[0081] Here, the inverse matrix of T 4 ' can be determined as the second transformation matrix of the second object, that is, the second transformation matrix of the second object is (T 4 ') -1 . Based on the second transformation matrix of the second object, the cross-section (i.e., the first plane) of the second object can be determined according to the first projection of the second object in the image coordinate system.

[0082] Accordingly, the second transformation matrix corresponding to each object can be obtained; based on the second equation parameters and the second transformation matrix corresponding to each second object, a second training sample set can be constructed.

[0083] After that, each second training sample parameter in the second training sample set can be used as the input, and the corresponding second equation parameter can be used as the expected output of the second initial model to train the second initial model; when the preset stop training condition is satisfied, it can be determined that the training of the second initial model is completed, and the trained model can be determined as the matrix determination model of the embodiment of the present application.

[0084] Here, the stop training condition can be set according to actual needs, and the embodiment of the present application does not limit this; for example, the stop training condition can be that the accuracy rate of the second initial model is greater than or equal to a preset accuracy rate threshold; or for another example, the number of training iterations is greater than or equal to a preset iteration number threshold.

[0085] After obtaining the matrix determination model, the matrix determination model can be applied to actual center location. Using the matrix determination model, the cross-section of an object can be efficiently determined according to the parameters of the general quadratic surface equation corresponding to the projection of the object in the camera acquisition device coordinate system.

[0086] Specifically, please refer to Figure 3 , an embodiment of a center location method in the embodiment of the present application may include steps S301 to S304:

[0087] Step S301, obtain target location parameters.

[0088] In the embodiment of the present application, an image of the object to be measured can be acquired by using a camera acquisition device (such as a camera); based on the acquired image, the projection of the object to be measured in the image coordinate system (referred to as the first target projection) can be determined.

[0089] In addition, any existing calibration method can be used to calibrate the camera acquisition device to determine the internal parameters of the camera acquisition device (specifically, the focal length).

[0090] In the embodiment of the present application, the first target projection of the object to be measured and the internal parameters of the camera acquisition device can be determined as the parameters required for positioning the object to be measured (referred to as target location parameters).

[0091] Step S302, determine target equation parameters based on the target location parameters.

[0092] In an embodiment of the present application, the internal parameters of the camera acquisition device (specifically, the focal length) can be used to project the first target onto the camera acquisition device coordinate system, obtaining the projection of the object to be measured in the camera acquisition device coordinate system (referred to as the second target projection); subsequently, based on the second target projection, the general equation of the quadratic surface corresponding to the second target projection can be determined, and the parameters of the general equation of the quadratic surface corresponding to the second target projection can be determined as the target equation parameters.

[0093] The implementation of the above process can refer to the detailed description in the previous text and will not be elaborated here.

[0094] In a specific implementation manner of an embodiment of the present application, the target equation parameters can also be determined by using a trained equation conversion model. Specifically, the target positioning parameters can be used as the input of the equation conversion model in the embodiment of the present application. Subsequently, the corresponding output of the equation conversion model can be obtained, and this output can be determined as the target equation parameters. Through the equation conversion model, a complex solution process can be completed in a relatively short time, greatly improving the response speed.

[0095] As an example, the general equation of the conic surface corresponding to the second target projection can be expressed as:

[0096] a target x target-ic 2 +b target y target-ic 2 +c target z target-ic 2 +2f target y target-ic Z target-ic +2g target x target-ic Z target-ic +2h target x target-ic y target-ic +2u target x target-ic +2v target y target-ic +2w target Z target-ic +d target =0,

[0097] where, (x target-ic , y target-ic , z target-ic , 1) is the coordinate of the i-th point in the second target projection in the camera acquisition device coordinate system O c -x c y c z c in, a targetFor x target-ic The coefficient related to item a target Can affect the curvature of the second target projection in the x c Direction; b target For y ic The coefficient related to item b target Can affect the curvature of the second target projection in the y c Direction; c target For z target-ic The coefficient related to item c target Can affect the curvature of the second target projection in the zc direction; f target For the coefficient related to the cross - term y target-ic z target-ic Related; f target Can affect the curvature of the second target projection in the y c Plane and z c Plane; g target For the coefficient related to the cross - term x target-ic z target-ic Related; g target Can affect the curvature of the second target projection in the x c Plane and z c Plane; h target For the cross - term x target-ic y target-ic Related; h target Can affect the curvature of the second target projection in the x c Plane and y c Plane; u target For the coefficient of the first - order term of x target-ic Related; u target Can affect the translation of the second target projection in the x c Axis direction; v target For the coefficient of the first - order term of y target-ic Related; v target Can affect the translation of the second target projection in the y c Axis direction; w target For the coefficient of the first - order term of z target-ic Related; w target Can affect the translation of the second target projection in the z c Axis direction; d target For the constant term; d target Can affect the distance between the conical surface and the origin. The above - mentioned parameters jointly determine the geometric characteristics of the second target projection; then the second matrix T 1 ″ can be expressed as:

[0098]

[0099] Among them, l target-1 , l target-2 , l target-3 , m target-1 , m target-2 , m target-3 , n target-1 , n target-2 , n target-3 are the respective parameters in the second target transformation matrix T 1 ″; here, the general equation of the conical surface corresponding to the second target projection can be converted into the general equation of a quadratic surface, and then the coordinates corresponding to (x target-ic , y target-ic , z target-ic , 1) are denoted as (x target-ic ′, y target-ic ′, z target-ic ′, 1). Then l target-1 , l target-2 , l target-3 define the direction and length ratio of x target-ic ′ in O c -x c y c z c , m target-1 , m target-2 , m target-3 define the direction and length ratio of y target-ic ′ in O c -x c y c z c , n target-1 , n target-2 , n target-3 define the direction and length ratio of z target-ic ′ in O c -x c y c z c . Then the general equation of the quadratic surface corresponding to the second target projection can be expressed as:

[0100] λ target-1 x target-ic ′ 2 +λ target-2 y target-ic ′ 2 +λ target-3 z target-ic ′ 2 +2(u target l target-1 +v target m target-1 +w target n target-1 )x target-ic′ + 2(u target l target-2 + v target m target-2 + w target n target-2 )y target-ic ′ + 2(u target l target-3 + v target m target-3 + w target n taraget-3 )z target-ic ′ + d target =0,

[0101] wherein, the above λ target-1 、λ target-2 、λ target-3 are the roots of the following equation:

[0102] λ target 2 (a target + b target + C target ) + λ target (b target c target + c target a target + a target b target - f target 2 - g target 2 h target 2 ) - (a ttarget b target c target + 2f target g target h target - a target f target 2 - b target g target 2 c target h target 2 )=0,

[0103] After that, each parameter in (λ target-j , l target-j , m target-j , n target-j , u target , v target , w target ) can be determined as the target equation parameters of the object to be measured. In this example, the target positioning parameters can be used as the equation conversion model Model1 The process of obtaining the target equation parameters from the input is expressed as:

[0104]

[0105] Wherein, is the target positioning parameter, that is, the input of the equation conversion model Model 1 p i is the coordinate of the i-th point on the first target projection, m is the number of points included in the first target projection, and output 1 (λ target-j , l target*j , m target-j , n target-j , u target , v target , w target ) is the output of the equation conversion model Model 1 .

[0106] Step S303: Determine the target transformation matrix of the object to be measured based on the target equation parameters.

[0107] In the embodiment of the present application, the target transformation matrix of the object to be measured can be determined based on the target equation parameters.

[0108] Specifically, the plane where the second target projection is located in the camera acquisition device coordinate system can be transformed to obtain a transformed plane; the projection of the object to be measured on this transformed plane (referred to as the third target projection) is circular; this process can be expressed as:

[0109]

[0110] Wherein, (X target , Y target , Z target , 1) is the coordinate on the transformed plane corresponding to (x target-ic ′, y target-ic ′, z target-ic ′, 1), and T 2 ″ is the matrix that transforms the plane where the second target projection is located in the camera acquisition device coordinate system to the transformed plane, which is called the third matrix. Thereafter, the transformed plane can be rotated to obtain a target plane, and the projection of the object to be measured on the target plane (referred to as the fourth target projection) can be obtained. The target plane is the cross-section of the object to be measured; this process can be expressed as:

[0111]

[0112] Wherein, (X target ′, Y target ′, Z target ′, 1) is (Xtarget ,Y target ,Z target , 1) The coordinates corresponding on the fourth target projection; T 3 ″ is the fourth matrix for rotating the conversion plane to obtain the target plane, then the target conversion matrix (T 4 ″)- 1 Can be expressed as:

[0113] (T 4 ″) -1 =(T 0 ″T 1 ″T 2 ″T 3 ″) -1 ,

[0114] Wherein, the target conversion matrix is the matrix for converting the first target projection into the fourth target projection; T 0 ″ is the first matrix for converting the first target projection into the second target projection, T 1 ″ is the second matrix for converting the general equation of the conical surface corresponding to the second target projection into the general equation of the quadratic surface, T 2 ″ is the third matrix for converting the second target projection into the third target projection, T 3 ″ is the matrix for converting the third target projection into the fourth target projection.

[0115] In a specific implementation manner of the embodiment of the present application, the above process of determining the target conversion matrix of the object to be measured can also be implemented by using a matrix determination model; specifically, the target equation parameters of the object to be measured can be used as the input of the matrix determination model, and the corresponding output of the matrix determination model can be determined as the target conversion matrix of the object to be measured. Wherein, the target conversion matrix is the matrix for converting the center of the object to be measured from the camera acquisition device coordinate system to the target plane.

[0116] As an example, using the matrix determination model Model 2 , based on the target equation parameters output 1 (λ target-j , l target-j , m target-j , n target-j , u target, v target , w target ) to determine the target conversion matrix (T 4 ″) -1 The process can be expressed as:

[0117] output 1 (λ target-j , l target-j , m target-j, n target-j , u target , v target , w target ) → Model 2 → output 2 ((T 4 ) - 1 ),

[0118] Among them, output 2 ((T4″) -1 ) is the output of the matrix determination model Model 2 .

[0119] Step S304: Based on the target equation parameters and the target transformation matrix, determine the target position of the center of the object to be measured.

[0120] In the embodiment of the present application, the projection coordinates of the center of the object to be measured on the target plane can be determined based on the target equation parameters and the geometric parameters of the object to be measured.

[0121] Here, the coordinates of the center of the object to be measured on the target plane can be calculated based on the target equation parameters; specifically, the target plane of the object to be measured can be transformed into:

[0122]

[0123] Among them, A is the sum of the products of λ target-j and l target-j 2 , B is the sum of the products of λ target-j and l target-j n target-j , C is the sum of the products of λ target-j and m target-j n target-j , D is the sum of the products of λ target-j and n target-j 2 , p target is the value of the Z-axis of the target plane, and can be specifically expressed as:

[0124] A = λ target-1 l target-1 2 + λ target-2 l target-2 2 + λ target-3 i target-3 2 ,

[0125] B = λ target-1 l target-1 n target-1 + λ target-2 ltarget-2 n target-2 +λ target-3 l target-3 n target-3 ,

[0126] C = λ target-1 m target-1 n target-1 +λ target-2 m target-2 n target-2 +λ target-3 m target-3 n target-3 ,

[0127] D = λ target-1 n target-1 2 +λ target-2 n target-2 2 +λ target-3 n target-3 2 ,

[0128] In the embodiments of the present application, the target positioning parameters may further include the geometric parameters of the object to be measured, and the geometric parameters are specifically the radius or diameter of the object to be measured. Taking the radius r of the object to be measured target as an example of the geometric parameter of the object to be measured, the target plane can be expressed as Z = p target , and p target is:

[0129]

[0130] Accordingly, the projection coordinates (X′ 0 , Y′ 0 , Z′ 0 , 1) of the center of the object to be measured in the target plane can be obtained; among them, X′ 0 , Y′ 0 , Z′ 0 are specifically:

[0131]

[0132]

[0133] After that, based on the target transformation matrix and the projection coordinates of the center of the object to be measured in the target plane, the position of the center of the object to be measured in the camera acquisition device coordinate system (referred to as the target position) can be determined.

[0134] Specifically, the inverse matrix of the target transformation matrix can be multiplied by the projection coordinates of the center of the object to be measured in the target plane to obtain the target position of the center of the object to be measured:

[0135]

[0136] Among them, (x co , y co , z co , 1) is the position of the center of the object to be measured in the coordinate system of the camera acquisition device (i.e., the target position).

[0137] In a specific implementation manner of the embodiment of the present application, after obtaining the target position of the center of the object to be measured, the component where the object to be measured is located can be positioned based on this target position.

[0138] For example, if the component where the object to be measured is located is a steel plate, the position of the center of the steel plate obtained by positioning can be compared with a preset specified position. If the gap between the two positions is less than the preset position gap threshold, it can be determined that the steel plate is located in the specified position; if the gap between the two positions is greater than or equal to the preset position gap threshold, it can be determined that the steel plate is not located in the specified position; then, corresponding operations can be performed according to actual needs. For example, if it is determined that the steel plate is located in the specified position, the steel plate can be welded; for another example, if it is determined that the steel plate is not located in the specified position, the position of the steel plate can be adjusted.

[0139] In summary, the embodiment of the present application obtains target positioning parameters; the target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the object to be measured in the image coordinate system; based on the target positioning parameters, target equation parameters are determined; the target equation parameters are the parameters of the general quadratic surface equation corresponding to the second target projection of the object to be measured in the coordinate system of the camera acquisition device; based on the target equation parameters, a target transformation matrix of the object to be measured is determined; the target transformation matrix is a matrix for converting the center of the object to be measured from the coordinate system of the camera acquisition device to the target plane, and the target plane is the cross-section of the object to be measured; based on the target equation parameters and the target transformation matrix, the target position of the center of the object to be measured is determined; the target position is the position of the center of the object to be measured in the coordinate system of the camera acquisition device. The center positioning method of the embodiment of the present application does not need to use the complex structured light imaging principle, and only needs to use an ordinary two-dimensional industrial camera acquisition device to efficiently and stably complete the positioning of the center of the object to be measured, which helps to improve the efficiency of industrial operations.

[0140] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.

[0141] Corresponding to a center positioning method described in the above embodiment Figure 4Shows a structural diagram of an embodiment of a center - point positioning device provided by an embodiment of the present application.

[0142] In an embodiment of the present application, a center - point positioning device may include:

[0143] A parameter acquisition module 401, configured to acquire target positioning parameters; the target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the object to be measured in the image coordinate system.

[0144] A parameter determination module 402, configured to determine target equation parameters based on the target positioning parameters; the target equation parameters are the parameters of the general quadratic surface equation corresponding to the second target projection of the object to be measured in the camera acquisition device coordinate system.

[0145] A matrix determination module 403, configured to determine the target transformation matrix of the object to be measured based on the target equation parameters; the target transformation matrix is a matrix for converting the center of the object to be measured from the camera acquisition device coordinate system to the target plane, and the target plane is the cross - section of the object to be measured.

[0146] A position determination module 404, configured to determine the target position of the center of the object to be measured based on the target equation parameters and the target transformation matrix; the target position is the position of the center of the object to be measured in the camera acquisition device coordinate system.

[0147] In a specific implementation manner of an embodiment of the present application, the parameter determination module includes:

[0148] A parameter determination sub - module, configured to use an equation conversion model to determine the target equation parameters based on the target positioning parameters; wherein, the equation conversion model is an artificial intelligence model for determining the target equation parameters based on the target positioning parameters.

[0149] In a specific implementation manner of an embodiment of the present application, the parameter determination module further includes:

[0150] A first construction sub - module, configured to construct a first training sample set; the first training sample set includes the first training sample parameters of the first number and the corresponding first equation parameters. Any one of the first training sample parameters includes the first projection of any first object in the image coordinate system and the internal parameters of the camera acquisition device, and any one of the first equation parameters is the parameter of the general quadratic surface equation corresponding to the second projection of the corresponding first object in the camera acquisition device coordinate system.

[0151] The first training sub-module is used to train the first initial model with each of the first training sample parameters in the first training sample set as the input and the corresponding first equation parameter as the expected output of the first initial model, so as to obtain the equation conversion model.

[0152] In a specific implementation manner of the embodiment of the present application, the first construction sub-module includes:

[0153] A parameter acquisition unit, configured to acquire each of the first training sample parameters of the first number;

[0154] A projection conversion unit, configured to convert the first projection of any one of the first objects in the image coordinate system into the second projection of any one of the first objects in the camera acquisition device coordinate system based on the internal parameters of the camera acquisition device;

[0155] An equation determination unit, configured to determine the general equation of the conical surface corresponding to the second projection of any one of the first objects in the camera acquisition device coordinate system based on the second projection of any one of the first objects in the camera acquisition device coordinate system;

[0156] A parameter determination unit, configured to determine the parameters of the general equation of the conical surface corresponding to the second projection of any one of the first objects in the camera acquisition device coordinate system as the first equation parameter corresponding to any one of the first objects;

[0157] A sample set construction unit, configured to construct the first training sample set based on each of the first training sample parameters and the corresponding first equation parameter.

[0158] In a specific implementation manner of the embodiment of the present application, the matrix determination module includes:

[0159] A matrix determination sub-module, configured to use a matrix determination model to determine the target conversion matrix of the object to be measured based on the target equation parameter; wherein, the matrix determination model is an artificial intelligence model for determining the target conversion matrix based on the target equation parameter.

[0160] In a specific implementation manner of the embodiment of the present application, the matrix determination module further includes:

[0161] The second construction sub-module is used to construct a second training sample set; the second training sample set includes the second training sample parameters of the second number and the corresponding second transformation matrix. Any one of the training sample parameters includes the second equation parameters corresponding to any one of the second objects, and any one of the second equation parameters is the parameter of the general quadratic surface equation corresponding to the second projection of the corresponding second object in the camera acquisition device coordinate system. Any one of the second transformation matrices is a matrix that converts the center of the corresponding second object from the camera acquisition device coordinate system to the first plane, and the first plane is the cross-section of the second object.

[0162] The second training sub-module is used to take the second training sample parameters in the second training sample set as inputs, use the corresponding second transformation matrix as the expected output of the second initial model, and train the second initial model to obtain the matrix determination model.

[0163] In a specific implementation manner of the embodiment of the present application, the second construction sub-module includes:

[0164] The matrix acquisition unit is used to acquire the second training sample parameters of the second number and the first transformation matrix. The first transformation matrix of any one of the second objects is a matrix for determining the second equation parameters of any one of the second objects based on the first projection of any one of the second objects in the image coordinate system.

[0165] The plane conversion unit is used to convert the plane where the second projection is located in the camera acquisition device coordinate system to obtain a second plane; the third projection of any one of the second objects in the second plane is circular.

[0166] The plane rotation unit is used to rotate the second plane to obtain the first plane, and obtain the fourth projection of any one of the second objects in the first plane.

[0167] The matrix determination unit is used to determine the second transformation matrix corresponding to any one of the second objects based on the first projection, second projection, third projection, and fourth projection of any one of the second objects.

[0168] The sample set construction unit is used to construct the second training sample set based on the second equation parameters corresponding to each of the second objects and the second transformation matrix.

[0169] In a specific implementation manner of the embodiment of the present application, the target positioning parameter further includes the geometric parameter of the object to be measured.

[0170] The position determination module includes:

[0171] A coordinate determination sub-module, configured to determine the projection coordinates of the center of the object to be measured on the target plane based on the target equation parameters and the geometric parameters of the object to be measured;

[0172] A position determination sub-module, configured to determine the target position based on the target transformation matrix and the projection coordinates of the center of the object to be measured on the target plane.

[0173] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices, modules, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0174] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0175] Figure 5 FIG. shows a schematic block diagram of an electronic device provided by an embodiment of the present application. For the sake of convenience of description, only parts related to the embodiments of the present application are shown.

[0176] As Figure 5 shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-described various center location method embodiments are implemented, such as Figure 3 the steps S301 to S304 shown. Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-described device embodiments are implemented, such as Figure 4 the functions of the modules 401 to 404 shown.

[0177] Exemplarily, the computer program 52 can be divided into one or more modules / units. The one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 52 in the electronic device 5.

[0178] Those skilled in the art can understand that Figure 5 merely examples of the electronic device 5, which do not constitute a limitation to the electronic device 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device 5 may further include input / output devices, network access devices, buses, etc.

[0179] The processor 50 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc.

[0180] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk equipped on the electronic device 5, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 51 may also include both the internal storage unit and the external storage device of the electronic device 5. The memory 51 is used to store the computer program and other programs and data required by the electronic device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0181] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0182] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0183] Those of ordinary skill in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0184] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0185] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] In addition, the functional units in each embodiment of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0187] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0188] The above-described embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for locating the center of a circle, characterized in that: include: Get target positioning parameters; The target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the measured object in the image coordinate system; Based on the target positioning parameters, target equation parameters are determined; the target equation parameters are parameters of a generalized quadratic surface equation corresponding to a second target projection of the measured object in a camera acquisition device coordinate system; Based on the target equation parameters, determining the target transformation matrix of the object to be measured; the target transformation matrix is ​​a matrix that transforms the center of the circle of the object to be measured from the coordinate system of the camera acquisition device to a target plane, and the target plane is a cross section of the object to be measured; Based on the target equation parameters and the target transformation matrix, the target position of the center of the circle of the measured object is determined; the target position is the position of the center of the circle of the measured object in the coordinate system of the camera acquisition device.

2. The circle center positioning method according to claim 1, characterized in that: The step of determining target equation parameters based on the target positioning parameters includes: Determining the target equation parameters based on the target positioning parameters using an equation conversion model; Among them, the equation conversion model is an artificial intelligence model that determines the target equation parameters based on the target positioning parameters.

3. The circle center positioning method according to claim 2, characterized in that: The training process of the equation conversion model includes: Constructing a first training sample set; the first training sample set includes a first number of first training sample parameters and corresponding first equation parameters, any of the first training sample parameters includes a first projection of any first object in the image coordinate system and an internal parameter of the camera acquisition device, and any of the first equation parameters is a parameter of a generalized quadratic surface equation corresponding to a second projection of the first object in the camera acquisition device coordinate system; Taking each of the first training sample parameters in the first training sample set as input and taking the corresponding first equation parameters as the expected output of the first initial model, the first initial model is trained to obtain the equation conversion model.

4. The circle center positioning method according to claim 3, characterized in that: The constructing of the first training sample set comprises: Obtaining the first number of parameters of each of the first training samples; Based on the internal parameters of the video acquisition device, converting a first projection of any of the first objects in the image coordinate system into a second projection of any of the first objects in the video acquisition device coordinate system; Determine, based on the second projection of any of the first objects in the coordinate system of the camera acquisition device, a generalized equation of a conic surface corresponding to the second projection of any of the first objects in the coordinate system of the camera acquisition device; Determine the parameters of the generalized equation of the conic surface corresponding to the second projection of any of the first objects in the coordinate system of the camera acquisition device as the parameters of the first equation corresponding to any of the first objects; The first training sample set is constructed based on each of the first training sample parameters and the corresponding first equation parameters.

5. The circle center positioning method according to claim 1, characterized in that: The step of determining the target transformation matrix of the object under test based on the target equation parameters includes: Determine the target transformation matrix of the object to be measured based on the target equation parameters by using a matrix determination model; Among them, the matrix determination model is an artificial intelligence model that determines the target transformation matrix based on the target equation parameters.

6. The circle center positioning method according to claim 5, characterized in that: The training process of the matrix determination model includes: Constructing a second training sample set; the second training sample set includes a second number of second training sample parameters and a corresponding second transformation matrix, any of the training sample parameters includes a second equation parameter corresponding to any second object, any of the second equation parameters is a parameter of a quadratic surface generalized equation corresponding to a second projection of the corresponding second object in the coordinate system of the camera acquisition device, and any of the second transformation matrices is a matrix that transforms the center of the corresponding second object from the coordinate system of the camera acquisition device to a first plane, and the first plane is a cross section of the second object; Taking each of the second training sample parameters in the second training sample set as input and the corresponding second transformation matrix as the expected output of the second initial model, the second initial model is trained to obtain the matrix determination model.

7. The circle center positioning method according to claim 6, characterized in that: The constructing the second training sample set comprises: Acquire the second number of parameters of each of the second training samples and a first transformation matrix, wherein the first transformation matrix of any second object is a matrix for determining the second equation parameters of any second object based on a first projection of any second object in the image coordinate system; The plane where the second projection is located in the coordinate system of the camera acquisition device is transformed to obtain a second plane; the third projection of any second object on the second plane is a circle; Rotate the second plane to obtain the first plane, and obtain a fourth projection of any second object on the first plane; Determine the second transformation matrix corresponding to any second object based on the first projection, the second projection, the third projection, and the fourth projection of any second object; The second training sample set is constructed based on the second equation parameters and the second transformation matrix corresponding to each of the second objects.

8. The circle center positioning method according to any one of claims 1 to 7, characterized in that: The target positioning parameters also include geometric parameters of the measured object; The step of determining the target position of the center of the measured object based on the target equation parameters and the target transformation matrix includes: Determine the projection coordinates of the center of the object to be measured on the target plane based on the target equation parameters and the geometric parameters of the object to be measured; The target position is determined based on the target transformation matrix and the projection coordinates of the center of the measured object on the target plane.

9. A circle center positioning device, characterized in that: include: A parameter acquisition module is used to obtain target positioning parameters; The target positioning parameters include the internal parameters of the camera acquisition device and the first target projection of the measured object in the image coordinate system; A parameter determination module, used to determine target equation parameters based on the target positioning parameters; the target equation parameters are parameters of a generalized quadratic surface equation corresponding to a second target projection of the measured object in a camera acquisition device coordinate system; A matrix determination module, used to determine the target transformation matrix of the object to be measured based on the target equation parameters; the target transformation matrix is ​​a matrix that transforms the center of the circle of the object to be measured from the coordinate system of the camera acquisition device to a target plane, and the target plane is a cross section of the object to be measured; The position determination module is used to determine the target position of the center of the circle of the measured object based on the target equation parameters and the target transformation matrix; the target position is the position of the center of the circle of the measured object in the coordinate system of the camera acquisition device.

10. A computer program product, characterized in that The invention comprises a computer program, and when the computer program is executed, the method for locating the center of a circle according to any one of claims 1 to 8 is executed.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the electronic device implements the steps of the circle center positioning method as described in any one of claims 1 to 8.