Automatic alignment method and device
By obtaining the initial image of the marker and calculating the offset information, and automatically adjusting the camera position, the problem of reliance on physical parameters in the prior art is solved, and an efficient and automatic camera alignment method is realized.
Patent Information
- Application Number
- CN202411741595.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
AI Technical Summary
The existing camera view alignment method relies on the physical parameter information of the camera, and cannot achieve accurate alignment when the accurate physical parameter information cannot be obtained, resulting in complex and inefficient alignment process, and high dependence on equipment and labor, making it difficult to achieve complete automation.
By acquiring the initial image of the marker containing the marker point, calculating the offset information, adjusting the position of the image acquisition device, obtaining at least two images of the marker at different distances, analyzing the image to determine the target position, and adjusting the device to the target position.
It realizes that the position of the image acquisition device can be adjusted accurately without obtaining physical parameters, improves the alignment accuracy and efficiency, simplifies the alignment process, and reduces dependence on equipment and labor.
Smart Images

Figure CN119629483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera testing, and in particular to an automatic alignment method and device. Background Art
[0002] During objective image quality evaluation of smart devices such as mobile phones and tablets, it is necessary to control the camera to capture specific landmarks or light boxes. Existing camera framing and alignment methods mainly include manual photography and computational automated photography based on the camera's optical parameters. Manual photography requires manual adjustment of the camera position, which is inefficient and easily affected by human factors. Computational automated photography methods rely on physical camera parameters such as pixel size and lens focal length.
[0003] The existing computational automated photography method has the following technical problems: First, the method must pre-configure the physical parameter information of the camera, including data such as pixel size and focal length. When accurate physical parameter information cannot be obtained, the method will not be able to achieve accurate alignment. Secondly, in the actual operation process, auxiliary equipment such as laser rangefinders and tripods are still needed, and manual participation is required to complete the final position adjustment, which fails to achieve full automation. These problems make the alignment process complicated and inefficient, and it is highly dependent on equipment and labor. In addition, since the physical parameters of different models of cameras are different, the versatility of this method is limited, making it difficult to be widely used in batch testing.
[0004] The limitations of existing technologies affect the efficiency and accuracy of camera testing, while also increasing testing costs. These issues are particularly prominent in large-scale production test environments, severely restricting the automation and scalability of camera testing.
[0005] Therefore, it is urgent to propose an automatic alignment method and device to solve the above problems. Summary of the Invention
[0006] The purpose of the present invention is to provide an automatic alignment method and device, which can improve the efficiency and accuracy of precise positioning of an image acquisition device.
[0007] In order to solve the above technical problems, the present invention provides an automatic alignment method, which specifically includes the following:
[0008] Obtain the initial image of the landmark containing the identification point and calculate the offset information;
[0009] adjusting the position of the image acquisition device according to the offset information to obtain at least two images of the marker at different distances;
[0010] analyzing the at least two images to determine a target position of the image acquisition device; and
[0011] Adjust the image acquisition device to the target position.
[0012] Furthermore, the offset information includes the up-down, left-right and rotational offsets of the center position of the image acquisition device relative to the center position of the marker.
[0013] Furthermore, obtaining the initial image of the marker including the identification point specifically includes:
[0014] Identify the position coordinates P of the marker points around the marker in the initial image i (x i ,y i ), where there are i identification points, i is a positive integer;
[0015] According to the position coordinates P of the marking point i (x i ,y i ) and the distance formula between two points, obtain the center coordinates Core(x,y) of the rectangular frame surrounded by the multiple identification points in the initial image and the first width size of the rectangular frame.
[0016] Furthermore, the calculation of the offset information specifically includes: obtaining the following offset information according to the center coordinates Core (x, y) of the rectangular frame and the first width size:
[0017] Where ShiftRatio is the similarity ratio, presetSpace is the height of the known marking point on the marker, and ImageMarkWidth1 is the first width size of the rectangular box;
[0018] Wherein, ΔZ is the vertical offset, height is the height of the initial image, and Core.y is the y value of the center coordinate of the rectangular frame;
[0019] ΔX is the left and right offset, width is the width of the initial image, and Core.x is the x value of the center coordinate of the rectangular frame;
[0020] R=Arctan((P i_2 .yP i_1 .y) / (P i_2 .xP i_1 .x)), where R is the rotation offset, P i_2 .y and P i_ 1.y is the y value of the position coordinates of different identification points, P i_2 .x and P i_2 .y are the x values of the coordinates of the different identification points.
[0021] Furthermore, adjusting the position of the image acquisition device according to the offset information to obtain at least two images of the marker at different distances specifically includes:
[0022] Adjusting the position of the image acquisition device according to the offset information, acquiring a first image including the plurality of identification points, and obtaining a second width size of a rectangular frame enclosed by the identification points in the first image;
[0023] The image acquisition device is moved in the horizontal direction by a predetermined distance to acquire a second image containing a plurality of the identification points, and a third width dimension of a rectangular frame surrounded by the identification points in the second image is obtained.
[0024] Furthermore, the determining of the target position of the image acquisition device specifically includes the following steps:
[0025] Calculating the distance h2 between the image acquisition device and the marker according to the change in image width;
[0026] Calculate the theoretical prediction deviation distance h1;
[0027] Calculate the final adjustment distance Δh=h2-h1-SecondPositionMove, where SecondPositionMove is a predetermined distance that the image acquisition device moves in the horizontal direction;
[0028] The image acquisition device is moved to a target position according to the adjustment distance Δh.
[0029] Furthermore, the calculating of the distance h2 between the image acquisition device and the marker according to the change in image width specifically includes:
[0030] According to the first formula: Obtain the distance h2 between the image acquisition device and the marker after the image acquisition device moves the predetermined distance, wherein SecondPositionMove is the predetermined distance the image acquisition device moves in the horizontal direction, ImageMarkWidth3 is the third width dimension after moving the predetermined distance, and ImageMarkWidth2 is the second width dimension before moving the predetermined distance.
[0031] Furthermore, the calculation of the theoretical prediction deviation distance h1 specifically includes: substituting h2 into the second formula: The theoretical predicted deviation distance h1 when the image acquisition device moves to the target position is obtained, ImageMarkWidth2 is the second width size before moving the predetermined distance, and height is the height of the initial image.
[0032] Furthermore, the method further includes: the image acquisition device captures an image at an initial distance D1 to obtain an initial image ratio r1; setting a target image ratio r2; and according to the proportional relationship formula Calculating a target distance D2; and adjusting a relative distance between the image acquisition device and the marker according to the target distance D2.
[0033] Furthermore, before acquiring the initial image of the marker, the method includes: keeping the plane where the marker is located parallel to the plane where the image acquisition device is located.
[0034] In addition, the present invention also proposes an automatic alignment device for implementing the automatic alignment method as described above, comprising: an image acquisition device, a position adjustment mechanism, and an image processing module;
[0035] The image acquisition device is used to obtain an initial image of the marker including the identification point;
[0036] The image processing module is used to calculate the offset information based on the initial image of the marker, and to analyze at least two images to determine the target position of the image acquisition device;
[0037] The position adjustment mechanism is used to adjust the position of the image acquisition device according to the offset information, and is used to adjust the position of the image acquisition device according to the target position.
[0038] Through the above technical solution, the present invention has the following beneficial effects:
[0039] The automatic alignment method provided by the present invention involves acquiring an initial image of a marker containing a marking point and calculating offset information; adjusting the position of an image acquisition device based on the offset information to acquire at least two images of the marker at different distances; and analyzing the at least two images to determine the target position of the image acquisition device. By calculating offset information and analyzing multiple images, the position of the image acquisition device can be precisely adjusted without obtaining the device's physical parameters, thereby improving alignment accuracy and efficiency.
[0040] In addition, the image scale is automatically adjusted based on the linear relationship between the image ratio and the sensor's movement distance, thus achieving precise control of the image ratio to meet different shooting needs.
[0041] In addition, by pre-maintaining the parallelism between the marker plane and the image acquisition device plane, the subsequent alignment process is simplified, the workload of repeated adjustments is reduced, and the stability and reliability of the system are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Flowchart of an automatic alignment method according to an embodiment of the present invention;
[0043] Figure 2 Schematic diagram of the imaging principle in the automatic alignment method in one embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a marker including a marking point in an automatic alignment method according to an embodiment of the present invention;
[0045] Figure 4 Schematic diagram of the alignment process of the image acquisition device in the automatic alignment method according to one embodiment of the present invention;
[0046] Figure 5 Schematic diagram of the processing flow of the image processing module in the automatic alignment method according to one embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following is a more detailed description of an automatic alignment method and apparatus of the present invention, with reference to the accompanying drawings, which illustrate preferred embodiments of the present invention. It should be understood that those skilled in the art may modify the present invention described herein while still achieving the advantageous effects of the present invention. Therefore, the following description should be understood as a general guide for those skilled in the art and not as a limitation of the present invention.
[0048] The following paragraphs describe the present invention in more detail by way of example with reference to the accompanying drawings. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are greatly simplified and not to exact scale, and are provided solely for the purpose of assisting in the description of the embodiments of the present invention.
[0049] like Figure 1 As shown, an embodiment of the present invention proposes an automatic alignment method, which specifically includes the following steps:
[0050] S1. Obtain an initial image of the marker containing the identification point and calculate the offset information;
[0051] S2. adjusting the position of the image acquisition device according to the offset information to obtain at least two images of the marker at different distances;
[0052] S3, analyzing the at least two images to determine the target position of the image acquisition device; and
[0053] S4. Adjust the image acquisition device to the target position.
[0054] In one embodiment, in step S1 , the offset information includes the up-down, left-right, and rotational offsets of the center position of the image acquisition device relative to the center position of the marker.
[0055] In step S1, the acquisition of the initial image of the marker including the marker points specifically includes: identifying the position coordinates P of the marker points around the marker in the initial image i (x i ,y i ), wherein there are i identification points, i is a positive integer; according to the position coordinates P of the identification points i (x i ,y i ) and the distance formula between two points The center coordinates Core(x, y) of the rectangular frame surrounded by the plurality of the marking points in the initial image and the first width of the rectangular frame are obtained, wherein the rectangular frame is a square. i_2 and x i_2 are the x values of the position coordinates of different identification points; y i_1 and y i_2 They are the x values of the coordinates of different identification points.
[0056] In step S1, the calculation of the offset information specifically includes: obtaining the following offset information according to the center coordinates Core (x, y) of the rectangular frame and the first width size:
[0057] Among them, ShiftRatio is the similarity ratio, presetSpace is the height of the known identification point on the marker, and ImageMarkWidth1 is the first width dimension of the rectangular frame. The rectangular frame needs to be a square to facilitate the establishment of a unified coordinate mapping relationship to reduce angle and position errors. For example, it can be corrected to a square through an algorithm before subsequent calculations.
[0058] Wherein, ΔZ is the vertical offset, height is the height of the initial image, and Core.y is the y value of the center coordinate of the rectangular frame.
[0059] ΔX is the left and right offset, width is the width of the initial image, and Core.x is the x value of the center coordinate of the rectangular frame.
[0060] R=Arctan((P i_2 .yP i_1 .y) / (P i_2 .xP i_1 .x)), where R is the rotation offset, P i_2 .y and P i_ 1.y is the y value of the position coordinates of different identification points, P i_2 .x and P i_2 .y are the x values of the coordinates of the different identification points.
[0061] In step S2, adjusting the position of the image acquisition device according to the offset information to obtain at least two images of the marker at different distances specifically includes: adjusting the position of the image acquisition device according to the offset information to obtain a first image containing a plurality of the identification points, and obtaining a second width dimension of a rectangular frame enclosed by the identification points in the first image; moving the image acquisition device in a horizontal direction by a predetermined distance to obtain a second image containing a plurality of the identification points, and obtaining a third width dimension of a rectangular frame enclosed by the identification points in the second image (the rectangular frame is a square, so only one side length is required).
[0062] In step S3, determining the target position of the image acquisition device specifically includes the following steps:
[0063] S301, calculating the distance h2 between the image acquisition device and the marker according to the change in image width;
[0064] S302, calculating the theoretical prediction deviation distance h1;
[0065] S303, calculating a final adjustment distance Δh=h2-h1-SecondPositionMove, wherein SecondPositionMove is a predetermined distance that the image acquisition device moves in the horizontal direction; and
[0066] S304 : Move the image acquisition device to a target position according to the adjustment distance Δh.
[0067] In step S301, the distance h2 between the image acquisition device and the marker is calculated according to the change in image width, specifically including:
[0068] According to the first formula: Obtain the distance h2 between the image acquisition device and the marker after the image acquisition device moves the predetermined distance, wherein SecondPositionMove is the predetermined distance the image acquisition device moves in the horizontal direction, ImageMarkWidth3 is the third width dimension after moving the predetermined distance, and ImageMarkWidth2 is the second width dimension before moving the predetermined distance.
[0069] In step S302, the calculation of the theoretical prediction deviation distance h1 specifically includes: substituting h2 into the second formula: The theoretical predicted deviation distance h1 when the image acquisition device moves to the target position is obtained, ImageMarkWidth2 is the second width size before moving the predetermined distance, and height is the height of the initial image.
[0070] Furthermore, before step S1, that is, before obtaining the initial image of the marker, the process includes: maintaining the plane where the marker is located parallel to the plane where the image acquisition device is located. It is known to those skilled in the art that the parallelism adjustment can be flexibly set according to actual accuracy requirements.
[0071] In addition, this embodiment also proposes an automatic alignment device for implementing the automatic alignment method as described above, comprising: an image acquisition device, a position adjustment mechanism, and an image processing module.
[0072] Specifically, the image acquisition device is used to obtain an initial image of a marker containing identification points; the image processing module is used to calculate offset information based on the initial image of the marker, and to analyze at least two images to determine the target position of the image acquisition device; the position adjustment mechanism is used to adjust the position of the image acquisition device according to the offset information, and to adjust the position of the image acquisition device according to the target position.
[0073] As a preferred embodiment, in order to meet the requirement of automatically adjusting the screen ratio of the marker, this embodiment also includes an image screen ratio adjustment step: the image acquisition device captures the image at the initial distance D1 to obtain the initial image ratio r1; sets the target image ratio r2; according to the proportional relationship formula Calculate the target distance D2; use the calculated target distance D2 as the position adjustment instruction of the image acquisition device to adjust the relative distance between the image acquisition device and the marker. The image proportion is the ratio of the length and width of the rectangular frame in the image to the overall length and width of the image.
[0074] In a specific example, assuming that: initial distance D1 = 100 mm, initial image proportion r1 = 20%, target image proportion r2 = 40%, the sensor target distance D2 is calculated as D2 = (r2×D1) / r1 = (40%×100 mm) / 20% = 200 mm.
[0075] This embodiment achieves automatic image scaling by using a linear relationship between image ratio and sensor movement distance. The specific steps are: recording the initial image ratio r1 and the corresponding distance D1; setting the target image ratio r2; calculating the target distance D2 based on this ratio; and inputting D2 into the end of the robotic arm to precisely adjust the camera position. This method allows for precise control of image ratio to meet diverse shooting needs.
[0076] In this embodiment, the image acquisition device is preferably a camera mounted on the robotic arm, and the marker can be a picture card (i.e., the picture card to be photographed), which is surrounded by clear and identifiable marking points. This embodiment is based on the principle of precision optical imaging, such as Figure 2As shown in the figure, automatic alignment is achieved by using the geometric relationship of the physical marking points in the camera's field of view. Specifically, when the imaging center of the camera sensor and the center of the marker are on the same horizontal line, there is a fixed similarity ratio relationship between the sensor's forward and backward displacement along the optical axis and the geometric change of the specified marking point in the imaging image. By analyzing the similar features of the two triangles in the image, the offset of the camera can be accurately calculated. When the offset is within the preset range, combined with the coordinated control of the robotic arm and the mobile platform (such as the AGV), the real-time automatic and precise alignment of the camera can be achieved.
[0077] In one specific example, the camera plane and the plane of the image card to be photographed are a pair of parallel planes. This planar relationship is established based on the fixed relative positions of the image card plane to be photographed and the center plane of the robotic arm end. Through precise, one-time initial debugging, the parallelism of the two planes can be ensured. Specifically, during the system initialization phase, the operator only needs to make minor adjustments to the relative positions of the robotic arm end and the image card to be photographed to establish a precise parallel relationship. Once this adjustment is completed, the subsequent alignment process will no longer require repeated plane calibration, thereby streamlining the alignment process.
[0078] Combine Figure 3 - Figure 5 As shown, the first alignment is performed, and a picture of the card is taken to obtain the initial image. For example, the coordinates of the marker points around the card in the initial image can be identified by a visual recognition algorithm. i (x i ,y i ), for example, there are 4 identification points, namely P1(x1,y1), P2(x2,y2), P3(x3,y3), P4(x4,y4), such as Figure 3 As shown, according to the principle of optical imaging similarity, the vertical, horizontal, and rotational offsets of the camera center position relative to the center position of the image card are calculated. i (x i ,y i ) and the distance formula between two points, we can get: the center coordinates Core(x,y) of the rectangle surrounded by the four markers in the image, the rectangle length ImageMarkHeight, and the rectangle width ImageMarkWidth (because the rectangle is a square, only the rectangle length or the rectangle width can be used), as follows:
[0079] Assume the initial image size is 4000 pixels × 3000 pixels (width × height). The coordinates of the markers on the chart are P1 (200, 180), P2 (2520, 280), P3 (2520, 2600), and P4 (200, 2500). The initial image size can be directly obtained by reading the original image data through the image software API. In this process, only the width and height data of the markers on the chart need to be obtained in advance; no additional physical camera information is required.
[0080] The center coordinates of the rectangle are (1360, 1340) according to the rectangle center calculation formula. The actual calculated rectangle length is 2320mm and the width is 2420mm, which is a rectangle. Since the actual calculation is done on pixels, there will be some deviation. Therefore, the visual recognition algorithm can be used to correct the rectangle to a square, and the actual coordinates P2 (2520, 280) and P3 (2520, 2600) can be corrected to P2 (2520, 180) and P3 (2520, 2500). Maintaining the length of the rectangle at 2320mm and the width of the rectangle at 2320mm allows for precise positioning. The following offset calculation is based on the center coordinates (1360, 1340) and the width of the rectangle at 2320mm.
[0081] Specifically, similarity ratio:
[0082] Up and down offset:
[0083] Left and right offset:
[0084] Rotation offset: R = Arctan((P2.y - P1.y) / (P2.x - P1.x)) = arctan(1 / 23).
[0085] The above data are obtained by approximation. Therefore, the robot arm of this embodiment can translate upward 24.144 mm, translate right 96.576 mm, and rotate clockwise around the horizontal by a specified angle of arctan (1 / 23).
[0086] Next, the first image is captured. This implementation uses two images, excluding the initial image, as an example: a photo is taken at the current position to obtain the location of the new marker in the image, and the width of the rectangular frame in the image, ImageMarkWidth2, is obtained. At this point, the camera simply needs to be horizontally translated a predetermined distance, and another photo is taken to obtain the width of the rectangular frame in the image, ImageMarkWidth3.
[0087] For example, if ImageMarkWidth2 = 1500mm, ImageMarkWidth3 = 2000mm, and SecondPositionMove(predetermined distance) = 100mm, we get h2 = 2000 × 100 / 500 = 400mm. This means that after the camera moves the predetermined distance of 100mm, the distance between the camera and the image card is 400mm. Furthermore, we get h1 = 1500 × 400 / 4000 = 150mm, meaning the theoretical predicted deviation distance when the camera moves to the target position is 150mm.
[0088] Thus, we can obtain Δh=h2-h1-SecondPositionMove=400-150-100=150mm, that is, the camera can be moved to the target position according to the adjustment distance of 150mm.
[0089] In summary, the automatic alignment method and device proposed in the present invention have the following advantages:
[0090] The automatic alignment method provided by the present invention involves acquiring an initial image of a marker containing a marking point and calculating offset information; adjusting the position of an image acquisition device based on the offset information to acquire at least two images of the marker at different distances; and analyzing the at least two images to determine the target position of the image acquisition device. By calculating offset information and analyzing multiple images, the position of the image acquisition device can be precisely adjusted without obtaining the device's physical parameters, thereby improving alignment accuracy and efficiency.
[0091] In addition, the image scale is automatically adjusted based on the linear relationship between the image ratio and the sensor's movement distance, thus achieving precise control of the image ratio to meet different shooting needs.
[0092] In addition, by pre-maintaining the parallelism between the marker plane and the image acquisition device plane, the subsequent alignment process is simplified, the workload of repeated adjustments is reduced, and the stability and reliability of the system are improved.
[0093] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. An automatic alignment method, characterized in that: The details include: Obtain the initial image of the landmark containing the identification point and calculate the offset information; Adjust the position of the image acquisition device according to the offset information to obtain at least two images of the marker at different distances; analyzing the at least two images to determine a target position of the image acquisition device; as well as The image acquisition device is adjusted to the target position.
2. The automatic alignment method according to claim 1, characterized in that: The offset information includes the up-down, left-right and rotational offsets of the center position of the image acquisition device relative to the center position of the marker.
3. The automatic alignment method according to claim 2, characterized in that: The obtaining of the initial image of the marker including the identification point specifically includes: Identify the position coordinates P of the marker points around the marker in the initial image i (x i ,y i ), where there are i identification points and i is a positive integer; According to the position coordinates P of the marking point i (x i ,y i ) and the distance formula between two points, obtain the center coordinates Core(x,y) of the rectangular frame surrounded by the multiple identification points in the initial image and the first width size of the rectangular frame.
4. The automatic alignment method according to claim 3, characterized in that: The calculation of the offset information specifically includes: obtaining the following offset information according to the center coordinate Core (x, y) of the rectangular frame and the first width size: Wherein, ShiftRatio is the similarity ratio, presetSpace is the height of the known marking point on the marker, and ImageMarkWidth1 is the first width size of the rectangular frame; Wherein, ΔZ is the up and down offset, height is the height of the initial image, and Core.y is the y value of the center coordinate of the rectangular frame; ΔX is the left and right offset, width is the width of the initial image, and Core.x is the x value of the center coordinate of the rectangular frame; R = Arctan((P i_2 .yP i_1 .y) / (P i_2 .xP i_1 .x)), where R is the rotation offset, P i_2 .y and P i_1 .y are the y values of the position coordinates of different marking points, P i_2 .x and P i_2 .y are the x values of the coordinates of the different marking points.
5. The automatic alignment method according to claim 1, characterized in that: The step of adjusting the position of the image acquisition device according to the offset information to obtain at least two images of the marker at different distances specifically includes: According to the offset information, the position of the image acquisition device is adjusted to obtain a first image including a plurality of the identification points, and a second width size of a rectangular frame surrounded by the identification points in the first image is obtained; The image acquisition device is moved in the horizontal direction by a predetermined distance to acquire a second image including a plurality of the identification points, and a third width dimension of a rectangular frame surrounded by the identification points in the second image is obtained.
6. The automatic alignment method according to claim 1, characterized in that: Determining the target position of the image acquisition device specifically includes the following steps: Calculate the distance h2 between the image acquisition device and the marker according to the change in image width; Calculate the theoretical prediction deviation distance h1; Calculate the final adjustment distance Δh = h2-h1-SecondPositionMove, where: SecondPositionMove is the predetermined distance that the image acquisition device moves in the horizontal direction; The image acquisition device is moved to a target position according to the adjustment distance Δh.
7. The automatic alignment method according to claim 6, characterized in that: The calculating the distance h2 between the image acquisition device and the marker according to the change of the image width specifically includes: According to the first formula: The distance h2 between the image acquisition device and the marker after the image acquisition device moves the predetermined distance is obtained, wherein SecondPositionMove is the predetermined distance that the image acquisition device moves in the horizontal direction, ImageMarkWidth3 is the third width dimension after moving the predetermined distance, and ImageMarkWidth2 is the second width dimension before moving the predetermined distance.
8. The automatic alignment method according to claim 6, characterized in that: The calculating of the theoretical prediction deviation distance h1 specifically includes: substituting h2 into the second formula: The theoretical predicted deviation distance h1 when the image acquisition device moves to the target position is obtained, ImageMarkWidth2 is the second width dimension before moving the predetermined distance, and height is the height of the initial image.
9. The automatic alignment method according to claim 1, characterized in that: Also includes: The image acquisition device captures an image at an initial distance D1, obtains an initial image ratio r1, sets a target image ratio r2, and uses a proportional relationship formula Calculating a target distance D2; and adjusting a relative distance between the image acquisition device and the marker according to the target distance D2.
10. The automatic alignment method according to claim 1, characterized in that: Before acquiring the initial image of the marker, the process includes: keeping the plane where the marker is located parallel to the plane where the image acquisition device is located.
11. An automatic alignment device, used to implement the automatic alignment method according to any one of claims 1 to 10, characterized in that: include: Image acquisition device, position adjustment mechanism and image processing module; The image acquisition device is used to obtain an initial image of a landmark including a marking point; The image processing module is used to calculate the offset information according to the initial image of the marker, and to analyze at least two images to determine the target position of the image acquisition device; The position adjustment mechanism is used to adjust the position of the image acquisition device according to the offset information, and is used to adjust the position of the image acquisition device according to the target position.