Test method, electronic device, test system, and computer storage medium

By analyzing the texture sharpness of test charts in multiple frames of images, and using standard deviation and coefficient of variation to evaluate the focusing stability of the shooting device, the problem of unstable focusing in group photos was solved, and the autofocus stability and sharpness of the shooting device were improved.

CN120751111BActive Publication Date: 2026-05-19HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-06-24
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In group photos, the focus stability of the shooting equipment is difficult to guarantee, resulting in unstable images and affecting the shooting effect.

Method used

By acquiring the texture clarity of the test image card corresponding to the test object in multiple frames of images, calculating test indicators such as standard deviation and coefficient of variation, determining the focusing stability of the shooting device, and using the test device to analyze the focusing stability information of the shooting device.

Benefits of technology

The accuracy of focus stability testing and the improvement of the device's autofocus function have been enhanced to ensure stable image clarity in group photos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751111B_ABST
    Figure CN120751111B_ABST
Patent Text Reader

Abstract

A test method, an electronic device, a test system and a computer storage medium are provided. The test method comprises: obtaining multiple images according to shooting data shot by a shooting device, each image of the multiple images comprising a first test object and a test chart corresponding to the first test object, the test chart and the first test object being located on the same plane; determining the texture definition of the test chart corresponding to the first test object in each image; and determining the focus stability information of the shooting device according to the texture definition of the test chart corresponding to the first test object in the multiple images. The focus stability of the shooting device can be tested.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image quality assessment technology, and in particular to a testing method, electronic device, testing system, and computer storage medium. Background Technology

[0002] The demand for group photos is growing stronger, especially with the development of mobile imaging technology, making group photos increasingly convenient, particularly for family gatherings, meetings, and travel where the quality of group photos is crucial. Group photos involve algorithms for detecting multiple faces, autofocus, and sharpness, ensuring good overall results even in scenarios with many faces. However, due to factors such as lens aperture and depth of field, facial texture characteristics, the accuracy and stability of face detection algorithms, focusing algorithms and strategies, as well as ambient lighting, light ratio, and subject movement, focusing instability can still occur during group photos or videos. To ensure stable focusing, it's necessary to test the focusing stability of the shooting equipment. Based on the test results, the autofocus function can be improved, thereby enhancing the stability of the autofocus. Summary of the Invention

[0003] The purpose of this application is to provide a testing method, electronic device, testing system, and computer storage medium that can test the focusing stability of a shooting device.

[0004] The aforementioned and other objectives will be achieved through the features described in the independent claims. Further implementations are illustrated in the dependent claims, the specification, and the drawings.

[0005] Firstly, a testing method is provided for use in electronic devices, including:

[0006] Based on the shooting data captured by the shooting device, multiple frames of images are acquired. Each frame of the multiple frames includes a first test object and a test chart corresponding to the first test object. The test chart and the first test object are located on the same plane.

[0007] Determine the texture sharpness of the test chart corresponding to the first test object in each frame image;

[0008] Based on the texture clarity of the test chart corresponding to the first test object in multiple frames of images, the focus stability information of the shooting device is determined.

[0009] The method described in the first aspect involves acquiring multiple frames of images. The focus stability information of the shooting device is tested by measuring the texture sharpness of the test chart corresponding to the same first test object in each of the multiple frames. For example, the focus stability information of the shooting device can be determined by measuring the stability of the texture sharpness of the test chart corresponding to the same first test object in the multiple frames. This provides a way to test the focus stability of the shooting device and facilitates the improvement of the autofocus function of the shooting device based on the test results.

[0010] In conjunction with the first aspect, in one possible implementation, the focus stability information of the shooting device is determined based on the texture sharpness of the test chart corresponding to the first test object in multiple frames of images, including:

[0011] Based on the texture sharpness of the test chart corresponding to the first test object in multiple frames of images, a test index is calculated. The test index is used to represent the stability of the texture sharpness of the test chart corresponding to the first test object in multiple frames of images.

[0012] Based on the test indicators, determine the focus stability information of the shooting equipment.

[0013] By implementing this method, the stability of texture clarity of the test chart corresponding to the same test object in multiple frames of images can be quantitatively reflected through test indicators, thereby improving the accuracy of focus stability testing.

[0014] In conjunction with the first aspect, in one possible implementation, the test metrics include standard deviation and / or coefficient of variation;

[0015] Based on the test metrics, determine the focus stability information of the shooting equipment, including:

[0016] If the standard deviation is less than or equal to the first preset threshold, the focusing of the shooting device is determined to be stable; and / or,

[0017] If the dispersion coefficient is less than or equal to the second preset threshold, the focusing of the shooting device is determined to be stable.

[0018] By implementing this method, the stability of texture sharpness of the test chart corresponding to the same test object in multiple frames of images can be determined by the standard deviation and / or coefficient of variation, thereby improving the accuracy of focus stability testing.

[0019] In conjunction with the first aspect, in one possible implementation, the first test object includes one or more test objects, and the test chart corresponding to the first test object includes one or more test charts corresponding to each of the test objects.

[0020] One or more test objects are test objects located on the same plane among N test objects;

[0021] The N test objects are the test objects contained in each frame of the image, and the N test objects are distributed across multiple planes.

[0022] By implementing this method, focus stability can be determined based on the texture sharpness of test charts corresponding to one or more test objects that are on the same plane among N test objects, thereby improving the accuracy of the test.

[0023] In conjunction with the first aspect, in one possible implementation, the method further includes:

