Periscopic camera module detection method and system, computer and storage medium
Through computer vision and image technology, template matching, edge detection and distance calculation methods are adopted to achieve efficient and accurate periscope camera module detection, solving the problems of low detection efficiency and insufficient accuracy in the prior art.
Patent Information
- Application Number
- CN202510022348.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to achieve efficient and accurate periscope camera module detection, especially in large-scale production, which is too low to achieve micron-level detection accuracy.
Using the principles of computer vision and imagery, automated periscope camera module detection is achieved through template matching, edge detection, Hough transformation and distance calculation methods. Specific steps include loading detection images, preprocessing, template matching positioning, edge detection, distance calculation and error judgment.
It improves the efficiency and accuracy of detection, realizes an automated detection process, and can accurately detect the qualification of the periscope camera module at the micron level.
Smart Images

Figure CN119991579A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lens detection technology, and in particular to a periscope camera module detection method, system, computer and storage medium. Background Art
[0002] The camera module is an essential component in mobile phones, consumer drones or monitoring equipment, and it is also a very important component. The periscope camera module is a relatively new lens design compared to the traditional telephoto lens. It has a larger field of view, a larger zoom and better anti-shake performance. Therefore, the application of periscope camera modules on mobile phones is also a future trend.
[0003] However, due to the high precision and complex structure of the periscope lens module, the requirements for its detection are also relatively high. The basic detection specifications are at the micron level (um), and the human eye detection cannot achieve the detection purpose. Although the human eye plus detection equipment (OGP) can achieve the detection purpose and can detect accurately, the detection efficiency is too low to achieve large-scale production. Summary of the invention
[0004] In view of the deficiencies of the above-mentioned prior art, the technical problem to be solved by the present invention is: to propose a periscope camera module detection method, system, computer and storage medium, which can realize automatic and efficient detection means to improve efficiency and accuracy through template matching, edge detection, Hough transform, distance calculation and other methods based on the principles of computer vision and computer graphics.
[0005] A technical solution adopted by the present invention is to provide a periscope camera module detection method, comprising the following steps:
[0006] S1: Load the detection image of the camera module under test and preprocess the detection image;
[0007] S2: Locate the center of the detection image according to the template image;
[0008] S3: Extract the edge lines of the detection image through edge detection algorithm and Hough transform;
[0009] S4: Calculate the distance from the center to the edge line of the detection image through the distance detection algorithm;
[0010] S5: Determine whether the distance calculated in S4 exceeds a preset error. If so, the camera module under test is unqualified; if not, the camera module under test is qualified.
[0011] Furthermore, the step S1 includes the following sub-steps:
[0012] S11: Use the image loading method of Opencv to load the detection image of the camera module under test;
[0013] S12: Use the grayscale processing method of Opencv to convert the detection image into a grayscale image;
[0014] S13: Use Opencv’s Gaussian blur method to reduce the noise of the detection image.
[0015] Furthermore, the step S2 includes the following sub-steps:
[0016] S21: Load the template image, match the template image with the detection image, and calculate the similarity:
[0017]
[0018] Among them, R(x,y) represents the similarity at the position (x,y) on the detection image; T(x ’ ,y ’ ) represents the template image (x ’ ,y ’ ) position; I(x+x ’ ,y+y ’ ) indicates that the detection image is the same as (x ’ ,y ’ ) The pixel value at the corresponding position;
[0019] S22: Obtain the position of the template image when the similarity is the highest, draw the four sides of the template image into a rectangle, and use the intersection of the diagonals of the rectangle as the center of the detection image.
[0020] Furthermore, the step S3 includes the following sub-steps:
[0021] S31: Calculate the gradient magnitude of the detection image pixel and the direction corresponding to the gradient magnitude:
[0022]
[0023] Where G represents the gradient amplitude of the detection image; G x represents the horizontal gradient, G y Represents the vertical gradient; α represents the gradient direction of the detected image pixel;
[0024] S32: Using the double threshold method to determine whether the pixel is an edge, which can be specifically expressed as:
[0025]
[0026] Among them, T H represents a high threshold, used to determine strong edges; T LRepresents a low threshold, used to filter weak edges.
[0027] Furthermore, the step S3 further includes the following sub-steps:
[0028] S33: Express any pixel point of the edge E obtained in step S32 in polar coordinate form:
[0029] ρ = x·sinθ + y·cosθ;
[0030] Wherein, ρ represents the distance from the origin of polar coordinates to the pixel; θ represents the angle of the perpendicular line connecting the origin of polar coordinates to the edge E; x and y represent the horizontal and vertical coordinates of the pixel, respectively;
[0031] S34: Repeat step S33 until all pixels on edge E are traversed, record the (ρ, θ) corresponding to each pixel, and perform cumulative voting for the same (ρ, θ);
[0032] S35: Setting a voting threshold, and taking the straight line corresponding to (ρ, θ) with a number of votes greater than the voting threshold as the edge line.
[0033] Furthermore, in the step S4, the following sub-steps are included:
[0034] S41: Convert the edge line in polar coordinates back to rectangular coordinates:
[0035] Ax+By+C=0;
[0036] Among them, A, B, and C all represent the coefficients of the edge line;
[0037] S42: Calculate the center point (x c ,y c ) to the edge line:
[0038]
[0039] Where d represents the center point (x c ,y c ) to the edge line.
[0040] Furthermore, the step S5 includes the following sub-steps:
[0041] S51: Calculation error:
[0042] Δd=|dd std |;
[0043] Where Δd represents the distance error, d std Indicates the standard distance value;
[0044] S52: Error judgment: if Δd is not greater than the preset error, the camera module under test is qualified, otherwise it is unqualified.
[0045] In order to solve the above technical problems, the second technical solution adopted by the present invention is: to provide a periscope camera module detection system, comprising:
[0046] An image loading module is used to load the detection image of the camera module under test and preprocess the detection image;
[0047] A center positioning module is used to locate the center of the detection image;
[0048] An edge detection module is used to extract edge lines of the detection image;
[0049] A distance calculation module is used to calculate the distance from the center to the edge line of the detection image;
[0050] The error judgment module is used to judge whether the distance calculated in the distance calculation module exceeds the preset error. If so, the camera module under test is unqualified; if not, the camera module under test is qualified.
[0051] To solve the above technical problems, the third technical solution adopted by the present invention is: a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above detection methods.
[0052] In order to solve the above technical problems, the fourth technical solution adopted by the present invention is: a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements any of the above detection methods.
[0053] The periscope camera module detection method, system, computer and storage medium of the present invention have at least the following beneficial effects: the scheme uses the principles or methods of computer vision and image science to find the position similar to the template image to find the center position of the camera, and realizes automatic and fast matching and center positioning of the detection image and the template image; then the straight line of the upper edge and the right edge is found by the edge detection algorithm, and then the distance from the center position to the upper edge and the position from the center position to the right edge are calculated by the distance from the point to the straight line. Then, the standard distance measured by the standard instrument (the distance from the center of the periscope lens module to the upper edge, the distance from the center position of the periscope lens to the right edge) is compared with the actual measured distance, so as to realize accurate distance calculation and qualified rate judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0055] Figure 1 The present invention is a flowchart of an implementation method of a periscope camera module.
[0056] Figure 2 For the present invention Figure 1 Sub-flowchart of step S1 in .
[0057] Figure 3 For the present invention Figure 1 Sub-flowchart of step S2 in .
[0058] Figure 4 For the present invention Figure 1 Sub-flowchart of step S3 in .
[0059] Figure 5 For the present invention Figure 1 Sub-flowchart of step S4 in .
[0060] Figure 6 This is a structural block diagram of an implementation scheme of a periscope camera module detection system of the present invention. DETAILED DESCRIPTION
[0061] The present invention will be further described below in conjunction with the accompanying drawings.
[0062] See also Figure 1 , is a flow chart of an implementation method of a periscope camera module detection method of the present invention. This implementation method may specifically include the following steps:
[0063] S1: Load the detection image of the camera module under test and preprocess the detection image.
[0064] Specifically, in this embodiment, the camera module under test is a periscope lens module, and the detection image of the periscope lens module under test is loaded into the memory and preprocessed to reduce noise and improve detection accuracy. It should be noted that the above detection image is a photographed image of the periscope lens module under test.
[0065] See also Figure 2 , this step S1 may include the following sub-steps:
[0066] S11: Use the image loading method of Opencv to load the detection image of the camera module under test.
[0067] Specifically, in this embodiment, Opencv is used as an image processing platform. In OpenCV, the detection image and template image of the periscope lens can be loaded by using its cv2.imread() method or other methods of loading yuv byte arrays.
[0068] S12: Use the grayscale processing method of Opencv to convert the detection image into a grayscale image.
[0069] Specifically, in Opencv, the cv2.cvtColor() method is used to convert the image into a grayscale image to reduce the amount of calculation.
[0070] S13: Use Opencv’s Gaussian blur method to reduce the noise of the detection image.
[0071] Specifically, in Opencv, Gaussian blur cv2.GaussianBlur() is used to reduce image noise so that the edge and center of the detected image can be accurately obtained in subsequent steps.
[0072] S2: Locate the center of the detection image according to the template image.
[0073] Specifically, in this embodiment, the cv2.matchTemplate() method of Opencv is used to match the detection image with the template image, so that a matching degree map (heat map) can be returned, in which the template image is an image of a qualified standard periscope lens module. Template matching is a technology based on the similarity of local areas. By sliding the template on the original image, calculating the similarity, and finding the most similar position. Template matching looks for an area in the image that is as similar as possible to the template image. Then a rectangle is drawn according to the four sides of the outermost area of the template, and the center position is the intersection of the two diagonals of the rectangle. This intersection is the center point of the periscope camera module.
[0074] In some embodiments, see Figure 3 , this step S2 may include the following sub-steps:
[0075] S21: Load the template image, match the template image with the detection image, and calculate the similarity:
[0076]
[0077] Among them, R(x,y) represents the similarity at the position (x,y) on the detection image; T(x ’ ,y ’ ) represents the template image (x ’ ,y ’ ) position; I(x+x ’ ,y+y’ ) indicates that the detection image is the same as (x ’ ,y ’ ) position corresponds to the pixel value at the position.
[0078] Specifically, the image matching process can be represented by the above similarity calculation. In this embodiment, the value range of R(x, y) can be set to [-1, 1]. That is, the closer the calculated value of R(x, y) is to 1, the more the detected image matches the template image at that position.
[0079] S22: Obtain the position of the template image when the similarity is the highest, draw the four sides of the template image into a rectangle, and use the intersection of the diagonals of the rectangle as the center of the detection image.
[0080] Specifically, after the template image and the detection image reach the best matching position, the four sides of the template image can be used as a rectangle, and the center of the rectangle is used as the center of the detection image.
[0081] S3: Extract edge lines of the detected image.
[0082] Specifically, in this implementation, the edges of the detection image are extracted through Canny edge detection and Hough transform.
[0083] See also Figure 4 , this step S3 may include the following sub-steps:
[0084] S31: Calculate the gradient magnitude of the detection image pixel and the direction corresponding to the gradient magnitude:
[0085]
[0086] Where G represents the gradient amplitude of the detected image pixel; G x represents the horizontal gradient, G y Represents the vertical gradient; α represents the gradient direction of the detected image pixel.
[0087] Specifically, the Canny edge detection process in this embodiment uses the Sobel operator S x and S y Convolve with the detection image to calculate the gradient amplitude of the detection image, where S x It can be expressed as:
[0088]
[0089] The S x The horizontal operator is used to detect edges in the horizontal direction. Assume that a certain area (3×3 window) in the detection image is:
[0090]
[0091] Where I represents the area of a 3×3 window in the detection image. Then the pixel point I 2,2 The horizontal gradient G x The specific calculation process is:
[0092]
[0093] The above-mentioned S y It can be expressed as:
[0094]
[0095] The S y The vertical operator is used to detect edges in the vertical direction. Similarly, assuming that a certain area (3×3 window) in the detection image is I, then the pixel I 2,2 The vertical gradient G y The specific calculation process is:
[0096]
[0097] S32: Using the double threshold method to determine whether the pixel is an edge, which can be specifically expressed as:
[0098]
[0099] Among them, T H represents a high threshold, used to determine strong edges; T L Represents a low threshold, used to filter weak edges.
[0100] Specifically, after calculating the gradient of each pixel on the detection image, the double threshold method can be used to determine whether each pixel is an edge. The double threshold method sets a high threshold T H , and the low threshold T L , and compare the gradient amplitude of each pixel with the double threshold. If the gradient amplitude of the pixel G>T H , it means that the pixel belongs to a strong edge; if the gradient amplitude T L <G≤T H , then the pixel belongs to a weak edge, and further judgment is needed whether the pixel is connected to a strong edge; if the gradient amplitude G of the pixel is less than T L , it means that the pixel does not belong to the edge. Further, the strong edge and the weak edge connected to the strong edge are retained, and other pixels are suppressed, so that the edge of the detected image can be obtained.
[0101] In some embodiments, this step S3 may also include the following sub-steps:
[0102] S33: Express any pixel point of the edge E obtained in step S32 in polar coordinate form:
[0103] ρ = x·sinθ+y·cosθ;
[0104] Wherein, ρ represents the distance from the origin of polar coordinates to the pixel; θ represents the angle of the perpendicular line connecting the origin of polar coordinates to the edge E; x and y represent the horizontal and vertical coordinates of the pixel, respectively;
[0105] S34: Repeat step S33 until all pixels on edge E are traversed, record the (ρ, θ) corresponding to each pixel, and perform cumulative voting for the same (ρ, θ);
[0106] S35: Setting a voting threshold, and taking the straight line corresponding to (ρ, θ) with a number of votes greater than the voting threshold as the edge line.
[0107] Specifically, after the edge of the detection image is extracted by using Canny edge detection, the extracted edge is further detected by Hough transform in this embodiment. First, each pixel point on the extracted edge E is transformed into polar coordinates to obtain (ρ, θ) corresponding to each edge pixel point. In the polar coordinate space, since multiple edge pixels may correspond to the same straight line parameter (ρ, θ), cumulative voting is performed on these same (ρ, θ) values, and the straight line corresponding to (ρ, θ) with a number of votes greater than the voting threshold is used as the edge line. Then, the angle error and the minimum length are used to determine whether the edge line can be used as the edge line of the detection image. The angle error can be determined by comparing the difference between the angle of the edge line and the expected angle (the expected angle of the horizontal edge is 0°, and the expected angle of the vertical edge is 90°) with the preset angle error (which can be set to 0°~5°). If the difference does not exceed the preset angle error, the angle of the edge line meets the edge line detection. At the same time, if the length of the edge line meets the preset minimum straight line length, the edge line can be used as the edge line of the detection image.
[0108] S4: Calculate the distance from the center to the edge line of the detection image through the distance detection algorithm.
[0109] In some embodiments, see Figure 5 , this step S4 may include the following sub-steps:
[0110] S41: Convert the edge line in polar coordinates back to rectangular coordinates:
[0111] Ax+By+C=0;
[0112] Among them, A, B, and C all represent the coefficients of the edge line;
[0113] S42: Calculate the center point (x c ,y c ) to the edge line:
[0114]
[0115] Where d represents the center point (x c ,y c ) to the edge line.
[0116] Specifically, after the edge of the detection image is extracted through edge detection and Hough transform, it can be converted back into rectangular coordinates, and the distance from the center point to the edge can be calculated using the distance formula based on the center point coordinates. It is worth mentioning that this solution mainly detects the eligibility of the detection image by detecting the distance from its center point to the upper edge and the right edge. Therefore, when extracting the edge line, only the upper edge and the right edge need to be extracted, and the position of the extracted edge can be selected according to the actual installation position of the periscope camera module on the mobile phone.
[0117] S5: Determine whether the distance calculated in S4 exceeds a preset error. If so, the camera module under test is unqualified; if not, the camera module under test is qualified.
[0118] In some embodiments, this step S5 may include the following sub-steps:
[0119] S51: Calculation error:
[0120] Δd=|dd std |;
[0121] Where Δd represents the distance error, d std Indicates the standard distance value;
[0122] S52: Error judgment: if Δd is not greater than the preset error, the camera module under test is qualified, otherwise it is unqualified.
[0123] Specifically, in this embodiment, the distance between the center point of the detected image and the edge is compared with the standard distance value, and it is determined whether the calculated distance error exceeds the preset error (the preset error in this embodiment can be set to ±10 pixels or 50μm), so as to determine whether the camera module under test is qualified. It should be noted that when judging the distance error, the distance error from the center point of the detected image of the camera module under test to all the extracted edges needs to meet the preset error at the same time, so that the camera module under test can be judged as qualified.
[0124] In some embodiments, the detection results are labeled and output.
[0125] Specifically, after completing the qualification test of the camera module test image, the detected center point, upper edge and right edge can be marked on the test image, and the distance from the center point to the edge can be indicated by a green line. Then the test image is displayed and the qualified or unqualified judgment information is output.
[0126] See also Figure 6 , is a structural block diagram of an embodiment of a periscope camera module detection system of the present invention. The periscope camera module detection system of this embodiment is used to implement the periscope camera module detection method described in the above embodiment. Specifically, the periscope camera module detection system of this embodiment includes an image loading module 100, a center positioning module 200, an edge detection module 300, a distance calculation module 400 and an error judgment module 500. Among them:
[0127] The image loading module 100 is used to load the detection image of the camera module under test and pre-process the detection image;
[0128] A center positioning module 200 is used to locate the center of the detection image;
[0129] The edge detection module 300 is used to extract the edge lines of the detection image;
[0130] A distance calculation module 400 is used to calculate the distance from the center to the edge line of the detection image;
[0131] The error judgment module 500 is used to judge whether the distance calculated in the distance calculation module exceeds a preset error. If so, the camera module under test is unqualified; if not, the camera module under test is qualified.
[0132] The present invention uses the principles or methods of computer vision and image science to find a position similar to a template image to find the center position of the camera, thereby realizing automatic and rapid matching and center positioning of the detection image and the template image; then the straight lines of the upper edge and the right edge are found through an edge detection algorithm, and then the distance from the center position to the upper edge and the distance from the center position to the right edge are calculated by the distance from the point to the straight line. Then, the standard distance measured by a standard instrument (the distance from the center of the periscope lens module to the upper edge, the distance from the center position of the periscope lens to the right edge) is compared with the actually measured distance, thereby realizing accurate distance calculation and qualified rate judgment.
[0133] On the other hand, an embodiment of the present invention further provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned detection methods. The computer device comprises a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a multi-agent data analysis method based on a large language model is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0134] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements any of the above-mentioned detection methods when executed by a processor.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0136] The above content only expresses the preferred embodiments of the present invention, and its description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A periscope camera module detection method, characterized in that: The following steps are involved: S1: Load the detection image of the camera module under test and preprocess the detection image; S2: locate the center of the detection image; S3: extract edge lines of the detection image; S4: Calculate the distance from the center to the edge line of the detection image through the distance detection algorithm; S5: Determine whether the distance calculated in S4 exceeds a preset error. If so, the camera module under test is unqualified; if not, the camera module under test is qualified.
2. The periscope camera module detection method according to claim 1, characterized in that: The S1 step includes the following sub-steps: S11: Use the image loading method of Opencv to load the detection image of the camera module under test; S12: Use the grayscale processing method of Opencv to convert the detection image into a grayscale image; S13: Use Opencv’s Gaussian blur method to reduce the noise of the detection image.
3. The periscope camera module detection method according to claim 1, characterized in that: The S2 step includes the following sub-steps: S21: Load the template image, match the template image with the detection image, and calculate the similarity: Among them, R(x,y) represents the similarity at the position (x,y) on the detection image; T(x ’ ,y ’ ) represents the template image (x ’ ,y ’ ) position; I(x+x ’ ,y+y ’ ) indicates that the detection image is the same as (x ’ ,y ’ ) The pixel value at the corresponding position; S22: Obtain the position of the template image when the similarity is the highest, draw the four sides of the template image into a rectangle, and use the intersection of the diagonals of the rectangle as the center of the detection image.
4. The periscope camera module detection method according to claim 1, characterized in that: The S3 step includes the following sub-steps: S31: Calculate the gradient magnitude of the detection image pixel and the direction corresponding to the gradient magnitude: Where G represents the gradient amplitude of the detection image; G x represents the horizontal gradient, G y represents the vertical gradient; a represents the gradient direction of the detected image pixel; S32: Using the double threshold method to determine whether the pixel is an edge, which can be specifically expressed as: Among them, T H represents a high threshold, used to determine strong edges; T L Represents a low threshold, used to filter weak edges.
5. The periscope camera module detection method according to claim 4, characterized in that: The S3 step further includes the following sub-steps: S33: Express any pixel point of the edge E obtained in step S32 in polar coordinate form: ρ = x·sinθ+y·cosθ; Wherein, ρ represents the distance from the origin of polar coordinates to the pixel; θ represents the angle of the perpendicular line connecting the origin of polar coordinates to the edge E; x and y represent the horizontal and vertical coordinates of the pixel, respectively; S34: Repeat step S33 until all pixels on edge E are traversed, record the (ρ, θ) corresponding to each pixel, and perform cumulative voting for the same (ρ, θ); S35: Setting a voting threshold, and taking the straight line corresponding to (ρ, θ) with a number of votes greater than the voting threshold as the edge line.
6. The periscope camera module detection method according to claim 5, characterized in that: The S4 step includes the following sub-steps: S41: Convert the edge line in polar coordinates back to rectangular coordinates: Ax+By+C=0; Among them, A, B, and C all represent the coefficients of the edge line; S42: Calculate the center point (x c ,y c ) to the edge line: Where d represents the center point (x c ,y c ) to the edge line.
7. The periscope camera module detection method according to claim 1, characterized in that: The step S5 includes the following sub-steps: S51: Calculation error: Δd=|d-d std |; Where Δd represents the distance error, d std Indicates the standard distance value; S52: Error judgment: if Δd is not greater than the preset error, the camera module under test is qualified, otherwise it is unqualified.
8. A periscope camera module detection system, characterized in that: include: An image loading module is used to load the detection image of the camera module under test and preprocess the detection image; A center positioning module is used to locate the center of the detection image; An edge detection module is used to extract edge lines of the detection image; A distance calculation module is used to calculate the distance from the center to the edge line of the detection image; The error judgment module is used to judge whether the distance calculated in the distance calculation module exceeds the preset error. If so, the camera module under test is unqualified; if not, the camera module under test is qualified.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the detection method according to any one of claims 1 to 7 is implemented.