Coke cutting evaluation method and related equipment

By acquiring reference and test recordings of the recording equipment under different lighting conditions, and using the sharpness changes of the standard chart to calculate the sharpness gradient and frame rate, the problem of evaluating the focus-cutting process of the recording equipment was solved, and the accuracy and smoothness of the focus-cutting process were judged.

CN121750856APending Publication Date: 2026-03-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

How to accurately evaluate the focus-cutting process of recording equipment to ensure its smoothness and accuracy.

Method used

By acquiring reference and test videos of the recording device under different lighting conditions, and using the sharpness change process of the standard chart, the sharpness gradient and frame rate are calculated to determine the smoothness and accuracy of the focus cutting process of the recording device.

Benefits of technology

It enables accurate evaluation of the focus-cutting process of recording equipment, better judges the smoothness and accuracy of the focus-cutting process, and adapts to application scenarios under different light source environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121750856A_ABST
    Figure CN121750856A_ABST
Patent Text Reader

Abstract

The invention discloses a focus cutting evaluation method and related equipment, and the method comprises the steps: obtaining a first reference video, the first reference video comprising a picture after focusing a first object, and the first reference video being shot by recording equipment in a first light source environment; a first test video is obtained, the first test video comprises a picture obtained after focus cutting from the second object to the first object and refocusing of the first object, and the first test video is shot by the recording device in the first light source environment; and performing focus cutting evaluation on the recording equipment based on the first test video and the first reference video to obtain a focus cutting evaluation result corresponding to the first light source environment. By adopting the method, the focus cutting evaluation can be accurately carried out on the recording equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular to a focus-cutting evaluation method and related equipment. Background Technology

[0002] In film, television, and video production, focus cutting is frequently used to guide the audience's attention or create specific visual effects. This involves rapidly switching the focus of the camera from one object to another. From the perspective of the equipment's focusing, focus cutting is achieved by manually or automatically switching the lens's focal length. Whether manual or automatic, the smoothness and accuracy of the focus cutting process must be ensured. Therefore, how to evaluate the focus cutting capabilities of recording equipment has become a problem that needs to be solved. Summary of the Invention

[0003] This application provides a focus-cutting evaluation method and related equipment, which can accurately evaluate the focus-cutting of recording equipment.

[0004] Firstly, some embodiments of this application provide a focus-cutting evaluation method. This focus-cutting evaluation method may include: acquiring a first reference video recording, which includes an image of a first object after focusing, the first reference video recording being captured by a recording device under a first light source environment; acquiring a first test video recording, which includes an image of a focus cut from a second object to the first object, and an image of the first object after refocusing, the first test video recording being captured by a recording device under the first light source environment; and performing focus-cutting evaluation on the recording device based on the first test video recording and the first reference video recording to obtain a focus-cutting evaluation result corresponding to the first light source environment.

[0005] By using the above method, the image after focusing directly on the first object is recorded as the first reference video, and the image of switching focus from other objects to the first object is recorded as the first test video. Through these two videos, the focus switching of the recording device can be accurately evaluated.

[0006] In one possible implementation, the first object includes a standard image card. The recording device is evaluated for focus cutting based on a first video recording and a second video recording. This evaluation includes: determining the smoothness of the focus cutting process of the recording device based on the change in sharpness of the standard image card in the first test video recording; and determining the accuracy of the focus cutting of the recording device based on the sharpness of the standard image card in the first test video recording after refocusing the first object and the sharpness of the standard image card in the first reference video recording.

[0007] Using the above methods, the focus cutting of the recording device is evaluated from two dimensions: smoothness and accuracy. In particular, a standard chart is introduced. The texture of the standard chart can better determine the sharpness changes during the focus cutting process of the recording device, thereby more accurately determining the smoothness and accuracy.

[0008] In one possible implementation, the smoothness of the focus-cutting process of the recording device is determined by the change in sharpness of the standard image card in the first test video recording, including: performing frame segmentation processing on the first test video recording to obtain multiple first images containing the standard image card; calculating the sharpness gradient of the standard image card in adjacent first images, wherein the sharpness gradient is positively correlated with the change in sharpness of the standard image card; and determining the smoothness of the focus-cutting process of the recording device based on the sharpness gradient of the standard image card.

[0009] In the process described above, when switching focus from other objects back to the first object, the standard charts included in the first object should gradually become clearer. Therefore, the standard charts in the first image should gradually become clearer along the time axis during the focus switching process. The clarity of any two adjacent standard charts should gradually increase, and the value of the clarity gradient of the standard charts should be relatively low. Therefore, the smoothness of the focus switching process of the recording device can be accurately determined by the clarity gradient of the standard charts.

[0010] In one possible implementation, the smoothness of the recording device's focus-cutting process is determined based on the sharpness gradient of a standard chart, including: counting the number of peaks in all sharpness gradients, where peaks are sharpness gradients that are greater than a peak threshold; and determining the smoothness of the recording device's focus-cutting process based on the number of peaks, where the number of peaks is negatively correlated with smoothness.

[0011] Using the above method, since the sharpness gradient represents the sharpness change between two standard charts, a large number of peaks in all sharpness gradients (representing numerous abrupt changes in sharpness) indicates that the focus-cutting process of the recording device is not smooth. Conversely, a small number of peaks in all sharpness gradients indicates that the focus-cutting process of the recording device is smooth. Therefore, the smoothness of the focus-cutting process of the recording device can be accurately determined by the number of peaks.

[0012] In one possible implementation, the frame rate of a first test video is determined, where the frame rate of the first test video is the number of images displayed per second in the first test video; based on the frame rate of the first test video, a peak threshold is determined.

[0013] As described above, the sharpness gradient between adjacent frames differs depending on the frame rate. Therefore, determining the peak threshold based on the frame rate allows for a more accurate assessment of the recording device's smoothness.