[0024] Determine the texture sharpness corresponding to each of the multiple planes. The texture sharpness is the texture sharpness of the test image card of the test object located on the corresponding plane.

[0025] The first plane among multiple planes is used as the focus position of the shooting device. The texture sharpness corresponding to the first plane is greater than the texture sharpness corresponding to any other plane among the multiple planes except the first plane.

[0026] By implementing this method, the plane with the highest texture clarity among multiple planes of the test object's test chart is used as the focus position of the shooting device, thereby accurately determining the focus position of the shooting device.

[0027] In conjunction with the first aspect, in one possible implementation, the captured data includes video captured by the capturing device, or multiple frames of images captured continuously by the capturing device.

[0028] This method involves analyzing videos or multiple images captured by the camera to adapt to various scenarios for testing focus stability.

[0029] In conjunction with the first aspect, in one possible implementation, the captured data includes captured video, and acquiring multiple frames of images based on the captured data from the capturing device includes:

[0030] Extract multiple frames from the captured video according to the set frame interval.

[0031] This method allows for the extraction and analysis of multiple frames from captured videos, thereby reducing the number of images to be analyzed.

[0032] Secondly, embodiments of this application provide a testing system, including a shooting device and a testing device;

[0033] The shooting equipment is used to capture shooting data and send the shooting data to the testing equipment;

[0034] The testing equipment is used to acquire multiple frames of images based on the captured data. Each frame of the multiple frames includes a first test object and a test chart corresponding to the first test object. The test chart and the first test object are located on the same plane.

[0035] The testing equipment is also used to determine the texture sharpness of the test chart corresponding to the first test object in each frame of the image;

[0036] The testing equipment is also used to determine the focus stability information of the shooting device based on the texture clarity of the test chart corresponding to the first test object in multiple frames of images.

[0037] Thirdly, embodiments of this application provide an electronic device, the electronic device comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method in the first aspect or any possible implementation of the first aspect.

[0038] Fourthly, a chip system is provided, the chip system being applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the methods of the first aspect or any possible implementation thereof.

[0039] Fifthly, a computer-readable storage medium is provided, including instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in the first aspect or any possible implementation thereof.

[0040] The beneficial effects of the technical solutions provided in the second to fifth aspects of this application can be referred to the beneficial effects of the technical solutions provided in the first aspect, and will not be repeated here. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of a withered leaf image card provided in an embodiment of this application;

[0042] Figure 2 A schematic diagram of a shooting scene provided for an embodiment of this application;

[0043] Figure 3 A schematic diagram illustrating the setting of a withered leaf image card for a human portrait mold, provided in an embodiment of this application;

[0044] Figure 4a A schematic diagram of a testing system provided in an embodiment of this application;

[0045] Figure 4b A schematic diagram of another testing system provided in an embodiment of this application;

[0046] Figure 5a A schematic diagram showing the test objects and test charts distributed on three planes according to embodiments of this application;

[0047] Figure 5b A schematic diagram showing the test objects and test charts provided in the embodiments of this application distributed across five planes;

[0048] Figure 6 A flowchart of a testing method provided in an embodiment of this application;

[0049] Figure 7 This is a schematic diagram of the relationship between frame order and texture sharpness provided in an embodiment of this application;

[0050] Figure 8 This is another schematic diagram of the relationship between frame order and texture sharpness provided in the embodiments of this application;

[0051] Figure 9 This is another schematic diagram of the relationship between frame order and texture sharpness provided in the embodiments of this application;

[0052] Figure 10 A flowchart of another testing method provided in the embodiments of this application;

[0053] Figure 11 A flowchart of yet another test method provided in the embodiments of this application;

[0054] Figure 12 The structure of the electronic device provided in the embodiments of this application;

[0055] Figure 13 A software structure block diagram of an electronic device provided in an embodiment of this application;

[0056] Figure 14 This is a schematic diagram of the structure of another electronic device provided in an embodiment of this application. Detailed Implementation

[0057] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0058] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below.

[0059] 1. Withered Leaf Picture Card

[0060] like Figure 1The image shown is a schematic diagram of a dead leaf image chart. The dead leaf image chart includes dead leaf mark points and areas for calculating texture sharpness. The dead leaf mark points are used to determine the position of the dead leaf image chart. The dead leaf image chart is mainly used to detect the image sharpness (texture details in the image) corresponding to the image of the dead leaf image chart acquired by the shooting device, and then obtain parameters for evaluating the imaging quality of the camera of the shooting device.

[0061] 2. Plane

[0062] A plane can be understood as a focal plane. The distance between the subject being photographed and the lens of the shooting device is the same when the subject is located on the same focal plane.

[0063] Figure 2 This is a schematic diagram of a shooting scene provided in an embodiment of this application. Please refer to... Figure 2 The user uses a camera device 15 (e.g., a mobile phone) to record videos of multiple people, wanting to obtain videos of those multiple people. Figure 2 As shown, the multiple figures form a V-shape, meaning the faces of the multiple figures form a V-shape. Figure 10 is, for example, plane 1. In this embodiment, a plane can be understood as a focal plane. Figures 11 and 12 are plane 2, and figures 13 and 14 are plane 3.

