Camera position control method, device and equipment

By obtaining the distance between the camera and the center point and marking point of the target imaging area, position control instructions are generated, which solves the problem of traditional camera debugging relying on manual intuition, achieves high-precision vertical installation, and improves the accuracy of material thickness measurement.

CN118741297APending Publication Date: 2024-10-01BEIJING SID ENVIRONMENTAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410881443.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The traditional camera position debugging method relies on manual intuition, which is difficult to ensure high-precision vertical installation and affects the accuracy of measuring material thickness.

Method used

By obtaining the distance between the camera and the center point and identification point of the target imaging area, position control instructions are generated, the camera position is adjusted to ensure vertical installation, and the camera image is used for visualization and intelligent prompts.

Benefits of technology

It improves the accuracy of the vertical installation of the camera and the chain plate machine, and improves the accuracy of material thickness measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741297A_ABST
    Figure CN118741297A_ABST
Patent Text Reader

Abstract

The invention provides a camera position control method, device and equipment, and the method comprises the steps: obtaining a first distance between an initial position of a camera and a central point of a target imaging region, the target imaging region being a region on a chain plate machine plane used for containing materials, and the chain plate machine plane being located in a shooting range of the camera; acquiring second distances between the initial position of the camera and a plurality of identification points of the target imaging area; acquiring third distances between the central point of the target imaging area and the plurality of identification points; generating a position control instruction of the camera according to the first distance, the plurality of second distances and the plurality of third distances; and adjusting the initial position of the camera to a target position according to the control instruction. According to the scheme, the camera and the chain plate machine can be vertically mounted in a plane, so that the accuracy of measuring the thickness of the material is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automation control technology, and in particular to a method, device and equipment for controlling the position of a camera. Background Art

[0002] In industrial automation production lines, using binocular cameras to accurately measure the thickness of materials fed by chain conveyors is of great significance for the uniform speed of chain conveyors. To ensure the accuracy of measuring material thickness, the binocular camera must be perpendicular to the plane of the chain conveyor. However, traditional debugging methods are usually cumbersome and rely on human intuition, making it difficult to ensure high-precision vertical installation. Summary of the invention

[0003] The present invention provides a camera position control method, device and equipment to solve the problem that the traditional camera position debugging method relies on manual intuitive debugging and is difficult to ensure high-precision vertical installation.

[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0005] A method for controlling a camera position, comprising:

[0006] Acquire a first distance between an initial position of the camera and a center point of a target imaging area, wherein the target imaging area is an area on a plane of a chain conveyor for holding materials, and the chain conveyor plane is within a shooting range of the camera;

[0007] Obtaining second distances between the initial position of the camera and a plurality of identification points of the target imaging area;

[0008] Obtaining third distances between the center point of the target imaging area and the multiple marking points respectively;

[0009] generating a position control instruction for the camera according to the first distance, a plurality of second distances, and a plurality of third distances;

[0010] The initial position of the camera is adjusted to the target position according to the control instruction.

[0011] Optionally, obtaining a first distance between an initial position of the camera and a center point of a target imaging area includes:

[0012] Obtaining a first coordinate of an initial position of the camera in a world coordinate system;

[0013] Acquire a second coordinate of a center point of the target imaging area in the world coordinate system;

[0014] A first distance between an initial position of the camera and a center point of a target imaging area is obtained according to the first coordinate and the second coordinate.

[0015] Optionally, obtaining second distances between the initial position of the camera and a plurality of identification points of the target imaging area includes:

[0016] Acquire third coordinates of a plurality of identification points in the target imaging area in the world coordinate system;

[0017] According to the first coordinate and multiple third coordinates, second distances between the initial position of the camera and multiple identification points of the target imaging area are respectively obtained; wherein the multiple identification points are evenly distributed around the center point.

[0018] Optionally, obtaining third distances between the center point of the target imaging area and the plurality of identification points respectively includes:

[0019] According to the second coordinate and multiple third coordinates, the third distances between the center point of the target imaging area and the multiple identification points are respectively obtained.

[0020] Optionally, generating a position control instruction for the camera according to the first distance, a plurality of second distances, and a plurality of third distances includes:

[0021] When the multiple second distances are equal, and it is determined based on the first distance and the multiple second distances that the projection of the camera coincides with the center point of the target imaging area, a first control instruction is generated; otherwise, a second control instruction is generated; the first control instruction is used to instruct the camera to maintain the initial position unchanged, and the second control instruction is used to control the camera to adjust its position.

[0022] Optionally, determining, according to the first distance and the plurality of second distances, that the projection of the camera coincides with the center point of the target imaging area includes:

[0023] When the square of the first distance and the sum of the squares of each of the second distances are equal, the projection of the camera coincides with the center point of the target imaging area; otherwise, the projection of the camera does not coincide with the center point of the target imaging area.

[0024] Optionally, adjusting the initial position of the camera to a target position according to the control instruction includes:

[0025] When the second distances between any two non-adjacent marking points among the multiple marking points are not equal;

[0026] According to the second control instruction, the camera is controlled to move toward the center point of the target imaging area, so that the projection of the camera coincides with the center point of the target imaging area.

[0027] The present invention also provides a camera position control device, comprising:

[0028] An acquisition module is used to acquire a first distance between an initial position of a camera and a center point of a target imaging area, wherein the target imaging area is an area on a chain conveyor plane for holding materials, and the chain conveyor plane is located within the shooting range of the camera; acquire a second distance between the initial position of the camera and a plurality of identification points of the target imaging area; and acquire a third distance between the center point of the target imaging area and the plurality of identification points.

[0029] A processing module is used to generate a position control instruction for the camera according to the first distance, multiple second distances, and multiple third distances; and adjust the initial position of the camera to a target position according to the control instruction.

[0030] The present invention also provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed.

[0031] The present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above.

[0032] The above solution of the present invention includes at least the following beneficial effects:

[0033] The above scheme of the present invention obtains the first distance between the initial position of the camera and the center point of the target imaging area, the target imaging area is the area on the chain plate machine plane for holding materials, and the chain plate machine plane is located within the shooting range of the camera; obtains the second distance between the initial position of the camera and multiple identification points of the target imaging area; obtains the third distance between the center point of the target imaging area and the multiple identification points; generates the position control instruction of the camera according to the first distance, multiple second distances, and multiple third distances; adjusts the initial position of the camera to the target position according to the control instruction. The camera screen can be used for visual and intelligent prompting operations to ensure that the camera is installed vertically to the chain plate machine plane and improve the accuracy of measuring the thickness of the material. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of a method for controlling a camera position of the present invention;

[0035] Figure 2It is a structural schematic diagram of the camera fixing bracket and the chain plate machine of the present invention;

[0036] Figure 3 It is a module schematic diagram of the camera position control device of the present invention. DETAILED DESCRIPTION

[0037] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0038] like Figure 1 As shown, an embodiment of the present invention provides a method for controlling a camera position, comprising:

[0039] Step 11, obtaining a first distance between an initial position of the camera and a center point of a target imaging area, wherein the target imaging area is an area on a plane of a chain conveyor for holding materials, and the chain conveyor plane is within a shooting range of the camera;

[0040] Step 12, obtaining second distances between the initial position of the camera and a plurality of identification points of the target imaging area;

[0041] Step 13, obtaining third distances between the center point of the target imaging area and the multiple identification points respectively;

[0042] Step 14, generating a position control instruction for the camera according to the first distance, a plurality of second distances, and a plurality of third distances;

[0043] Step 15: Adjust the initial position of the camera to the target position according to the control instruction.