[0014] In one possible implementation, the ratio of the sharpness of the standard chart in the first reference video to the sharpness of the standard chart in the first test video after refocusing the first object is inversely proportional to the accuracy.

[0015] Using the above method, the sharpness of the standard chart in the first reference image is considered as the sharpness of the standard after focusing. The sharpness of the sharp chart of the focused image in the first test measurement is considered to be more accurate if it is close to the sharpness in the first reference image.

[0016] In one possible implementation, a second reference video is acquired, which includes an image of the first object after focusing, and the second reference video is captured by the recording device under a second light source environment; a second test video is acquired, which includes an image of the first object after switching focus from the second object to the first object and refocusing on the first object, and the second test video is captured by the recording device under a second light source environment; a focus switching evaluation of the recording device is performed based on the second test video and the second reference video to obtain a focus switching evaluation result corresponding to the second light source environment.

[0017] By using the above method, since the recording device will face various light sources in actual application scenarios, the focus cut evaluation results corresponding to different light sources can be obtained more accurately.

[0018] Secondly, this application provides a focus-cutting evaluation device, which can be an electronic device, a device within an electronic device, or a device compatible with an electronic device; wherein, the focus-cutting evaluation device can also be a chip system, and the focus-cutting evaluation device can execute the method executed by the electronic device in the first aspect. The function of the focus-cutting evaluation device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions. The unit can be software and / or hardware. The operation performed by the focus-cutting evaluation device and its beneficial effects can be found in the method and beneficial effects described in the first aspect above, and will not be repeated here.

[0019] Thirdly, this application provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the focus-cutting evaluation method in any possible implementation of the first aspect described above.

[0020] Fourthly, this application provides a chip system including a processor and an interface, the processor and the interface being coupled; the interface is used to receive or output signals, and the processor is used to execute code instructions to perform the focus-cutting evaluation method in any possible implementation of the first aspect above.

[0021] Fifthly, this application provides a computer-readable storage medium storing a computer program / instructions that, when the computer program product is run on a computer, cause the computer to execute the focus-cutting evaluation method in any possible implementation of the first aspect described above.

[0022] Sixthly, this application provides a computer program product that, when run on a computer, causes the computer to execute the focus-cutting evaluation method in any possible implementation of the first aspect described above. Attached Figure Description

[0023] Figure 1A This application provides a schematic diagram of the architecture of a focus cutting test and evaluation system.

[0024] Figure 1B A schematic diagram of a first reference video recording provided for an embodiment of this application;

[0025] Figure 1C A schematic diagram of a first test video recording provided in an embodiment of this application;

[0026] Figure 1D A schematic diagram of an interface for a focus-cutting method provided in an embodiment of this application;

[0027] Figure 2 A flowchart illustrating a focus-cutting evaluation method provided in an embodiment of this application;

[0028] Figure 3A A schematic diagram of a standard drawing card provided in an embodiment of this application;

[0029] Figure 3B A schematic diagram illustrating the relationship between resolution and frame order is provided for an embodiment of this application.

[0030] Figure 3C A schematic diagram illustrating the relationship between sharpness, sharpness gradient, and frame order is provided for embodiments of this application.

[0031] Figure 3D Another schematic diagram illustrating the relationship between sharpness, sharpness gradient, and frame order provided for an embodiment of this application;

[0032] Figure 4 This is a schematic diagram of the hardware structure of a recording device provided in an embodiment of this application;

[0033] Figure 5 This is a schematic diagram of the software structure of a recording device provided in an embodiment of this application;

[0034] Figure 6 This is a schematic diagram of the structure of a coke cutting evaluation device provided in an embodiment of this application;

[0035] Figure 7 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0037] It should be understood that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0038] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0039] The focus-cutting evaluation method provided in this application can be applied to, for example... Figure 1A The coke cutting evaluation system shown. Figure 1A The focus-cutting evaluation system shown is used to simulate real-world application scenarios where recording equipment performs focus cutting during actual use. For example... Figure 1A As shown, the focus cutting evaluation system mainly includes the following parts:

[0040] The first object 11 includes a distant object and a standard chart. The distant object can be a person, a water glass, a table, or other similar objects. The standard chart can be attached to the distant object, and the standard chart and the distant object are on the same horizontal plane.

[0041] The second object 12 includes objects at close range, and the second object 12 may specifically be text in a book, a picture card of a person, etc. This application does not limit this.

[0042] The recording device 13 is a terminal device with shooting function, and can be of various types. This application embodiment does not limit its specific type. For example, it can be a mobile phone, and may also include a tablet computer, a laptop computer, a smart screen, a wearable device, etc.

[0043] Electronic device 14 is used to perform focus testing on recording device 13 based on the video recording captured by recording device 13. This electronic device is a terminal device with a certain computing capability and can be of various types; the specific type is not limited in this application embodiment. For example, it can be a mobile phone, and may also include tablet computers, desktop computers, laptop computers, handheld computers, smart screens, wearable devices, augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, in-vehicle systems, smart headphones, game consoles, and may also be Internet of Things (IoT) devices or smart home devices such as smart TVs, etc. It is not limited to these; it may also include non-portable terminal devices such as laptops and desktop computers with touch-sensitive surfaces or touch panels.

[0044] A controllable lighting system for simulating different lighting environments. The controllable lighting system includes... Figure 1A The system includes a high-brightness lightbox, light source A, and light source B. Optionally, the controllable lighting system may include only light source A and / or light source B (excluding the high-brightness lightbox), or it may include more light sources, such as light source C. The high-brightness lightbox illuminates from behind the first object 11 to simulate the scene of a illuminated billboard in a real-world application.