[0064] If the focus position of the shooting device 15 is on plane 1, that is, the focus position is the face of person 10, then the sharpness value of person 10's face is the highest. The sharpness of faces on plane 2 is the second highest, and the sharpness of faces on plane 2 includes the faces of people 11 and 12. The sharpness of faces on plane 3 is the lowest, and the sharpness of faces on plane 3 includes the faces of people 13 and 14. If the focus position of the shooting device 15 is on plane 2, that is, the focus position is the face of person 11 and 12, then the sharpness of faces of person 11 and 12 is the highest, and the sharpness of faces on plane 1 and plane 3 is the second highest. If the focus position of the shooting device 15 is on plane 3, that is, the focus position is the face of person 13 and 14, then the sharpness of faces on plane 2 is the second highest, and the sharpness of faces on plane 1 is the lowest.

[0065] During video recording by the recording device 15, the focus position may switch repeatedly. For example, the focus position may initially be on plane 2, then switch to plane 1, and finally switch back to plane 3. Repeated switching of the focus position will also affect the overall sharpness of the image.

[0066] To ensure that the shooting equipment can capture clear and high-quality images with stable focus in multi-plane, multi-person scenes, it is necessary to test the stability of the shooting equipment's autofocus and obtain the test results. Based on the test results, the autofocus function of the shooting equipment can then be improved.

[0067] Based on this, this application proposes a testing system. The testing system includes multiple test objects, a camera, and testing equipment. The test objects can be simulated objects such as human figures, animal figures, or plant figures, or real entities such as people, animals, or plants, or image cards including images of people, animals, and plants. The multiple test objects can be distributed on multiple planes, for example, such as... Figure 2 As shown, multiple test objects can be located on three planes.

[0068] The shooting device can be an electronic device that supports shooting functions, such as a mobile phone, camera, tablet, drone, or smartwatch, used to shoot multiple test objects in a set shooting mode. The shooting mode can be a video recording mode or a continuous shooting mode.

[0069] The imaging device can photograph the test object and then send the captured data to the testing device. The testing device then tests the focusing stability of the imaging device based on the captured data and obtains the corresponding test results. The testing device can be an electronic device such as a computer or server. The imaging device and the testing device are connected. This application does not limit the specific connection method; for example, Bluetooth, Wireless Local Area Network (WLAN), fiber optic cable, or Ethernet cable can be used for connection.

[0070] During the shooting process, the shooting device can automatically identify and focus on the test object on a plane. However, when the focus position of the shooting device shifts, for example, switching from focusing on one plane to focusing on another, the image sharpness of the test object in the captured image will fluctuate. To reflect changes in image sharpness, in this embodiment, a test chart is set for each test object, and the test chart for each test object is located on the same plane as the test object. The test chart is used to objectively evaluate image quality and can accurately reflect the image sharpness of test objects located on the same plane. Test charts can be, for example, grayscale charts, withered leaf charts, high-definition electronic universal test charts, resolution comprehensive test charts, Sineimage comprehensive test charts, color reproduction test charts, etc. Figure 3As shown, taking a human portrait mold as the test object and a withered leaf pattern card as the test image card as an example, a withered leaf pattern card is set for the human portrait mold. The withered leaf pattern card and the human portrait mold are located on the same plane. The image clarity of the human portrait mold is reflected by calculating the texture clarity of the withered leaf pattern card.

[0071] The testing equipment can acquire the image sharpness of the test chart, and then determine the stability of the autofocus of the shooting equipment based on the fluctuation of the image sharpness of the test chart.

[0072] The following is combined Figure 4a and Figure 4b The test system of the application embodiment is described by way of example. Figure 4a and Figure 4b The arrangement of the test objects may vary, which is understandable. This application does not limit the arrangement of the test objects in its embodiments. Figure 4a and Figure 4b The arrangement is for illustrative purposes only. The details are explained below:

[0073] like Figure 4a As shown, the testing system includes multiple human figure molds (i.e., multiple test subjects). Each human figure mold is associated with a test chart. The multiple human figure molds are arranged in a V-shape and distributed across three planes. A detailed schematic diagram of each human figure mold and the test chart associated with it can be seen as follows: Figure 5a As shown.

[0074] The testing system also includes a camera device 20 and a testing device 21. The camera device 20 is used to capture images of the area where multiple human figures are located, obtaining shooting data. For example, it can record video to obtain the recorded video. Or, for example, it can continuously shoot to obtain multiple captured images.

[0075] Optionally, to improve the accuracy of test results, a background board can be placed behind the test object to avoid the influence of the background environment. This application does not limit the material, pattern, color, etc. of the background board; for example, a pure white wooden background board can be used.

[0076] Optionally, to test the stability of the autofocus of the shooting device 20 under different lighting conditions, the test system also includes at least one light source device. Figure 4a Taking the Sino-Israeli testing system as an example, it includes two light source devices, namely light source device 22 and light source device 23. Light source device 22 and light source device 23 can be used to provide different lighting conditions for the shooting device 20, thereby simulating various lighting environments in real-world scenes.

[0077] Optionally, the testing system may also include a highlight light box 24, which can be located in the background of multiple human figure models. This highlight light box is used to adjust the highlights in high dynamic range scenes.

[0078] The shooting device 20 sends the captured shooting data to the testing device 21. The shooting data includes video or multiple pictures. After receiving the shooting data sent by the shooting device 20, the testing device 21 obtains the image clarity of each test chart from the shooting data, and tests the focusing stability of the shooting device 20 based on the clarity to obtain the test results.

[0079] like Figure 4b As shown, the testing system includes multiple human figure molds (i.e., multiple test subjects). Each human figure mold is associated with a test chart. These multiple human figure molds are arranged in a gradient, located on different planes, with each mold distributed across one plane. A detailed diagram of each human figure mold and its corresponding test chart can be seen as follows: Figure 5b As shown.

