Camera test method and electronic equipment detection system

By introducing automated camera testing methods into electronic device detection systems, the problems of low detection efficiency and incompatibility in the prior art are solved, efficient and accurate camera testing is achieved, and detection systems of different types of electronic devices are supported to be compatible with each other.

CN119854478APending Publication Date: 2025-04-18HONGFUJIN PRECISION ELECTRONICS (ZHENGZHOU) CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311340660.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art is inefficient and easy to miss inspection when detecting the quality and performance of electronic equipment cameras, and different types of electronic equipment require different detection systems, resulting in high cost and incompatibility.

Method used

Provide a camera testing method and an electronic equipment detection system. Through the control device, the camera is automatically controlled to acquire images in multiple locations and perform automated detection based on the image, including protective film testing, white balance testing, brightness uniformity testing and dirty testing.

Benefits of technology

It improves the efficiency and accuracy of camera testing of electronic devices, reduces the error rate of manual testing, and realizes the mutual compatibility of detection systems of different types of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854478A_ABST
    Figure CN119854478A_ABST
Patent Text Reader

Abstract

The invention provides a camera test method and an electronic equipment detection system. The camera test method comprises the following steps: controlling a camera of the electronic equipment to acquire a first image in response to the electronic equipment reaching a first position; testing a detection item of the camera at the first position according to the first image; controlling the camera to enter a second position in response to completion of the test of the detection item of the first position; in response to the electronic equipment reaching the second position, controlling the camera to obtain a second image; testing a detection item of the camera at the second position according to the second image; controlling the electronic equipment to enter a third position in response to completion of the test of the detection item of the second position; in response to the electronic equipment reaching the third position, controlling the camera to obtain a third image; and testing a detection item of the camera at the third position according to the third image so as to improve the testing efficiency and accuracy of the camera module of the electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a camera testing method and an electronic equipment detection system. Background Art

[0002] With the popularization of the fifth generation mobile communication technology (5G) and the Internet, electronic devices based on 5G technology and Internet technology can achieve more functions. Among them, the camera is an important component for electronic devices to achieve many functions and is a standard configuration for different types of electronic devices. Therefore, the requirements for the quality and performance of the camera are getting higher and higher.

[0003] Before electronic products leave the factory, the quality and performance of the cameras of electronic devices need to be tested to check whether the quality and performance of the cameras meet the factory standards. There are many quality and performance inspection items, which are easy to miss. Manual testing one by one is time-consuming, labor-intensive, and prone to errors. In addition, the different types of electronic devices make the detection systems of the cameras of electronic devices incompatible with each other. For example, the structures and components of the detection systems used to detect computers and mobile phones are different. When detecting different types of electronic devices, the detection system needs to be replaced, which is costly. Summary of the invention

[0004] In view of this, the present application provides a camera testing method and an electronic device detection system to improve the testing efficiency and accuracy of the camera of the electronic device.

[0005] A first aspect provides a camera testing method, which is applied to a control device, and the camera testing method includes: in response to an electronic device reaching a first position, controlling the camera of the electronic device to acquire a first image; testing the detection items of the camera at the first position according to the first image; in response to completing the test of the detection items at the first position, controlling the camera to enter a second position; in response to the electronic device reaching the second position, controlling the camera to acquire a second image; testing the detection items of the camera at the second position according to the second image; in response to completing the test of the detection items at the second position, controlling the electronic device to enter a third position; in response to the electronic device reaching the third position, controlling the camera to acquire a third image; and testing the detection items of the camera at the third position according to the third image.

[0006] In the above technical solution, the control device controls the camera to acquire the first image in response to the electronic device reaching the first position, and tests the detection items of the camera at the first position according to the first image. Then, in response to completing the test of the detection items at the first position, the control device controls the electronic device to enter the second position, controls the camera to acquire the second image in response to the electronic device reaching the second position, and tests the detection items of the camera at the second position according to the second image. Finally, in response to completing the test of the detection items at the second position, the control device controls the electronic device to enter the third position, controls the camera to acquire the third image in response to the electronic device reaching the third position, and tests the detection items of the camera at the third position according to the third image, so as to automatically detect the performance and quality of the camera, so as to improve the testing efficiency and accuracy of the camera of the electronic device.

[0007] In some embodiments of the first aspect, the detection items of testing the camera at the first position according to the first image include: obtaining a red component, a green component and a blue component of the pixel point according to the first image; obtaining a first average component according to the red component, a second average component according to the green component and a third average component according to the blue component; if the first average component, the second average component and the third average component are all within the color component range, confirming that the camera is not provided with a protective film; if any one of the first average component, the second average component and the third average component is not within the color component range, confirming that the camera is provided with a protective film, and controlling the electronic device to move to the starting position.

[0008] In some embodiments of the first aspect, after confirming that the camera is not provided with a protective film, the detection items of testing the camera at the first position according to the first image also include: obtaining an average pixel brightness according to the brightness values ​​of the pixels of the first image; if the average pixel brightness is greater than or equal to the preset brightness value, confirming that the brightness presentation of the camera meets the brightness test standard; if the average pixel brightness is less than the preset brightness value, confirming that the brightness presentation of the camera does not meet the brightness test standard, and controlling the electronic device to move to the starting position; and / or determining the target pixel and the target pixel area in the first image; obtaining the pixel grayscale gradient value of the target pixel according to the grayscale value of the target pixel and the grayscale value of the pixel in the target pixel area; if the pixel grayscale gradient value is greater than the pixel gradient threshold, determining that the target pixel is a stain; if the total number of stains is less than or equal to the stain number threshold, determining that the point stains on the camera meet the point stain test standard; if the total number of stains is greater than the stain number threshold, determining that the point stains on the camera do not meet the point stain test standard, and controlling the electronic device to move to the starting position.

[0009] In some embodiments of the first aspect, after confirming that the camera is not provided with a protective film, testing the detection items of the camera at the first position according to the first image further includes: dividing the first image into a plurality of image areas of equal area; determining a first component ratio of a red component to a green component, and a second component ratio of a green component to a blue component of the image area; if both the first component ratio and the second component ratio are within a component ratio range, confirming that the color presentation of the camera meets the white balance test standard; if any of the first component ratio and the second component ratio is not within the component ratio range, confirming that the color presentation of the camera does not meet the white balance test standard, and controlling the electronic device to move to the starting position; and / or determining a regional brightness average and a center brightness average of the image area according to brightness values ​​of pixels in the image area; Obtain a regional brightness ratio of the image area based on the difference between the average center brightness and the average regional brightness; if the regional brightness ratio is greater than or equal to the brightness range, confirm that the uniformity of the camera's brightness meets the brightness uniformity test standard; if the regional brightness ratio is less than the brightness range, confirm that the uniformity of the camera's brightness does not meet the brightness uniformity test standard, and control the electronic device to move to the starting position; and / or determine that there are block stains in the image area based on the grayscale value of the pixel points in the image area; if the total number of block stains is less than or equal to the block stain threshold, determine that the block stains on the camera meet the block stain test standard; if the total number of block stains is greater than the block stain threshold, determine that the block stains on the camera do not meet the block stain test standard, and control the electronic device to move to the starting position.