[0045] For example, such as Figure 1AAs shown, in this focus cut evaluation system, a recording device 13 is placed directly in front of the first object 11 and the second object 12. The recording device 13 and the electronic device 14 can be connected wirelessly (e.g., via Bluetooth) or wiredly. Data transmission between the recording device 13 and the electronic device 14 can occur via this wireless / wired connection (e.g., the recording device 13 sends a first reference video recording to the electronic device 14). A highlight light box in this focus cut evaluation system is located in the background, behind the first object 11, and can be turned on or off. Light sources A and B in this focus cut evaluation system can simulate different illuminance levels.

[0046] This focus-switching evaluation system simulates the focus-switching situation of near and far objects in real-world application scenarios by rapidly switching the focus between the first object 11 and the second object 12. Optionally, the process of switching focus from the second object 12 to the first object 12 can be simulated by rapidly removing the second object 12 from the recording device.

[0047] The following is based on Figure 1A The provided focus-cutting evaluation method further describes the acquisition process of the first reference video, the first test video, the second reference video, and the second test video in the focus-cutting evaluation method provided in this application:

[0048] First, before starting the test, fix the recording device 13 so that it is directly in front of the first object 11 and / or the second object 12. Fix the first object 11 and the second object 12 so that they are on different horizontal planes, with the distance between the first object 11 and the recording device 13 being greater than the distance between the second object 12 and the recording device 13. Then turn on the recording device 13 so that its viewfinder can capture images of the first object 11 and the second object 12.

[0049] Next, adjust the light source of the focus measurement system. First, adjust light source A and light source B to the preset brightness (for example, control the illuminance of light source A and light source B on the first object 11 to be about 1000 lux, and the color temperature to be about 6500K). The highlight light box can be set to not be turned on, or the illuminance can be set to 2.3 × 10⁻⁶. 4 lux, placing it in a highly dynamic scene (such as a billboard).

[0050] After the above steps are completed, at the first moment, move the second object 12 out of the viewfinder of the recording device 13 so that the first object 11 faces the recording device 13. Turn on the recording device to start recording. After recording for a preset time (e.g., 10 seconds), at the second moment, move the second object 12 back into the viewfinder so that the second object 12 faces the recording device 13. After stabilizing for a certain period of time (e.g., 5 seconds), quickly remove the second object 12. Stop recording once the recording device has stabilized and focused on the first object 11.

[0051] The video clip from the first moment mentioned above is used as the first reference video clip, and the video clip from the second moment is used as the second reference video clip. In other words, the first reference video clip and the second reference video clip are from the same video clip.

[0052] Alternatively, two separate recordings can be performed to obtain a first reference recording and a first test recording.

[0053] Recording the first reference video: First, record a video of the first object 11, which is not obstructed by the second object 12, for a preset time (e.g., 10 seconds), and then obtain the first reference video. Figure 1B As shown, the Figure 1B These are two frames from the first reference video. Figure 1B The image on the left side shows the first object 11 before focusing. Figure 1B The image on the right side shows the first object 11 after it has been focused. There is no second object 12 in the entire first reference video; the focus is directly on the first object 11.

[0054] Recording the first test video: First, move the second object 12 into the viewfinder of the recording device 13. The second object 12 can completely obscure the first object 11. The second object 12 is positioned between the first object 11 and the recording device. Then, start recording. During recording, stabilize for a preset time (e.g., 5 seconds), then quickly move the second object 12 out of the viewfinder of the recording device 13. Finally, stop recording after the recording device 13 has stabilized its focus on the first object 11, thus obtaining the first test video. Figure 1C As shown, Figure 1C The first image from left to right is the image after focusing on the second object 12; Figure 1C The second frame from left to right shows the second object 12 being moved out of the viewfinder of the recording device 13; Figure 1C The third frame from left to right is the frame after the second object 12 has been moved out of the viewfinder of the recording device 13, and is also the frame after the first object 11 has been focused. Figure 1C The fourth image from left to right shows the image after focusing on the first object 11.

[0055] Optionally, multiple first test recordings can be recorded. That is, one first reference recording can serve as a reference recording for multiple first test recordings to avoid errors caused by environmental or other factors during a particular recording.

[0056] Optionally, multiple first test videos can be recorded for each light source environment.

[0057] After obtaining the first reference video and the first test video, the controllable lighting system is adjusted to obtain reference videos and test videos under other light source environments.

[0058] Optionally, multiple light source environments can be preset. Each preset light source environment includes the illuminance corresponding to light source A and light source B, as well as the on / off status of the high-brightness light box. Based on the preset multiple light source environments, multiple sets of reference videos and test videos are obtained. Each set of reference videos and test videos may include one reference video and multiple test videos.

[0059] Optionally, after all preset lighting environments have been captured, each video recording in the recording device 13 is sent to the electronic device 14, which then performs a focus test on the recording device 13 based on each video recording.

[0060] The aforementioned focus evaluation system operates by removing the second object 12 from the viewfinder of the recording device 13, causing the recording device 13 to switch focus from the second object 12 to the first object 11. Besides this removal-based focus switching method, the object to be focused on can also be manually selected, causing the recording device 13 to switch focus from the second object 12 to the first object 11. The following section combines... Figure 1D Further explanation of another focus-cutting method:

[0061] For example, such as Figure 1D As shown, Figure 1D The girl in the text can be understood as the second object 12 mentioned above. Figure 1D The boy in the text can be understood as the first object 11 mentioned above. Figure 1D In the illustrated embodiment, the viewfinder of the recording device can simultaneously capture the female and male figures. The female and male figures are not on the same horizontal plane. Figure 1D The male and female characters in the image are merely examples. In this focus-cutting method, there may be more than two people; there may be two objects, such as an apple and a table simultaneously framed in the viewfinder, or a person and an object. This application does not impose any restrictions on this.