[0080] The testing system also includes a shooting device 30 and a testing device 31. Further optionally, the testing system also includes a light source device 32 and a light source device 33, which are used to provide different lighting conditions. Optionally, the testing system may also include a high-brightness light box 34 and a backdrop; detailed descriptions of each device can be found in [reference needed]. Figure 4a The description.

[0081] based on Figure 4a and Figure 4b The test system shown below illustrates the test process with an example. Turn on the shooting device, which can be a mobile phone. Taking a mobile phone as an example, adjust the viewfinder of the mobile phone so that the mobile phone can capture all the portrait models, that is, make all the portrait models within the viewfinder of the mobile phone.

[0082] Adjust the lighting parameters of the light source equipment to provide different lighting conditions. Under different lighting conditions, the shooting equipment captures different shooting data, which can be video or multiple consecutively captured images. The following example uses video shooting. Examples of lighting conditions include: a D65 light source (a simulated sunlight light source with a color temperature of 6500K) with an illuminance of 1000 lux (lux is a unit of illuminance used to evaluate light intensity); a TL84 light source (a narrow-band fluorescent light source with a color temperature of 4000K) with an illuminance of 100 lux; and an A light source (a simulated sunlight light source with a color temperature of 2850K) with an illuminance of 20 lux. The highlight light box can be left off or set to an illuminance of approximately 2.3 × 10⁴ lux to create a high dynamic range scene.

[0083] Switch your phone to video recording mode and record video under the lighting conditions provided by the light source. Under the same lighting conditions, you can record a video of a certain duration, such as 10 seconds. For example, you can record a first video of the same duration under the lighting conditions provided by a D65 light source, a second video of the same duration under the lighting conditions provided by a TL84 light source, and a third video of the same duration under the lighting conditions provided by a light source A. Understandably, the duration of the recorded video can also differ depending on the lighting conditions.

[0084] The mobile phone sends the captured videos to the testing device. For example, the mobile phone sends three captured videos to the testing device. For each video, the testing device performs image frame extraction processing to obtain multiple frames. Then, it obtains the image sharpness of each test chart in each frame and tests the focusing stability of the shooting device based on the image sharpness. The test result is the result of the focusing stability of the shooting device under the corresponding lighting conditions for that video. For example, analyzing the first video yields the result of the focusing stability test of the shooting device under the lighting conditions provided by the D65 light source. Analyzing the second video yields the result of the focusing stability test of the shooting device under the lighting conditions provided by the TL84 light source. Analyzing the third video yields the result of the focusing stability test of the shooting device under the lighting conditions provided by the A light source.

[0085] Please refer to Figure 6 The flowchart shown is a test method provided in an embodiment of this application. The flowchart includes, but is not limited to, the following steps, and may also include some of the following steps:

[0086] 501. The shooting device captures images of multiple test objects and the shooting area where the corresponding test charts for each test object are located, thereby obtaining the captured video.

[0087] The test objects can be simulated objects such as human figures, animal figures, and plant figures, or real entities such as people, animals, and plants. They can also be image cards containing images of people, animals, and plants. In some implementations, multiple test objects can be distributed across multiple planes. For example... Figure 5a As shown, the 5 test objects are distributed on 3 planes, as follows: Figure 5b As shown, the 5 test objects are distributed across 5 planes. The distance between the two planes that are furthest apart is D, as shown below. Figure 5a and Figure 5bThe distance D shown is the distance indicated by the image. This distance D is less than the depth of field, which is determined based on at least one of the following: lens aperture, lens focal length, shooting distance, and the diameter of the circle of confusion. A distance D less than the depth of field ensures that multiple faces are captured in relatively sharp images.

[0088] Each test object corresponds to a test chart, which is used to calculate the image sharpness of the corresponding test object. In some implementations, the test object and its corresponding test chart can be located on the same plane. This application does not limit the relative position of the test object and the test chart within the same plane; for example, it can be as follows: Figure 5a He Ru Figure 5b The test chart shown is located below the face area of ​​the test subject.

[0089] The recording device can capture video of multiple test subjects and the corresponding test charts located in the recording area, in video recording mode. In other words, the multiple test subjects and their corresponding test charts are the subjects of the recording.

[0090] In some implementations, the camera can also capture videos under different light source conditions, with one video recording corresponding to each light source condition. For example, the camera can capture videos corresponding to light source condition 1, light source condition 2, and light source condition 3.

[0091] In some implementations, the video being captured can be a video of the first recorded duration. The duration of the video captured under different lighting conditions can be the same or different, and this application does not impose any restrictions.

[0092] 502, The recording device sends the recorded video. Correspondingly, the test device receives the recorded video.

[0093] The shooting device can transmit the captured video to the test device via Bluetooth, short-range wireless, or network.

[0094] In some implementations, the capturing device can send the captured video corresponding to at least one light source condition to the testing device. The processing method of the captured video corresponding to each light source condition by the testing device can be referred to the description in steps 503 to 505.

[0095] 503, The test equipment performs image frame extraction processing on the captured video to obtain multiple frames of images.

[0096] After receiving the video footage from the camera, the test device can use frame extraction software (e.g., PotPlayer, FFmpeg) to extract images from the video at set frame intervals, such as extracting one frame every seven frames. After performing frame extraction on the video footage, the test device can obtain multiple frames.

[0097] 504, The test equipment acquires the texture clarity of a test chart of at least one plane in each of multiple frames of images.