[0010] In some embodiments of the first aspect, the image area includes a brightness center area and a brightness peripheral area, and determining the regional brightness average value and the central brightness average value of the image area according to the brightness values ​​of the pixels of the image area includes: determining the central brightness average value of the brightness center area according to the brightness values ​​of the pixels of the brightness center area; determining the regional brightness average value of the brightness peripheral area according to the brightness values ​​of the pixels of the brightness peripheral area; obtaining the regional brightness ratio of the image area according to the difference between the central brightness average value and the regional brightness average value includes: obtaining the difference according to the central brightness average value and the regional brightness average value; obtaining the regional brightness ratio of the image area according to the difference and a preset brightness level.

[0011] In some embodiments of the first aspect, the image area includes a target grayscale image area, a first grayscale image area, and a second grayscale image area, and determining the presence of block stains in the image area according to the grayscale values ​​of pixels in the image area includes: determining the target grayscale image area, the first grayscale image area, and the second grayscale image area of ​​the first image; determining a first grayscale average value according to the grayscale values ​​of pixels in the target grayscale image area; determining a second grayscale average value according to the grayscale values ​​of pixels in the first grayscale image area; determining a third grayscale average value according to the grayscale values ​​of pixels in the second grayscale image area; obtaining a regional grayscale gradient value according to the first grayscale average value, the second grayscale average value, and the third grayscale average value; if the regional grayscale gradient value is greater than a regional gradient threshold, determining that block stains exist in the target grayscale image area.

[0012] In some embodiments of the first aspect, testing the detection items of the camera at the second position according to the second image includes: scanning the outline of the second image to obtain the image to be tested; dividing the image to be tested into a plurality of image areas to be tested with equal areas; obtaining corresponding modulation transfer function test values ​​according to the grayscale values ​​of the pixels of the image areas to be tested; if the modulation transfer function test values ​​of the image areas to be tested are within the corresponding clarity range, determining that the clarity presentation of the camera meets the clarity test standard, and completing the test of the detection items at the second position; if the modulation transfer function test values ​​of any image areas to be tested are not within the corresponding clarity range, determining that the clarity presentation of the camera does not meet the clarity test standard, and controlling the electronic device to move to the starting position.

[0013] In some embodiments of the first aspect, testing the detection items of the camera at the third position according to the third image includes: scanning the outline of the third image to obtain the image to be tested; dividing the image to be tested into multiple image areas to be tested with equal areas; obtaining corresponding modulation transfer function test values ​​according to the grayscale values ​​of the pixels of the image areas to be tested; if the modulation transfer function test values ​​of the multiple image areas to be tested are within the corresponding clarity range, determining that the clarity presentation of the camera meets the clarity test standard, and completing the test of the detection items at the third position; if the modulation transfer function test value of any image area to be tested is not within the corresponding clarity range, determining that the clarity presentation of the camera does not meet the clarity test standard, and controlling the electronic device to move to the starting position.

[0014] In some embodiments of the first aspect, obtaining a corresponding modulation transfer function test value according to the grayscale value of the pixel points in the image area to be tested includes: determining the maximum grayscale value and the minimum grayscale value of the pixel points in the image area to be tested; obtaining a grayscale critical value according to the maximum grayscale value and the minimum grayscale value; obtaining a fourth grayscale average value according to the grayscale value of the pixel points greater than the grayscale critical value; obtaining a fifth grayscale average value according to the grayscale value of the pixel points less than the grayscale critical value; and obtaining the corresponding modulation transfer function test value according to the fourth grayscale average value and the fifth grayscale average value.

[0015] According to a second aspect of the present application, there is provided an electronic device detection system, comprising a control device, wherein the control device is used to control a camera of the electronic device to acquire a first image in response to the electronic device arriving at a first position; test the detection items of the camera at the first position according to the first image; control the camera to enter a second position in response to completion of the test of the detection items at the first position; control the camera to acquire a second image in response to the electronic device arriving at the second position; test the detection items of the camera at the second position according to the second image; control the electronic device to enter a third position in response to completion of the test of the detection items at the second position; control the camera to acquire a third image in response to the electronic device arriving at the third position; and test the detection items of the camera at the third position according to the third image. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of the structure of an electronic device detection system according to an embodiment of the present application.

[0017] Figure 2 Schematic diagram of the camera testing method according to an embodiment of the present application.

[0018] Figure 3 for Figure 1 A schematic diagram of a scenario of an electronic device detection system according to some embodiments is shown.

[0019] Figure 4 for Figure 1 A schematic diagram of a third color test card of the electronic device detection system shown.

[0020] Figure 5 for Figure 1 A schematic diagram of a first color test card of an electronic device detection system is shown.

[0021] Figure 6 for Figure 1 A schematic diagram of a scenario of brightness uniformity testing of an electronic device detection system is shown.

[0022] Figure 7a for Figure 1 Another schematic diagram of a brightness uniformity test scenario of an electronic device detection system is shown.

[0023] Figure 7b for Figure 1 A schematic diagram of another scenario of a brightness uniformity test of an electronic device detection system is shown.

[0024] Figure 8 for Figure 1 A schematic diagram of a dirt test scenario of an electronic device detection system is shown.

[0025] Fig. 9 for Figure 1 A schematic diagram of a scenario of a point stain test of an electronic device detection system is shown.

[0026] Fig.10 for Figure 1 A schematic diagram of a scenario of a block stain test of an electronic device detection system is shown.

[0027] Fig.11 for Figure 1 A schematic diagram of a scenario for a white balance test of an electronic device detection system is shown.

[0028] Fig.12 for Figure 1 Schematic diagram of the scenario of color testing of electronic equipment detection system.

[0029] Fig.13a for Figure 1 A schematic diagram of a scenario of a short-distance clarity test of a rear camera of an electronic device detection system.

[0030] Fig.13b for Figure 1 Another scenario schematic diagram of the short-distance clarity test of the rear camera of the electronic device detection system.

[0031] Fig.13c for Figure 1 Another scenario schematic diagram of the short-distance clarity test of the rear camera of the electronic device detection system. DETAILED DESCRIPTION

[0032] In the present application, the term "plurality" refers to two or more. In addition, it should be understood that in the description of the present application, the terms "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as controlling or implying relative importance, nor can they be understood as controlling or implying an order.

[0033] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0034] The following is a brief description of the relevant technology.

[0035] With the popularization of the fifth generation mobile communication technology (5G) and the Internet, electronic devices based on 5G technology and Internet technology can achieve more functions. Among them, the camera is an important component for electronic devices to achieve many functions and is a standard configuration for different types of electronic devices. Therefore, the requirements for the quality and performance of the camera are getting higher and higher.

[0036] Before electronic products leave the factory, the quality and performance of the cameras of electronic devices need to be tested to check whether the quality and performance of the cameras meet the factory standards. There are many quality and performance inspection items, which are easy to miss. Manual testing one by one is time-consuming, labor-intensive, and prone to errors. In addition, the different types of electronic devices make the detection systems of the cameras of electronic devices incompatible with each other. For example, the structures and components of the detection systems used to detect computers and mobile phones are different. When detecting different types of electronic devices, the detection system needs to be replaced, which is costly.