[0062] Figure 1D In the first frame from left to right, the recording device is focused on the girl; the boy behind her is blurry because the image is out of focus. (Example) Figure 1DIn the second frame from left to right, the user taps on the area of ​​the boy's position on the recording device's screen to signal the device to refocus and refocus on the boy. (Example) Figure 1D The third frame from left to right shows the recording device's corresponding gesture, focusing on the boy; the girl is blurry because she is not in focus.

[0063] In one possible embodiment, the first reference video recording may be a direct comparison. Figure 1D The video was recorded after the boy in the video was focused. The first test video can be used as a reference. Figure 1D The process shown involves first focusing on the girl, and then using gestures to switch focus to focus on the boy.

[0064] The focus-cutting evaluation method provided in the embodiments of this application is further described below: Please refer to Figure 2 As shown, Figure 2 This is a flowchart illustrating a focus-cutting evaluation method provided in an embodiment of this application. The focus-cutting evaluation method includes the following steps 201-203. Figure 2 The method shown can be executed by an electronic device, which can be... Figure 1A Electronic device 14. Or Figure 2 The device executing the method shown can be a chip or chip system in an electronic device; however, this application does not limit this. Wherein:

[0065] 201. The electronic device acquires a first reference video recording, which includes a picture of the first object after focusing, and the first reference video recording is taken by the recording device under the first light source environment.

[0066] Optionally, the first reference video recording may be a video segment from the first video recording.

[0067] Optionally, the electronic device acquires the first reference video recording sent by the recording device. This first reference video recording may be a recording of the focusing process on the first object. The recording device can record the first reference video recording and immediately send it to the electronic device.

[0068] Optionally, the electronic device can acquire the first reference video sent by the recording device via a wired means or via a wireless means; this application does not impose any limitation on this.

[0069] Optionally, the first object may refer to the above. Figure 1A The description states that the first object can be a person or an object, and the first object can specifically be text, patterns, etc.

[0070] 202. The electronic device acquires a first test video recording, which includes the image after switching focus from the second object to the first object and refocusing on the first object. The first test video recording is captured by the recording device under the first light source environment.

[0071] Optionally, the first test video recording may be a video segment from the first video recording.

[0072] Optionally, the electronic device acquires the first test video recording sent by the recording device. The recording device may send the first test video recording to the electronic device immediately after recording, or it may send the first test video recording to the electronic device together with the reference and test videos of all lighting environments after they have been recorded.

[0073] Optionally, there can be multiple first test videos. The first test video first focuses on the second object, then cuts focus from the second object back to the first object. This focus-cutting method can be either the method described above (moving out to the second object) or the method described above (manual clicking). For details, please refer to the above description of... Figure 1C and Figure 1D The descriptions in the document are not repeated here.

[0074] Optionally, the image after refocusing the first object includes the image after switching focus to the first object and after focusing is complete.

[0075] Optionally, the first test video and the first reference video are taken under the same light source environment, and the first test video and the first reference video are obtained by the same recording device.

[0076] 203. The electronic device performs a focus-cutting evaluation on the recording device based on the first test video and the first reference video, and obtains the focus-cutting evaluation result corresponding to the first light source environment.

[0077] Optionally, the focus cut evaluation result corresponding to the first light source environment can be directly used as the focus cut evaluation result of the recording device. The focus cut evaluation result can be a score (e.g., 89 points) or a grade (e.g., Grade A). This application does not limit the form of the focus cut evaluation result.

[0078] Optionally, the focus-cutting test results can characterize the smoothness and accuracy of focus cutting by the recording device.

[0079] In one possible embodiment, the first object includes a standard image card. The electronic device performs a focus-cutting test on the recording device based on a first video recording and a second video recording. Specifically, the electronic device determines the smoothness of the focus-cutting process of the recording device based on the change in sharpness of the standard image card in the first test video recording; the electronic device determines the accuracy of the focus-cutting of the recording device based on the sharpness of the standard image card in the first test video recording after refocusing the first object and the sharpness of the standard image card in the first reference video recording.

[0080] Optionally, the standard chart can be specifically a withered leaf diagram, which includes two main parts: a pattern part and a mark point part. For example... Figure 3A As shown, the pattern can be located in the center of the leaf image, and the mark points are located at the four corners of the leaf image. These marks are used by electronic devices to identify the location of the leaf image. The pattern portion is used by electronic devices to calculate texture sharpness.

[0081] Optionally, the standard chart and the first object are located on the same horizontal plane, and the first object can be attached to the first object.

[0082] Optionally, the first object is the standard chart, or the first object is both the object and the standard chart, such as... Figure 1B As shown, the first object is a male and a standard picture card, or the first object may not include the standard picture card, and this application does not limit this.

[0083] The methods for determining the smoothness and accuracy of the coke cutting process are described below.

[0084] For smoothness, a standard chart (e.g., a dead leaf chart) reflects the sharpness of the image in front of the focus point on that plane. The sharpness of the standard chart is low when focused in front of the plane, and high when focused behind the plane. When the recording device switches focus from the second object to the first object, the sharpness of the standard chart, which is on the same plane as the first object, should gradually increase. Then, after focusing is complete, the sharpness of the standard chart should remain stable. Figure 3B As shown, Figure 3B This demonstrates the relationship between frame order and the sharpness of a standard graphics card. Figure 3B To focus on the first object, the change in sharpness of the standard chart within the first object after focusing on it. Therefore, the sharpness of the standard chart can reflect the entire focus convergence process during focus switching. Thus, calculating the smoothness of the sharpness of the standard chart can reflect the smoothness of the focus convergence process of the recording device.