[0044] In this embodiment, if Figure 2 As shown in the figure, the camera 4 is fixed on the cross bar 2 of the camera fixing bracket, the chain plate machine 6 is located between the vertical poles 1 of the camera fixing bracket, and the camera 4 is located above the chain plate machine 6 to measure the material thickness on the plane of the chain plate machine 6. The camera 4 transmits the shooting signal to the industrial computer 3 and displays it through the display 5; the camera 4 in this embodiment adopts a binocular camera.

[0045] The camera 4 identifies the center point in the imaging area, as well as multiple identification points evenly distributed around the center point. The industrial computer 3 processes the data based on the distance between the camera 4 and the center point, the distance between the camera 4 and the multiple identification points, and the distance between the center point and the multiple identification points to determine whether the shooting angle of the camera 4 and the plane of the chain conveyor 6 is perpendicular. According to the determination result, the installation angle of the camera is adjusted, and an adjustment prompt is provided on the display 5.

[0046] The solution of this embodiment is to obtain a first distance between the initial position of the camera and the center point of a target imaging area, wherein the target imaging area is an area on a chain conveyor plane for holding materials, and the chain conveyor plane is within the shooting range of the camera; obtain a second distance between the initial position of the camera and a plurality of identification points of the target imaging area; obtain a third distance between the center point of the target imaging area and the plurality of identification points; generate a position control instruction for the camera according to the first distance, the plurality of second distances, and the plurality of third distances; adjust the initial position of the camera to the target position according to the control instruction; use the camera screen for visualization and intelligent prompting operations, so that the camera is installed vertically to the chain conveyor plane, thereby improving the accuracy of measuring material thickness.

[0047] In an optional embodiment of the present invention, step 11 may include:

[0048] Step 111, obtaining a first coordinate of an initial position of the camera in a world coordinate system;

[0049] Step 112, obtaining a second coordinate of the center point of the target imaging area in the world coordinate system;

[0050] Step 113: Obtain a first distance between an initial position of the camera and a center point of a target imaging area according to the first coordinate and the second coordinate.

[0051] In this embodiment, the plane of the chain plate machine is taken as the xy plane, the plane coordinates of the xy plane are obtained, and then the plane coordinates of the xy plane are used as a reference to obtain the z-axis coordinate point in the world coordinate system, and the z coordinate is a dynamic value that follows the change of the xy coordinate;

[0052] The coordinates P (x, y, z) of the initial position of the camera 4 are obtained in the world coordinate system, and the coordinates (x0, y0, z0) of the center point P0 in the imaging area are obtained through the camera 4. According to the coordinates P (x, y, z) of the camera 4 and the coordinates (x0, y0, z0) of the center point P0, the first distance between the initial position of the camera 4 and the center point of the target imaging area is calculated:

[0053]

[0054] Wherein, d0 is the distance between the initial position of the camera and the center point of the target imaging area.

[0055] In an optional embodiment of the present invention, step 12 may include:

[0056] Step 121, obtaining third coordinates of a plurality of identification points in the target imaging area in the world coordinate system;

[0057] Step 122, based on the first coordinate and multiple third coordinates, respectively obtain the second distance between the initial position of the camera and multiple identification points of the target imaging area; wherein the multiple identification points are evenly distributed around the center point.

[0058] In this embodiment, the positions and coordinates of multiple uniformly distributed identification points are determined with the center point as the geometric center, such as Figure 2 As shown, in this embodiment, four identification points are selected to locate in the four directions of up, down, left and right of the center point P0, and their coordinates are P1 (x1, y1, z1), P2 (x2, y2, z2), P3 (x3, y3, z3), and P4 (x4, y4, z4), respectively; a geometric figure area is constructed with the center point P0 as the geometric center. When the area is a square, the identification points P1, P2, P3, and P4 are the midpoints of each side of the square, respectively; when the area is a circle, the identification points P1, P2, P3, and P4 are the points that divide the circumference into four equal parts, respectively.

[0059] According to the initial position coordinates P of the camera and the coordinates of the marking points P1, P2, P3, and P4, the distances between the initial position of the camera and the multiple marking points of the target imaging area are calculated:

[0060]

[0061] Among them, d1 is the distance between the initial position of the camera and the identification point P1, d2 is the distance between the initial position of the camera and the identification point P2, d3 is the distance between the initial position of the camera and the identification point P3, and d4 is the distance between the initial position of the camera and the identification point P4.

[0062] In an optional embodiment of the present invention, step 13 may include:

[0063] Step 131: Obtain the third distances between the center point of the target imaging area and the multiple identification points respectively according to the second coordinate and multiple third coordinates.

[0064] In this embodiment, according to the coordinates of the center point P0 and the coordinates of the marking points P1, P2, P3, and P4 in step 12, the distances from the center point P0 to the multiple marking points are determined:

[0065]

[0066] Among them, c1 is the distance between the center point P0 and the marker point P1, c2 is the distance between the center point P0 and the marker point P2, c3 is the distance between the center point P0 and the marker point P3, and c4 is the distance between the center point P0 and the marker point P4.

[0067] In an optional embodiment of the present invention, step 14 may include:

[0068] When the multiple second distances are equal, and it is determined based on the first distance and the multiple second distances that the projection of the camera coincides with the center point of the target imaging area, a first control instruction is generated; otherwise, a second control instruction is generated; the first control instruction is used to instruct the camera to maintain the initial position unchanged, and the second control instruction is used to control the camera to adjust its position.

[0069] In this embodiment, two judgment conditions are used to determine whether the position of the camera 4 is perpendicular to the plane of the chain plate conveyor 6; Condition 1: The distances from the camera to the four marking points of the top, bottom, left and right are equal, that is, d1 = d2 = d3 = d4;

[0070] Condition 2: The distance between the camera and the center point, the distance from any identification point to the center point, and the distance to the camera satisfy the vertical condition relationship, and the projection of the camera 4 on the plane of the chain conveyor 6 coincides with the center point P0.

[0071] When both condition 1 and condition 2 are satisfied, the industrial computer 3 generates a first control instruction to keep the position of the camera 4 unchanged, and controls the display 5 to display that the camera 4 is in a vertical installation position;

[0072] When any one of condition 1 and condition 2 is not met, the industrial computer 3 generates a second control instruction and issues an alarm through the PLC (programmable logic controller). The alarm information is displayed on the display 5. The display 5 prompts that the position of the camera 4 needs to be adjusted, and displays the direction and distance that need to be adjusted, as well as the coordinate data of the current center point and each identification point.

[0073] In an optional embodiment of the present invention, determining that the projection of the camera coincides with the center point of the target imaging area according to the first distance and the plurality of second distances includes:

[0074] When the square of the first distance and the sum of the squares of each of the second distances are equal, the projection of the camera coincides with the center point of the target imaging area; otherwise, the projection of the camera does not coincide with the center point of the target imaging area.

[0075] In this embodiment, when the projection of the camera coincides with the center point of the target imaging area, the line connecting the camera and the center point is perpendicular to the plane of the chain conveyor. At this time, the distance between the camera and the center point, the distance from any identification point to the center point, and the distance to the camera satisfy the perpendicular condition relationship;

[0076] That is, when

[0077]

[0078] At this time, the projection of the camera coincides with the center point of the target imaging area, and the line connecting the camera and the center point is perpendicular to the plane of the chain conveyor.

[0079] In an alternative embodiment of the present invention, in step 15, it may include:

[0080] Step 151, when the second distances between any two non-adjacent identification points among the multiple identification points are not equal;

[0081] Step 152, controlling the camera to move in the direction of the center point of the target imaging area according to the second control instruction, so that the projection of the camera coincides with the center point of the target imaging area.

[0082] In this embodiment, when c1 is not equal to c2 or c3 is not equal to c4, the industrial control computer 3 issues a second control instruction to control the movement of the camera. Specifically:

[0083] When c1 > c2, the industrial control computer 3 determines that the camera is tilted forward and controls the camera to move backward by a distance of |c1 - c2|.

[0084] When c1 < c2, the industrial control computer 3 determines that the camera is tilted backward and controls the camera to move forward by a distance of |c1 - c2|.

[0085] When c3 > c4, the industrial control computer 3 determines that the camera is tilted to the left and controls the camera to move to the right by a distance of |c3 - c4|.

[0086] When c3 < c4, the industrial control computer 3 determines that the camera is tilted to the right and controls the camera to move to the left by a distance of |c3 - c4|.

[0087] After each adjustment of the position of the camera, the industrial control computer 3 re-determines the current position of the camera through condition 1 and condition 2. When c1 = c2 = c3 = c4, it is confirmed that the camera is vertical and the position adjustment is completed.

[0088] In the above embodiments of the present invention, by citing the principles of geometric trigonometry and the multi-point calibration and error compensation mechanism, the operations of visualization and intelligent prompting are realized through the camera image, reducing the error of adjustment by human eye observation, enabling the camera to be vertically installed with respect to the plane of the chain conveyor, and improving the accuracy of measuring the thickness of the material.

[0089] like Figure 3 As shown, an embodiment of the present invention further provides a camera fixed position adjustment device 30, comprising:

[0090] The acquisition module 31 is used to acquire a first distance between an initial position of the camera and a center point of a target imaging area, wherein the target imaging area is an area on a chain conveyor plane for holding materials, and the chain conveyor plane is located within the shooting range of the camera; acquire a second distance between the initial position of the camera and a plurality of identification points of the target imaging area; and acquire a third distance between the center point of the target imaging area and the plurality of identification points.

[0091] The processing module 32 is used to generate a position control instruction for the camera according to the first distance, multiple second distances, and multiple third distances; and adjust the initial position of the camera to a target position according to the control instruction.

[0092] Optionally, obtaining a first distance between an initial position of the camera and a center point of a target imaging area includes:

[0093] Obtaining a first coordinate of an initial position of the camera in a world coordinate system;

[0094] Acquire a second coordinate of a center point of the target imaging area in the world coordinate system;

[0095] A first distance between an initial position of the camera and a center point of a target imaging area is obtained according to the first coordinate and the second coordinate.

[0096] Optionally, obtaining second distances between the initial position of the camera and a plurality of identification points of the target imaging area includes:

[0097] Acquire third coordinates of a plurality of identification points in the target imaging area in the world coordinate system;

[0098] According to the first coordinate and multiple third coordinates, second distances between the initial position of the camera and multiple identification points of the target imaging area are respectively obtained; wherein the multiple identification points are evenly distributed around the center point.

[0099] Optionally, obtaining third distances between the center point of the target imaging area and the plurality of identification points respectively includes:

[0100] According to the second coordinate and multiple third coordinates, the third distances between the center point of the target imaging area and the multiple identification points are respectively obtained.

[0101] Optionally, generating a position control instruction for the camera according to the first distance, a plurality of second distances, and a plurality of third distances includes:

[0102] When the multiple second distances are equal, and it is determined based on the first distance and the multiple second distances that the projection of the camera coincides with the center point of the target imaging area, a first control instruction is generated; otherwise, a second control instruction is generated; the first control instruction is used to instruct the camera to maintain the initial position unchanged, and the second control instruction is used to control the camera to adjust its position.

[0103] Optionally, determining, according to the first distance and the plurality of second distances, that the projection of the camera coincides with the center point of the target imaging area includes:

[0104] When the square of the first distance and the sum of the squares of each of the second distances are equal, the projection of the camera coincides with the center point of the target imaging area; otherwise, the projection of the camera does not coincide with the center point of the target imaging area.

[0105] Optionally, adjusting the initial position of the camera to a target position according to the control instruction includes:

[0106] When the second distances between any two non-adjacent marking points among the multiple marking points are not equal;