[0098] The testing equipment identifies each frame of the extracted multi-frame images to determine the position of at least one plane of the test chart in each frame. For example, if the test chart is a withered leaf chart, its position can be identified by the Mark points on the withered leaf chart.

[0099] For example, the positions of the test charts for all planes in each frame of an image can be obtained, meaning at least one plane includes all planes in each frame of the image. Alternatively, the positions of the test charts for a portion of the planes in each frame of the image can also be obtained, meaning at least one plane includes a portion of the planes in each frame of the image. For instance, if each frame of the image includes test charts for three planes, namely plane 1, plane 2, and plane 3, then the position of the test chart for one of the planes can be obtained, for example, the position of the test chart for plane 1 in each frame of the image.

[0100] After determining the position of the test chart in at least one plane of each frame image, an image of the test chart is cropped, and the texture sharpness of the test chart is calculated. The texture sharpness of the test chart corresponding to at least one plane can be calculated for each frame image. The texture sharpness of the test chart corresponding to all planes of each frame image can be calculated, or the texture sharpness of the test chart corresponding to a portion of the planes of each frame image can be calculated. For example, the texture sharpness of the test chart corresponding to plane 1 of each frame image can be calculated.

[0101] The following example uses the calculation of texture sharpness on a test chart for all planes of each frame of an image. Figure 5aFor example, each frame includes test objects in three planes and test charts. Images of the test charts in plane 1, plane 2, and plane 3 are extracted from each frame. The testing device calculates the texture sharpness t1 of the test chart in plane 1 based on the image of the test chart in plane 1. The testing device calculates the texture sharpness t2 of the test chart in plane 2 based on the image of the test chart in plane 2. For example, the texture sharpness t2 can be the texture sharpness of the test chart corresponding to one test object in plane 2, or it can be the average of the texture sharpness of the test charts corresponding to two test objects in plane 2. The testing device calculates the texture sharpness t3 of the test chart in plane 3 based on the image of the test chart in plane 3. Similarly, the texture sharpness t3 can be the texture sharpness of the test chart corresponding to one test object in plane 3, or it can be the average of the texture sharpness of the test charts corresponding to two test objects in plane 3.

[0102] 505. The testing equipment determines the focus stability information of the shooting equipment based on the texture clarity of the test chart on the same plane in multiple frames of images.

[0103] In this embodiment, the focusing stability information of the shooting device can be determined by the stability of the texture sharpness of the test pattern of the same plane in multiple frames of images. The higher the stability of the texture sharpness of the test pattern of the same plane in multiple frames of images, the higher the focusing stability of the shooting device. That is, it is necessary to determine whether the texture sharpness of the test pattern of each plane in at least one plane is stable in multiple frames of images. For example, if the at least one plane includes two planes, namely plane 1 and plane 2, then it is necessary to determine whether the texture sharpness of the test pattern of plane 1 in multiple frames of images is stable, and also to determine whether the texture sharpness of the test pattern of plane 2 in multiple frames of images is stable. It can be understood that if the at least one plane includes only one plane, then it is necessary to determine whether the texture sharpness of the test pattern of that one plane in multiple frames of images is stable. If the texture sharpness of the test pattern of at least one plane in multiple frames of images is stable, then it is determined that the focusing of the shooting device is stable. If the texture sharpness of the test pattern of one plane in multiple frames of images is unstable, then it is determined that the focusing of the shooting device is unstable.

[0104] In some implementations, if the multi-frame images are extracted from a video shot under a specific light source condition, the determined focus stability information can be understood as the focus stability information of the shooting device under that light source condition. By analyzing images from different videos shot under different light source conditions, the focus stability information of the shooting device under different light source conditions can be determined.

[0105] For example, the focus position of the shooting device can also be determined based on the texture sharpness of the test charts for each plane. That is, the focus position of the shooting device is the plane corresponding to the highest texture sharpness.

[0106] In some implementations, the stability of texture sharpness on a test chart of the same plane across multiple frames can be indicated by a curve. For example, the imaging device is... Figure 5a The test objects and test charts shown were photographed. Figure 7 The figures shown are schematic diagrams illustrating the texture sharpness versus frame order for planes 1, 2, and 3, respectively. Figure 7 As shown, the texture sharpness of the test chart for plane 1 in each frame of the multi-frame image is approximately 0.91, the texture sharpness of the test chart for plane 2 in each frame of the multi-frame image is approximately 0.75, and the texture sharpness of the test chart for plane 3 in each frame of the multi-frame image is approximately 0.52. Since the texture sharpness of the test chart for plane 1 is the highest, the focus position of the shooting device is on plane 1.

[0107] In some implementations, the stability of texture sharpness of test patterns on the same plane in multiple frames of images can be indicated by a test metric. That is, the test metric indicates whether the texture sharpness of test patterns on the same plane is stable. The test metric may include, for example, the standard deviation and / or the coefficient of variation, where the coefficient of variation = standard deviation / mean. The standard deviation and mean are determined based on the texture sharpness of test patterns on the same plane in multiple frames of images. For example, the standard deviation and mean of plane 1 can be determined based on the texture sharpness of the test pattern on plane 1 in each frame of multiple images. If the test metric is less than a preset threshold, the focusing of the shooting device is determined to be stable. For example, the test metric includes the standard deviation and / or the coefficient of variation. If the standard deviation of a plane is less than or equal to a first preset threshold, and / or the coefficient of variation of a plane is less than or equal to a second preset threshold, the focusing of the shooting device is determined to be stable. In some implementations, if the standard deviation of all planes in multiple frames of images is less than the first preset threshold, and / or the coefficient of variation of all planes in multiple frames of images is less than or equal to the second preset threshold, the focusing of the shooting device is determined to be stable.