[0085] In one possible embodiment, the electronic device determines the smoothness of the focus-cutting process of the recording device by measuring the change in sharpness of a standard image card in the first test video recording, including: the electronic device performing frame segmentation processing on the first test video recording to obtain multiple first images containing the standard image card; calculating the sharpness gradient of the standard image card in adjacent first images, wherein the sharpness gradient is positively correlated with the change in sharpness of the standard image card; and determining the smoothness of the focus-cutting process of the recording device based on the sharpness gradient of the standard image card.

[0086] The first image is a frame from the first test video recording that contains the standard chart, or in other words, the first image is an image from the first test video recording that contains the complete standard chart. For example, Figure 1C As shown, Figure 1C Although the second image from left to right contains a standard chart, it is not a complete standard chart, therefore it cannot be used as the first image. Figure 1C The third and fourth images can be used as the first image.

[0087] Optionally, the frame-capturing process can be performed frame-by-frame, meaning the number of frames in the first test video will equal the number of first images obtained after frame-capturing. Alternatively, the frame-capturing process can also capture one frame at a time, or capture one frame at a preset interval. This application does not impose any limitations on this.

[0088] Optionally, if frame-by-frame capture is used, the adjacent first images are the two adjacent frames in the first test video recording that contain the standard chart. If frame capture is used at intervals, the adjacent first images are the two most recent frames in the first test video recording that contain the standard chart. For example, if the frame capture process extracts frames 60, 62, 64, and 66 from the first test video recording (all extracted images contain the complete standard chart), then the adjacent first images are frames 60 and 62, frames 62 and 64, and so on.

[0089] Optionally, the sharpness gradient can be the difference in sharpness between the standard charts in the two first images. For example, it could be the difference between the sharpness of the standard chart in frame 60 and the sharpness of the standard chart in frame 62. Alternatively, the sharpness gradient can be the ratio of the sharpness of the standard charts in the two first images. This application does not limit this.

[0090] Optionally, the sharpness gradient is positively correlated with the sharpness change of the standard chart; the larger the sharpness gradient, the greater the sharpness change of the standard chart; conversely, the smaller the sharpness gradient, the smaller the sharpness change of the standard chart.

[0091] Optionally, the sharpness gradient of the standard card in all adjacent first images can be calculated. For example, if the first images are obtained by capturing frames as follows: frame 60, frame 62, frame 64, and frame 66, then when calculating the sharpness gradient, it is necessary to calculate the sharpness gradient between the sharpness of the standard card in frame 60 and frame 62, the sharpness gradient between the sharpness of the standard card in frame 62 and frame 64, and the sharpness gradient between the sharpness of the standard card in frame 64 and frame 66.

[0092] Optionally, the first test video recording may be processed by frame segmentation, specifically by using frame segmentation software to extract every other frame from the first test video recording. This frame segmentation software can be PotPlayer or ffmpeg, etc.

[0093] Optionally, the standard chart includes mark points. The electronic device calculates the sharpness gradient of the standard chart in adjacent first images. Specifically, the electronic device identifies the position of the standard chart in the first image based on the mark in the first image; the electronic device calculates the sharpness of the standard chart in each first image; and the electronic device calculates the sharpness gradient of the standard chart in adjacent first images based on the sharpness of the standard chart in each first image.

[0094] In one possible embodiment, the electronic device determines the smoothness of the recording device's focus-cutting process based on the sharpness gradient of a standard chart, including: the electronic device counting the number of peaks in all sharpness gradients, where peaks are sharpness gradients greater than a peak threshold; and determining the smoothness of the recording device's focus-cutting process based on the number of peaks, where the number of peaks is negatively correlated with smoothness.

[0095] Optionally, the electronic device counts the number of peaks in all the sharpness gradients, specifically: the electronic device determines the number of peaks in all sharpness gradients based on a peak threshold and the sharpness gradient.

[0096] The number of peaks is negatively correlated with smoothness; that is, the more peaks there are, the worse the smoothness of focus cutting; conversely, the fewer peaks there are, the better the smoothness of focus cutting.

[0097] For example, the following is combined with Figure 3C and Figure 3D The relationship between sharpness, sharpness gradient, and smoothness is further explained.

[0098] like Figure 3C As shown, Figure 3C The left side of the central axis represents sharpness, the right side represents the sharpness gradient, and the horizontal axis represents frame order. Figure 3CThe line marked 301 in the middle indicates the relationship between frame order and sharpness. Figure 3C The line marked 302 represents the relationship between frame order and sharpness gradient. It can be seen that when the sharpness changes abruptly in line 301, a peak will appear in the corresponding line 302. For line 302, there are 5 peaks, meaning there are five sharpness gradients in line 302 that are greater than the peak threshold.

[0099] like Figure 3D As shown, Figure 3D The left side of the central axis represents sharpness, the right side represents the sharpness gradient, and the horizontal axis represents frame order. Figure 3D The line marked 303 in the middle indicates the relationship between frame order and sharpness. Figure 3C The line marked 304 represents the relationship between frame order and sharpness gradient. For line 304, there are 3 peaks, meaning that there are 3 sharpness gradients in line 304 that are greater than the peak threshold.

[0100] In summary, the peak value in line 304 is smaller than the peak value in line 302, and the smoothness corresponding to line 304 is better than that corresponding to line 302.

[0101] For video recordings, frame rate affects the sharpness gradient. For example, for the same video recording, if the frame rate is high, the sharpness of adjacent frames is more similar, meaning the sharpness gradient is smaller; if the frame rate is low, the sharpness difference between adjacent frames is greater, meaning the sharpness gradient is larger. Therefore, to more accurately determine smoothness for different frame rates, in one possible embodiment, the electronic device determines the frame rate of a first test video recording, where the frame rate is the number of images displayed per second in the first test video recording; based on the frame rate of the first test video recording, a peak threshold is determined.