[0107] According to the second control instruction, the camera is controlled to move toward the center point of the target imaging area, so that the projection of the camera coincides with the center point of the target imaging area.

[0108] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0109] The embodiment of the present invention further provides a computing device, including: a processor, a memory storing a computer program, and when the computer program is executed by the processor, the method described in the above embodiment is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0110] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described in the above embodiment. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0111] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for controlling a camera position, characterized in that: include: Acquire a first distance between an initial position of the camera and a center point of a target imaging area, wherein the target imaging area is an area on a plane of a chain conveyor for holding materials, and the chain conveyor plane is within a shooting range of the camera; Obtaining second distances between the initial position of the camera and a plurality of identification points of the target imaging area; Obtaining third distances between the center point of the target imaging area and the multiple marking points respectively; generating a position control instruction for the camera according to the first distance, a plurality of second distances, and a plurality of third distances; The initial position of the camera is adjusted to the target position according to the control instruction.

2. The method for controlling the camera position according to claim 1, characterized in that: Obtaining the first distance between the initial position of the camera and the center point of the target imaging area includes: Obtaining a first coordinate of an initial position of the camera in a world coordinate system; Acquire a second coordinate of a center point of the target imaging area in the world coordinate system; A first distance between an initial position of the camera and a center point of a target imaging area is obtained according to the first coordinate and the second coordinate.

3. The method for controlling the camera position according to claim 2, characterized in that: Obtaining second distances between the initial position of the camera and a plurality of identification points of the target imaging area, including: Acquire third coordinates of a plurality of identification points in the target imaging area in the world coordinate system; According to the first coordinate and multiple third coordinates, second distances between the initial position of the camera and multiple identification points of the target imaging area are respectively obtained; wherein the multiple identification points are evenly distributed around the center point.

4. The method for controlling the camera position according to claim 3, characterized in that: Obtaining third distances between the center point of the target imaging area and the plurality of identification points respectively, comprising: According to the second coordinate and multiple third coordinates, the third distances between the center point of the target imaging area and the multiple identification points are respectively obtained.

5. The method for controlling the camera position according to claim 4, characterized in that: Generating a position control instruction of the camera according to the first distance, a plurality of second distances, and a plurality of third distances, comprises: When the multiple second distances are equal, and it is determined based on the first distance and the multiple second distances that the projection of the camera coincides with the center point of the target imaging area, a first control instruction is generated; otherwise, a second control instruction is generated; the first control instruction is used to instruct the camera to maintain the initial position unchanged, and the second control instruction is used to control the camera to adjust its position.

6. The method for controlling the camera position according to claim 5, characterized in that: Determining, according to the first distance and the plurality of second distances, that the projection of the camera coincides with the center point of the target imaging area includes: When the square of the first distance and the sum of the squares of each of the second distances are equal, the projection of the camera coincides with the center point of the target imaging area; otherwise, the projection of the camera does not coincide with the center point of the target imaging area.

7. The method for controlling the camera position according to claim 5, characterized in that: Adjusting the initial position of the camera to the target position according to the control instruction includes: When the second distances between any two non-adjacent marking points among the multiple marking points are not equal; According to the second control instruction, the camera is controlled to move toward the center point of the target imaging area, so that the projection of the camera coincides with the center point of the target imaging area.

8. A camera position control device, characterized in that: include: An acquisition module is used to acquire a first distance between an initial position of a camera and a center point of a target imaging area, wherein the target imaging area is an area on a chain conveyor plane for holding materials, and the chain conveyor plane is located within the shooting range of the camera; acquire a second distance between the initial position of the camera and a plurality of identification points of the target imaging area; and acquire a third distance between the center point of the target imaging area and the plurality of identification points. A processing module is used to generate a position control instruction for the camera according to the first distance, multiple second distances, and multiple third distances; and adjust the initial position of the camera to a target position according to the control instruction.

9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is performed.

10. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.