[0037] In view of this, the present application provides a camera testing method and an electronic device detection system to improve the testing efficiency and accuracy of the camera of the electronic device.

[0038] The technical terms involved in this application are explained below.

[0039] The eigenvalue refers to the value used to characterize the characteristics of each pixel in the image. The eigenvalue includes the red component (Red, R), the green component (Greed, G) and the blue component (Blud, B) used to characterize the color of the pixel. The eigenvalue also includes the grayscale value of the pixel. When the image is a grayscale image, that is, when the values ​​of R, G, and B are equal, the grayscale value of the pixel can be obtained. For example, R=G=B=0 of the pixel, that is, the grayscale value of the pixel is zero. The eigenvalue also includes the brightness value, which is used to reflect the brightness of the image. The brightness value can be obtained by multiplying R, G, and B by the corresponding coefficients and adding them together. It can be understood that when the image is a grayscale image, the brightness value is equal to the grayscale value. The eigenvalue also includes clarity, which is a comprehensive expression of the contrast and resolution of the image.

[0040] See also Figure 1 , Figure 1The structure diagram of the side view of the electronic device detection system of the embodiment of the present application, the detection system 100 includes a control device 10 and a dark box 20. The electronic device 30 can be placed in the dark box 20, and the control device 10 is used to control the dark box 20 or the electronic device 30 to perform corresponding actions to implement the camera test method of the embodiment of the present application. For example, after the dark box 20 receives the control instruction, the current position of the electronic device 30 is sent to the control device 10, and after the electronic device 30 receives the control instruction, it sends the captured image to the control device 10, and the control device 10 generates a control instruction according to the image and the current position, and sends the control instruction to the dark box 20 and the electronic device 30. The dark box 20 moves the electronic device 30 to the next position indicated by the control instruction according to the control instruction, and the electronic device 30 controls the camera 31 to capture the image at the next position according to the control instruction. In some embodiments, the control device 10 and the dark box 20 or the electronic device 30 can be connected based on wireless communication technology, or can be connected through physical wires, such as Universal Serial Bus (USB) data.

[0041] In some embodiments, the dark box 20 includes a movable panel 21, a test card 22 and an auxiliary component 23. The movable panel 21 is used to move the electronic device 30 and a bracket 32 ​​for supporting the electronic device 30. The test card 22 is used as a shooting target of the camera 31, and the auxiliary component 23 is used to assist the camera 31 in shooting the test card 22. In some embodiments, the camera 31 of the electronic device 30 includes a front camera 31a and a rear camera 31b. A through hole is provided on the movable panel 21, and the front camera 31a or the rear camera 31b shoots an image through the through hole. The test card 22 includes a first whiteboard test card 22a, a second whiteboard test card 22b, a first color test card 22c, a second color test card 22d and a third color test card 22e. Among them, the shooting targets of the rear camera 31b include the first whiteboard test card 22a, the first color test card 22c and the third color test card 22e, which are respectively used to test the detection items of the rear camera 31b at different positions. The camera target of the front camera 31a includes the detection items of the second whiteboard test card 22b and the second color test card 22d, which are respectively used to test the detection items of the front camera 31a at different positions. The auxiliary component 23 is a lens 23, which is used to simulate the infinite focus of the rear camera 31b to assist the rear camera 31b in long-distance testing. In some embodiments, the electronic device 30 can be, but is not limited to, a mobile phone, a smart watch, and a personal computer.

[0042] In some embodiments, the dark box 20 is further provided with a carrying device 24, which is connected to the movable panel 21 and extends outside the dark box 20, and is used to carry the electronic device 30 and the bracket 32. The carrying device 24 facilitates the operator to replace the electronic device 30 outside the dark box 20. It can be understood that the type and position of the test card can be adjusted according to different types of electronic devices 30 to be compatible with different types of electronic devices 30.

[0043] See also Figure 2 , Figure 2 Flow chart of the camera testing method of the embodiment of the present application. The testing method is applied to the control device 10. The camera testing method of the embodiment of the present application includes the following steps:

[0044] Step S101: in response to the electronic device reaching a first position, controlling a camera of the electronic device to acquire a first image.

[0045] Please also read Figure 3 , Figure 3 2 is an application scenario diagram of the dark box 20. The first position 01 is the position of the detection item for testing the camera 31 at the first position. That is, the relative position of the first whiteboard test card 22a on the mobile panel 21 is also the relative position of the second whiteboard test card 22b on the mobile panel 21. The first whiteboard test card 22a and the second whiteboard test card 22b are white light-emitting cards that can emit light. The white light-emitting cards are attached as shown in FIG. Figure 4 The black and white transparent test card shown. One part of the black and white transparent test card is a black pattern, and the other part is a white transparent pattern. In one example, the brightness of the light source is greater than 1000 lux, and the color temperature of the light source is between 5200K and 6300K.

[0046] When the electronic device 30 is located at the first position 01, the electronic device 30 responds to the control instruction of the control device 10, and takes a first rear image of the first whiteboard test card 22a through the rear camera 31b, and takes a first front image of the second whiteboard test card 22b through the front camera 31a. That is, the first image includes the first front image and the first rear image.

[0047] Step S102: testing detection items of the camera at the first position according to the first image.

[0048] The detection items of the first position 01 may include a protective film test, a white balance test, a brightness uniformity test, a dirt test, and the like.

[0049] The control device 10 can perform a protective film test, a white balance test, a brightness uniformity test and a dirt test on the rear camera 31b according to the first rear image, and can perform a protective film test, a white balance test, a brightness uniformity test and a dirt test on the front camera 31a according to the first front image.

[0050] Step S103: in response to completing the test of the detection item at the first position, controlling the electronic device to enter the second position.

[0051] After completing the detection items at the first position 01 , the control device 10 sends a control instruction to the dark box 20 , so that the dark box 20 controls the movable panel 21 to move to the second position 02 .

[0052] Step S104: In response to the electronic device reaching the second position, controlling the camera to acquire a second image.

[0053] The camera 31 is at the second position 02, the rear camera 31b of the electronic device 30 faces the lens 23, and the front camera 31a faces the second color test card 22d. The lens 23 is arranged between the rear camera 31b and the first color test card 22c, which can simulate the infinite focus of the rear camera 31b. In an example, the first color test card 22c and the second color test card 22d are as follows Figure 5 The black and white transparent test card shown has black lines and transparent lines arranged alternately.

[0054] When the electronic device 30 is located at the second position 02, the electronic device 30 responds to the control instruction of the control device 10, and takes a second rear image of the first color test card 22c through the lens 23 through the rear camera 31b, and takes a second front image of the second color test card 22d through the front camera 31a. That is, the second image includes the second front image and the second rear image.

[0055] Step S105: testing the detection items of the camera at the second position according to the second image.