[0108] Continue with Figure 7Taking the illustration of texture sharpness and frame order of each plane as an example, the calculated standard deviation of plane 1 is std1 = 0.004511, and the coefficient of variation k1 = standard deviation / mean = 0.0049; the standard deviation of plane 2 is std2 = 0.004099, and the coefficient of variation k2 = standard deviation / mean = 0.0054; the standard deviation of plane 3 is std3 = 0.005277, and the coefficient of variation k3 = standard deviation / mean = 0.0050. For example, the first preset threshold is 0.05, and the second preset threshold is 0.05. It can be understood that the first and second preset thresholds being the same here is merely an example. The standard deviations of plane 1, plane 2, and plane 3 are all less than 0.05, and the coefficients of variation k1, k2, and k3 are all less than 0.05, indicating that the shooting device's focus is stable and there is no switching of the focus position between different planes. In some implementations, the stability of the shooting device's focus can also be determined solely based on the standard deviation or the coefficient of variation.

[0109] if Figure 7 The texture sharpness of each plane shown is obtained under a certain light source condition (e.g., a D65 light source with 1000 lux), which can determine that the shooting device is stable in focus under that light source condition.

[0110] In some implementations, if the shooting device is... Figure 5a The graphs showing the texture sharpness versus frame order during the shooting of the test object and test chart are illustrated below. Figure 8 As shown, the texture sharpness of the test chart for plane 1 in each of the multi-frame images is around 0.80, the texture sharpness of the test chart for plane 2 in each of the multi-frame images is around 0.89, and the texture sharpness of the test chart for plane 3 in each of the multi-frame images is around 0.75.

[0111] Since the test chart in plane 2 has the highest texture clarity, the focus position of the shooting device is in plane 2.

[0112] In this implementation, the texture sharpness of the test charts for planes 1, 2, and 3 are all within the range of 0.7-1, indicating that planes 1, 2, and 3 are in relatively clear focus. The calculated standard deviations are std1 = 0.005416 for plane 1, std2 = 0.005596 for plane 2, and std3 = 0.004778 for plane 3. These standard deviations are all less than a first preset threshold, for example, 0.05. Furthermore, the coefficients of variation (k1 = 0.006826 for plane 1, k2 = 0.006364 for plane 2, and k3 = 0.006373 for plane 3) are all less than a second preset threshold of 0.05. This indicates that the autofocus stability of the three planes is good, with no focus switching, meaning the shooting device has stable focus.

[0113] In some implementations, if the texture sharpness of the test chart corresponding to a plane of the test object is unstable across multiple frames of images, the focusing of the shooting device is determined to be unstable. For example, stability can be determined by the standard deviation and / or the coefficient of variation. For instance, if the shooting device is... Figure 5a The curves showing the texture sharpness versus frame order of plane 1 obtained when the test object and test chart were photographed are illustrated below. Figure 9 As shown, the standard deviation of plane 1, std4, is 0.16, and the coefficient of variation, k, is equal to the standard deviation / mean texture sharpness, which is 0.78. The standard deviation, std4, is greater than 0.05, and the coefficient of variation, k, is greater than 0.05. This indicates that the autofocus stability of the video recording system is poor, and a focus hunting phenomenon has occurred.

[0114] Please refer to Figure 10 The flowchart shown is another testing method provided in an embodiment of this application. The flowchart includes, but is not limited to, the following steps, and may also include some of the following steps:

[0115] 601. The imaging device continuously captures multiple images of multiple test objects and the corresponding test charts of each test object within the imaging area.

[0116] The shooting device can capture video by continuously shooting multiple test objects and the shooting area of ​​the corresponding test charts for each test object. In other words, the multiple test objects and the corresponding test charts for each test object are the subjects of the shooting.

[0117] These multiple images can be multiple images taken within the first time period.

[0118] For a detailed description of 601, please refer to [link / reference needed]. Figure 6 The description of 501 in the illustrated embodiment will not be repeated here.

[0119] 602, The capturing device sends out multiple images captured in succession. Correspondingly, the test device receives multiple images.

[0120] The shooting device can send multiple captured images to the test device via Bluetooth, short-range wireless, or network.

[0121] 603, The test device acquires the texture clarity of a test chart of at least one plane of each of multiple images.

[0122] The testing equipment identifies each of the extracted images to determine the position of at least one plane of the test chart in each image. For example, if the test chart is a withered leaf image, its position can be identified by the mark points on the withered leaf image.

[0123] After determining the position of the test chart in at least one plane of each image, the image of the test chart is cropped, and the texture sharpness of the test chart is calculated. The texture sharpness of the test chart corresponding to at least one plane of each image can be calculated. For specific calculation methods, please refer to [reference needed]. Figure 6 Step 504 in the embodiment describes calculating the texture sharpness of the test chart for each plane of each frame of the image.

[0124] 604. The testing equipment determines the focusing stability information of the shooting equipment based on the texture clarity of the test chart on the same plane in multiple images.

[0125] The method for determining the focusing stability information of the shooting device based on the texture sharpness of the test chart on the same plane in multiple images can be referred to [reference needed]. Figure 6 Description of step 505 in the embodiment.

[0126] Please refer to Figure 11 The flowchart shown is a further test method provided in an embodiment of this application. The flowchart includes, but is not limited to, the following steps, and may also include some of the following steps:

[0127] 701, The test device acquires multiple frames of images based on the shooting data captured by the shooting device.

