Test method, electronic equipment, test system and computer storage medium
By obtaining the texture clarity of the test image card in multiple frames and calculating the test indicators, the problem of unstable focus of the shooting equipment in group photos was solved, the accuracy of the focus stability test and the improvement of the autofocus function were achieved, ensuring the stability of the clarity of the shooting equipment in group photos.
Patent Information
- Application Number
- CN202410823133.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-06-24
AI Technical Summary
When taking group photos, it is difficult to ensure the focus stability of the shooting equipment, resulting in unstable pictures and affecting the shooting effect.
By obtaining the texture clarity of the test chart corresponding to the test object in multiple frames of images, calculating test indicators such as standard deviation and dispersion coefficient, determining the focus stability of the shooting equipment, and using the test system and equipment to perform autofocus stability testing.
The accuracy of focus stability testing and the perfection of autofocus functions have been improved to ensure the clarity and stability of the shooting equipment in group photo scenes.
Smart Images

Figure CN120751111A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image quality evaluation, and in particular to a testing method, electronic equipment, a testing system, and a computer storage medium. Background Art
[0002] The demand for group photos is growing, especially with the advancement of mobile imaging technology, which has made group photos increasingly convenient. This is particularly true for family gatherings, meetings, and travel, where the demand for high-quality group photos is even greater. Group photos require algorithms for multiple face detection, autofocus, and clarity, ensuring a good overall photo quality even in scenes with multiple faces. Due to factors such as the imaging system's lens aperture and depth of field, facial texture characteristics, the accuracy and stability of the face detection algorithm, the focus algorithm and its corresponding strategy, as well as ambient lighting and light ratios, and subject motion, unstable focus can occur during group photos or video recordings. To ensure that the camera captures stable focus, it is necessary to test the camera's focus stability. Based on the test results, the autofocus function can be refined to improve the camera's autofocus stability. Summary of the Invention
[0003] The purpose of this application is to provide a testing method, electronic equipment, testing system and computer storage medium, which can be used to test the focus stability of a shooting device.
[0004] These and other objects are achieved by the features of the independent claims. Further implementations are given in the dependent claims, the description and the drawings.
[0005] In a first aspect, a testing method is provided for electronic equipment, comprising:
[0006] Acquire multiple frames of images based on the captured data captured by the capturing device, wherein each frame of the multiple frames includes a first test object and a test chart corresponding to the first test object, and the test chart and the first test object are located on the same plane;
[0007] Determining the texture clarity of the test chart corresponding to the first test object in each frame of the image;
[0008] Focus stability information of the shooting device is determined according to texture clarity of the test chart corresponding to the first test object in the multiple frames of images.
[0009] Implement the method of the first aspect, obtain multiple frames of images, and test the focus stability information of the shooting device through the texture clarity of the test chart corresponding to the same first test object in each frame of the multiple frames. For example, the focus stability information of the shooting device can be determined by the stability of the texture clarity of the test chart corresponding to the same first test object in the multiple frames of images, thereby providing a test for the focus stability of the shooting device, which is convenient for improving the autofocus function of the shooting device according to the test results.
[0010] In conjunction with the first aspect, in one possible implementation, determining focus stability information of a shooting device based on texture clarity of a test chart corresponding to a first test object in multiple frames of images includes:
[0011] Calculating a test index based on the texture clarity of the test chart corresponding to the first test object in the multiple frames of images, where 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 multiple frames of images;
[0012] Determine the focus stability information of the shooting device based on the test indicators.
[0013] By implementing this method, the test indicators can quantitatively reflect the stability of the texture clarity of the test image card corresponding to the same test object in multiple frames, thereby improving the accuracy of the focus stability test.
[0014] In conjunction with the first aspect, in one possible implementation, the test indicator includes a standard deviation and / or a coefficient of variation;
[0015] Determine the focus stability information of the shooting device based on the test indicators, including:
[0016] If the standard deviation is less than or equal to the first preset threshold, it is determined that the focus of the camera is stable; and / or,
[0017] If the dispersion coefficient is less than or equal to the second preset threshold, it is determined that the focus of the shooting device is stable.
[0018] By implementing this method, the texture clarity stability of the test image card corresponding to the same test object in multiple frames can be determined by standard deviation and / or dispersion coefficient, thereby improving the accuracy of the focus stability test.
[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 test charts corresponding to the one or more test objects respectively;
[0020] The one or more test objects are test objects located on the same plane among the 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 on multiple planes.
[0022] By implementing this method, focus stability can be determined based on the texture clarity of the test chart corresponding to one or more test objects in the same plane among the N test objects, thereby improving the accuracy of the test.
[0023] In combination with the first aspect, in a possible implementation manner, the method further includes:
[0024] Determining a texture clarity corresponding to each of the plurality of planes, where the texture clarity is a texture clarity of a test chart of a test object located on the corresponding plane;
[0025] A first plane among the multiple planes is used as a focus position of the shooting device, and a texture clarity corresponding to the first plane is greater than a texture clarity corresponding to any plane among the multiple planes except the first plane.
[0026] By implementing this method, the plane with the highest texture clarity of the test chart of the test object among the multiple planes is used as the focus position of the shooting device, so that the focus position of the shooting device can be accurately determined.
[0027] In combination with the first aspect, in a possible implementation, the shooting data includes a video shot by a shooting device, or a plurality of frames of images shot continuously by a shooting device.
[0028] This method can be implemented by analyzing videos or multiple pictures taken by the shooting device to adapt to the test of focus stability in various scenarios.
[0029] In conjunction with the first aspect, in one possible implementation, the captured data includes a captured video, and acquiring multiple frames of images according to the captured data captured by a capturing device includes:
[0030] Extract multiple frames of images from the captured video at a set frame interval.
[0031] By implementing this method, multiple frames of images can be extracted from the captured video for analysis, thereby reducing the number of images to be analyzed.
[0032] In a second aspect, an embodiment of the present application provides a testing system, including a shooting device and a testing device;
[0033] A shooting device is used to shoot and obtain shooting data, and send the shooting data to the test device;
[0034] A test device, configured to acquire multiple frames of images based on the captured data, each frame of the multiple frames 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;
[0035] The testing device is further configured to determine the texture clarity of the test chart corresponding to the first test object in each frame of the image;
[0036] The testing device is further 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 multiple frames of images.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method in the first aspect or any possible implementation of the first aspect.
[0038] In a fourth aspect, a chip system is provided, which is applied to an electronic device, and the chip system includes one or more processors, and the processors are used to call computer instructions to enable the electronic device to execute the method in the first aspect or any possible implementation of the first aspect.
[0039] In a fifth aspect, a computer-readable storage medium is provided, comprising instructions. When the instructions are executed on an electronic device, the electronic device executes the method in the first aspect or any possible implementation of the first aspect.
[0040] The beneficial effects of the technical solutions provided in aspects 2 to 5 of this application can refer to the beneficial effects of the technical solutions provided in aspect 1, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of a dead leaf chart card provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a shooting scene provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of setting a dead leaf image card for a portrait mold provided in an embodiment of the present application;
[0044] Figure 4a A schematic diagram of a test system provided in an embodiment of the present application;
[0045] Figure 4b A schematic diagram of another test system provided in an embodiment of the present application;
[0046] Figure 5a Schematic diagram of the test objects and test charts provided in the embodiment of the present application distributed on three planes;
[0047] Figure 5b Schematic diagram of the test objects and test charts provided in an embodiment of the present application distributed on five planes;
[0048] Figure 6 A flow chart of a testing method provided in an embodiment of the present application;
[0049] Figure 7 This is a curve diagram of frame sequence and texture clarity provided by an embodiment of the present application;
[0050] Figure 8 is another curve diagram of frame sequence and texture clarity provided by an embodiment of the present application;
[0051] Figure 9 This is another curve diagram of frame sequence and texture clarity provided in an embodiment of the present application;
[0052] Figure 10 A flowchart of another testing method provided in an embodiment of the present application;
[0053] Figure 11 A flowchart of another testing method provided in an embodiment of the present application;
[0054] Figure 12 The structure of the electronic device provided in the embodiment of the present application;
[0055] Figure 13 A software structure diagram of the electronic device provided in the embodiment of the present application;
[0056] Figure 14 A schematic structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.
[0058] To facilitate understanding, the following first introduces relevant terms and other related concepts involved in the embodiments of this application.
[0059] 1. Dead Leaf Tutu Card
[0060] like Figure 1The figure shows a schematic diagram of a dead leaves chart, which includes a dead leaves chart mark point and an area for calculating texture clarity. The dead leaves chart mark point is used to determine the position of the dead leaves chart. The dead leaves chart is mainly used to detect the image clarity (texture details in the image) corresponding to the image of the dead leaves chart captured by the shooting device, and then obtain parameters for evaluating the imaging quality of the camera of the shooting device.
[0061] 2. Plane
[0062] The plane can be understood as a focal plane, and the object distance between the photographic objects located in the same focal plane and the lens of the photographic device is the same.
[0063] Figure 2 This is a schematic diagram of a shooting scene provided by an embodiment of the present application. Figure 2 , a user uses a shooting device 15 (such as a mobile phone) to record multiple people and wants to obtain videos about the multiple people. Figure 2 As shown, the multiple characters are in a V-shape, that is, the faces of the multiple characters are in a V-shape. Character 10 is, for example, plane 1. In the embodiment of the present application, a plane can be understood as a focal plane. Characters 11 and 12 are plane 2, and characters 13 and 14 are plane 3.
[0064] If the camera 15 focuses on plane 1, that is, the face of person 10, then the clarity of person 10's face is the highest, followed by the clarity of the faces on plane 2, which includes the faces of person 11 and person 12. The clarity of the faces on plane 3 is the lowest, which includes the faces of person 13 and person 14. If the camera 15 focuses on plane 2, that is, the faces of person 11 and person 12, then the clarity of the faces of person 11 and person 12 is the highest, followed by the clarity of the faces on planes 1 and 3. If the camera 15 focuses on plane 3, that is, the faces of person 13 and person 14, then the clarity of the faces on plane 2 is the lowest, and the clarity of the faces on plane 1 is the lowest.
[0065] During the recording process of the camera 15, the focus position may switch repeatedly. For example, the focus position may be initially on plane 2, then switch to plane 1, and finally switch to plane 3. Repeated switching of the focus position will also affect the overall clarity of the image.
[0066] To ensure that the camera can capture high-quality images with stable clarity in multi-plane, multi-person scenes, it is necessary to test the stability of the camera's autofocus and obtain test results. Based on the test results, the camera's autofocus function can then be improved.
[0067] Based on this, the embodiment of the present application proposes a test system. The test system includes multiple test objects, a shooting device, and a test device. The test object can be a simulation object such as a human portrait mold, an animal mold, a plant mold, or a real entity such as a person, an animal, or a plant, or a picture card including images such as a human portrait, an animal image, or a plant image. The multiple test objects can be distributed on multiple planes, for example, 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 function, such as a mobile phone, a camera, a tablet computer, a drone, a phone watch, etc., which is used to shoot multiple test objects in a set shooting mode. The set shooting mode can be a video recording mode or a continuous shooting mode.
[0069] The shooting device can shoot the test object and then send the shooting data to the test device. The test device tests the focus stability of the shooting device based on the shooting data and obtains corresponding test results. The test device can be an electronic device such as a computer or a server. The shooting device is connected to the test device. This application does not limit the specific connection method. For example, Bluetooth, wireless local area network (WLAN), optical fiber, network cable, etc. 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, when switching from focusing on one plane to focusing on another plane, the image clarity of the test object in the shooting picture will fluctuate. In order to be able to reflect the changes in image clarity, in an embodiment of the present application, a test chart is set for each test object, and the test chart set for each test object is located on the same plane as the test object. The test chart is a chart used to objectively evaluate image quality, which can accurately reflect the image clarity of the test object located on the same plane. The test chart can be, for example, a grayscale chart, a dead leaf chart, a high-definition electronic universal test chart, a resolution comprehensive test chart, a Sineimage comprehensive test chart, a color reproduction test chart, and other types of charts. Such as Figure 3As shown, taking the test object as a portrait mold and the test chart as a dead leaf chart as an example, a dead leaf chart is set for the portrait mold. The dead leaf chart and the portrait mold are located on the same plane, and the image clarity of the photographed portrait mold is reflected by calculating the texture clarity of the dead leaf chart.
[0071] The test equipment can obtain the image clarity of the test chart, and then determine the stability of the autofocus of the shooting equipment based on the fluctuation of the image clarity of the test chart.
[0072] The following combination Figure 4a and Figure 4b The test system of the embodiment of the application is introduced with examples. Figure 4a and Figure 4b The arrangement positions of the test objects are different. It is understood that the arrangement positions of the test objects are not limited in the embodiments of the present application. Figure 4a and Figure 4b The arrangement position is just an example. The following is a detailed description:
[0073] like Figure 4a As shown, the test system includes multiple portrait molds (i.e., multiple test objects). It can be understood that each portrait mold is provided with a test chart. The multiple portrait molds are arranged in a V shape and distributed on three planes. The specific schematic diagram of each portrait mold and the test chart provided for the portrait mold can be shown as follows: Figure 5a shown.
[0074] The testing system also includes a photographing device 20 and a testing device 21. The photographing device 20 is used to photograph the photographing area where the multiple portrait molds are located to obtain photographic data. For example, the photographing device 20 can be used to record a video to obtain the recorded video. In another example, the photographing device 20 can be used to continuously capture multiple images.
[0075] Optionally, in order to improve the accuracy of the test results, a background board can be set 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, in order to test the stability of the autofocus of the shooting device 20 under different lighting conditions, the testing system further includes at least one light source device. Figure 4a In the example, the test system 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 shooting device 20, thereby simulating various lighting environments in real scenes.
[0077] Optionally, the test system may further include a highlight light box 24, which may be located at the background of the multiple portrait molds and is used to adjust the highlight conditions in high-dynamic 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 based on the clarity, tests the focus stability of the shooting device 20 to obtain the test results.
[0079] like Figure 4b As shown, the test system includes multiple portrait molds (i.e., multiple test objects). It can be understood that each portrait mold is provided with a test chart. The multiple portrait molds are placed in a gradient manner and are located on different planes. One portrait mold is distributed on one plane. The specific schematic diagram of each portrait mold and the test chart can be shown as follows: Figure 5b shown.
[0080] The test system also includes a shooting device 30 and a test device 31. Further optionally, the test system also includes a light source device 32 and a light source device 33, which are used to provide different lighting conditions. Optionally, the test system may also include a high-light box 34 and a background board. For the relevant introduction of each device, please refer to Figure 4a Description.
[0081] based on Figure 4a and Figure 4b The test system shown in the figure, the test process is illustrated below by an example, turn on the shooting device, the shooting device can be a mobile phone, taking the mobile phone as an example, adjust the viewfinder of the mobile phone so that the mobile phone can capture all the portrait molds, that is, make all the portrait molds within the viewfinder of the mobile phone.
[0082] Adjust the lighting parameters of the light source device to provide different lighting conditions. Under different lighting conditions, the shooting device obtains different shooting data. The shooting data can be a video or multiple pictures taken continuously. The following takes shooting a video as an example. The following examples of light source conditions include, for example, a D65 light source (a light source that simulates daylight with a color temperature of 6500K) with a light intensity of 1000 lux (lux is a unit of illumination used to evaluate light intensity), a TL84 light source (a narrow-band fluorescent light source with a color temperature of 4000K) with a light intensity of 100 lux, and an A light source (a light source that simulates daylight with a color temperature of 2850K) with a light intensity of 20 lux. The high-light light box setting can be turned off, or the illumination can be set to approximately 2.3×104 lux to create a high-dynamic scene.
[0083] Set your phone to video recording mode and shoot a video under the lighting conditions provided by the light source device. Under the same lighting conditions, you can record videos of a first duration, which can be 10 seconds, for example. For example, you can record a first video of a first duration under the lighting conditions provided by the D65 light source, a second video of a first duration under the lighting conditions provided by the TL84 light source, and a third video of a first duration under the lighting conditions provided by the A light source. It is understood that the duration of videos recorded under different lighting conditions can also vary.
[0084] The mobile phone sends the captured video to the test device. For example, the mobile phone sends the captured first video, second video, and third video to the test device. For each video, the test device performs image frame extraction processing on the video to obtain multiple frames of images, and then obtains the image clarity of each test chart in each frame of the image, and based on the image clarity, tests the focus stability of the shooting device to obtain a test result, which is a test result of the focus stability of the shooting device under the light source conditions corresponding to the video. For example, the first video is analyzed, and the test result obtained is the focus stability test result of the shooting device under the light source provided by the D65 light source. For example, the second video is analyzed, and the test result obtained is the focus stability test result of the shooting device under the light source provided by the TL84 light source. For example, the third video is analyzed, and the test result obtained is the focus stability test result of the shooting device under the light source provided by the A light source.
[0085] Please refer to Figure 6 As shown, it is a flowchart of a testing method provided in an embodiment of the present application. The flowchart includes but is not limited to the following steps. It is understandable that it may also include the following steps:
[0086] 501. A shooting device shoots a plurality of test objects and a shooting area where a test chart corresponding to each test object is located to obtain a shot video.
[0087] The test object can be a simulation such as a human portrait mold, an animal mold, a plant mold, or a real entity such as a person, an animal, or a plant, or a picture card including images such as a human portrait, an animal image, or a plant image. In some implementations, multiple test objects can be distributed on multiple planes. Figure 5a As shown, 5 test objects are distributed on 3 planes, such as Figure 5b As shown in , 5 test objects are distributed on 5 planes. The distance between the two farthest planes in the multiple planes is D, as shown in Figure 5a and Figure 5bThe distance D is shown. This distance D is less than the depth of field, which is determined based on at least one of the following: the lens aperture, the focal length, the shooting distance, and the diameter of the circle of confusion. This distance D, which is less than the depth of field, ensures that multiple faces are captured clearly.
[0088] Each test object corresponds to a test chart, and the test chart is used to calculate the image clarity of the corresponding test object. In some implementations, the test object and the test chart corresponding to the test object can be located on the same plane. The relative position relationship between the test object and the test chart in the same plane is not limited in this application, for example, it can be as follows: Figure 5a He Ru Figure 5b The test chart shown is positioned below the test subject's face area.
[0089] The shooting device can be in a video recording mode, shooting the multiple test objects and the shooting area of the test chart corresponding to each test object to obtain the shooting video. In other words, the multiple test objects and the test chart corresponding to each test object are the shooting objects.
[0090] In some implementations, the camera can also capture videos under different lighting conditions, with each lighting condition corresponding to a captured video. For example, the camera can capture a video corresponding to lighting condition 1, a video corresponding to lighting condition 2, and a video corresponding to lighting condition 3.
[0091] In some implementations, the captured video may be a video of the first duration. The durations of the captured videos corresponding to different light source conditions may be the same or different, and this application does not limit this.
[0092] 502: The shooting device sends the shot video, and the test device receives the shot video accordingly.
[0093] The shooting device can send the captured video to the test device via Bluetooth, wireless short-range or network.
[0094] In some implementations, the shooting device may send the captured video corresponding to at least one light source condition to the test device. The test device may process the captured video corresponding to each light source condition in the manner described in steps 503 to 505.
[0095] 503 , the testing device performs image frame extraction processing on the captured video to obtain multiple frames of images.
[0096] After receiving the video from the camera, the test device can call frame capture software (e.g., potplayer, ffmpeg, etc.) to extract images from the video at a set frame interval, for example, capturing one frame every seven frames. After the test device performs frame extraction on the video, multiple frames of images can be obtained.
[0097] 504. The testing device obtains the texture clarity of at least one plane of the test chart in each frame of the multiple frames.
[0098] The test device identifies each of the extracted multiple frames and determines the position of at least one plane of the test chart in each frame. For example, if the test chart is a dead leaves chart, the position of the dead leaves chart can be identified by its mark points.
[0099] For example, the positions of all planes of the test chart in each frame can be obtained, that is, at least one plane includes all planes of each frame. Alternatively, the positions of some planes of the test chart in each frame can be obtained, that is, at least one plane includes some planes of each frame. For example, if each frame includes three planes of the test chart, namely Plane 1, Plane 2, and Plane 3, the position of one of the planes can be obtained, for example, the position of the test chart for Plane 1 in each frame.
[0100] After determining the position of the test chart in at least one plane of each frame, an image of the test chart is captured and the texture clarity of the test chart is calculated. The texture clarity of the test chart corresponding to at least one plane of each frame can be calculated. The texture clarity of the test chart corresponding to all planes of each frame can be calculated, or the texture clarity of the test chart corresponding to a portion of the planes of each frame can be calculated. For example, the texture clarity of the test chart corresponding to plane 1 of each frame can be calculated.
[0101] The following example uses the calculation of the texture clarity of the test chart on all planes of each frame image as an example. Figure 5aFor example, each image frame includes three planes of test objects and a test chart. Images of the test charts on plane 1, plane 2, and plane 3 are captured in each frame. Based on the image of the test chart on plane 1, the testing device calculates texture clarity t1 of the test chart on plane 1. Based on the image of the test chart on plane 2, the testing device calculates texture clarity t2 of the test chart on plane 2. Exemplarily, texture clarity t2 may be the texture clarity of the test chart corresponding to a test object located in plane 2, or the average of the texture clarity of the test charts corresponding to two test objects located in plane 2. Based on the image of the test chart on plane 3, the testing device calculates texture clarity t3 of the test chart on plane 3. Similarly, texture clarity t3 may be the texture clarity of the test chart corresponding to a test object located in plane 3, or the average of the texture clarity of the test charts corresponding to two test objects located in plane 3.
[0102] 505 , the testing device determines the focus stability information of the shooting device according to the texture clarity of the test chart on the same plane in the multiple frames of images.
[0103] In an embodiment of the present application, the focus stability information of a camera can be determined by the stability of the texture clarity of a test chart on the same plane across multiple frames. The higher the stability of the texture clarity of the test chart on the same plane across multiple frames, the higher the focus stability of the camera. Specifically, the stability of the texture clarity of each test chart in at least one plane across multiple frames is determined separately. For example, if the at least one plane includes two planes, Plane 1 and Plane 2, the stability of the texture clarity of the test chart on Plane 1 across multiple frames is determined, as is the stability of the texture clarity of the test chart on Plane 2 across multiple frames. It is understood that if the at least one plane includes only one plane, the stability of the texture clarity of the test chart on that one plane across multiple frames is determined. If the texture clarity of at least one test chart plane across multiple frames is stable, the focus of the camera is determined to be stable. If the texture clarity of one test chart plane across multiple frames is unstable, the focus of the camera is determined to be unstable.
[0104] In some implementations, if the multiple frames are captured from a video captured under a specific lighting condition, the determined focus stability information can be understood as the focus stability information of the camera under that lighting condition. By analyzing images from different videos captured under different lighting conditions, the focus stability information of the camera under different lighting conditions can be determined.
[0105] For example, the focus position of the camera device may be determined based on the texture clarity of the test chart on each plane, that is, the focus position of the camera device is the plane corresponding to the highest texture clarity.
[0106] In some implementations, the stability of the texture clarity of the test chart on the same plane in multiple frames can be indicated by a curve. Figure 5a The test object and test chart shown are photographed. Figure 7 The following are curve diagrams showing the texture clarity and frame sequence of plane 1, plane 2, and plane 3, respectively. Figure 7 As shown, the texture clarity of the test chart on plane 1 in each of the multiple image frames is approximately 0.91, the texture clarity of the test chart on plane 2 in each of the multiple image frames is approximately 0.75, and the texture clarity of the test chart on plane 3 in each of the multiple image frames is approximately 0.52. Since the texture clarity of the test chart on plane 1 is the highest, the camera's focus position is on plane 1.
[0107] In some implementations, the stability of the texture clarity of a test chart on the same plane across multiple image frames can be indicated by a test metric. Specifically, the test metric can indicate whether the texture clarity of the test chart on the same plane is stable. For example, the test metric can include a standard deviation and / or a coefficient of variation, where coefficient of variation = standard deviation / mean. Both the standard deviation and mean are determined based on the texture clarity of the test chart on the same plane across the multiple image frames. For example, the standard deviation and mean of plane 1 can be determined based on the texture clarity of the test chart on plane 1 across each frame across the multiple image frames. If the test metric is less than a preset threshold, the camera's focus is determined to be stable. Exemplarily, the test metric includes a standard deviation and / or a 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 camera's focus is determined to be stable. In some implementations, if the standard deviation of all planes across the multiple image frames is less than a first preset threshold, and / or the coefficient of variation of all planes across the multiple image frames is less than or equal to a second preset threshold, the camera's focus is determined to be stable.
[0108] Continue with Figure 7Taking the schematic diagram of texture clarity and frame sequence for each plane as an example, for example, the calculated standard deviation of plane 1, std1, is 0.004511, and the coefficient of dispersion, k1, is standard deviation / mean, which is 0.0049; the standard deviation of plane 2, std2, is 0.004099, and the coefficient of dispersion, k2, is standard deviation / mean, which is 0.0054; and the standard deviation of plane 3, std3, is 0.005277, and the coefficient of dispersion, k3, is standard deviation / mean, which is 0.0050. For example, the first preset threshold is 0.05, and the second preset threshold is 0.05. It should be understood that the first preset threshold and the second preset threshold are the same here for example only. The standard deviation of plane 1, the standard deviation of plane 2, and the standard deviation of plane 3 are all less than 0.05, and the coefficients of dispersion, k1, k2, and k3 are all less than 0.05, indicating that the camera's focus is stable and that the focus position does not switch between different planes. In some implementations, the camera's focus stability can also be determined based solely on the standard deviation or the coefficient of dispersion.
[0109] if Figure 7 The texture clarity of each plane shown is the texture clarity obtained under a certain light source condition (for example, the light source condition is D65 light source 1000 lux), and it can be determined that the focus of the shooting device is stable under this light source condition.
[0110] In some implementations, if the camera is Figure 5a When shooting the test object and test chart shown in the figure, the curve diagram of texture clarity and frame sequence is as follows: Figure 8 As shown, the texture clarity of the test chart on plane 1 of each frame in the multiple images is about 0.80, the texture clarity of the test chart on plane 2 of each frame in the multiple images is about 0.89, and the texture clarity of the test chart on plane 3 of each frame in the multiple images is about 0.75.
[0111] Since the texture clarity of the test chart on plane 2 is the highest, the focus position of the camera is on plane 2.
[0112] In this implementation, the texture clarity of the test charts for planes 1, 2, and 3 all fall within the range of 0.7-1, indicating that planes 1, 2, and 3 are clearly focused. The calculated standard deviation for plane 1, std1, is 0.005416; the standard deviation for plane 2, std2, is 0.005596; and the standard deviation for plane 3, std3, is 0.004778. These standard deviations for planes 1, 2, and 3 are all less than a first preset threshold, such as 0.05. Furthermore, the coefficient of dispersion for plane 1, k1, 0.006826, k2, 0.006364, and k3, 0.006373, are all less than a second preset threshold of 0.05. This indicates that the autofocus stability of the three planes is relatively good, with no switching between focus positions. This indicates that the camera's focus is stable.
[0113] In some implementations, if the texture clarity of the test chart corresponding to a plane of the test object in the multi-frame image is unstable, it is determined that the focus of the shooting device is unstable. For example, the stability can be determined by the standard deviation and / or the dispersion coefficient. Figure 5a When the test object and the test chart are photographed, the curve diagram of the texture clarity and frame sequence of plane 1 is shown as follows: Figure 9 As shown, the standard deviation std4 of plane 1 is 0.16, the dispersion coefficient k is standard deviation / texture clarity mean = 0.78, and the standard deviation std4 is 0.16, which is greater than 0.05; the dispersion coefficient k>0.05; this indicates that the autofocus stability of the video recording system is poor, and the focus is not stable.
[0114] Please refer to Figure 10 As shown, it is a flowchart of another testing method provided in an embodiment of the present application. The flowchart includes but is not limited to the following steps. It is understandable that it may also include the following steps:
[0115] 601. A photographing device continuously photographs a plurality of test objects and a photographing area where a test chart corresponding to each test object is located, to obtain a plurality of continuously photographed pictures.
[0116] The shooting device may be in a continuous shooting mode, shooting a plurality of test objects and a shooting area where a test chart corresponding to each test object is located to obtain a shot video. In other words, the plurality of test objects and the test chart corresponding to each test object are the shooting objects.
[0117] The multiple pictures may be multiple pictures taken within the first time period.
[0118] For detailed description of 601, please refer to Figure 6 The description of 501 in the illustrated embodiment will not be repeated here.
[0119] 602. The photographing device sends a plurality of pictures taken continuously, and the testing device receives the plurality of pictures accordingly.
[0120] The shooting device can send multiple captured pictures to the test device via Bluetooth, wireless short-range or network.
[0121] 603. The testing device obtains the texture clarity of at least one plane of the test chart of each of the multiple images.
[0122] The test device identifies each of the extracted images and determines the location of at least one plane of the test chart in each image. For example, if the test chart is a dead leaf chart, the location of the dead leaf chart can be identified by its mark points.
[0123] After determining the position of the test chart in at least one plane of each image, the image of the test chart is captured and the texture clarity of the test chart is calculated. The texture clarity of the test chart corresponding to at least one plane of each image can be calculated. The specific calculation method can be referred to Figure 6 In the embodiment, step 504 describes calculating the texture clarity of the test chart of each plane of each frame image.
[0124] In step 604 , the testing device determines the focus stability information of the shooting device based on the texture clarity of the test chart on the same plane in the multiple images.
[0125] The test equipment determines the focus stability information of the shooting device based on the texture clarity of the test chart on the same plane in multiple pictures. Figure 6 Description of step 505 of an embodiment.
[0126] Please refer to Figure 11 As shown, it is a flowchart of another testing method provided in an embodiment of the present application. The flowchart includes but is not limited to the following steps. It is understandable that it may also include the following steps:
[0127] 701 , a testing device acquires multiple frames of images according to shooting data shot by a shooting device.
[0128] Shooting data may include shot videos, which can be found in Figure 6 The video captured in the embodiment may be a plurality of images (also referred to as a plurality of frames for ease of description), as shown in FIG. Figure 10 If the captured data is a video, the test device may extract multiple frames of images from the video at a set frame interval.
[0129] Each frame of the multiple frames includes a first test object and a test chart corresponding to the first test object, and the test chart and the first test object are located on the same plane.
[0130] In some implementations, the first test object may include one test object or multiple test objects, and accordingly, the test chart corresponding to the first test object includes the test charts corresponding to the one or more test objects. The one or more test objects are test objects located on the same plane among the N test objects photographed by the photographing device. The N test objects may be distributed on multiple planes, for example, Figure 5a As shown, 5 test objects are distributed in 3 planes. N test objects are the objects photographed by the camera. Figure 10 In some implementations, if there are multiple test objects located on the same plane, one of the test objects may be used as the first test object. For example, one test object may be selected as the first test object, or multiple test objects may be used as the first test objects to be calculated.
[0131] 702. The testing device determines the texture clarity of the test chart corresponding to the first test object in each frame of the image.
[0132] The testing device may calculate the texture clarity of the test chart corresponding to the first test object in each frame. If the first test object includes multiple test objects, the testing device may calculate the texture clarity of the test chart corresponding to each of the multiple test objects in each frame. The testing device may determine the texture clarity of the test chart corresponding to the first test object based on the texture clarity of the test chart corresponding to each of the multiple test objects in each frame.
[0133] For example, the average value of the texture clarity of the test charts corresponding to multiple test objects can be used as the texture clarity of the test chart corresponding to the first test object, or the texture clarity of the test chart corresponding to one test object can be selected as the texture clarity of the test chart corresponding to the first test object, or the texture clarity of the test chart corresponding to multiple test objects can be used as the texture clarity of the test chart corresponding to the first test object. This application does not limit this.
[0134] If the first test object includes one test object, the texture clarity of the test chart corresponding to the one test object is used as the texture clarity of the test chart corresponding to the first test object.
[0135] 703. The testing device determines focus stability information of the shooting device according to texture clarity of the test chart corresponding to the first test object in the multiple frames of images.
[0136] The texture clarity of the test chart corresponding to the first test object can be calculated for each frame of image, and the focus stability information of the camera device can be determined based on the stability of the texture clarity of the test chart corresponding to the first test object in multiple frames of image. For example, if the texture clarity of the test chart corresponding to the first test object in multiple frames of image is relatively stable, it can be determined that the focus of the camera device is stable. For example, whether the texture clarity of the test chart corresponding to the first test object is stable can be determined by calculating a test index. The test index may include, for example, a standard deviation and / or a coefficient of variation. For details, please refer to the description of the aforementioned embodiment and will not be repeated here.
[0137] In some implementations, N test objects are distributed across multiple planes, and if the texture clarity of the test chart corresponding to the test object in at least one of the multiple planes is stable, then the camera focus may be determined to be stable. For example, if the texture clarity of the test chart corresponding to the test objects in all of the multiple planes is stable, then the camera focus may be determined to be stable.
[0138] In some implementations, the texture clarity corresponding to each of the multiple planes can be determined. The texture clarity corresponding to any one of the multiple planes is the texture clarity of the test chart corresponding to the test object located on the plane. The specific calculation method can refer to the calculation method of the texture clarity of the test chart corresponding to the first test object in the above embodiment.
[0139] The plane with the greatest texture clarity among the multiple planes is determined as the focus position of the shooting device. For ease of description, the plane with the greatest texture clarity is called the first plane, that is, the focus position of the shooting device is on the first plane.
[0140] For example, if the focus of the shooting device is stable, the focus position of the shooting device can be determined based on the texture clarity corresponding to each plane in a frame image, or the focus position of the shooting device can be determined based on the texture clarity corresponding to each plane in each frame image in multiple frames.
[0141] For example, if the focus of the shooting device is unstable, the focus position of the shooting device can be determined based on the texture clarity corresponding to each plane of the multiple frames of images, and the focus position of the shooting device is constantly changing.
[0142] The electronic device provided by the embodiments of the present application is introduced below.
[0143] The electronic device can be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a 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 exemplarily shown. The electronic device can be implemented as the above-mentioned 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, an earphone interface 170D, a sensor module 180, a button 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, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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 should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0147] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0148] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0149] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0150] In some embodiments, the processor 110 may include one or more interfaces. The 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.
[0151] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0152] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can 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, enabling the function of answering 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 a 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 calls via 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 communication 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, enabling the function of playing music through Bluetooth headphones.
[0155] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0156] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, 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] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0158] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0159] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive 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 provide power to the electronic device via the power management module 141.
[0160] The power management module 141 is used to connect 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, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0161] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor. If the electronic device 100 accesses the Internet through the mobile communication module 150, it can be understood that the electronic device 100 accesses the Internet through the cellular network. If the electronic device 100 accesses the Internet through the wireless local area network (WLAN) in the wireless communication module 160, it can be understood that the electronic device accesses the Internet through wireless fidelity (WiFi). The user can choose to access the Internet through the mobile communication module 150 or through the wireless communication module 160, and can specifically switch between the two communication modules. For example, the user can disconnect the WiFi and use the cellular network for communication, or the user can disconnect the cellular network and use WiFi for communication.
[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 a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0163] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0164] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate 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 being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0165] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. 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 the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0166] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through 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 technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0167] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0168] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can 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 MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0169] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0170] The ISP processes data fed back by camera 193. For example, when taking a photo, 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, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0171] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. 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, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0172] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0173] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0174] The external memory 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0175] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0176] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0177] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0178] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0179] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0180] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0181] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) 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 located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0183] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0184] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air 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 case. 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 based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0186] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0187] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0188] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a 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 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0189] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether 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 use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0191] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0192] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0193] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0194] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0195] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0196] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0197] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 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, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. 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 an embodiment of the present application, the camera 193 can be controlled to shoot a video, or to shoot multiple pictures continuously, and the shot video or multiple pictures can be sent to the test device.
[0199] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0200] Figure 13 1 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 distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: 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, short message, etc.
[0204] The application framework layer provides an application programming interface (API) and programming framework for the 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, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0206] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0207] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0208] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0209] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0210] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0211] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0212] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0213] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0214] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0215] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0216] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0217] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[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 drawing engine for 2D drawings.
[0220] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0221] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
[0222] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.
[0223] Figure 14 FIG1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device can be implemented as the test device in the above embodiment.
[0224] like Figure 14 As shown, the electronic device 200 of this embodiment includes: at least one processor 201 ( Figure 14Only one processor is shown in the figure), a memory 202 and a computer program 203 stored in the memory 202 and executable on the at least one processor 201, wherein the processor 201 implements the steps of any of the above-mentioned test method embodiments when executing the computer program 203.
[0225] The electronic device 200 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server.
[0226] The electronic device may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that Figure 14 This is merely an example of the electronic device 200 and does not constitute a limitation on the electronic device 200 . The electronic device 200 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 200 may also include input and output devices, network access devices, etc.
[0227] The processor 201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may 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 also be an external storage device of the electronic device 200, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 200. Furthermore, the memory 202 may also include both an internal storage unit of the electronic device 200 and an external storage device. The memory 202 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 202 may also be used to temporarily store data that has been output or is about to be output.
[0229] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0230] An embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the above-mentioned various method embodiments.
[0231] An embodiment of the present application also provides an electronic device, which can be implemented as the above-mentioned terminal device or test device, and 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, and the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method shown in the aforementioned embodiment.
[0232] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0233] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the process or function described in the embodiment of the present application is generated in whole or in part. 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 computer-readable storage medium. 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 a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
[0234] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described 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: Acquire multiple frames of images based on shooting data captured by a shooting device, wherein each frame of the multiple frames includes a first test object and a test chart corresponding to the first test object, and the test chart and the first test object are located on the same plane; Determining the texture clarity of the test chart corresponding to the first test object in each frame of the image; The focus stability information of the shooting device is determined according to the texture clarity of the test chart corresponding to the first test object in the multiple frames of images.
2. The method according to claim 1, wherein The determining, based on the texture clarity of the test chart corresponding to the first test object in the multiple frames of images, the focus stability information of the shooting device includes: Calculating a test index based on the texture clarity of the test chart corresponding to the first test object in the multiple frames of images, the test index being used to indicate a degree of stability of the texture clarity of the test chart corresponding to the first test object in the multiple frames of images; Determine focus stability information of the shooting device according to the test indicator.
3. The method according to claim 2, wherein The test indicators include standard deviation and / or coefficient of dispersion; Determining the focus stability information of the shooting device according to the test indicator includes: If the standard deviation is less than or equal to a first preset threshold, it is determined that the focus of the photographing device is stable; and / or, If the dispersion coefficient is less than or equal to a second preset threshold, it is determined that the focus of the shooting device is stable.
4. The method according to any one of claims 1 to 3, wherein The shooting data includes a video shot by the shooting device, or a plurality of frames of images shot continuously by the shooting device.
5. The method according to claim 4, wherein The shooting data includes a shot video, and acquiring multiple frames of images according to the shooting data shot by the shooting device includes: Extract multiple frames of images from the captured video according to a set frame interval.
6. The method according to any one of claims 1 to 5, wherein: The first test object includes one or more 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 one or more test objects are test objects located on the same plane among the N test objects; The N test objects are test objects contained in each frame of image, and the N test objects are distributed in multiple planes.
7. The method according to claim 6, wherein The method further comprises: Determining a texture clarity corresponding to each plane of the plurality of planes, where the texture clarity is a texture clarity of a test chart of a test object located on the corresponding plane; A first plane among the multiple planes is used as the focus position of the shooting device, and a texture clarity corresponding to the first plane is greater than a texture clarity corresponding to any plane among the multiple planes except the first plane.
8. A testing system, characterized in that: Including filming equipment and testing equipment; The shooting device is used to shoot to obtain shooting data and send the shooting data to the test device; The test device is configured to acquire multiple frames of images based on the captured data, each frame of the multiple frames including 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; The testing device is further configured to determine the texture clarity of the test chart corresponding to the first test object in each frame of the image; The testing device is further configured to determine focus stability information of the shooting device based on texture clarity of the test chart corresponding to the first test object in the multiple frames of images.
9. An electronic device, characterized in that: The electronic device includes: one or more processors, a memory and a display screen; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 7.
10. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1-7.
11. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Assistant focusing method using multiple face blocks
CN102338972A
Microscopic image shooting focusing method and device
CN114697548A
Focusing test method and system for shooting equipment
CN115567700A
Image acquisition method, electronic equipment and computer readable storage medium
CN116055872A
Focusing stability test method and system, electronic equipment and storage medium
CN117714664A