[0102] The frame rate is inversely proportional to the peak threshold; that is, the higher the frame rate, the smaller the peak threshold, and vice versa.

[0103] Optionally, the frame rate of the first test video can also represent the frame rate of the video recorded by the recording device, that is, the number of images captured per second when recording the video.

[0104] Optionally, the frame rate is the frame rate corresponding to the recording device. This frame rate can be sent separately by the recording device to the electronic device, or it can be carried in the first test recording and sent to the electronic device, or it can be preset in the electronic device.

[0105] Optionally, the electronic device determines the peak threshold based on the frame rate of the first test video recording. Specifically, the electronic device determines the peak threshold based on the frame rate of the first test video recording and a preset first mapping relationship, wherein the first mapping relationship includes at least one mapping relationship between the frame rate and the peak threshold.

[0106] For example, the first mapping relationship is as follows: frame rate A—peak threshold A, frame rate B—peak threshold B, and frame rate C—peak threshold C. If the frame rate of the first test recording is frame rate B, then the peak threshold is peak threshold B.

[0107] Alternatively, the first mapping relationship includes a mapping relationship between at least one frame rate range and a peak threshold. For example, the first mapping relationship is as follows: [frame rate 1, frame rate 2] — peak threshold A, [frame rate 3, frame rate 4] — peak threshold B, [frame rate 5, frame rate 6] — peak threshold C. If the frame rate of the first test recording is between [frame rate 3, frame rate 4], then the peak threshold is peak threshold B.

[0108] For accuracy, a standard chart (e.g., a dead leaf chart) reflects the sharpness of the image from the focus point to the plane. A standard chart focused in front of the plane has low sharpness, while one focused behind the plane has high sharpness. In the first reference video, the focus was directly applied to the plane containing the standard chart (the first object). Therefore, the sharpness of the standard chart in the first reference video after focusing is considered the sharpest. The closer the sharpness of the standard chart in the first measurement video after focus trimming is to the sharpness of the standard chart in the first reference video after focus trimming, the more accurate the focus trimming process is considered.

[0109] In one possible embodiment, the ratio of the sharpness of the standard chart in the first reference video to the sharpness of the standard chart in the first test video after refocusing the first object is inversely proportional to the accuracy.

[0110] Optionally, the sharpness of the standard chart in the first reference video is the sharpness of the standard chart after focusing in the first reference video, or the sharpness of the standard chart in the first reference video is the sharpness of the standard chart in the last frame of the first reference video.

[0111] Optionally, the sharpness of the standard chart in the first test video after refocusing the first object can be: the sharpness of the standard chart in the last frame of the first test video.

[0112] The ratio of the sharpness of the standard image card in the first reference video to the sharpness of the standard image card in the first test video after refocusing the first object is at least 1. When the ratio of the sharpness of the standard image card in the first reference video to the sharpness of the standard image card in the first test video after refocusing the first object is 1, that is, when the sharpness of the standard image card in the first reference video and the sharpness of the standard image card in the first test video after refocusing the first object are the same, the accuracy of the focus cut is considered to be the highest.

[0113] In other words, accuracy is inversely proportional to the ratio of sharpness A to sharpness B. Sharpness A is the sharpness of the standard image card in the first reference video, and sharpness B is the sharpness of the standard image card in the first test video after refocusing the first object. The smaller the sharpness B, the larger the ratio, and the lower the accuracy. Conversely, the larger the sharpness B, the smaller the ratio, and the higher the accuracy. The maximum value of sharpness B is equal to sharpness A, at which point the ratio is 1, resulting in the highest accuracy.

[0114] Optionally, if there are multiple first test recordings, that is, multiple resolutions B, then the average of the multiple resolutions B is taken as the denominator.

[0115] In one possible embodiment, a second reference video is acquired, which includes an image of the first object after focusing. The second reference video is captured by the recording device under a second light source environment. A second test video is acquired, which includes an image of the first object after focusing from the second object and refocusing on the first object. The second test video is captured by the recording device under a second light source environment. Based on the second test video and the second reference video, a focus-switching evaluation of the recording device is performed to obtain a focus-switching evaluation result corresponding to the second light source environment.

[0116] Optionally, the electronic device acquires a second reference video recording sent by the recording device. This second reference video recording may be a recording of the focusing process on the first object. The recording device can record the second reference video recording and immediately send it to the electronic device.

[0117] Optionally, the electronic device can acquire the second reference video sent by the recording device via a wired means or via a wireless means; this application does not impose any restrictions on this.

[0118] Optionally, the electronic device acquires the second test video sent by the recording device. The recording device may send the second test video to the electronic device immediately after shooting, or it may send the second test video to the electronic device together with the reference and test videos of all lighting environments after they have been shot.

[0119] Optionally, there can be multiple second test videos. The second test video first focuses on the second object, then cuts focus from the second object back to the first object. This focus-cutting method can be either the method described above (moving out to the second object) or the method described above (manual clicking). For details, please refer to the above description of... Figure 1C and Figure 1D The descriptions in the document are not repeated here.

[0120] Optionally, the second test video and the second reference video are taken under the same light source environment, and the first test video and the first reference video are taken by the same recording device.

[0121] Optionally, the second test video and the first test video are recorded by recording devices under different light source environments. Similarly, the second reference video and the first reference video are also recorded by recording devices under different light source environments.

[0122] The hardware structure of the recording device is described below:

[0123] This recording device can Figure 1A Recording device 13 in the middle.

[0124] Please see Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of the recording device 100 provided in this application embodiment. The recording device 100 can be a recording device corresponding to the training phase or a recording device corresponding to the application phase.

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

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

[0127] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0128] The controller can serve as the central nervous system and command center of the recording device 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0129] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor 110 retrieves the instructions or data stored in the memory, causing the recording device 100 to execute the shooting method performed by the recording device in the following method embodiments.

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