[0056] The detection items of the second position include a long-distance color test of the rear camera 31 b and a short-distance color test of the front camera 31 a .

[0057] The control device 10 can perform a long-distance color test on the rear camera 31 b according to the second rear image, and can perform a short-distance color test on the front camera 31 a according to the second front image.

[0058] Step S106: in response to completing the test of the detection items at the second position, controlling the electronic device to enter the third position.

[0059] After completing the detection items at the second position, the control device 10 sends a control instruction to the dark box 20 so that the dark box 20 controls the movable panel 21 to move to the third position 03. The third position 03 is the relative position of the third color test card 22e on the movable panel 21.

[0060] Step S107: In response to the electronic device reaching the third position, controlling the camera to acquire a third image.

[0061] When the electronic device 30 is located at the third position 03, the electronic device 30 responds to the control instruction of the control device 10 and takes a third rear image of the third color test card 22e through the rear camera 31b. The third color test card 22e is also used as shown in FIG. Figure 5 The black and white transparent test card shown. That is, the third image is the third post-image.

[0062] Step S108: testing the detection items of the camera at the third position according to the third image.

[0063] The detection items at the third position include a close-range color test of the rear camera 31 b. The control device 10 can perform a close-range color test on the rear camera 31 b according to the third rear image.

[0064] Among them, the detection items at the first position, the detection items at the second position and the detection items at the third position may constitute basic detection items of the camera 31 before it leaves the factory.

[0065] In the above technical solution, the control device 10 controls the camera 31 to acquire the first image in response to the electronic device 30 arriving at the first position 01, and tests the detection items of the camera 31 at the first position 01 according to the first image. Then, in response to completing the test of the detection items at the first position 01, the control device 10 controls the electronic device 30 to enter the second position 02, controls the camera 31 to acquire the second image in response to the electronic device 30 arriving at the second position 02, and tests the detection items of the camera 31 at the second position 02 according to the second image. Finally, in response to completing the test of the detection items at the second position 02, the control device 10 controls the electronic device 30 to enter the third position 03, controls the camera 31 to acquire the third image in response to the electronic device 30 arriving at the third position 03, and tests the detection items of the camera 31 at the third position 03 according to the third image. In this way, through the camera testing method of the embodiment of the present application, the performance and quality of the camera 31 can be automatically tested to improve the test efficiency and accuracy of the camera 31 of the electronic device 30.

[0066] In some embodiments, step S102 includes the following steps:

[0067] Step S201: obtaining a red component, a green component and a blue component of a pixel point according to a first image.

[0068] The inspection items of the first position include a protective film test. The protective film test is used to test whether the front camera 31a and the rear camera 31b are provided with a protective film. It can be understood that in order to protect the front camera 31a and the rear camera 31b of the camera, a colored transparent film will be affixed to the front camera 31a and the rear camera 31b of the electronic device 30 that has just been produced as a protective film. In order to prevent the protective film from interfering with the test, it is necessary to determine that the front camera 31a and the rear camera 31b are not provided with a protective film before starting other inspection items.

[0069] Specifically, taking the first rear image as an example of the first image, the control device 10 analyzes the first rear image and extracts the red component R, the green component G and the blue component B of each pixel in the first rear image.

[0070] Step S202: obtaining a first average component according to the red component, obtaining a second average component according to the green component, and obtaining a third average component according to the blue component.

[0071] In one example, the red components of all pixels are added and divided by the number of pixels in the first rear image to obtain a first average component of the red components in the first rear image, the green components of all pixels are added and divided by the number of pixels in the first rear image to obtain a second average component of the green components in the first rear image, and the blue components of all pixels are added and divided by the number of pixels in the first rear image to obtain a second average component of the blue components in the first rear image.

[0072] Step S203: If the first average component, the second average component and the third average component are all within the color component range, it is confirmed that the camera is not provided with a protective film.

[0073] The color component range is set based on the protective film test and can be 100 to 200 without specific limitation. In one example, the color component range is 100 to 200, if the first average component is 150, the second average component is 110, and the third average component is 198, the control device 10 can confirm that the camera 31 is not provided with a protective film.

[0074] Step S204: If any one of the first average component, the second average component and the third average component is not within the color component range, confirm that the camera is provided with a protective film, and control the electronic device to move to the starting position.

[0075] Please refer to Figure 3, the starting position 00 is on the carrying surface of the carrying device 24. In one example, the color component range is 100 to 200, if the first average component is 100, the second average component is 80 and the third average component is 235, the control device 10 can confirm that the camera is provided with a protective film, and then control the movable panel 21 to move the camera 31 to the starting position 00. This is convenient for the operator to tear off the protective film from the camera 31, so as to re-test the detection items of the first position 01.

[0076] In some embodiments, after confirming that the camera is not provided with a protective film, step S102 further includes the following steps:

[0077] Step S301: obtaining an average pixel brightness value according to the brightness values ​​of the pixels of the first image.

[0078] The detection items of the first position 01 also include a brightness level test and a brightness uniformity test. The brightness level test may be performed before the brightness uniformity test.

[0079] Specifically, in the brightness test, the first image takes the first post-image as an example, and the control device 10 grayscales the first post-image to obtain a first grayscale image, and removes noise from the first grayscale image. Next, the control device 10 extracts the grayscale value of each pixel in the first grayscale image, and based on the uniform algorithm, the average pixel brightness of the first grayscale image can be obtained according to the grayscale value. The uniform algorithm includes the average method, the median method, and the weighted average method. For example, the grayscale values ​​of all pixels are added and divided by the number of pixels to obtain the average pixel brightness.

[0080] In one example, grayscale processing is performed on the first image according to formula (1), and denoising is performed on the first grayscale image based on mean filtering based on 3*3 convolution.

[0081] Gray=(R*19595+G*38469+B*7472)>>16—(1)

[0082] Among them, Gray represents the gray value of a pixel, R represents the red component, G represents the green component, and B represents the blue component.

[0083] Step S302: If the average pixel brightness is greater than or equal to the preset brightness value, confirm that the brightness of the camera meets the brightness test standard.