[0128] The captured data may include the captured video, as detailed below. Figure 6 The video recording described in the embodiments may also refer to multiple captured images (or multiple frames for ease of description), as detailed in the examples. Figure 10 The embodiments describe multiple images. If the captured data is video, the test device can extract multiple frames of images from the video at set frame intervals.

[0129] Each frame of the multi-frame image includes a first test object and a test chart corresponding to the first test object, with the test chart and the first test object located on the same plane.

[0130] In some implementations, the first test object may include one or more test objects, and correspondingly, the test charts corresponding to the first test object include the test charts corresponding to each of the one or more test objects. The one or more test objects are test objects located on the same plane among N test objects captured by the imaging device. These N test objects may be distributed across multiple planes, for example... Figure 5a As shown, the 5 test objects are distributed across 3 planes. The N test objects are those captured by the imaging device, as detailed in the image. Figure 10 Multiple test objects in the dataset. In some implementations, if there are multiple test objects located on the same plane, one of them can be used as the first test object. For example, select one test object as the first test object, or use multiple test objects as the first test object to be calculated.

[0131] 702, The test equipment determines the texture sharpness of the test chart corresponding to the first test object in each frame of the image.

[0132] The testing equipment can calculate the texture sharpness of the test chart corresponding to the first test object in each frame of the image. If the first test object includes multiple test objects, the testing equipment can calculate the texture sharpness of the test chart corresponding to each of the multiple test objects in each frame of the image. Based on the texture sharpness of the test chart corresponding to each of the multiple test objects in each frame of the image, the testing equipment can determine the texture sharpness of the test chart corresponding to the first test object.

[0133] For example, the average texture sharpness of the test charts corresponding to multiple test objects can be used as the texture sharpness of the test chart corresponding to the first test object. Alternatively, the texture sharpness of the test chart corresponding to one test object can be used as the texture sharpness of the test chart corresponding to the first test object. Or, the texture sharpness of the test charts corresponding to multiple test objects can be used as the texture sharpness of the test chart corresponding to the first test object. This application does not impose any limitations.

[0134] If the first test object includes a test object, then the texture sharpness of the test chart corresponding to that test object is taken as the texture sharpness of the test chart corresponding to the first test object.

[0135] 703. The testing equipment determines the focus stability information of the shooting equipment based on the texture clarity of the test chart corresponding to the first test object in multiple frames of images.

[0136] For each frame of image, the texture sharpness of the test chart corresponding to the first test object can be calculated. The focus stability information of the shooting device can be determined based on the stability of the texture sharpness of the test chart corresponding to the first test object across multiple frames of images. For example, if the texture sharpness of the test chart corresponding to the first test object is relatively stable across multiple frames of images, it can be determined that the shooting device is focusing stably. For example, the stability of the texture sharpness of the test chart corresponding to the first test object can be determined by calculating test indicators. Test indicators may include, for example, standard deviation and / or coefficient of variation, as described in the foregoing embodiments, and will not be repeated here.

[0137] In some implementations, N test objects are distributed across multiple planes. If the texture sharpness of the test charts corresponding to the test objects on at least one of the planes is stable, then the focusing stability of the shooting device can be determined. For example, if the texture sharpness of the test charts corresponding to the test objects on all of the multiple planes is stable, then the focusing stability of the shooting device can be determined.

[0138] In some implementations, the texture sharpness corresponding to each of the multiple planes can be determined. The texture sharpness corresponding to any one of the multiple planes is the texture sharpness of the test chart corresponding to the test object located on that plane. The specific calculation method can refer to the calculation method of the texture sharpness of the test chart corresponding to the first test object in the above embodiment.

[0139] The plane with the highest texture clarity among multiple planes is determined as the focus position of the shooting device. For ease of description, the plane with the highest texture clarity is called the first plane, that is, the focus position of the shooting device is the first plane.

[0140] For example, if the shooting device is in focus, the focus position of the shooting device can be determined based on the texture sharpness corresponding to each plane in a single frame of an image, or it can be determined based on the texture sharpness corresponding to each plane in each frame of multiple images.

[0141] For example, if the focusing of the shooting device is unstable, the focus position of the shooting device can be determined based on the texture sharpness corresponding to each plane of multiple frames of images, and the focus position of the shooting device is constantly changing.

[0142] The electronic device provided in the embodiments of this application is described below.

[0143] The electronic device can be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), computer, etc. This application does not impose any restrictions on the specific type of the electronic device.

[0144] Figure 12 The structure of the electronic device is illustrated as an example. This electronic device can be implemented as the aforementioned terminal device.

[0145] like Figure 12 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0146] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0147] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0148] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0149] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0150] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0151] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0152] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0153] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0154] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.

[0155] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.

[0156] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0157] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0158] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0159] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0160] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0161] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. If electronic device 100 accesses the internet via mobile communication module 150, it can be understood as accessing the internet via a cellular network. If electronic device 100 accesses the internet via wireless local area networks (WLANs) in wireless communication module 160, it can be understood as accessing the internet via wireless fidelity (WiFi). Users can choose to access the internet via mobile communication module 150 or wireless communication module 160, and can switch between the two communication modules. For example, a user can disconnect WiFi and use cellular network communication, or vice versa.

[0162] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0163] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0164] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0165] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0166] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0167] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0168] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0169] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0170] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0171] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0172] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0173] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0174] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0175] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0176] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0177] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0178] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0179] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0180] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0181] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0182] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.

[0183] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.

[0184] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0185] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.