[0131] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0132] 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 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be located in the processor 110.

[0133] The wireless communication function of the recording device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

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

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

[0136] A modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor.

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

[0138] In some embodiments, the antenna 1 of the recording 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 recording device 100 can communicate with the network and other devices through wireless communication technology.

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

[0140] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some embodiments, recording device 100 may include one or N displays screens 194, where N is a positive integer greater than 1. Display screen 194 may include OLED screens.

[0141] Optionally, the display 194 may further include: an OLED glass layer, an OLED light-emitting unit, a fingerprint recognition sensor, a microlens array, etc. The display 194 supports optical in-display fingerprint recognition.

[0142] The recording device 100 can perform shooting functions through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor. The ISP processes data fed back by the camera 193. The camera 193 captures still images or videos. The camera 193 may include a front-facing camera and a rear-facing camera; the front-facing camera is located on the display area of ​​the screen, and the rear-facing camera is located on the back area of ​​the screen. The digital signal processor processes digital signals, including digital image signals and other digital signals. The video codec is used to compress or decompress digital video. The recording device 100 may support one or more video codecs.

[0143] NPU stands for Neural-Network (NN) Computing Processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.

[0144] 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 recording device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage.

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

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

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

[0148] A speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. A receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. A microphone 170C, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. A headphone jack 170D is used to connect wired headphones. A pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be located on the display screen 194. A gyroscope sensor 180B can be used to determine the motion posture of the recording device 100. A barometric pressure sensor 180C is used to measure barometric pressure. A magnetic sensor 180D includes a Hall effect sensor. An accelerometer 180E can detect the magnitude of the acceleration of the recording device 100 in various directions (generally three axes). A distance sensor 180F is used to measure distance. A proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photosensor. An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. Temperature sensor 180J is used to detect temperature. Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. Bone conduction sensor 180M can acquire vibration signals. Buttons 190 include power button, volume buttons, etc. Motor 191 can generate vibration prompts. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.

[0149] Furthermore, an operating system runs on top of the aforementioned components. Examples include iOS and Android. The operating system of the recording device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of the recording device 100. It should be noted that although this application embodiment uses the Android system as an example for illustration, its basic principles are equally applicable to recording devices with other operating systems.

[0150] The software structure of the recording device 100 is described below:

[0151] Figure 5This is a schematic diagram of the software structure of a recording device 100 provided in an embodiment of this application. The software structure adopts a layered architecture, which divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In this embodiment, the operating system (taking Android as an example, with Android running on an AP) can be divided into four layers, from top to bottom: the application layer (APP), the application framework layer (FWK), the hardware abstraction layer (HAL), and the kernel layer.

[0152] The application layer can include a series of application packages. For example... Figure 5 As shown, the application package may include applications such as a camera and a gallery. In this embodiment, "camera" refers to a camera application. A camera application may include a camera interface module (which may be called a CameraApi2Module), etc. "Gallery" refers to a gallery application, which is used to store images and videos captured by the recording device. This gallery application also provides users with playback functionality, allowing users to view historically captured images and videos within the gallery application.

[0153] The application framework layer provides application developers with an application programming interface (API) framework and various services and management tools to access core functionalities, including interface management, data access, application-layer messaging, application package management, telephony management, and location management. The application framework layer includes some predefined functions. For example... Figure 5 As shown, the application framework layer may include, but is not limited to, the camera service CameraService.

[0154] CameraService is responsible for scheduling the startup process of the camera application, creating and managing processes, and creating and managing windows. In this application, the portrait enhancement model can be built into the camera service or be a module independent of the camera service. For ease of description, we will take the example of the portrait enhancement model being built into the camera service.

[0155] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the hardware circuitry. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform, providing the operating system with a virtual hardware platform. For example... Figure 5As shown, the hardware abstraction layer can include CameraResourceService, CameraProvider, etc. In addition, this hardware abstraction layer can also include: CameraDeviceSession, PreviewFlowImpl, etc. Specifically, CameraResourceService is used to interact with the memory modules in the hardware; CameraProvider is used to enumerate individual devices and manage their states, enabling the opening and closing of physical camera devices (such as rear cameras); CameraDeviceSession is used to create camera device sessions and store the attributes and configuration information required for the camera device sessions; PreviewFlowImpl is responsible for informing the app that the first frame of the preview has been displayed after the first frame of the preview is shown.

[0156] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, etc.

[0157] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a coke cutting evaluation device 600 provided in an embodiment of this application. Figure 6 The focus cutting test device shown can be an electronic device, a device within an electronic device, or a device that can be used in conjunction with an electronic device. Figure 6 The focus cutting test training device shown may include an acquisition unit 601 and a processing unit 602. Wherein:

[0158] The acquisition unit 601 is used to acquire a first reference video recording, which includes a picture of the first object after focusing. The first reference video recording is captured by the recording device under the first light source environment.

[0159] The acquisition unit 601 is also used to acquire a first test video recording, which includes the image after switching focus from the second object to the first object and refocusing on the first object. The first test video recording is captured by the recording device under the first light source environment.

[0160] The processing unit 602 is used to perform focus-cutting evaluation on the recording device based on the first test video and the first reference video, and obtain the focus-cutting evaluation result corresponding to the first light source environment.

[0161] In one possible embodiment, the processing unit 602 is further configured to determine the smoothness of the focus-cutting process of the recording device based on the change in the sharpness of the standard chart in the first test video; and to determine the accuracy of the focus-cutting process of the recording device based on the sharpness of the standard chart in the first test video after the first object has been refocused, and the sharpness of the standard chart in the first reference video.

