Camera position calibration method and terminal
The problem of additional calibration objects in the prior art is solved by collecting solid color images and performing binarization and linear fitting, and achieving higher calibration accuracy and lower complexity.
Patent Information
- Application Number
- CN202411296692.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-18
AI Technical Summary
The existing camera position calibration method requires additional calibration objects, which are complex and costly, affecting calibration accuracy.
The camera is used to collect solid color images, convert them into grayscale images and perform binarization. Linear fit is performed through contour point search and gradient descent methods to determine whether the camera is installed correctly without additional calibration of objects.
Improve the accuracy and reliability of the calibration process, reduce complexity and cost, and simplify the calibration process.
Smart Images

Figure CN119251310A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis, and in particular to a camera position calibration method and terminal. Background Art
[0002] Most cameras on electronic products are installed inside the product housing. When the hole size of the camera position on the housing is smaller than the camera's visual range, only part of the camera image is the effective image area, and the rest is blocked by the housing, such as Figure 3 As shown in the figure, in this case, if there is a large error in the position of the camera fixture, it will lead to the loss of the effective image area and the loss of effective image data, such as Figure 4 shown.
[0003] Therefore, during the tooling process, the position of the assembled camera needs to be calibrated to determine whether the camera tooling position error is within the allowable range.
[0004] In the prior art, a camera is usually used to take a picture of the calibration plate, and the specific origin position information on the calibration plate in the photographed image is identified through an algorithm to obtain the calibration parameters of the camera; or, a picture of the standard part taken by a camera installed in an ideal position is compared with the picture of the standard part taken by a camera of the actual tooling through an algorithm to calculate the actual installation position.
[0005] In the above two methods, the calibration process after installing the camera requires an additional calibration object, such as a calibration plate or a standard part, as a reference image. The accuracy of the calibration object greatly affects the accuracy of the calibration itself. Therefore, in order to ensure the accuracy of the calibration, it is necessary to improve the consistency of the calibration object, which increases the cost of the calibration process. In addition, the calibration process of the above two methods is relatively complicated, and there are strict requirements on the camera distance and angle of the calibration object, otherwise it will affect the calibration accuracy, which also adds cost and uncertainty to the calibration process. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a camera position calibration method and terminal, which can reduce the complexity of calibration while being more accurate and reliable.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A camera position calibration method comprises the steps of:
[0009] Using a camera on a product to capture a pure color image, and converting the pure color image into a grayscale image;
[0010] Binarizing the grayscale image to obtain a binary image, and searching for contour points on the binary image to obtain a contour point coordinate linked list;
[0011] According to the contour point coordinate chain list, a gradient descent method is used to perform linear fitting on the contour points to obtain final hole-shaped image information;
[0012] It is determined whether the final hole-shaped image information complies with the regulations. If so, it is determined that the camera is installed correctly. If not, it is determined that the camera is installed incorrectly.
[0013] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0014] A camera position calibration terminal includes 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 following steps are implemented:
[0015] Using a camera on a product to capture a pure color image, and converting the pure color image into a grayscale image;
[0016] Binarizing the grayscale image to obtain a binary image, and searching for contour points on the binary image to obtain a contour point coordinate linked list;
[0017] According to the contour point coordinate chain list, a gradient descent method is used to perform linear fitting on the contour points to obtain final hole-shaped image information;
[0018] It is determined whether the final hole-shaped image information complies with the regulations. If so, it is determined that the camera is installed correctly. If not, it is determined that the camera is installed incorrectly.
[0019] The beneficial effects of the present invention are as follows: a pure color image is captured by a camera on a product, which is converted into a grayscale image, the grayscale image is binarized to obtain a binarized image, and a contour point search is performed on the binarized image to obtain a contour point coordinate list, and the contour points are linearly fitted using a gradient descent method according to the contour point coordinate list to obtain final hole-shaped image information, and whether the camera is correctly installed is determined according to the final hole-shaped image information. In this way, no additional calibration objects are required, and subsequent calibration can be achieved by capturing any pure color image, such as a desktop or wall. During the calibration process, the final hole-shaped image information is obtained by linear fitting using a gradient descent method, which is more accurate than the prior art that relies on calibration objects for imaging, thereby reducing the complexity of calibration and being more accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of the steps of a camera position calibration method according to an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of the structure of a camera position calibration terminal according to an embodiment of the present invention;
[0022] Figure 3 An image captured by a correctly installed camera in the camera position calibration method of an embodiment of the present invention;
[0023] Figure 4 An image captured by a camera that is incorrectly installed in the camera position calibration method of an embodiment of the present invention;
[0024] Figure 5 It is a schematic diagram of a range in which a hole-shaped image exceeds a pure color image in a camera position calibration method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0026] Please refer to Figure 1 , a camera position calibration method, comprising the steps of:
[0027] Using a camera on a product to capture a pure color image, and converting the pure color image into a grayscale image;
[0028] Binarizing the grayscale image to obtain a binary image, and searching for contour points on the binary image to obtain a contour point coordinate linked list;
[0029] According to the contour point coordinate chain list, a gradient descent method is used to perform linear fitting on the contour points to obtain final hole-shaped image information;
[0030] It is determined whether the final hole-shaped image information complies with the regulations. If so, it is determined that the camera is installed correctly. If not, it is determined that the camera is installed incorrectly.
[0031] From the above description, it can be seen that the beneficial effects of the present invention are: using the camera on the product to capture a pure color image, converting it into a grayscale image, binarizing the grayscale image to obtain a binarized image, and performing contour point search on the binarized image to obtain a contour point coordinate list, using the gradient descent method according to the contour point coordinate list to perform linear fitting on the contour points to obtain the final hole-shaped image information, and determining whether the camera is installed correctly based on the final hole-shaped image information. In this way, no additional calibration objects are required, and subsequent calibration can be achieved by simply capturing any pure color image, such as a desktop or wall. During the calibration process, the final hole-shaped image information is obtained by linear fitting using the gradient descent method. Compared with the prior art that relies on calibration objects for imaging, the accuracy is higher, thereby reducing the complexity of calibration while being more accurate and reliable.
[0032] Furthermore, binarizing the grayscale image to obtain a binarized image includes:
[0033] Performing grayscale value histogram statistics on the grayscale image to obtain a histogram;
[0034] Obtaining two groups of grayscale values with the highest frequency from the histogram;
[0035] Calculate a binarization threshold according to the two groups of gray values;
[0036] The grayscale image is binarized according to the binarization threshold to obtain a binarized image.
[0037] From the above description, it can be seen that the grayscale image is subjected to grayscale value histogram statistics to obtain a histogram, the two groups of grayscale values with the highest frequency are obtained from the histogram, the binarization threshold is calculated based on it, and the grayscale image is binarized according to the binarization threshold to obtain a binary image. The binary image obtained in this way can more easily distinguish the camera visible range area and the shell area, which is convenient for subsequent calibration.
[0038] Further, the binary image includes foreground points and background points;
[0039] The performing contour point search on the binary image to obtain a contour point coordinate linked list comprises:
[0040] Traversing the pixels in the binary image;
[0041] For the traversed target pixel point, if the target pixel point is the foreground point, it is determined whether the target pixel point is adjacent to the background point, and if so, it is determined that the target pixel point is a contour point;
[0042] The coordinates of all the contour points are determined, and a contour point coordinate linked list is obtained according to the coordinates of all the contour points.
[0043] From the above description, it can be seen that when traversing the pixel points in the binary image, for the traversed target pixel point, if the target pixel point is a foreground point, then when the target pixel point is adjacent to the background point, it can be determined that the target pixel point is a contour point, and the contour point coordinate linked list is obtained according to the coordinates of all contour points, so as to more efficiently determine all contour point information.
[0044] Furthermore, the linear fitting of the contour points using the gradient descent method according to the contour point coordinate chain list to obtain the final hole image information includes:
[0045] Obtaining a preset shell opening shape corresponding to the camera on the product;
[0046] Determine a linear equation group according to the preset shell opening shape and the contour point coordinate chain list;
[0047] Based on the linear equation group, a gradient descent method is used to perform linear fitting to obtain the final pore image information.
[0048] From the above description, it can be seen that the preset shell hole shape corresponding to the camera on the product is obtained, and a group of linear equations is determined according to the preset shell hole shape and the contour point coordinate list. The gradient descent method is used for linear fitting based on the group of linear equations to obtain the final hole image information. The final hole image information, that is, the parameter information of the hole image, can accurately determine the position and size of the hole image, reducing the complexity.
[0049] Further, the determining whether the final hole-shaped image information complies with the regulations, if yes, determining that the camera is installed correctly, if no, determining that the camera is installed incorrectly includes:
[0050] Determine a hole-shaped image according to the final hole-shaped image information;
[0051] It is determined whether the hole-shaped image exceeds the range of the pure color image. If so, it is determined that the camera is installed incorrectly. If not, it is determined that the camera is installed correctly.
[0052] From the above description, it can be seen that the final hole image information is obtained through optimization. The hole image is determined based on the final hole image information. Whether the camera is installed correctly is determined by judging whether the hole image exceeds the range of the pure color image, thereby improving the accuracy of calibration.
[0053] Please refer to Figure 2 A camera position calibration terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0054] Using a camera on a product to capture a pure color image, and converting the pure color image into a grayscale image;
[0055] Binarizing the grayscale image to obtain a binary image, and searching for contour points on the binary image to obtain a contour point coordinate linked list;
[0056] According to the contour point coordinate chain list, a gradient descent method is used to perform linear fitting on the contour points to obtain final hole-shaped image information;
[0057] It is determined whether the final hole-shaped image information complies with the regulations. If so, it is determined that the camera is installed correctly. If not, it is determined that the camera is installed incorrectly.
[0058] From the above description, it can be seen that the beneficial effects of the present invention are: using the camera on the product to capture a pure color image, converting it into a grayscale image, binarizing the grayscale image to obtain a binarized image, and performing contour point search on the binarized image to obtain a contour point coordinate list, using the gradient descent method according to the contour point coordinate list to perform linear fitting on the contour points to obtain the final hole-shaped image information, and determining whether the camera is installed correctly based on the final hole-shaped image information. In this way, no additional calibration objects are required, and subsequent calibration can be achieved by simply capturing any pure color image, such as a desktop or wall. During the calibration process, the final hole-shaped image information is obtained by linear fitting using the gradient descent method. Compared with the prior art that relies on calibration objects for imaging, the accuracy is higher, thereby reducing the complexity of calibration while being more accurate and reliable.
[0059] Furthermore, binarizing the grayscale image to obtain a binarized image includes:
[0060] Performing grayscale value histogram statistics on the grayscale image to obtain a histogram;
[0061] Obtaining two groups of grayscale values with the highest frequency from the histogram;
[0062] Calculate a binarization threshold according to the two groups of gray values;
[0063] The grayscale image is binarized according to the binarization threshold to obtain a binarized image.
[0064] From the above description, it can be seen that the grayscale image is subjected to grayscale value histogram statistics to obtain a histogram, the two groups of grayscale values with the highest frequency are obtained from the histogram, the binarization threshold is calculated based on it, and the grayscale image is binarized according to the binarization threshold to obtain a binary image. The binary image obtained in this way can more easily distinguish the camera visible range area and the shell area, which is convenient for subsequent calibration.
[0065] Further, the binary image includes foreground points and background points;
[0066] The performing contour point search on the binary image to obtain a contour point coordinate linked list comprises:
[0067] Traversing the pixels in the binary image;
[0068] For the traversed target pixel point, if the target pixel point is the foreground point, it is determined whether the target pixel point is adjacent to the background point, and if so, it is determined that the target pixel point is a contour point;
[0069] The coordinates of all the contour points are determined, and a contour point coordinate linked list is obtained according to the coordinates of all the contour points.
[0070] From the above description, it can be seen that when traversing the pixel points in the binary image, for the traversed target pixel point, if the target pixel point is a foreground point, then when the target pixel point is adjacent to the background point, it can be determined that the target pixel point is a contour point, and the contour point coordinate linked list is obtained according to the coordinates of all contour points, so as to more efficiently determine all contour point information.
[0071] Furthermore, performing linear fitting on the contour points according to the contour point coordinate linked list to obtain initial hole-shaped image information includes:
[0072] Obtaining a preset shell opening shape corresponding to the camera on the product;
[0073] Determine a linear equation group according to the preset shell opening shape and the contour point coordinate chain list;
[0074] Based on the linear equation group, a gradient descent method is used to perform linear fitting to obtain the final pore image information.
[0075] From the above description, it can be seen that the preset shell hole shape corresponding to the camera on the product is obtained, and a group of linear equations is determined according to the preset shell hole shape and the contour point coordinate list. The gradient descent method is used for linear fitting based on the group of linear equations to obtain the final hole image information. The final hole image information, that is, the parameter information of the hole image, can accurately determine the position and size of the hole image, reducing the complexity.
[0076] Further, the determining whether the final hole-shaped image information complies with the regulations, if yes, determining that the camera is installed correctly, if no, determining that the camera is installed incorrectly includes:
[0077] Determine a hole-shaped image according to the final hole-shaped image information;
[0078] It is determined whether the hole-shaped image exceeds the range of the pure color image. If so, it is determined that the camera is installed incorrectly. If not, it is determined that the camera is installed correctly.
[0079] From the above description, it can be seen that the final hole image information is obtained through optimization. The hole image is determined based on the final hole image information. Whether the camera is installed correctly is determined by judging whether the hole image exceeds the range of the pure color image, thereby improving the accuracy of calibration.
[0080] The camera position calibration method and terminal of the present invention can be applied to the position calibration scenario of a camera installed in a product housing, and are described below through specific implementation methods:
[0081] Please refer to Figure 1 , Figure 3 and Figure 5 , Embodiment 1 of the present invention is:
[0082] A camera position calibration method comprises the steps of:
[0083] S1. Use a camera on a product to capture a pure color image, and convert the pure color image into a grayscale image.
[0084] Among them, the pure color image only needs to be different in color from the shell blocking area. For example, the color of the shell blocking area is generally black, so the pure color image does not need to be a black image. The pure color image can be conveniently collected by shooting the desktop, wall or ground.
[0085] In an optional implementation, the resolution of the camera is set to 640*480, and the grayscale image is in 8-bit grayscale format. In an optional implementation, the product is an embedded device running a real-time operating system (RTOS).
[0086] S2, binarizing the grayscale image to obtain a binarized image, and searching for contour points on the binarized image to obtain a contour point coordinate linked list, specifically including S21-S26:
[0087] S21, performing grayscale value histogram statistics on the grayscale image to obtain a histogram.
[0088] Specifically, based on a pixel grayscale range of 0 to 255 and a group interval of 32 grayscale values, grayscale value histogram statistics are performed on the grayscale image to obtain a histogram with 8 groups, wherein the grayscale range of the i-th group is 32i to 32i-1 (i=0 to 7).
[0089] S22. Obtain two groups of grayscale values with the highest frequency from the histogram.
[0090] Among them, the two groups of gray values with the highest frequency are the gray values of the effective image area and the gray values of the shell occlusion area.
[0091] S23, calculating a binarization threshold binary_threshould according to the two groups of gray values, specifically:
[0092] binary_threshould=(a+b)*32 / 2+16, a∈i, b∈i;
[0093] In the formula, a represents the subscript (grouping index) of one set of grayscale values in the two sets of grayscale values, and b represents the subscript of the other set of grayscale values in the two sets of grayscale values.
[0094] S24. Binarize the grayscale image according to the binarization threshold to obtain a binarized image.
[0095] Specifically, the pixel points whose grayscale values in the grayscale image are higher than the binarization threshold are set to 255, i.e., foreground points, and the pixel points whose grayscale values are lower than the binarization threshold are set to 0, i.e., background points, so as to obtain a binary image, which includes foreground points and background points.
[0096] S25, traversing the pixel points in the binary image; for the traversed target pixel point, if the target pixel point is the foreground point, determining whether the target pixel point is adjacent to the background point, and if so, determining that the target pixel point is a contour point.
[0097] S26. Determine the coordinates of all the contour points, and obtain a contour point coordinate linked list according to the coordinates of all the contour points.
[0098] S3, according to the contour point coordinate chain list, use the gradient descent method to perform linear fitting on the contour points to obtain the final hole image information, specifically including S31-S33:
[0099] S31, obtaining a preset shell opening shape corresponding to the camera on the product.
[0100] Wherein, the shape of the preset shell opening is circular or rectangular or other shapes. In this embodiment, the shape of the preset shell opening is circular, such as Figure 3 shown.
[0101] S32. Determine a linear equation group according to the preset shell opening shape and the contour point coordinate linked list.
[0102] Specifically, the preset shape of the shell opening is a circle, indicating that the image to be fitted is a circle. For any contour point coordinate (x i ,y i ), should satisfy the equation (x i -x c ) 2 +(y i -y c ) 2 =r 2 , where (x c ,y c ) represents the coordinates of the center of the circle, r represents the radius, and the formula can be derived The coordinates of n contour points are combined into a linear equation system, and Aw=z, where:
[0103]
[0104] S33, performing linear fitting based on the linear equation group using the gradient descent method to obtain final pore image information.
[0105] Specifically, the gradient descent method is used to perform linear fitting to solve the linear equations to obtain the final hole-shaped image information, which includes the center and radius (x c ,y c ,r).
[0106] Assuming that the shape of the opening of the shell is a rectangle, the final hole image information obtained here includes parameters such as the center and vertices of the rectangle.
[0107] The gradient descent method determines the loss function Loss according to the preset shell opening shape, specifically:
[0108]
[0109] In the iterative process of the gradient descent method, the gradient is obtained by calculating the loss function, which is used to update the initial hole image information (x c ,y c ,r), until the number of iterations reaches the upper limit or the loss function reaches the threshold, the iteration is stopped and the final hole image information is obtained.
[0110] S4, judging whether the final hole-shaped image information meets the requirements, if yes, determining that the camera is installed correctly, if no, determining that the camera is installed incorrectly, specifically including S41-S42:
[0111] S41, determining a hole-shaped image according to the final hole-shaped image information.
[0112] Specifically, a circular image, that is, a hole-shaped image, can be determined according to the center and radius.
[0113] S42, determine whether the hole-shaped image exceeds the range of the pure color image, if so, Figure 5 As shown, it is determined that the camera is installed incorrectly. If not, Figure 3 As shown, it is determined that the camera is installed correctly.
[0114] In an optional embodiment, after determining that the camera is installed incorrectly, it also includes: determining an excess area where the hole-shaped image exceeds the range of the solid color image, and adjusting the installation parameters of the camera based on the excess area to improve the accuracy of subsequent installation.
[0115] In an optional embodiment, after determining that the camera is correctly installed, it also includes: acquiring the image captured by the camera, and filtering out other area images except the hole-shaped image from the image; performing image processing on the hole-shaped image to filter out other useless area images except the hole-shaped image, that is, the image of the area blocked by the shell, which greatly saves the amount of calculation and improves the efficiency of subsequent image processing.
[0116] Please refer to Figure 2 , Embodiment 2 of the present invention is:
[0117] A camera position calibration terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the camera position calibration method in the first embodiment is implemented.
[0118] In summary, the present invention provides a camera position calibration method and terminal, which uses the camera on the product to collect a pure color image, converts it into a grayscale image, binarizes the grayscale image to obtain a binary image, and searches for contour points on the binary image to obtain a contour point coordinate list, and uses the gradient descent method to perform linear fitting on the contour points according to the contour point coordinate list to obtain the final hole-shaped image information, and determines whether the camera is installed correctly according to the final hole-shaped image information, thereby eliminating the need for additional calibration objects, and only requires collecting any pure color image, such as a desktop or wall, to achieve subsequent calibration. During the calibration process, the gradient descent method is used for linear fitting to obtain the final hole image information. Compared with the existing technology that relies on calibration object imaging, it has higher accuracy, thereby reducing the complexity of calibration and being more accurate and reliable. In addition, the grayscale image is statistically analyzed by grayscale value histogram to obtain a histogram, and the two groups of grayscale values with the highest frequency are obtained from the histogram. The binarization threshold is calculated based on the grayscale value, and the grayscale image is binarized according to the binarization threshold to obtain a binarized image. The binarized image obtained in this way can more easily distinguish the camera visible range area and the shell area, which is convenient for subsequent calibration.
[0119] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A camera position calibration method, characterized in that: Includes steps: Using a camera on a product to capture a pure color image, and converting the pure color image into a grayscale image; Binarizing the grayscale image to obtain a binary image, and searching for contour points on the binary image to obtain a contour point coordinate linked list; According to the contour point coordinate chain list, a gradient descent method is used to perform linear fitting on the contour points to obtain final hole-shaped image information; It is determined whether the final hole-shaped image information complies with the regulations. If so, it is determined that the camera is installed correctly. If not, it is determined that the camera is installed incorrectly.
2. A camera position calibration method according to claim 1, characterized in that: Binarizing the grayscale image to obtain a binary image includes: Performing grayscale value histogram statistics on the grayscale image to obtain a histogram; Obtaining two groups of grayscale values with the highest frequency from the histogram; Calculate a binarization threshold according to the two groups of gray values; The grayscale image is binarized according to the binarization threshold to obtain a binarized image.
3. A camera position calibration method according to claim 1, characterized in that: The binary image includes foreground points and background points; The performing contour point search on the binary image to obtain a contour point coordinate linked list comprises: Traversing the pixels in the binary image; For the traversed target pixel point, if the target pixel point is the foreground point, it is determined whether the target pixel point is adjacent to the background point, and if so, it is determined that the target pixel point is a contour point; The coordinates of all the contour points are determined, and a contour point coordinate linked list is obtained according to the coordinates of all the contour points.
4. A camera position calibration method according to claim 1, characterized in that: The linear fitting of the contour points using the gradient descent method according to the contour point coordinate chain list to obtain the final hole-shaped image information includes: Obtaining a preset shell opening shape corresponding to the camera on the product; Determine a linear equation group according to the preset shell opening shape and the contour point coordinate chain list; Based on the linear equation group, a gradient descent method is used to perform linear fitting to obtain the final pore image information.
5. A camera position calibration method according to claim 1, characterized in that: The determining whether the final hole-shaped image information complies with the regulations, if yes, determining that the camera is installed correctly, if no, determining that the camera is installed incorrectly includes: Determine a hole-shaped image according to the final hole-shaped image information; It is determined whether the hole-shaped image exceeds the range of the pure color image. If so, it is determined that the camera is installed incorrectly. If not, it is determined that the camera is installed correctly.
6. A camera position calibration terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Using a camera on a product to capture a pure color image, and converting the pure color image into a grayscale image; Binarizing the grayscale image to obtain a binary image, and searching for contour points on the binary image to obtain a contour point coordinate linked list; According to the contour point coordinate chain list, a gradient descent method is used to perform linear fitting on the contour points to obtain final hole-shaped image information; It is determined whether the final hole-shaped image information complies with the regulations. If so, it is determined that the camera is installed correctly. If not, it is determined that the camera is installed incorrectly.
7. A camera position calibration terminal according to claim 6, characterized in that: Binarizing the grayscale image to obtain a binary image includes: Performing grayscale value histogram statistics on the grayscale image to obtain a histogram; Obtaining two groups of grayscale values with the highest frequency from the histogram; Calculate a binarization threshold according to the two groups of gray values; The grayscale image is binarized according to the binarization threshold to obtain a binarized image.
8. The camera position calibration terminal according to claim 6, characterized in that: The binary image includes foreground points and background points; The performing contour point search on the binary image to obtain a contour point coordinate linked list comprises: Traversing the pixels in the binary image; For the traversed target pixel point, if the target pixel point is the foreground point, it is determined whether the target pixel point is adjacent to the background point, and if so, it is determined that the target pixel point is a contour point; The coordinates of all the contour points are determined, and a contour point coordinate linked list is obtained according to the coordinates of all the contour points.
9. The camera position calibration terminal according to claim 6, characterized in that: The linear fitting of the contour points using the gradient descent method according to the contour point coordinate chain list to obtain the final hole-shaped image information includes: Obtaining a preset shell opening shape corresponding to the camera on the product; Determine a linear equation group according to the preset shell opening shape and the contour point coordinate chain list; Based on the linear equation group, a gradient descent method is used to perform linear fitting to obtain the final pore image information.
10. The camera position calibration terminal according to claim 6, characterized in that: The determining whether the final hole-shaped image information complies with the regulations, if yes, determining that the camera is installed correctly, if no, determining that the camera is installed incorrectly includes: Determine a hole-shaped image according to the final hole-shaped image information; It is determined whether the hole-shaped image exceeds the range of the pure color image. If so, it is determined that the camera is installed incorrectly. If not, it is determined that the camera is installed correctly.
Citation Information
Patent Citations
Multi-camera position positioning method based on single equipment
CN112614178A
Methods and systems of generating camera models for camera calibration
US20230070281A1
Machine vision-based augmented reality blind area assembly guidance method
WO2022036478A1
Calibration board and calibration control device
WO2023226403A1
Self-calibration method for vehicle-mounted BSD camera, device, and storage medium
WO2023273376A1