[0084] The brightness preset value is based on the brightness level test setting and can be 64 (cd / m 2 It can be understood that if the average pixel brightness is greater than or equal to the preset brightness value, it can be determined that the brightness of the first post-image is sufficient.

[0085] Step S303: If the average pixel brightness is less than the preset brightness value, it is determined that the brightness of the camera does not meet the brightness test standard, and the electronic device is controlled to move to the starting position.

[0086] It can be understood that if the average pixel brightness is less than the preset brightness value, it can be determined that the brightness of the first rear image is insufficient. At this time, the control device 10 controls the movable panel 21 to move the camera 31 to the starting position 00.

[0087] In some embodiments, after confirming that the brightness of the camera meets the brightness test standard, step S102 further includes the following steps:

[0088] Step S401: Determine the average brightness of the region and the average brightness of the center of the image region according to the brightness values ​​of the pixels in the image region. In the detection items of the first position 01, some tests need to divide the first image into multiple regions of equal area, that is, divide the first image into multiple image regions. Depending on the test, the position, number and size of the image region are also different.

[0089] In the brightness uniformity test, the first image takes the first rear image as an example. Figure 6 As shown, according to the selection range of the preset size, the center of the first post-image is selected to obtain the brightness center area CC. Taking the center as the starting point, press Figure 6 After moving the preset offset in the +X direction or -X direction, move to the positions of the four corners in the +Y direction or -Y direction to obtain four brightness peripheral areas LT, LB, RB and RT. In one example, the preset size is 0.3 times the size of the first rear image. The preset offset is half of 0.8 times the +X direction of the first rear image. That is, the image area includes a brightness center area and a brightness peripheral area.

[0090] In some embodiments, step S401 includes determining a central brightness average value of the brightness central area according to the brightness values ​​of the pixels in the brightness central area, and determining a regional brightness average value of the brightness peripheral area according to the brightness values ​​of the pixels in the brightness peripheral area. The calculation method of the central brightness average value of the brightness central area and the regional brightness average value of the brightness peripheral area is also a uniform algorithm.

[0091] Step S402: Obtaining a regional brightness ratio of the image region according to a difference between the central brightness average value and the regional brightness average value.

[0092] In some embodiments, step S402 includes obtaining a difference value based on the center brightness average value and the regional brightness average value, and obtaining a regional brightness ratio of the image area based on the difference value and a preset brightness level. In one example, the preset brightness level is 235, and the center brightness average value of the brightness center area CC is subtracted from the regional brightness average values ​​of the brightness peripheral areas LT, LB, RB, and RT, respectively, to obtain the difference value between CC and LT, the difference value between CC and LB, the difference value between CC and RB, and the difference value between CC and RT. Then, the obtained difference values ​​are divided by 235, respectively, to obtain the brightness ratio values ​​R_LT, R_RT, R_LB, and R_RB corresponding to the brightness peripheral areas LT, LB, RB, and RT, respectively, that is, to obtain the regional brightness ratio values ​​R_LT, R_RT, R_LB, and R_RB of the image area.

[0093] It can be understood that in the brightness uniformity test, the four selected brightness peripheral areas can be used to test whether the brightness of the first image is uniform, and whether there are shadows at the four corners of the first image.

[0094] Step S403: If the area brightness ratio is greater than or equal to the brightness range, confirm that the uniformity of the camera brightness meets the brightness uniformity test standard. The brightness range is set based on the brightness uniformity test and can be 0.2 to 0.3. In one example, Figure 7a and Figure 7b This is a graph showing the uniformity of the brightness of the rear camera, from 7a or Figure 7b It can be seen that the test results of the regional brightness ratios R_LT, R_RT, R_LB and R_RB are all less than 0.3, which can confirm that they meet the brightness uniformity test standards and the test has passed.

[0095] Step S404: If the regional brightness ratio is less than the brightness range, it is determined that the uniformity of the brightness of the camera does not meet the brightness uniformity test standard, and the electronic device is controlled to move to the starting position.

[0096] It can be understood that if any of the four area brightness ratios is smaller than the brightness range, it can be determined that the brightness uniformity of the first image is insufficient. At this time, the control device 10 controls the movable panel 21 to move the camera to the starting position 00.

[0097] In some embodiments, after confirming that the camera is not provided with a protective film, step S102 further includes the following steps:

[0098] Step S501: determine a target pixel point of a first image.

[0099] The first detection item also includes a dirt test. The dirt test is used to test whether there are stains or spots on the front camera 31a and the rear camera 31b. The dirt test includes a point stain (POD) test and a block stain (POG) test. Since the image features of point stains and block stains are different, for example Figure 8 As shown, the first image takes the first post-image as an example. The corresponding shape features obtained after processing the first post-image with point-shaped stains are different from the corresponding shape features obtained after processing the first post-image with block-shaped stains. Therefore, the specific algorithms are also different. Specifically, in the point-shaped stain test, as described in step S301, after obtaining the first grayscale image according to the first post-image, a certain pixel point of the first grayscale image is determined as the target pixel point. Fig. 9 As shown, pixel 16 is the target pixel.

[0100] Step S502: Obtain the pixel grayscale gradient value of the target pixel according to the grayscale value of the target pixel and the grayscale values ​​of the pixels in the target pixel area. The pixels in the target pixel area are the first ten pixels in the same row as the target pixel, such as Fig. 9 As shown, the target pixel area is pixel points 6 to 15. In one example, the calculation formula of the pixel grayscale gradient value of the target pixel point is shown in (2).

[0101]

[0102] Where w is the width of the first post-image, GV n is the gray value of the nth pixel in a row, D n is the gradient value of the nth pixel in a row (i.e., the target pixel). That is, when n is 10, the number of pixels in the target pixel area is 10.

[0103] Step S503: If the pixel grayscale gradient value is greater than the pixel gradient threshold, the target pixel is determined to be a stain. The pixel gradient threshold is set based on the point stain test, for example, 235*0.3=76.5.

[0104] Step S504: If the total number of stains is less than or equal to the stain number threshold, it is determined that the dot stains on the camera meet the dot stain test standard. The stain number threshold is also set based on the dot stain test, for example, 5 to 15.

[0105] Step S505: If the total number of stains is greater than the stain number threshold, it is determined that the dot stains on the camera do not meet the dot stain test standard, and the electronic device 30 is controlled to move to the starting position. It can be understood that if the total number of stains is greater than the stain number threshold, it can be determined that there are too many dot stains on the camera. At this time, the control device 10 controls the movable panel 21 to move the camera to the starting position 00.

[0106] In some embodiments, after confirming that the camera is not provided with a protective film, step S102 further includes the following steps:

[0107] Step S601: determining whether a block stain exists in the image region according to the grayscale values ​​of the pixels in the image region.

[0108] In the block stain test, specifically, in one embodiment, step S601 includes the following steps:

[0109] Step S6011: Determine a target grayscale image area, a first grayscale image area, and a second grayscale image area of ​​the first image.

[0110] As mentioned above, the first image takes the first post-image as an example. After obtaining the first grayscale image according to the first post-image, the first grayscale image is divided into multiple regions. One region is selected from the multiple regions as the target grayscale image region, and then the first grayscale image region and the second grayscale image region are determined according to the target grayscale image region. That is, the image region can also include the target grayscale image region, the first grayscale image region and the second grayscale image region. For example, Fig.10 As shown, 0 or 3 is the target grayscale area. When 0 is the target grayscale area, 1 is the first grayscale image area, and 2 is the second grayscale image area. When 3 is the target grayscale area, 4 is the first grayscale image area, and 5 is the second grayscale image area. That is, the first grayscale image area and the second grayscale image area are the last two grayscale image areas in the same row of the target grayscale image area.

[0111] Step S6012: Determine a first grayscale average value according to the grayscale values ​​of the pixels in the target grayscale image area.

[0112] Step S6013: Determine a second grayscale average value according to the grayscale values ​​of the pixels in the first grayscale image area.

[0113] Step S6014: Determine a third grayscale average value according to the grayscale values ​​of the pixels in the second grayscale image area.

[0114] The first grayscale average refers to the grayscale average of the target grayscale image area, the second grayscale average refers to the grayscale average of the first grayscale image area, and the third grayscale average refers to the grayscale average of the third grayscale image area. The algorithm for obtaining the grayscale average according to the grayscale values ​​of the pixels in the grayscale image area includes the above-mentioned uniform algorithm.

[0115] Step S6015: Obtain the regional grayscale gradient value according to the first grayscale average value, the second grayscale average value and the third grayscale average value.

[0116] In one example, the regional grayscale gradient value is obtained according to formula (3).

[0117] D0=(abs(GV0-GV1)+abs(GV0-GV2)) / 2—(3)

[0118] Wherein, D0 represents the regional grayscale gradient value, GV0 represents the first average value of the target grayscale image region, GV1 represents the second average value of the first grayscale image region, and GV2 represents the third average value of the second grayscale image region.

[0119] Step S6016: If the regional grayscale gradient value is greater than the regional gradient threshold, it is determined that there are block stains in the target grayscale image area. The regional gradient threshold is set based on the block stain test and can be 255*0.05=12.75. In an example, if D0 is greater than 12.75, it can be determined that there are block stains in the target grayscale image area 0.

[0120] Step S602: If the total number of block stains is less than or equal to the block stain threshold, determine that the block stains on the camera meet the block stain test standard. The block stain threshold is set based on the block stain test and can be 2 to 5.

[0121] Step S603: If the total number of block stains is greater than the block stain threshold, it is determined that the block stains on the camera do not meet the block stain test standard, and the electronic device 30 is controlled to move to the starting position. It can be understood that if the total number of block stains is greater than the block stain threshold, it can be determined that there are too many point stains on the camera. At this time, the control device 10 controls the mobile panel 21 to move the camera to the starting position 00.

[0122] In some embodiments, after confirming that the camera is not provided with a protective film, step S102 further includes:

[0123] Step S701: Divide a first image into a plurality of image regions of equal area.

[0124] The detection items of the first position 01 also include a white balance test. The white balance test is used to detect whether the front camera 31a or the rear camera 31b presents the various color components to the same extent. In the white balance test, as mentioned above, the first image is first divided into a plurality of image regions of equal area. Fig.11 As shown, taking the first post-image as an example, the first post-image is divided into nine image regions, namely, LT, CT, RT, LC, CC, RC, LB, CB and RB.

[0125] Step S702: Determine the first component ratio of the red component to the green component of the image area, and the second component ratio of the green component to the blue component. Specifically, the red component of the image area is obtained according to the red components of all pixels in each image area, and similarly, the green component and the blue component of the image area are obtained. Then, the red component of the image area is divided by the green component to obtain the first component ratio RG of the image area, and the blue component of the image area is divided by the green component to obtain the second component ratio BG of the image area.

[0126] Step S702: If the first component ratio and the second component ratio are both within the component ratio range, confirm that the color presentation of the camera meets the white balance test standard.

[0127] The component ratio range is based on the white balance test setting and can be 0.8 to 1.2. In one example, the first component ratio RG and the second component ratio BG of the image areas of LT, CT, RT, LC, CC, RC, LB, CB, and RB are both between 0.8 and 1.2, which confirms that the color presentation of the camera meets the white balance test standard. It can be understood that the closer the first component ratio RG is to 1, the better the presentation effect of the red component and the green component of the camera target by the first image. The closer the second component ratio BG is to 1, the better the presentation effect of the blue component and the green component of the camera target by the first image.

[0128] Step S702: If any of the first component ratio and the second component ratio is not within the component ratio range, it is determined that the color presentation of the camera does not meet the white balance test standard, and the electronic device is controlled to move to the starting position.

[0129] It can be understood that if the first component ratio or the second component ratio of any image area is not within the component ratio range, it can be determined that the color presentation of the camera does not meet the white balance test standard. At this time, the control device 10 controls the movable panel 21 to move the camera to the starting position 00.

[0130] It can be understood that after any one or all of the protective film test, white balance test, brightness uniformity test and dirt test are confirmed to meet the test standards, it can be determined that the first test item is completed, that is, the first test item is passed.

[0131] In some embodiments, step S105 includes the following steps:

[0132] Step S801: Scan the contour of the second image to obtain an image to be tested.

[0133] The color test is used to test the clarity of the front camera 31a or the rear camera 31b. There are multiple rear cameras 31b on the electronic device 30, and the rear camera 31b is used to shoot distant scenes and has an automatic focusing function. Therefore, when testing the color test of the rear camera 31b, it is necessary to test the short-distance shooting function of the rear camera 31b and the front camera 31a, and the long-distance shooting function (i.e., shooting distant scenes) of the rear camera 31b. It can be understood that at the second position 02, the rear camera 31b is correspondingly provided with a lens 23, which can realize the automatic focusing function of the rear camera 31b. That is, at the second position 02, the clarity of the front camera 31a during short-distance shooting and the clarity of the rear camera 31b during long-distance shooting can be tested, wherein the first color test card 22c is about 10cm away from the rear camera 31b, and the second color test card 22d is about 10cm away from the front camera 31a. Specifically, the second image takes the second rear image as an example. After the control device 10 acquires the second rear image, it scans the contour of the second rear image to obtain the image to be tested. In one example, after the second rear image is gray-scaled, a second grayscale image is obtained. After the contour of the second grayscale image is scanned using the findContours function of the OpenCV library, the image area formed by the scanned maximum rectangular contour is used as the image to be tested.

[0134] Step S802: Divide the image to be tested into a plurality of image regions to be tested with equal areas.

[0135] like Fig.12 As shown, the image to be tested is divided into 13 image regions to be tested, namely, CC, CL01, CU01, CR01, CD01, CU02, CR02, CD02, CNLB, CNRB, CNRT and CNLT, wherein the size ratio of the image region to the image to be tested is one tenth.

[0136] Specifically, the image region CC to be tested is the central region of the image to be tested, and the center distances between other image regions to be tested and the central region are shown in Table 1 below.

[0137] Table 1

[0138]

[0139] Wherein, w is the width of the image to be tested, h is the height of the image to be tested, Radio_01 is the first ratio of the center distance to the X-axis or Y-axis, and the value range of the first ratio is 0.3 to 0.4, that is, Radio_01*(n)*w or Radio_01*(n)*h represents the first offset of some other image areas to be tested (such as CL01, CU01, CR01, CD01) on the X-axis or Y-axis relative to the center area. Radio_02 is the second ratio of the center distance to the X-axis or Y-axis, and the value range of the second ratio is 0.7 to 0.8, that is, Radio_02*(n)*w or Radio_02*(n)*h represents the second offset of some other image areas to be tested (such as CL02, CU02, CR02, CD02) on the X-axis or Y-axis relative to the center area. After the center of the central area is connected to the four corners of the image to be tested, four line segments can be formed. Radio_03 is the ratio of the center distance to a certain line segment, and the value range of this ratio is 0.6 to 0.7. That is, Radio_03*(+1)*w and Radio_03*(-1)*h jointly represent the third translation of other image areas to be tested (such as CNLT, CNRT, CNLB and CNRB) on a certain line segment.

[0140] Step S803: Obtaining a modulation transfer function test value according to the grayscale value of the pixel points in the image area to be tested.

[0141] The Modulation Transfer Function (MTF) test value can be used to reflect the clarity of the front camera 31a or the rear camera 31b. Clarity is a comprehensive expression of resolution and contrast.

[0142] In some embodiments, step S803 includes the following steps:

[0143] Step S8031: Determine the maximum grayscale value and the minimum grayscale value of the pixel points in the image area to be tested.

[0144] The MTF test value is calculated as follows: first, in the image area to be tested, find the pixel with the largest grayscale value (i.e., the pixel corresponding to the maximum grayscale value GH) and the pixel with the smallest grayscale value (i.e., the pixel corresponding to the minimum grayscale value GL).

[0145] Step S8032: Obtain the grayscale critical value according to the grayscale maximum value and the grayscale minimum value.

[0146] The grayscale critical value is obtained according to formula (4).

[0147] T=(GH+GL) / 2—(4)

[0148] Wherein, T represents the grayscale critical value, GH represents the maximum grayscale value, and GL represents the minimum grayscale value.

[0149] Step S8033: Obtain a fourth grayscale average value according to the grayscale values ​​of the pixels that are greater than the grayscale critical value.

[0150] Next, in the image region to be tested, pixels whose grayscale values ​​are greater than the grayscale threshold value T are found, and a fourth grayscale average value is obtained according to the grayscale values ​​of these pixels.

[0151] Step S8034: Obtain the fifth grayscale average value according to the grayscale values ​​of the pixels that are less than the grayscale critical value.

[0152] Find the pixels whose grayscale values ​​are less than the grayscale critical value T, and calculate the fifth grayscale average value according to the grayscale values ​​of these pixels. The fourth grayscale average value and the fifth grayscale average value also adopt the uniform algorithm.

[0153] Step S8035: Obtain a corresponding modulation transfer function test value according to the fourth grayscale average value and the fifth grayscale average value.

[0154] Finally, in one example, the MTF test value of each image region to be tested is obtained according to formula (5).

[0155] MTF=(mean L -mean D ) / (mean L +mean D )—(5)

[0156] Among them, MTF represents the MTF test value, mean L Indicates the fourth grayscale average, mean D Indicates the fifth average value.

[0157] Step S804: If the modulation transfer function test values ​​of the plurality of image regions to be tested are within the corresponding clarity range, it is determined that the clarity of the camera meets the clarity test standard, and the test of the detection item of the second position is completed.

[0158] The clarity range is set based on the clarity test. For example, the clarity of the center area CC is the most important, with a clarity range of 60 to 70, the clarity range of CNLT, CNRT, CNLB and CNRB is 40 to 50, and the clarity range of the remaining areas is set from 0 to 40 according to the situation.

[0159] Step S805: If the modulation transfer function test value of any image area to be tested is not within the corresponding clarity range, it is determined that the clarity presentation of the camera does not meet the clarity test standard, and the electronic device 30 is controlled to move to the starting position.

[0160] It can be understood that if the modulation transfer function test value of any image area to be tested is not within the corresponding clarity range, it can be determined that the clarity of the camera is insufficient. At this time, the control device 10 controls the movable panel 21 to move the camera to the starting position 00.

[0161] In some embodiments, step S108 includes the following steps:

[0162] Step S901: Scan the contour of the third image to obtain an image to be tested.

[0163] It can be understood that the third image is a third rear image, and the imaging distance of the third rear image is shorter than that of the second rear image. At the third position 03, the clarity of the rear camera 31b during short-distance photography can be tested.

[0164] Step S902: Divide the image to be tested into a plurality of image regions to be tested with equal areas.

[0165] Step S903: Obtaining a corresponding modulation transfer function test value according to the grayscale value of the pixel point in the image area to be tested.

[0166] In some embodiments, step 903 includes the following steps:

[0167] Step S9031: Determine the maximum grayscale value and the minimum grayscale value of the pixel points in the image area to be tested.

[0168] Step S9032: Obtain the grayscale critical value according to the grayscale maximum value and the grayscale minimum value.

[0169] Step S9033: Obtain a fourth grayscale average value according to the grayscale values ​​of the pixels that are greater than the grayscale critical value.

[0170] Step S9034: Obtain the fifth grayscale average value according to the grayscale values ​​of the pixels that are less than the grayscale critical value.

[0171] Step S9035: Obtain a corresponding modulation transfer function test value according to the fourth grayscale average value and the fifth grayscale average value.

[0172] Step S904: If the modulation transfer function test values ​​of the plurality of image regions to be tested are within the corresponding clarity range, it is determined that the clarity presentation of the camera meets the clarity test standard, and the test of the detection item at the third position is completed.

[0173] In one example, if Figures 13a to 13c As shown, Fig.13a is the original image of the third post-image, Fig.13b The area framed in the middle is the area where the control device 10 scans the original image. Fig.13cThe MTF test value of each image area to be tested in the area is shown. Each MTF test value is in the corresponding clarity range, and the clarity of the camera module is determined to meet the clarity test standard, and the test passes.

[0174] Step S905: If the modulation transfer function test value of any image area to be tested is not within the corresponding clarity range, it is determined that the clarity presentation of the camera does not meet the clarity test standard, and the electronic device 30 is controlled to move to the starting position.

[0175] It can be understood that if the modulation transfer function test value of any image area to be tested is not within the corresponding clarity range, it can be determined that the clarity of the latter camera is insufficient. At this time, the control device 10 controls the movable panel 21 to move the camera to the starting position 00. It can be understood that the specific calculation process of steps S901 to S905, and steps S9031 to S9035 can refer to steps S801 to S805, and steps S8031 to S8035.

[0176] Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the protection scope of the present application.

Claims

1. A camera testing method, applied to a control device, characterized in that: The camera testing method comprises: In response to the electronic device reaching the first position, controlling a camera of the electronic device to acquire a first image; Testing the detection items of the camera at the first position according to the first image; In response to completing the test of the detection item at the first position, controlling the camera to enter the second position; In response to the electronic device reaching the second position, controlling the camera to acquire a second image; testing the detection items of the camera at the second position according to the second image; In response to completing the test of the detection item at the second position, controlling the electronic device to enter a third position; In response to the electronic device reaching the third position, controlling the camera to acquire a third image; The detection items of the camera at the third position are tested according to the third image.

2. The camera testing method according to claim 1, characterized in that: The detection items of testing the camera at the first position according to the first image include: Obtaining a red component, a green component, and a blue component of a pixel point according to the first image; Obtain a first average component according to the red component, obtain a second average component according to the green component, and obtain a third average component according to the blue component; If the first average component, the second average component and the third average component are all within the color component range, it is confirmed that the camera is not provided with a protective film; If any one of the first average component, the second average component and the third average component is not within the color component range, it is confirmed that the camera is provided with a protective film, and the electronic device is controlled to move to a starting position.

3. The camera testing method according to claim 2, characterized in that: After confirming that the camera is not provided with a protective film, the detection items of testing the camera at the first position according to the first image further include: Obtaining an average pixel brightness value according to the brightness values ​​of the pixels of the first image; If the average pixel brightness is greater than or equal to the preset brightness value, it is confirmed that the brightness of the camera meets the brightness test standard; If the average pixel brightness is less than the preset brightness value, it is determined that the brightness presentation of the camera does not meet the brightness test standard, and the electronic device is controlled to move to the starting position; and / or Determine a target pixel point and a target pixel point area in the first image; Obtaining a pixel grayscale gradient value of the target pixel point according to the grayscale value of the target pixel point and the grayscale values ​​of the pixels of the target pixel point area; If the pixel grayscale gradient value is greater than the pixel gradient threshold, the target pixel is determined to be a stain; If the total number of the stains is less than or equal to the stain number threshold, it is determined that the dot stains on the camera meet the dot stain test standard; If the total number of the stains is greater than the stain quantity threshold, it is determined that the dot-shaped stains on the camera do not meet the dot-shaped stain test standard, and the electronic device is controlled to move to the starting position.

4. The camera testing method according to claim 2, characterized in that: After confirming that the camera is not provided with a protective film, the detection items of testing the camera at the first position according to the first image further include: Dividing the first image into a plurality of image regions of equal area; Determine a first component ratio of the red component to the green component, and a second component ratio of the green component to the blue component of the image area; If both the first component ratio and the second component ratio are within the component ratio range, confirming that the color presentation of the camera meets the white balance test standard; If any of the first component ratio and the second component ratio is not within the component ratio range, confirming that the color presentation of the camera does not meet the white balance test standard, controlling the electronic device to move to the starting position; and / or Determine a regional brightness average and a central brightness average of the image area according to brightness values ​​of pixels in the image area; Obtaining a regional brightness ratio of the image area according to a difference between the central brightness average value and the regional brightness average value; If the area brightness ratio is greater than or equal to the brightness range, it is confirmed that the uniformity of the brightness of the camera meets the brightness uniformity test standard; If the area brightness ratio is less than the brightness range, confirming that the uniformity of the brightness of the camera does not meet the brightness uniformity test standard, controlling the electronic device to move to the starting position; and / or Determining whether block stains exist in the image area according to the grayscale values ​​of the pixels in the image area; If the total number of block stains is less than or equal to the block stain threshold, determine that the block stains on the camera meet the block stain test standard; If the total number of the block stains is greater than the block stain threshold, it is determined that the block stains on the camera do not meet the block stain test standard, and the electronic device is controlled to move to the starting position.

5. The camera testing method according to claim 4, characterized in that: The image area includes a brightness center area and a brightness peripheral area, and determining the regional brightness average value and the central brightness average value of the image area according to the brightness values ​​of the pixels in the image area includes: Determine the average central brightness of the brightness center area according to the brightness values ​​of the pixels in the brightness center area; Determine the average brightness of the brightness surrounding area according to the brightness values ​​of the pixels in the brightness surrounding area; The step of obtaining the regional brightness ratio of the image area according to the difference between the central brightness average value and the regional brightness average value comprises: Obtaining the difference value according to the center brightness average value and the regional brightness average value; The area brightness ratio of the image area is obtained according to the difference and a preset brightness level.

6. The camera testing method according to claim 4, characterized in that: The image area includes a target grayscale image area, a first grayscale image area, and a second grayscale image area, and determining the presence of block stains in the image area according to the grayscale values ​​of pixels in the image area includes: Determining the target grayscale image area, the first grayscale image area, and the second grayscale image area of ​​the first image; Determine a first grayscale average value according to the grayscale values ​​of the pixels in the target grayscale image area; Determine a second grayscale average value according to the grayscale values ​​of the pixels in the first grayscale image area; Determine a third grayscale average value according to the grayscale values ​​of the pixels in the second grayscale image area; Obtaining a regional grayscale gradient value according to the first grayscale average value, the second grayscale average value, and the third grayscale average value; If the regional grayscale gradient value is greater than the regional gradient threshold, it is determined that block stains exist in the target grayscale image region.

7. The camera testing method according to claim 1, characterized in that: The detection items of testing the camera at the second position according to the second image include: Scanning the contour of the second image to obtain an image to be measured; Dividing the image to be tested into a plurality of image regions to be tested with equal areas; Obtaining a corresponding modulation transfer function test value according to the grayscale value of the pixel point in the image area to be tested; If the modulation transfer function test value of the image area to be tested is within the corresponding clarity range, it is determined that the clarity presentation of the camera meets the clarity test standard, and the test of the detection item of the second position is completed; If the modulation transfer function test value of any of the image areas to be tested is not within the corresponding clarity range, it is determined that the clarity presentation of the camera does not meet the clarity test standard, and the electronic device is controlled to move to a starting position.

8. The camera testing method according to claim 1, characterized in that: The testing of the detection items of the camera at the third position according to the third image includes: Scanning the contour of the third image to obtain an image to be tested; Dividing the image to be tested into a plurality of image regions to be tested with equal areas; Obtaining a corresponding modulation transfer function test value according to the grayscale value of the pixel point in the image area to be tested; If the modulation transfer function test values ​​of the plurality of image areas to be tested are within the corresponding clarity range, it is determined that the clarity presentation of the camera meets the clarity test standard, and the test of the detection item of the third position is completed; If the modulation transfer function test value of any of the image areas to be tested is not within the corresponding clarity range, it is determined that the clarity presentation of the camera does not meet the clarity test standard, and the electronic device is controlled to move to the starting position.

9. The camera testing method according to claim 7 or 8, characterized in that: The step of obtaining a corresponding modulation transfer function test value according to the grayscale value of the pixel point in the image area to be tested comprises: Determine the maximum grayscale value and the minimum grayscale value of the pixel points in the image area to be tested; Obtaining a grayscale critical value according to the grayscale maximum value and the grayscale minimum value; Obtaining a fourth grayscale average value according to the grayscale values ​​of the pixels that are greater than the grayscale critical value; Obtaining a fifth grayscale average value according to the grayscale values ​​of the pixels that are less than the grayscale critical value; The corresponding modulation transfer function test value is obtained according to the fourth grayscale average value and the fifth grayscale average value.

10. An electronic equipment detection system, characterized in that: A control device is included, wherein the control device is used to control a camera of the electronic device to acquire a first image in response to the electronic device reaching a first position; Testing the detection items of the camera at the first position according to the first image; In response to completing the test of the detection item at the first position, controlling the camera to enter the second position; In response to the electronic device reaching the second position, controlling the camera to acquire a second image; testing the detection items of the camera at the second position according to the second image; In response to completing the test of the detection item at the second position, controlling the electronic device to enter a third position; In response to the electronic device reaching the third position, controlling the camera to acquire a third image; The detection items of the camera at the third position are tested according to the third image.

Citation Information

Cited By

  • Test system and test method for compensating data of camera with high-permeability membrane

    CN121231014A