[0162] In one possible embodiment, the processing unit 602 is further configured to perform frame segmentation processing on the first test video to obtain multiple first images containing a standard image card; calculate the sharpness gradient of the standard image card in adjacent first images, wherein the sharpness gradient is positively correlated with the sharpness change of the standard image card; and determine the smoothness of the focus cutting process of the recording device based on the sharpness gradient of the standard image card.

[0163] In one possible embodiment, the processing unit 602 is further configured to count the number of peaks in all sharpness gradients, where a peak is a sharpness gradient greater than a peak threshold; and based on the number of peaks, determine the smoothness of the focus-cutting process of the recording device, wherein the number of peaks is negatively correlated with smoothness.

[0164] In one possible embodiment, the processing unit 602 is further configured to determine the frame rate of the first test video recording, the frame rate of which is the number of images displayed per second in the first test video recording; and to determine a peak threshold based on the frame rate of the first test video recording.

[0165] In one possible embodiment, the ratio of the sharpness of the standard chart in the first reference video to the sharpness of the standard chart in the first test video after refocusing the first object is inversely proportional to the accuracy.

[0166] In one possible embodiment, the acquisition unit 601 is further configured to acquire a second reference video, the second reference video including an image after focusing on the first object, the second reference video being captured by a recording device under a second light source environment; and acquire a second test video, the second test video including an image after switching focus from the second object to the first object and refocusing on the first object, the second test video being captured by a recording device under a second light source environment;

[0167] The processing unit 602 is also used to perform focus-cutting evaluation on the recording device based on the second test video and the second reference video, and obtain the focus-cutting evaluation result corresponding to the second light source environment.

[0168] For cases where the focus cutting evaluation device can be a chip or a chip system, please refer to [link / reference]. Figure 7 The diagram shows the structure of the chip. Figure 7 The chip 700 shown includes a processor 701 and an interface 702. Optionally, it may also include a memory 703. The number of processors 701 can be one or more, and the number of interfaces 702 can be multiple.

[0169] For cases where the chip is used to implement the electronic device in the embodiments of this application:

[0170] The interface 702 is used to receive or output signals;

[0171] The processor 701 is used to perform data processing operations of the electronic device.

[0172] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0173] It is understood that some optional features in the embodiments of this application can be implemented independently in certain scenarios without relying on other features, such as the current solution on which they are based, to solve the corresponding technical problems and achieve the corresponding effects. Alternatively, they can be combined with other features as needed in certain scenarios. Accordingly, the focus-cutting evaluation device given in the embodiments of this application can also implement these features or functions, which will not be elaborated here.

[0174] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0175] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0176] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed on an electronic device, implement the functions of any of the above method embodiments.

[0177] This application also provides a computer program product that, when run on a computer, enables the computer to perform the functions of any of the above method embodiments.

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

[0179] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for evaluating coke cutting performance, characterized in that, The method includes: Acquire a first reference video recording, which includes a focused image of a first object, and the first reference video recording is captured by a recording device under a first light source environment; Acquire a first test video, which includes a scene after switching focus from the second object to the first object and refocusing on the first object. The first test video is captured by the recording device under the first light source environment. Based on the first test video and the first reference video, the recording device is subjected to focus-cutting evaluation to obtain the focus-cutting evaluation result corresponding to the first light source environment.

2. The method according to claim 1, characterized in that, The first object includes a standard image card, and the focus-cutting evaluation of the recording device based on the first test video and the first reference video includes: Based on the change in sharpness of the standard chart in the first test video, the smoothness of the focus-cutting process of the recording device is determined; Based on the clarity of the standard chart of the image after refocusing the first object in the first test video and the clarity of the standard chart in the first reference video, the accuracy of the focus cut by the recording device is determined.

3. The method according to claim 2, characterized in that, The determination of the smoothness of the focus-cutting process of the recording device based on the change in sharpness of the standard chart in the first test video includes: The first test video is processed by frame segmentation to obtain multiple first images containing the standard image card; Calculate the sharpness gradient of the standard chart in adjacent first images, wherein the sharpness gradient is positively correlated with the sharpness change of the standard chart; Based on the sharpness gradient of the standard chart, the smoothness of the focus-cutting process of the recording device is determined.

4. The method according to claim 3, characterized in that, Determining the smoothness of the focus-cutting process of the recording device based on the sharpness gradient of the standard chart includes: Count the number of peaks in all the sharpness gradients, where the peaks are sharpness gradients that are greater than a peak threshold; The smoothness of the focus-cutting process of the recording device is determined based on the number of peaks, and the number of peaks is negatively correlated with smoothness.

5. The method according to claim 4, characterized in that, The method further includes: Determine the frame rate of the first test recording, where the frame rate of the first test recording is the number of images displayed per second in the first test recording; The peak threshold is determined based on the frame rate of the first test recording.

6. The method according to any one of claims 2-5, characterized in that, The ratio of the sharpness of the standard chart in the first reference video to the sharpness of the standard chart in the first test video after refocusing the first object is inversely proportional to the accuracy.

7. The method according to claim 1, characterized in that, The method further includes: Acquire a second reference video, which includes a focused image of the first object, and the second reference video is captured by a recording device under a second light source environment; Acquire a second test video, which includes a scene after switching focus from the second object to the first object and refocusing on the first object. The second test video is captured by the recording device under the second light source environment. Based on the second test video and the second reference video, the recording device is subjected to focus-cutting evaluation to obtain the focus-cutting evaluation result corresponding to the second light source environment.

8. An electronic device comprising one or more memories and one or more processors, characterized in that, The memory is used to store a computer program; the processor is used to invoke the computer program, causing the electronic device to perform the method of any one of claims 1-7.

9. A chip system for use in electronic devices, characterized in that, The chip system includes at least one processor and an interface for receiving instructions and transmitting them to the at least one processor; the at least one processor executes the instructions to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-7.

11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-7.