Working condition test method, system and device, electronic equipment and storage medium
By acquiring and analyzing the contrast and clarity of candidate images captured by the camera device under different environmental parameters, determining the target environmental parameters, solving the problem of low accuracy in existing operating conditions, and achieving more accurate performance evaluation and improvement of R&D efficiency.
Patent Information
- Application Number
- CN202311108289.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2025-02-28
AI Technical Summary
The existing working condition testing methods are difficult to accurately characterize the performance of the camera module under different environmental parameters, resulting in low test accuracy.
By acquiring the candidate images of the target object under multiple sets of environmental parameters, the first contrast of each candidate image is calculated, and the sharpness is determined based on the contrast and standard contrast, and finally, the environmental parameters corresponding to the candidate image with the highest sharpness are determined as the target environmental parameters.
It realizes the performance advantages and disadvantages of the camera device under different operating conditions in quantified form, improves the accuracy of operating conditions testing, and provides R&D personnel with quantitative information related to the performance of the camera device, improving R&D efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, specifically to the field of equipment testing technology, and in particular to a working condition testing method, system, device, electronic equipment and storage medium. Background Art
[0002] With the continuous innovation of electronic equipment production technology, users have higher and higher performance requirements for electronic equipment. Therefore, equipment manufacturers usually test the performance of electronic equipment when running under different environmental parameters, so as to improve the manufacturing process of electronic equipment according to the test results, thereby improving the performance and quality of electronic equipment. For example, smart terminal manufacturers usually test the performance of camera modules on smart terminals in taking pictures under different environmental parameters, so as to timely discover possible problems with camera modules and improve the manufacturing process of camera modules in a timely manner. However, the working conditions of camera modules under different environmental parameters are difficult to characterize in a quantitative way, and there is a defect of low accuracy of working condition testing. Summary of the invention
[0003] In view of the above, it is necessary to propose a working condition testing method, system, device, electronic device and storage medium to solve the technical problem of low accuracy of working condition testing.
[0004] The present application provides a working condition testing method, which includes: obtaining multiple candidate images of a target object obtained by a camera device under multiple sets of environmental parameters, wherein each set of environmental parameters corresponds to a candidate image, and the target object corresponds to a preset standard contrast; determining a first contrast of each candidate image; determining the clarity of each candidate image based on the first contrast and the standard contrast; determining the candidate image with the highest clarity as the target image; and determining the environmental parameters corresponding to the target image as target environmental parameters.
[0005] In some embodiments, the method for determining the first contrast of the candidate image includes: determining multiple sampling areas in the candidate image, calculating the second contrast of each sampling area; obtaining the contrast mean of the multiple sampling areas based on the second contrast of each sampling area; and determining the contrast mean as the first contrast of the candidate image.
[0006] In some embodiments, the method further includes: when the second contrast of any of the sampling areas is less than a preset contrast threshold, deleting the second contrast of the sampling area.
[0007] In some embodiments, the method for determining the first contrast of the candidate image includes: determining the brightness value of each pixel in the candidate image; and determining the first contrast of the candidate image according to the highest brightness value and the lowest brightness value.
[0008] In some embodiments, the method further includes: after obtaining the target environmental parameters, dividing the target image into a central area and an edge area; calculating a first clarity of the central area, and calculating a second clarity of the edge area; calculating a first difference between the first clarity and a pre-stored standard clarity, and calculating a second difference between the second clarity and the pre-stored standard clarity; when the first difference is greater than a preset first threshold, and the second difference is greater than a preset second threshold, outputting warning information of the target environmental parameters, wherein the preset first threshold is less than the preset second threshold.
[0009] An embodiment of the present application also provides a working condition testing system, which includes: an electronic device; a working condition testing device and a camera device communicatively connected to the electronic device, wherein the working condition testing device includes a box, and a temperature-controlled carrier, a servo motor, a guide assembly and a target object arranged inside the box, the temperature-controlled carrier is used to carry the camera device and adjust the environmental parameters inside the box; the servo motor is electrically connected to the temperature-controlled carrier, and is used to control the temperature-controlled carrier to move to a preset position along the guide assembly; the electronic device controls the camera device arranged on the temperature-controlled carrier to shoot the target object at the preset position by sending a pre-stored shooting instruction to the camera device; the electronic device also executes the working condition testing method to determine the target environmental parameters of the camera device shooting the target object.
[0010] In some embodiments, the system further includes a lighting device, which is disposed inside the box and is used to illuminate the target object.
[0011] An embodiment of the present application also provides a working condition testing device, which includes: an acquisition unit, used to acquire candidate images taken by a camera device under different environmental parameters, wherein each of the candidate images includes a target object, and the target object corresponds to a preset standard contrast; a determination unit, used to determine a first contrast of each of the candidate images respectively; the determination unit is also used to determine the clarity of each of the candidate images based on the contrast and the standard contrast; the determination unit is also used to determine the candidate image with the highest clarity as the target image; the determination unit is also used to determine that the environmental parameters corresponding to the target image are target environmental parameters.
[0012] The present application also provides an electronic device, the electronic device comprising:
[0013] A memory storing at least one instruction;
[0014] A processor executes instructions stored in the memory to implement the operating condition testing method.
[0015] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the operating condition testing method.
[0016] It can be seen from the above technical solutions that the embodiments of the present application can reflect the performance of the camera device when it is operating under different environmental parameters by determining the clarity of the candidate images taken by the camera device under different environmental parameters, and can characterize the performance of the camera device when it is operating under different working conditions in a quantitative form, thereby improving the accuracy of determining the optimal working conditions for the camera device to operate. In addition, it can also provide quantitative information related to the performance of the camera device to R&D personnel, thereby improving the accuracy of the R&D personnel in judging the quality of the camera device, which can effectively improve the efficiency of developing the camera device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of a working condition testing system provided in one embodiment of the present application.
[0018] Figure 2 It is a flow chart of a working condition testing method provided in one embodiment of the present application.
[0019] Figure 3 This is a checkerboard image provided by an embodiment of the present application.
[0020] Figure 4 Schematic diagram of a contrast detection card provided in one embodiment of the present application.
[0021] Figure 5 4 is a flowchart of a method for determining the contrast of a candidate image provided by an embodiment of the present application.
[0022] Figure 6 is a flowchart of a method for determining contrast of a candidate image provided by another embodiment of the present application.
[0023] Figure 7 It is a flow chart of a working condition testing method provided in one embodiment of the present application.
[0024] Figure 8 It is a schematic diagram of dividing the central area and the edge area provided in an embodiment of the present application.
[0025] Fig. 9 It is a functional module diagram of a working condition testing device provided in one embodiment of the present application.
[0026] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.
[0028] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0030] The embodiment of the present application provides a working condition testing method, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, etc.
[0031] An electronic device can be any electronic product that can interact with a customer, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0032] The electronic device may also include a network device and / or a client device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0033] The network where the electronic device is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0034] like Figure 1 FIG. 2 is a schematic diagram of a working condition test system provided by an embodiment of the present application. The working condition test method provided by the present application can be applied to Figure 1 In the working condition test system 10 shown, the working condition test system 10 includes: an electronic device 100; a working condition test device 200 and a camera device 300 that are communicatively connected to the electronic device 100. Among them, the working condition test device 200 at least includes a box 210, a temperature control carrier 220, a servo motor 230, a guide assembly 240 and a lighting device 250. Specifically, the electronic device 100 is communicatively connected to the servo motor 230, the temperature control carrier 220 and the lighting device 250 in the working condition test device 200.
[0035] In one embodiment of the present application, the servo motor 230, the guide assembly 240 and the lighting device 250 are disposed inside the box 210. Figure 1 As shown, the servo motor 230 is disposed at the bottom of the box 210, and the guide assembly 240 is disposed above the servo motor 230. One end of the guide assembly 240 abuts against one side (such as the left side) of the box 210, and the other end abuts against the other side (such as the right side) of the box 210. The temperature control carrier 220 is disposed on the guide assembly 240 for loading the mobile terminal, and the mobile terminal is provided with a camera device 300, and the temperature control carrier 220 is slidably connected to the guide assembly 240. A target 400 is disposed on the top of the box 210, for example Figure 3 The black and white checkerboard or Figure 4 The servo motor 230 is electrically connected to the temperature control carrier 220 to control the temperature control carrier 220 to slide along the guide assembly 240 to a preset position, so that the camera device 300 disposed on the temperature control carrier 220 can shoot the target object 400 .
[0036] In an embodiment of the present application, the temperature control carrier 220 may be a carrier plate with temperature control and humidity control functions, used to carry the camera device 300 and adjust environmental parameters (such as temperature and humidity) in the box 210. The temperature control carrier 220 may simultaneously adjust the temperature and humidity of the environment in which the camera device 300 is located, and may also adjust the temperature or humidity of the environment alone, which is not limited in the embodiment of the present application.
[0037] In one embodiment of the present application, in order to simulate the working conditions of the camera device 300 under different environmental parameters, the electronic device 100 can send a preset displacement instruction to the servo motor 230, so that the servo motor 230 drives the temperature control carrier 220 to move to a preset position along the guide assembly 240, and the distance between the preset position and the target object 400 is equal to the preset distance threshold, which is used to simulate the camera device 300 in a real working scene. Keep a certain distance between the target object 400. For example, when the camera device 300 is a front camera of a mobile terminal, and the target object 400 is the face of a user using the mobile terminal, in order to simulate the scene where the user uses the front camera of the mobile terminal to unlock the mobile terminal, the distance threshold can be preset to 40 cm. After the camera device 300 is in the preset position, the electronic device 100 controls the temperature-controlled carrier 220 to be in different environmental parameters by sending environmental control instructions to the temperature-controlled carrier 220, so that the camera device 300 can shoot the target object 400 installed inside the working condition test equipment 200 under different environmental parameters, so as to obtain candidate images shot by the camera device 300 under different environmental parameters, and then reflect the performance of the camera device 300 under different environmental parameters through the clarity of the candidate images, thereby improving the accuracy of the working condition test.
[0038] In one embodiment of the present application, the working condition testing device also includes a lighting device 250, which is used to illuminate the target object 400 when the ambient light is insufficient, so as to avoid poor quality of the candidate image obtained when the camera device 300 shoots the target object 400 due to insufficient light intensity.
[0039] like Figure 2 , is a flow chart of a working condition test method provided by an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The working condition test method provided by an embodiment of the present application includes the following steps.
[0040] S10, acquiring a plurality of candidate images of a target object obtained by photographing the target object under a plurality of sets of environmental parameters by a camera device, wherein each set of the environmental parameters corresponds to one candidate image, and the target object corresponds to a preset standard contrast.
[0041] In one embodiment of the present application, in order to test the performance of the camera device when it is running under different working conditions, the electronic device can control the camera device to shoot a target object under multiple sets of different environmental parameters to simulate the scene of the camera device running under different working conditions, and obtain candidate images shot by the camera device under different environmental parameters. The clarity of the candidate image is used to characterize the performance of the camera device when it is running, and the best working condition when the camera device is running can be characterized in a quantitative form, so that the result of the working condition test is more accurate.
[0042] In one embodiment of the present application, the camera device may be a camera module installed on a mobile terminal, and the mobile terminal may be a mobile phone, a tablet computer, a smart wearable device, etc., which is not limited to this embodiment of the present application; the camera device may also be a camera, a camcorder, or other device with a shooting function.
[0043] In one embodiment of the present application, different environmental parameters correspond to different working conditions, and the environmental parameters include one or more of the following combinations: preset temperature; and / or preset humidity. Exemplarily, the temperature may be: -25°C, -15°C, -5°C, 5°C, 15°C, 15°C, 35°C, 45°C. The humidity may be: 20%RH, 40%RH, 60%RH, 80%RH, where RH is relative humidity (RH).
[0044] In one embodiment of the present application, the electronic device can send a shooting instruction to the camera device to control the camera device to shoot the target object under different environmental parameters to obtain candidate images. The target object can be Figure 3 The black and white checkerboard image shown can also be Figure 4 The target object corresponds to a preset standard contrast, which is used to represent the highest contrast that can be theoretically presented by the candidate image obtained by the camera device shooting the target object.
[0045] In this way, by determining a plurality of candidate images among a plurality of preset environmental parameters, data support is provided for determining the optimal operating condition of the camera device.
[0046] In one embodiment of the present application, in order to simulate the distance between the camera device and the target object in an actual application scenario to ensure that the quality of the obtained candidate image is similar to the quality of the image obtained in the actual application scenario, before controlling the camera device to shoot the candidate image, the method also includes: sending a displacement control instruction to a servo motor to control the servo motor to drive the camera device to move along a guide assembly to a preset position, wherein the camera device is slidably connected to the guide assembly, and a preset distance interval is met between the preset position and the target object.
[0047] In one embodiment of the present application, a servo motor is connected to the electronic device for controlling the environment adjustment mechanism to move along the guide assembly, and the environment adjustment mechanism is slidably connected to the guide rail. The preset distance interval between the preset position and the target object is used to simulate the distance between the camera device and the face when the user uses the terminal for face recognition. For example, the preset distance interval can be 40 cm.
[0048] In one embodiment of the present application, in order to solve the problem that insufficient light intensity in the environment has a negative impact on the camera imaging quality, the target object can also be supplemented with light. Therefore, the method also includes: before the camera device captures the candidate image, by sending a lighting instruction to the lighting device, controlling the lighting device to change from an off state to a lit state, wherein the lighting device is communicatively connected to the electronic device for illuminating the target object. The light source can be an infrared light source. In this way, after the preset light source is turned on and illuminates the target object, the light intensity in the environment can be increased, the imaging quality of the candidate image can be improved, and thus the detection accuracy can be improved.
[0049] S11, determining a first contrast of each of the candidate images.
[0050] In one embodiment of the present application, in order to characterize the performance of the camera device when operating under different environmental parameters with quantitative data, a first contrast of each candidate image can be determined, and the performance of the camera device when operating under different environmental parameters can be determined based on the contrast.
[0051] In one embodiment of the present application, in order to improve the accuracy of determining the contrast of the candidate image, multiple sampling areas can be determined from the candidate image, the second contrast of each sampling area can be calculated respectively, and the first contrast of the candidate image can be determined based on the second contrast of the multiple sampling areas. The sampling area refers to multiple pre-set areas in the candidate image. For example, four adjacent pixels in the candidate image can be used as a sampling area; the peripheral pixels in the candidate image can be used as a sampling area, and the internal pixels of the candidate image can be used as a sampling area. For the above-mentioned method of determining the contrast, please refer to the following description for Figure 5 Detailed description of the flow chart shown.
[0052] In another embodiment of the present application, in order to improve the efficiency of determining the contrast of the candidate image, the first contrast of the entire candidate image can also be directly determined according to the highest brightness value and the lowest brightness value in the candidate image. Figure 6 Detailed description of the flow chart shown.
[0053] S12: Determine the clarity of each of the candidate images according to the first contrast and the standard contrast.
[0054] In one embodiment of the present application, when the camera device captures a target object under a certain set of environmental parameters, a higher first contrast ratio of the candidate image is obtained, indicating that the performance of the camera device is better when operating under the environmental parameters.
[0055] In one embodiment of the present application, the ratio of the contrast to the standard contrast can be used as the clarity of the candidate image. For example, when the first contrast of the candidate image is 0.7 and the standard contrast corresponding to the target object is 0.8, the clarity of the candidate image is 0.7 / 0.8=0.875.
[0056] In this way, the quantified data characterizes the imaging quality of the candidate image, and can provide data support for the subsequent evaluation of the performance of the camera device when operating in different environments, thereby improving the accuracy of determining the optimal operating conditions of the camera device.
[0057] S13, determining the candidate image with the highest definition as the target image.
[0058] In one embodiment of the present application, when the clarity of the candidate image captured by the camera device under certain environmental parameters is higher, it indicates that the quality of the candidate image is higher, thereby indicating that the working condition of the camera device when operating under the environmental parameters is better. Therefore, the candidate image with the highest clarity can be determined as the target image.
[0059] S14: Determine that the environmental parameter corresponding to the target image is a target environmental parameter.
[0060] In one embodiment of the present application, since the target image is the image with the highest definition among all candidate images, the environmental parameters corresponding to the target image can be used as target environmental parameters, and the target environmental parameters are the optimal working conditions of the camera device.
[0061] In one embodiment of the present application, the user may be prompted based on the target environmental parameters that when the camera device is not operating under the target environmental parameters, the performance of the camera device may be reduced.
[0062] In an embodiment of the present application, the developer can also determine whether there is a problem with the manufacturing process of the camera device and whether the quality of the camera device is qualified based on the target environmental parameters. When the target environmental parameters are significantly different from the standard room temperature environment, there may be a problem with the manufacturing process of the camera device, which may result in the camera device being unqualified in quality.
[0063] It can be seen from the above technical solutions that the embodiments of the present application can reflect the performance of the camera device when it is operating under different environmental parameters by determining the clarity of the candidate images taken by the camera device under different environmental parameters, and can characterize the performance of the camera device when it is operating under different working conditions in a quantitative form, thereby improving the accuracy of determining the optimal working conditions for the camera device to operate. In addition, it can also provide quantitative information related to the performance of the camera device to R&D personnel, thereby improving the accuracy of the R&D personnel in judging the quality of the camera device, which can effectively improve the efficiency of developing the camera device.
[0064] like Figure 5 , is a flow chart of a method for determining the contrast of a candidate image provided by an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining the contrast of a candidate image provided by an embodiment of the present application includes the following steps.
[0065] S20, determining a plurality of sampling regions in the candidate image, and calculating a second contrast ratio of each of the sampling regions.
[0066] In one embodiment of the present application, in order to improve the accuracy of determining the contrast of the candidate image by performing fine-grained division on the candidate image, multiple sampling areas in the candidate image may be first determined, and the second contrast of each sampling area may be calculated respectively.
[0067] In one embodiment of the present application, a method for determining multiple sampling areas in a candidate image includes but is not limited to: randomly determining multiple sampling areas from the candidate image, wherein each sampling area includes multiple adjacent pixel points; taking multiple adjacent pixel points in the center part of the candidate image as one sampling area, and taking all remaining pixel points as another sampling area.
[0068] In one embodiment of the present application, the second contrast of each sampling area can be calculated by a modulation transfer function based on the maximum brightness value and the minimum brightness value in each sampling area. The maximum brightness value can be the highest value among the brightness values of all pixels in the sampling area, and the minimum brightness value can be the lowest value among the brightness values of all pixels in the sampling area. The modulation transfer function satisfies the following relationship:
[0069]
[0070] Where contrast represents the second contrast of a sampling area in the candidate image; I max Represents the brightest value in the sampling area; I min Represents the darkest value in the sampled area.
[0071] In one embodiment of the present application, in order to reduce the error in determining the first contrast of the candidate image, it is also necessary to determine whether the second contrast of each sampling area is less than a preset threshold. When the second contrast of a certain sampling area is less than the preset threshold, it indicates that the second contrast of the sampling area is too low, which may have a negative impact on the calculation of the first contrast of the entire candidate image. Therefore, after obtaining the second contrast of each sampling area, the method also includes: when the second contrast of any of the sampling areas is less than the preset contrast threshold, deleting the second contrast of the sampling area. For example, the preset contrast threshold may be 0.5, 0.6, etc., which is not limited in the embodiment of the present application. For example, when the preset contrast threshold is 0.5, and the second contrast of a certain sampling area is 0.3, the quality of contrast sampling can be improved by deleting the contrast.
[0072] In this way, by removing redundant data, the accuracy of calculating the clarity of the candidate images can be improved.
[0073] S21, obtaining a contrast average of the plurality of sampling areas according to the second contrast of each of the sampling areas.
[0074] In one embodiment of the present application, in order to improve the accuracy of the first contrast of the obtained candidate image, the average of the second contrast of each sampling area can be calculated to avoid excessively high or low contrast from having a negative impact on the first contrast of the entire candidate image that is finally determined.
[0075] For example, when five sampling areas in the candidate image are determined, and the second contrast of each sampling area is 0.7, 0.6, 0.9, 0.6 and 0.9 respectively, the average contrast of the five sampling areas is 0.68.
[0076] S22: Determine the contrast mean as the first contrast of the candidate image.
[0077] In one embodiment of the present application, the contrast average of multiple sampling areas is used as the first contrast of the candidate image, and the negative impact of excessively large or small contrast in multiple sampling areas on the determination of the contrast of the candidate image can be avoided by using the mean value calculation method. This can effectively improve the accuracy of the final determined candidate image contrast.
[0078] like Figure 6 , is a flow chart of a method for determining the contrast of a candidate image provided by another embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining the contrast of a candidate image provided by an embodiment of the present application includes the following steps.
[0079] S30: Determine the brightness value of each pixel in the candidate image.
[0080] In one embodiment of the present application, in order to improve the efficiency of determining the contrast of the candidate image, the contrast of the entire candidate image can be directly determined. Therefore, the brightness value of each pixel in the candidate image can be determined first, and then the contrast of the entire candidate image can be determined according to the brightness value of each pixel. This improves the efficiency of determining the contrast of the candidate image.
[0081] S31: Determine the first contrast of the candidate image according to the highest brightness value and the lowest brightness value.
[0082] In one embodiment of the present application, the first contrast of the candidate image can be calculated by a modulation transfer function based on the highest brightness value and the lowest brightness value in the candidate image. The specific form of the modulation transfer function can be found in step S20 and will not be described in detail here. For example, when the brightest value in the candidate image is 100 and the darkest value is 1, the calculation method of the first contrast of the candidate image is:
[0083]
[0084] In this way, the highest brightness value and the lowest brightness value in the candidate image are directly determined to determine the first contrast of the entire candidate image, which can improve the efficiency of determining the contrast of the candidate image.
[0085] like Figure 7 , is a flow chart of a working condition test method provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The working condition test method provided in an embodiment of the present application also includes the following steps.
[0086] S40, after obtaining the target environment parameters, dividing the target image into a central area and an edge area.
[0087] In one embodiment of the present application, after determining the target environmental parameters, in order to evaluate whether the target environmental parameters are credible by judging whether the camera device is qualified, it is also possible to divide the target image into a central area and an edge area, and judge whether the clarity of the central area and the clarity of the edge area meet expectations based on the pre-stored standard clarity, thereby determining whether the target environmental parameters are credible.
[0088] In one embodiment of the present application, the pre-stored standard definition refers to the definition of the image obtained by the camera device when shooting the target object under standard room temperature. The higher the difference between the definition of the target image and the pre-stored standard definition, the less credible the target definition is, the more likely the camera device is unqualified, and the lower the credibility of the target environment parameter is.
[0089] In one embodiment of the present application, in order to accurately evaluate whether the target environment parameters are credible, the target image can be finely divided into a central area and an edge area. The central area can be a set of pixels with a preset size at the center of the target image. For example, Figure 8 FIG. 8 is a schematic diagram showing the division of the central area and the edge area of the target image. The target image 800 may be an image of size 7*7, with each row including 7 pixels and each column also including 7 pixels. The central area 810 of the target image 800 may be Figure 8 The preset size of the pixel point set is 3*3. The embodiment of the present application does not limit the size of the central area. The edge area can be the set of all pixel points in the target image except the central area, for example Figure 8 Edge region 820 is shown.
[0090] S41, calculating a first definition of the central area, and calculating a second definition of the edge area.
[0091] In one embodiment of the present application, a method for calculating the first clarity of the central area and a method for calculating the second clarity of the edge area are the same as a method for determining the contrast of the candidate image in step S12, and are not described in detail here.
[0092] S42, calculating a first difference between the first definition and a pre-stored standard definition, and calculating a second difference between the second definition and the pre-stored standard definition.
[0093] In one embodiment of the present application, when the first difference value is larger, it indicates that the difference between the clarity of the central area of the target image and the standard clarity is larger; when the second difference value is larger, it indicates that the difference between the clarity of the edge area of the target image and the standard clarity is larger.
[0094] S43, when the first difference is greater than a preset first threshold and the second difference is greater than a preset second threshold, outputting warning information of the target environmental parameter, wherein the preset first threshold is less than the preset second threshold.
[0095] In one embodiment of the present application, when the first difference is greater than a preset first threshold value, and the second difference is greater than a preset second threshold value, it indicates that the clarity of the target image captured by the camera device under the target environmental parameters is significantly different from the clarity captured under room temperature. Therefore, there may be defects in the quality of the camera device, which in turn leads to a low credibility of the obtained target environmental parameters. At this time, early warning information of the target environmental parameters can be output to remind R&D personnel that the target environmental parameters are unreliable or that the quality of the camera device is defective. Exemplarily, the early warning information may be: "The camera device is unqualified" or "The target environmental parameters are unreliable."
[0096] In one embodiment of the present application, since the distortion of the captured image of the camera device may cause the clarity of the central area of the image to be higher and the clarity of the edge area to be lower, the preset first threshold is smaller than the preset second threshold. For example, the preset first threshold may be 0.07, and the preset second threshold may be 0.13. The present application does not limit the specific values of the preset first threshold and the preset second threshold. In this way, by evaluating the clarity of the central area with a smaller first threshold, the accuracy of evaluating the clarity of the central area of the target image can be improved.
[0097] In one embodiment of the present application, when the first difference is less than or equal to a preset first threshold value, and the second difference is less than or equal to a preset second threshold value, the difference between the clarity of the central area and the clarity of the edge area of the target image and the standard clarity is small, indicating that the performance of the camera device when operating under the target environmental parameters and the performance when operating under the standard room temperature environment are less different, then the quality of the camera device is qualified and the credibility of the target environmental parameters is high.
[0098] In one embodiment of the present application, when the first difference is less than or equal to the preset first threshold value, and the second difference is greater than or equal to the preset second threshold value, it indicates that although the difference between the clarity of the edge area of the target image and the standard clarity is large, the difference between the clarity of the central area and the standard clarity is small, which indicates that the performance of the camera device when operating under the target environmental parameters is small compared to the performance when it is operating under the standard room temperature environment, and the quality of the camera device is qualified, and the credibility of the target environmental parameters is high. In one embodiment of the present application, when the first difference is greater than or equal to the preset first threshold value, and the second difference is less than or equal to the preset second threshold value, it indicates that although the difference between the clarity of the central area of the target image and the standard clarity is large, the difference between the clarity of the edge area and the standard clarity is small, which indicates that the performance of the camera device when operating under the target environmental parameters is small compared to the performance when it is operating under the standard room temperature environment, and the quality of the camera device is qualified, and the credibility of the target environmental parameters is high.
[0099] See also Fig. 9 , Fig. 9 It is a functional module diagram of a working condition test device provided in one embodiment of the present application. The working condition test device 11 includes an acquisition unit 110 and a determination unit 111. The module / unit referred to in the present application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete fixed functions, which are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0100] The acquisition unit 110 is used to acquire candidate images captured by the camera device under different environmental parameters, wherein each of the candidate images includes a target object, and the target object corresponds to a preset standard contrast.
[0101] The determining unit 111 is configured to respectively determine a first contrast of each of the candidate images.
[0102] The determining unit 111 is further configured to determine the clarity of each of the candidate images according to the contrast and the standard contrast.
[0103] The determining unit 111 is further configured to determine the candidate image with the highest definition as the target image.
[0104] The determining unit 111 is further configured to determine that the environmental parameter corresponding to the target image is a target environmental parameter.
[0105] In one embodiment of the present application, the determination unit 111 is specifically used to: determine multiple sampling areas in the candidate image, calculate the second contrast of each sampling area; obtain the contrast mean of the multiple sampling areas according to the second contrast of each sampling area; and determine the contrast mean as the first contrast of the candidate image.
[0106] In an embodiment of the present application, the determining unit 111 is specifically configured to: when the second contrast of any of the sampling areas is less than a preset contrast threshold, delete the second contrast of the sampling area.
[0107] In an embodiment of the present application, the determining unit 111 is specifically used to: determine the brightness value of each pixel in the candidate image; and determine the first contrast of the candidate image according to the highest brightness value and the lowest brightness value.
[0108] In one embodiment of the present application, the determination unit 111 is also used to: after obtaining the target environment parameters, divide the target image into a central area and an edge area; calculate a first clarity of the central area, and calculate a second clarity of the edge area; calculate a first difference between the first clarity and a pre-stored standard clarity, and calculate a second difference between the second clarity and the pre-stored standard clarity; when the first difference is greater than a preset first threshold, and the second difference is greater than a preset second threshold, output warning information of the target environment parameters, wherein the preset first threshold is less than the preset second threshold.
[0109] In one embodiment of the present application, the determination unit 111 is specifically used to: before the camera device captures the candidate image, control the servo motor to drive the camera device to move to a preset position along the guide assembly by sending a displacement control instruction to the servo motor, wherein the camera device is slidably connected to the guide assembly, and a preset distance interval is established between the preset position and the target object.
[0110] In one embodiment of the present application, the determination unit 111 is specifically used to: before the camera device captures the candidate image, control the lighting device to change from an off state to a lit state by sending a lighting instruction to the lighting device, wherein the lighting device is communicatively connected to the electronic device for illuminating the target object.
[0111] It can be seen from the above technical solutions that the embodiments of the present application can reflect the performance of the camera device when it is operating under different environmental parameters by determining the clarity of the candidate images taken by the camera device under different environmental parameters, and can characterize the performance of the camera device when it is operating under different working conditions in a quantitative form, thereby improving the accuracy of determining the optimal working conditions for the camera device to operate. In addition, it can also provide quantitative information related to the performance of the camera device to R&D personnel, thereby improving the accuracy of the R&D personnel in judging the quality of the camera device, which can effectively improve the efficiency of developing the camera device.
[0112] See also Fig.10 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is used to execute the computer-readable instructions stored in the memory to implement the working condition test method described in any of the above embodiments.
[0113] In an embodiment of the present application, the electronic device 1 further includes a bus, and a computer program stored in the memory 12 and executable on the processor 13, such as a working condition test program.
[0114] Fig.10 Only the electronic device 1 having the memory 12 and the processor 13 is shown, and those skilled in the art can understand that Fig.10 The structure shown does not constitute a limitation on the electronic device 1 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0115] Combination Figure 2 The memory 12 in the electronic device 1 stores a plurality of computer-readable instructions to implement a working condition testing method, and the processor 13 can execute the plurality of instructions to implement: obtaining a plurality of candidate images obtained by photographing a target object by a camera device under a plurality of sets of environmental parameters, wherein each set of environmental parameters corresponds to a candidate image, and the target object corresponds to a preset standard contrast; determining a first contrast of each candidate image; determining a clarity of each candidate image according to the contrast and the standard contrast; determining the candidate image with the highest clarity as the target image; and determining the environmental parameters corresponding to the target image as the target environmental parameters.
[0116] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0117] Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 may be a bus structure or a star structure. The electronic device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the electronic device 1 may also include input and output devices, network access devices, etc.
[0118] It should be noted that the electronic device 1 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0119] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium can be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 12 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the working condition test program, etc., but also can be used to temporarily store data that has been output or is to be output.
[0120] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 1, and uses various interfaces and lines to connect the various components of the entire electronic device 1, and executes or executes programs or modules stored in the memory 12 (for example, executing a working condition test program, etc.), and calls the data stored in the memory 12 to execute various functions of the electronic device 1 and process data.
[0121] The processor 13 executes the operating system of the electronic device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned various working condition test method embodiments, for example Figure 2 Steps shown.
[0122] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition unit 110, a prediction unit 111, a detection unit 112, a calculation unit 113, and a screening unit 114.
[0123] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of the working condition test method described in each embodiment of the present application.
[0124] If the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware devices to complete through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0125] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory and other memory, etc.
[0126] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0127] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. Fig.10 Only one arrow is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.
[0128] An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable storage medium is stored computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the operating condition testing method described in any of the above embodiments.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0130] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0132] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A working condition testing method, applied to electronic equipment, characterized in that: The method comprises: Acquire multiple candidate images of a target object obtained by photographing the target object with a camera device under multiple sets of environmental parameters, wherein each set of environmental parameters corresponds to one candidate image, and the target object corresponds to a preset standard contrast; determining a first contrast of each of the candidate images; Determining the clarity of each of the candidate images according to the first contrast and the standard contrast; Determine the candidate image with the highest definition as the target image; The environmental parameter corresponding to the target image is determined as a target environmental parameter.
2. The working condition testing method according to claim 1, characterized in that: The method for determining the first contrast of each candidate image comprises: Determine a plurality of sampling areas in the candidate image, and calculate a second contrast of each of the sampling areas; Obtaining a contrast average of the plurality of sampling areas according to the second contrast of each of the sampling areas; The contrast mean is determined as a first contrast of the candidate image.
3. The working condition testing method according to claim 2, characterized in that: The method further comprises: When the second contrast of any one of the sampling areas is less than a preset contrast threshold, the second contrast of the corresponding sampling area is deleted.
4. The working condition testing method according to claim 1, characterized in that: The method for determining the first contrast of each candidate image comprises: Determine the brightness value of each pixel in the candidate image; The first contrast of the candidate image is determined according to the highest brightness value and the lowest brightness value.
5. The working condition testing method according to claim 1, characterized in that: The method further comprises: After obtaining the target environment parameters, dividing the target image into a central area and an edge area; Calculating a first definition of the central area, and calculating a second definition of the edge area; Calculating a first difference between the first definition and a pre-stored standard definition, and calculating a second difference between the second definition and the pre-stored standard definition; When the first difference is greater than a preset first threshold and the second difference is greater than a preset second threshold, warning information of the target environmental parameter is output, wherein the preset first threshold is less than the preset second threshold.
6. A working condition testing system, characterized in that: The system comprises: Electronic equipment; A working condition test device and a camera device that are communicatively connected to the electronic device, wherein the working condition test device includes a box, and a temperature control carrier and a target object disposed inside the box, and the temperature control carrier is used to carry the camera device and adjust the environmental parameters inside the box; The electronic device sends a pre-stored shooting instruction to the camera device to control the camera device to shoot the target object at the preset position; The electronic device also executes the working condition testing method as described in any one of claims 1 to 5 to determine the target environment parameters corresponding to when the camera device photographs the target object.
7. The operating condition testing system according to claim 6, characterized in that: The system further comprises a servo motor and a guide assembly, wherein the servo motor is electrically connected to the temperature control carrier and is used to control the temperature control carrier to move to a preset position along the guide assembly; The system further comprises a lighting device, which is arranged inside the box and is used for illuminating the target object.
8. A working condition testing device, characterized in that: The device comprises: An acquisition unit, configured to acquire candidate images captured by a camera device under different environmental parameters, wherein each of the candidate images includes a target object, and the target object corresponds to a preset standard contrast; a determining unit, configured to respectively determine a first contrast of each of the candidate images; The determining unit is further configured to determine the clarity of each of the candidate images according to the first contrast and the standard contrast; The determining unit is further configured to determine the candidate image with the highest definition as the target image; The determining unit is further configured to determine that the environmental parameter corresponding to the target image is a target environmental parameter.
9. An electronic device, characterized in that: The electronic device comprises: a memory storing computer-readable instructions; and A processor executes computer-readable instructions stored in the memory to implement the operating condition testing method as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the operating condition testing method according to any one of claims 1 to 5 is implemented.