[0186] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.

[0187] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.

[0188] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.

[0189] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0190] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0191] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.

[0192] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0193] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.

[0194] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0195] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0196] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0197] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0198] In this embodiment of the application, the camera 193 can be controlled to capture video or capture multiple pictures continuously, and the captured video or multiple pictures can be sent to the test device.

[0199] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0200] Figure 13 This is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0201] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0202] The application layer can include a series of application packages.

[0203] like Figure 13 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0204] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0205] like Figure 13 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0206] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0207] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0208] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0209] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0210] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0211] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0212] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0213] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0214] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0215] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0216] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0217] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0218] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0219] A 2D graphics engine is a graphics engine for 2D drawing.

[0220] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0221] The following example, using a scene of capturing a photograph, illustrates the workflow of the software and hardware of the electronic device 100.

[0222] When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, etc.). The raw input event is stored in the kernel layer. The application framework layer retrieves the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking a touch click as an example, where the corresponding control is the camera application icon, the camera application calls the application framework layer's interface to launch the camera application, and then calls the kernel layer to launch the camera driver, capturing still images or videos through camera 193.

[0223] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. This electronic device can be implemented as the testing device in the above embodiments.

[0224] like Figure 14 As shown, the electronic device 200 of this embodiment includes: at least one processor 201 ( Figure 14The diagram shows only one processor, memory 202, and computer program 203 stored in the memory 202 and executable on the at least one processor 201, wherein the processor 201 executes the computer program 203 to implement the steps in any of the above-described test method embodiments.

[0225] The electronic device 200 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device.

[0226] The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 14 This is merely an example of electronic device 200 and does not constitute a limitation on electronic device 200. It may include more or fewer components than shown, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0227] The processor 201 may be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0228] In some embodiments, the memory 202 may be an internal storage unit of the electronic device 200, such as a hard disk or memory of the electronic device 200. In other embodiments, the memory 202 may be an external storage device of the electronic device 200, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 200. Furthermore, the memory 202 may include both internal and external storage units of the electronic device 200. The memory 202 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 202 can also be used to temporarily store data that has been output or will be output.

[0229] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0230] This application also provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0231] This application also provides an electronic device, which can be implemented as the aforementioned terminal device or testing device. The electronic device includes one or more processors and a memory; wherein the memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions. The one or more processors call the computer instructions to cause the electronic device to perform the method shown in the foregoing embodiments.

[0232] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0233] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0234] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A testing method, characterized in that, include: Based on the shooting data captured by the shooting device, multiple frames of images are acquired. Each frame of the multiple frames of images includes N test objects. The N test objects are distributed on multiple planes. N is an integer greater than or equal to 2. Each of the N test objects corresponds to a test chart. Determine the texture clarity of the test chart corresponding to the first test object in each frame image. The first test object includes one or more test objects located on the same plane among the N test objects. The test chart corresponding to the first test object includes the test charts corresponding to the one or more test objects respectively. The focus stability information of the shooting device is determined based on the texture clarity of the test chart corresponding to the first test object in the multi-frame images.

2. The method as described in claim 1, characterized in that, The step of determining the focus stability information of the shooting device based on the texture clarity of the test chart corresponding to the first test object in the multi-frame images includes: Based on the texture clarity of the test chart corresponding to the first test object in the multi-frame images, a test index is calculated. The test index is used to represent the stability of the texture clarity of the test chart corresponding to the first test object in the multi-frame images. Based on the test indicators, the focus stability information of the shooting device is determined.

3. The method as described in claim 2, characterized in that, The test metrics include standard deviation and / or coefficient of variation; Determining the focus stability information of the shooting device based on the test indicators includes: If the standard deviation is less than or equal to a first preset threshold, the focusing of the shooting device is determined to be stable; and / or, If the dispersion coefficient is less than or equal to the second preset threshold, the focusing of the shooting device is determined to be stable.

4. The method according to any one of claims 1-3, characterized in that, The captured data includes video captured by the capturing device, or multiple frames of images captured continuously by the capturing device.

5. The method as described in claim 4, characterized in that, The captured data includes the captured video, and the step of acquiring multiple frames of images based on the captured data from the shooting device includes: Multiple frames are extracted from the captured video at set frame intervals.

6. The method as described in claim 1, characterized in that, The method further includes: Determine the texture sharpness corresponding to each of the plurality of planes, wherein the texture sharpness is the texture sharpness of the test image card of the test object located on the corresponding plane; The first plane among the plurality of planes is used as the focus position of the shooting device, and the texture sharpness corresponding to the first plane is greater than the texture sharpness corresponding to any other plane among the plurality of planes except the first plane.

7. A testing system, characterized in that, Including filming equipment and testing equipment; The shooting device is used to capture shooting data and send the shooting data to the testing device; The testing device is used to acquire multiple frames of images based on the captured data. Each frame of the multiple frames includes N test objects, which are distributed on multiple planes. N is an integer greater than or equal to 2, and each of the N test objects corresponds to a test chart. The testing device is also used to determine the texture clarity of the test chart corresponding to the first test object in each frame image. The first test object includes one or more test objects located on the same plane among the N test objects, and the test chart corresponding to the first test object includes the test charts corresponding to the one or more test objects respectively. The testing device is also used to determine the focus stability information of the shooting device based on the texture clarity of the test chart corresponding to the first test object in the multi-frame images.

8. An electronic device, characterized in that, The electronic device includes: one or more processors, memory, and a display screen; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-6.

9. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-6.

10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-6.