Picture detection, device, computer device and storage medium

By introducing the region of interest and auxiliary window information to determine the detection window in the image detection process, and combining sharpness features to dynamically adjust the window parameters, the problem of insufficient sensitivity and reliability in image blur detection is solved, and a better focusing effect is achieved.

CN117115073BActive Publication Date: 2026-06-16HUIZHOU TCL MOBILE COMM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUIZHOU TCL MOBILE COMM CO LTD
Filing Date
2022-08-29
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing image blur detection mechanisms struggle to balance sensitivity and reliability, leading to excessively frequent focusing or failure to focus at all, thus affecting image display quality.

Method used

By introducing a first detection window and an auxiliary window to determine the region of interest in the image detection, and extracting and combining the sharpness features of both, the number, weight, and size of the windows are dynamically adjusted to improve the sensitivity and reliability of the detection.

🎯Benefits of technology

It improves the sensitivity and reliability of image blur detection, avoids false triggers, improves image focusing effect, and ensures that the image is always clear.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117115073B_ABST
    Figure CN117115073B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a picture detection method and device, computer equipment and a storage medium. The embodiments of the present application can acquire a region of interest in a to-be-detected picture and auxiliary window information of the to-be-detected picture, determine a first detection window for detecting the to-be-detected picture according to the region of interest, determine a second detection window for detecting the to-be-detected picture according to the auxiliary window information, extract a first definition feature corresponding to a picture region in the first detection window and a second definition feature corresponding to a picture region in the second detection window, and determine a detection result of the to-be-detected picture based on the first definition feature and the second definition feature. The scheme can improve the sensitivity and reliability of picture definition detection and improve the picture focusing effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a screen detection device, computer equipment, and storage medium. Background Technology

[0002] When an image becomes blurry, the ability to quickly and accurately detect this change helps trigger autofocus, thus ensuring the display quality. In practical applications, the image blur detection mechanism is a crucial component of an autofocus system.

[0003] In the process of researching and practicing related technologies, the inventors of this application discovered that increasing the sensitivity of image blur detection leads to excessively frequent focusing, resulting in poor visual effects. Conversely, increasing the reliability of detection results in the inability to detect blur, thus preventing focusing and leaving the image in a blurry state. Therefore, it is evident that current image blur detection mechanisms struggle to balance sensitivity and reliability, necessitating further improvement. Summary of the Invention

[0004] This application provides an image detection method, apparatus, computer device, and storage medium, which can improve the sensitivity and reliability of image blur detection and improve image focusing effect.

[0005] This application provides an image detection method, including:

[0006] Obtain the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected;

[0007] Based on the region of interest, a first detection window is determined for detecting the image to be detected;

[0008] Based on the auxiliary window information, a second detection window is determined for detecting the image to be detected;

[0009] Extract the first sharpness feature corresponding to the image region in the first detection window and the second sharpness feature corresponding to the image region in the second detection window;

[0010] Based on the first clarity feature and the second clarity feature, the detection result of the image to be detected is determined.

[0011] Accordingly, embodiments of this application also provide an image detection device, including:

[0012] The acquisition unit is used to acquire the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected;

[0013] The first determining unit is configured to determine a first detection window for detecting the image to be detected based on the region of interest.

[0014] The second determining unit is used to determine a second detection window for detecting the image to be detected based on the auxiliary window information.

[0015] The extraction unit is used to extract the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window.

[0016] The result determination unit is used to determine the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

[0017] In one embodiment, the result determination unit includes:

[0018] The interval determination subunit is used to determine the verification interval information for feature verification of the first sharpness feature;

[0019] The feature verification subunit is used to perform feature verification on the first clarity feature according to the verification interval information to obtain the first feature verification result of the image to be detected.

[0020] The result determination subunit is used to determine the detection result of the image to be detected based on the first feature verification result and the second clarity feature.

[0021] In one embodiment, the first feature verification result indicates that the detection result of the image to be detected is determined based on the second sharpness feature; the result determination subunit is used for:

[0022] Determine the verification interval information for feature verification of the second clarity feature; perform feature verification on the second clarity feature according to the verification interval information to obtain the second feature verification result of the image to be detected; determine the detection result of the image to be detected according to the second verification result.

[0023] In one embodiment, the extraction unit includes:

[0024] The initial determination subunit is used to determine the initial sharpness features corresponding to the image area in the first detection window based on the historical detection result data of the image to be detected.

[0025] The current determination subunit is used to extract the current sharpness features corresponding to the image area in the first detection window;

[0026] The feature determination subunit is used to determine the first sharpness feature corresponding to the image region in the first detection window based on the initial sharpness feature and the current sharpness feature.

[0027] In one embodiment, the second determining unit includes:

[0028] The result acquisition subunit is used to acquire historical detection result data of the image to be detected.

[0029] The information update subunit is used to update the auxiliary window information based on the historical detection result data;

[0030] The window determination subunit is used to determine a second detection window for detecting the image to be detected based on the updated auxiliary window information.

[0031] In one embodiment, the auxiliary window information includes the number of windows in the second detection window; the information update subunit is used to:

[0032] Determine the number of historical windows corresponding to the historical detection result data; analyze the number of historical windows based on the historical detection result data; update the number of windows of the second detection window in the auxiliary window information based on the analysis results.

[0033] In one embodiment, the auxiliary window information includes window weight information of the second detection window; the information update subunit is used to:

[0034] Determine the historical window weight information corresponding to the historical detection result data; based on the historical window weight information, determine the target second detection window whose window weight needs to be updated from the historical second detection window corresponding to the historical detection result data; update the window weight information corresponding to the target second detection window in the auxiliary window information.

[0035] In one embodiment, the auxiliary window information includes the window size information of the second detection window; the information update subunit is used to:

[0036] Based on the historical detection results data, the target screen area for adjusting the window size is determined from the screen to be detected; based on the area location information of the target screen area, the window size information of the second detection window in the auxiliary window information is updated.

[0037] In one embodiment, the information update subunit is configured to:

[0038] Based on the historical detection result data, a target second detection window to be divided into sub-windows is determined from the historical second detection window corresponding to the historical detection result data; the sub-window description information of the target second detection window is determined; and the window information corresponding to the target second detection window in the auxiliary window information is updated based on the sub-window description information.

[0039] In one embodiment, the acquisition unit includes:

[0040] The collection retrieves a sub-unit, used to retrieve a preset set of auxiliary window information;

[0041] The information determination subunit is used to determine the device parameter information of the screen display device corresponding to the screen to be detected;

[0042] The information query subunit is used to query the auxiliary window information corresponding to the device parameter information from the auxiliary window information set.

[0043] Accordingly, this application also provides a computer device including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any of the screen detection methods provided in this application.

[0044] Accordingly, embodiments of this application also provide a computer-readable storage medium for storing a computer program, which is loaded by a processor to execute any of the screen detection methods provided in embodiments of this application.

[0045] Accordingly, this application also provides a computer program product, including a computer program / instructions, wherein when the computer program / instructions are executed by a processor, they implement the steps of the screen detection method shown in this application embodiment.

[0046] This application embodiment can obtain the region of interest in the image to be detected, and the auxiliary window information of the image to be detected; determine a first detection window for detecting the image to be detected based on the region of interest; determine a second detection window for detecting the image to be detected based on the auxiliary window information; extract a first sharpness feature corresponding to the image region in the first detection window and a second sharpness feature corresponding to the image region in the second detection window; and determine the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

[0047] This scheme, based on a first detection window determined by the region of interest (ROI), incorporates a second detection window to assist in detecting image blur. For example, it can detect image blur, meaning blur detection no longer relies solely on the first detection window based on the ROI. This allows for the detection of blur changes even when the ROI does not include areas with drastic changes in sharpness, thus improving the reliability of blur detection. Furthermore, since this scheme specifically performs blur detection based on the first sharpness features corresponding to the image area in the first detection window and the second sharpness features corresponding to the image area in the second detection window, it can capture blur changes of different regions and degrees within the image, avoiding false triggers and improving the sensitivity of blur detection. Therefore, this scheme balances sensitivity and reliability in detecting image blur changes, thereby improving the focus of the image. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a scene diagram illustrating the image detection method provided in the embodiments of this application;

[0050] Figure 2 This is a flowchart of the image detection method provided in the embodiments of this application;

[0051] Figure 3 This is a schematic diagram of the detection window of the image detection method provided in the embodiments of this application;

[0052] Figure 4 This is a schematic diagram of another detection window of the image detection method provided in the embodiments of this application;

[0053] Figure 5 This is another flowchart of the image detection method provided in the embodiments of this application;

[0054] Figure 6 This is a schematic diagram of another detection window of the image detection method provided in the embodiments of this application;

[0055] Figure 7 This is a schematic diagram of another detection window of the image detection method provided in the embodiments of this application;

[0056] Figure 8This is another flowchart of the image detection method provided in the embodiments of this application;

[0057] Figure 9 This is another flowchart of the image detection method provided in the embodiments of this application;

[0058] Figure 10 This is another flowchart of the image detection method provided in the embodiments of this application;

[0059] Figure 11 This is a schematic diagram of the image detection device provided in the embodiments of this application;

[0060] Figure 12 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. However, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0062] This application provides a screen detection method, which can be executed by a screen detection device integrated into a computer device. The computer device may include a terminal. The screen detection method can be executed by the terminal, or it can be executed jointly by the terminal and a server.

[0063] The computer device can be a terminal or similar device. This terminal can be a personal computer, tablet, laptop, desktop computer, smart TV, smartphone, smart speaker, smartwatch, VR / AR device, in-vehicle terminal, smart home device, wearable electronic device, etc., but is not limited to these. The terminal and the server can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0064] In one embodiment, such as Figure 1 As shown, the screen detection device can be integrated into computer devices such as terminals to implement the screen detection method proposed in the embodiments of this application. As an example, this application can use a computer device as a terminal to illustrate the screen detection method.

[0065] refer to Figure 1 Terminal 10 can acquire the region of interest (ROI) in the image to be inspected, as well as the auxiliary window information of the image. For example, the image to be inspected can be acquired by an image acquisition device, the region of interest in the image can be determined by terminal 10, and the auxiliary window information of the image can be obtained from the stored data of terminal 10. Alternatively, the auxiliary window information of the image to be inspected can be obtained by terminal 10 by requesting data from server 20.

[0066] Terminal 10 can determine a first detection window for detecting the image to be detected based on the region of interest (ROI) of the image to be detected; and determine a second detection window for detecting the image to be detected based on the acquired auxiliary window information. Further, terminal 10 can extract a first sharpness feature corresponding to the image region in the first detection window and a second sharpness feature corresponding to the image region in the second detection window. It is worth noting that there can be multiple first detection windows and multiple second detection windows for the image to be detected. Then, based on the first and second sharpness features, the terminal can determine the detection result of the image to be detected; specifically, it can determine the detection result of the image blur of the image to be detected.

[0067] The following will provide a detailed description of each example. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0068] The screen detection method provided in this application can be executed by a terminal or jointly by a server and a terminal; this application example illustrates the screen detection method executed by a terminal.

[0069] like Figure 2 The specific process of the image detection method can be described as follows:

[0070] 101. Obtain the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected.

[0071] The image to be detected refers to the image whose blurriness is to be assessed. For example, the image to be detected can be an image captured by an image acquisition device, such as a camera in a video surveillance system. In practical applications, the working environment of cameras is complex and variable. To ensure 24 / 7 video surveillance, the camera must always be in sharp focus. When the image becomes blurry, the system must be able to quickly and accurately identify this change to trigger automatic focusing. Therefore, the image blur detection mechanism is a crucial component of an automatic focusing system.

[0072] A region of interest (ROI) is one or more image regions selected from an image. This region serves as the focus of image analysis, defining the area for further processing. For example, in face recognition applications, the region containing a face in an image is the ROI.

[0073] The auxiliary window information of the image to be detected describes the relevant information of the detection window used to assist in the image blur detection of the image to be detected. For example, the second detection window of the image to be detected in this application can also be called the auxiliary window for performing image blur detection on the image to be detected, and the auxiliary window information specifically describes the relevant information of the second detection window.

[0074] For example, the auxiliary window information may include information such as the number of windows, window weights, and window size of the second detection window.

[0075] It is worth noting that the detection window in this application is used to detect the blurriness of the screen to be detected, and specifically to determine the range of a specific screen area after the screen to be detected is divided into regions. The detection window in this application (including the first detection window and the second detection window) does not refer to the visible window in the front-end display interface. In the process of detecting the screen to be detected through the detection window, it is preferable that the detection window in this application is not visible to the user.

[0076] There are several ways for a terminal to determine the region of interest (ROI) in the image to be detected. For example, the terminal can use a pre-set training model or call a pre-set detection algorithm to detect the ROI in the image. Alternatively, the server can synchronously capture the image to be detected from an image acquisition device, and the server can determine the ROI in the image so that the terminal can learn about the ROI from the server. It is worth noting that the number of ROIs in the image to be detected can be one or multiple; this application does not limit this.

[0077] There are several ways for a terminal to acquire auxiliary window information of the image to be detected. For example, the terminal can store preset auxiliary window information that matches the terminal. In practical applications, when the current hardware and software resources of the image detection system change, the terminal can adjust the auxiliary window information accordingly, such as adjusting the number of windows, window weights, and window sizes of the second detection window.

[0078] For example, the terminal can obtain a preset set of auxiliary window information, which may include auxiliary window information that matches different device parameter information. Then the terminal can determine the matching auxiliary window information from the set of auxiliary window information based on its current device parameter information, thereby determining the auxiliary window information of the screen to be detected.

[0079] In one embodiment, the image detection system may specifically include an image display device for displaying the image to be detected. Specifically, the step "obtaining auxiliary window information of the image to be detected" may include:

[0080] Retrieve a preset set of auxiliary window information;

[0081] Determine the device parameter information of the display device corresponding to the screen to be tested;

[0082] Retrieve the auxiliary window information corresponding to the device parameter information from the auxiliary window information set.

[0083] The auxiliary window information set is a collection of auxiliary window information that matches different device parameter information. In practical applications, common display devices can be identified, and corresponding auxiliary window information suitable for each display device can be set to generate the auxiliary window information set.

[0084] For example, the auxiliary window information set can specifically manage data in the form of key-value pairs, where the device parameter information can be used as the query key and the auxiliary window information that matches the device parameter information can be used as the corresponding field value.

[0085] There are several ways for a terminal to obtain a preset set of auxiliary window information. For example, the terminal can store the preset set of auxiliary window information; or the terminal can request the preset set of auxiliary window information from a server, another terminal, or another intermediate device between the server and the terminal.

[0086] Here, "screen display device" refers to a device capable of displaying the screen to be tested. For example, a screen display device may include a screen display module, allowing the screen display device to display the screen to be tested through the screen display module. For example, a screen display module may include a display screen, etc.

[0087] For example, the device parameter information displayed on the screen may include device size information, device resolution information, etc.

[0088] Furthermore, the terminal can query the auxiliary window information corresponding to the device parameter information of the device displayed on the screen from the acquired auxiliary window information set, and use the auxiliary window information as the auxiliary window information of the screen to be detected.

[0089] 102. Based on the region of interest, determine the first detection window to be used for detecting the image to be detected.

[0090] In practical applications, the region to be processed can be delineated in the image to be detected using a rectangle, circle, ellipse, or irregular polygon, etc., as the region of interest in the image to be detected. Therefore, after determining the region of interest in the image to be detected, the first detection window corresponding to the region of interest in the image to be detected can be determined.

[0091] For example, if the region of interest in the image to be detected is specifically outlined by a box, the first detection window corresponding to the region of interest can be determined based on the box; or if the region of interest in the image to be detected is specifically outlined by other shapes, the first detection window corresponding to the region of interest can be determined based on a box that is similar to the shape.

[0092] It is worth noting that this application does not limit the number of regions of interest (ROIs) in the image to be detected, and correspondingly, it does not limit the number of first detection windows. For example, if there are multiple ROIs in the image to be detected, and these ROIs overlap, the corresponding first detection window can be determined based on the merged ROIs. Similarly, if there are multiple ROIs in the image to be detected, and these ROIs do not overlap, the first detection window corresponding to each ROI can be determined. Furthermore, if there are multiple ROIs in the image to be detected, and the interval between these ROIs meets a preset threshold, these ROIs can be merged, and the corresponding first detection window can be determined based on the merged ROIs.

[0093] As an example, in Figure 3 In the image to be detected shown, the first detection window, determined based on the region of interest, is specifically a window composed of the gray areas in the image.

[0094] 103. Based on the information in the auxiliary window, determine the second detection window to be used for detecting the screen to be detected.

[0095] The auxiliary window information of the image to be detected specifically describes the relevant information of the second detection window required for image detection, such as the number of windows, window weights, and window sizes. Therefore, after determining the auxiliary window information of the image to be detected, the terminal can determine the second detection window used for image detection based on this information.

[0096] In one embodiment, in order to ensure that the blurring changes in other areas of the image outside the region of interest in the image to be detected can be detected through the second detection window, the auxiliary window information of the image to be detected can be used to indicate that the image to be detected is divided into sections, and the second detection window of the image to be detected is determined according to the divided sections, so that the second detection window can cover the entire image of the image to be detected.

[0097] For example, the auxiliary window information may include window quantity information and window size information. Specifically, the window quantity information describes the number of second detection windows in the image to be detected as 6 * 8 = 48, and the window size information describes that all second detection windows have the same size. Figure 3 Based on the image to be detected shown, the second detection window of the image to be detected can be specifically as follows: Figure 4 As shown, each small window is a second detection window for the image to be detected.

[0098] As an example, the auxiliary window information of the image to be detected may include window quantity information, window size information, and window weight information. Furthermore, to facilitate data initialization by the image detection system, the window size information can be set to have the same size for all second detection windows in the image to be detected, and the window weight information can be set to have the same weight for all second detection windows in the image to be detected. Therefore, during the initialization of the terminal's image detection system, the number of second detection windows in the image to be detected can be determined based on the window quantity information, and each second detection window can be set to have the same size and weight based on the window size information and window weight information.

[0099] In one embodiment, considering that the image detection system can be endowed with self-learning capabilities in other image detection stages besides initialization, the image detection system can adaptively update the auxiliary window information by analyzing the results data of several rounds of image detection. This allows the image detection system to determine the most suitable auxiliary window information through self-learning, thereby improving the detection efficiency and effect of image detection based on the second detection window. Specifically, the step "determining the second detection window for detecting the image to be detected based on the auxiliary window information" may include:

[0100] Acquire historical detection result data for the image to be inspected;

[0101] Update the auxiliary window information based on historical test results data;

[0102] Based on the updated auxiliary window information, a second detection window is determined for detecting the screen to be detected.

[0103] The historical detection result data of the image to be detected refers to the detection result data of the image to be detected in the past. For example, the historical detection result data of the image to be detected in a previous round of image detection may include the detection result of that round of image detection (such as the detection result may include whether the image has reached a preset blur level or not), the detection window corresponding to the blurred area in the image (the detection window may include a first detection window and a second detection window), and the blur level corresponding to the blurred area in the image, etc.

[0104] It is worth noting that image blur can be considered as the opposite of image sharpness in image display. Therefore, in this application, the degree of image blur can be determined by analyzing the image sharpness characteristics.

[0105] For example, each round of image detection can be implemented by executing the image detection method described in this application. For instance, a round of image detection may specifically include the process from the step of "obtaining the region of interest in the image to be detected and the auxiliary window information of the image to be detected" to the step of "determining the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature".

[0106] As an example, the detection result data corresponding to each round of detection of the screen to be detected can be recorded, for example, stored locally on the terminal, stored on other trusted terminal devices, synchronously stored on the server, or stored on other trusted intermediate devices between the terminal and the server, so that the historical detection result data of the screen to be detected can be obtained when needed.

[0107] By analyzing historical detection data of the image to be detected, we can identify its blurry characteristics in past detections. This allows the system to dynamically allocate resources to areas more likely to produce blur in subsequent image detections, improving both the efficiency and effectiveness of blur detection. Specifically, since the second detection window serves as an auxiliary window for blur detection, and its determination in each detection round is based on this auxiliary window information, updating this information based on historical data allows the system to determine the appropriate second detection window for each round. This ensures that the system executes the necessary steps for image processing. In this way, the second detection window is not statically set to an initial value but dynamically adjusted by the image detection system based on its self-learning capabilities gained from analyzing historical data.

[0108] In one embodiment, the auxiliary window information may include the number of windows in the second detection window. Therefore, the number of windows in the auxiliary window information can be updated based on historical detection result data to dynamically adjust the number of windows in the second detection window in the screen to be detected. Specifically, the step of "updating the auxiliary window information based on historical detection result data" may include:

[0109] Determine the number of historical windows corresponding to historical test result data;

[0110] Analyze the historical window quantity information based on historical detection results data;

[0111] Based on the analysis results, the window count information of the second detection window in the auxiliary window information is updated.

[0112] It is worth noting that, in order to improve the accuracy of the analysis, the number of windows in the auxiliary window information can be updated based on the historical detection results data corresponding to multiple rounds of image detection.

[0113] Taking historical detection result data, specifically the detection result data corresponding to the previous round of image detection, as an example, the historical window quantity information corresponding to this historical detection result data refers to the window quantity information in the auxiliary window information of the previous round of image detection.

[0114] Furthermore, based on historical detection results data, the historical window quantity information can be analyzed to determine the current number of windows suitable for the screen to be detected.

[0115] For example, based on historical detection results data, statistical analysis of historical window count information can be performed to determine the optimal window count setting for optimal detection performance when performing image detection on the target image. Similarly, if the current criterion for image detection is a target ambiguity threshold, statistical analysis of historical window count information can be performed to determine the optimal window count setting for optimal detection performance when using the target ambiguity threshold as the criterion. Furthermore, statistical analysis of historical window count information can be performed based on historical detection results data to determine the optimal window count setting for optimal detection performance under the current system configuration of the image detection system (e.g., system configuration may include computing power configuration, storage configuration, etc.).

[0116] By analyzing the historical detection result data and the historical window quantity information, the window quantity setting that meets the target detection effect can be determined. Furthermore, the window quantity information of the second detection window in the auxiliary window information can be updated to this window quantity setting, thereby updating the window quantity information of the second detection window in the auxiliary window information.

[0117] In one embodiment, the auxiliary window information may include window weight information of the second detection window. Therefore, the window weight information in the auxiliary window information can be updated based on historical detection result data to dynamically adjust the window weight of the second detection window in the image to be detected. Specifically, the step of "updating the auxiliary window information based on historical detection result data" may include:

[0118] Determine the historical window weight information corresponding to the historical test result data;

[0119] Based on the historical window weight information, the target second detection window whose window weight needs to be updated is determined from the historical second detection window corresponding to the historical detection result data;

[0120] Update the window weight information corresponding to the second detection window of the target in the auxiliary window information.

[0121] Similarly, to improve the accuracy of the analysis, the window weight information in the auxiliary window information can be updated based on the historical detection results data corresponding to multiple rounds of image detection.

[0122] Taking historical detection result data, specifically the detection result data corresponding to the previous round of image detection, as an example, the historical window weight information corresponding to the historical detection result data refers to the window weight information in the auxiliary window information in the previous round of image detection; and the historical second detection window corresponding to the historical detection result data refers to the second detection window set in the previous round of image detection.

[0123] In this application, the window weight information in the auxiliary window information can be used to describe the window weight corresponding to each second detection window. Specifically, the window weight can be used to extract the second sharpness features corresponding to the image region in the second detection window, as detailed in the relevant description in step 103.

[0124] Furthermore, based on historical detection result data, the historical weight information corresponding to the historical second detection window can be analyzed to determine the target second detection window whose window weight needs to be adjusted from the historical second detection window corresponding to the historical detection result data.

[0125] For example, based on historical detection result data, statistical analysis can be performed on the historical window weight information of the historical second detection windows. This allows for review and confirmation of the window weight settings corresponding to each historical second detection window when performing image detection on historical images to achieve better detection results. Furthermore, by comparing the window weight settings obtained from the review of historical second detection windows with the historical window weight information of that historical second detection window, the target second detection window whose window weight needs to be adjusted can be determined from each historical second detection window. For instance, if the difference between the window weight settings obtained from the review of historical second detection windows and the historical window weight information of that historical second detection window meets a preset threshold, then that historical second detection window can be determined as the target second detection window whose window weight needs to be adjusted.

[0126] For example, if the current criterion for image detection is a target ambiguity threshold, then by statistically analyzing historical window weight information based on historical detection results, the window weight settings corresponding to each historical second detection window that achieve the best detection effect when using the target ambiguity threshold as the criterion can be determined. Similarly, by statistically analyzing historical window weight information based on historical detection results, the window weight settings corresponding to each historical second detection window that achieve the best detection effect under the current system configuration of the image detection system (e.g., system configuration may include computing power configuration, storage configuration, etc.) can be determined. Furthermore, by comparing the window weight settings obtained through statistical analysis of historical second detection windows with the historical window weight information of those historical second detection windows, the target second detection window whose window weight needs adjustment can be determined from each historical second detection window. For instance, if the difference between the window weight settings obtained through statistical analysis of a historical second detection window and its historical window weight information meets a preset threshold, then that historical second detection window can be determined as the target second detection window whose window weight needs adjustment.

[0127] After determining the target second detection window whose window weight needs to be updated from the historical second detection window, the window weight information corresponding to the target second detection window in the auxiliary window information can be further updated. Specifically, the second detection window corresponding to the target second detection window can be determined in the second detection window of the current round of image detection, and the window weight information of the determined second detection window can be updated to the window weight setting corresponding to the target second detection window under the condition of satisfying the target detection effect, as determined by the aforementioned analysis.

[0128] In one embodiment, the auxiliary window information may include the window size information of the second detection window. Therefore, the window size information in the auxiliary window information can be updated based on historical detection result data to dynamically adjust the window size of the second detection window in the image to be detected. Specifically, the step "updating the auxiliary window information based on historical detection result data" may include:

[0129] Based on historical detection data, determine the target image area for adjusting the window size from the image to be detected;

[0130] Based on the regional location information of the target image area, the window size information of the second detection window in the auxiliary window information is updated.

[0131] Similarly, to improve the accuracy of the analysis, the window size information in the auxiliary window information can be updated based on the historical detection results data corresponding to multiple rounds of image detection.

[0132] Taking historical detection result data, specifically the detection result data corresponding to the previous round of image detection, as an example, the historical window size information corresponding to this historical detection result data refers to the window size information in the auxiliary window information of the previous round of image detection.

[0133] In this application, the window size information in the auxiliary window information can be used to describe the window size corresponding to each second detection window.

[0134] For example, based on historical detection data, the target image region of interest in the image to be detected can be analyzed. This target image region could include blurred areas in the image to be detected that are more likely to exhibit blurriness, or blurred areas in the image to be detected that exhibit regular blurriness, and so on. Furthermore, based on the regional location information of the target image region, the window size information of the second detection window in the auxiliary window information can be updated. Specifically, the regional location information of the target image region determines its position and size within the image to be detected. Therefore, the window size of the second detection window positioned at that location can be adaptively adjusted, making the adjusted second detection window in the image to be detected more suitable for image detection of both the image to be detected and the target image region. As an example, Figure 6 This demonstrates one implementation method for updating the window size of the second detection window deployed in the screen to be detected. Figure 7 This demonstrates another implementation method for updating the window size of the second detection window deployed in the screen to be detected.

[0135] In one embodiment, the sensitivity of image detection in the second detection window can be improved by dividing the second detection window into sub-windows. Specifically, the step "updating the auxiliary window information based on historical detection result data" may include:

[0136] Based on historical detection results data, the target second detection window to be divided into sub-windows is determined from the historical second detection window corresponding to the historical detection results.

[0137] Determine the description information of the sub-windows in the second detection window of the target;

[0138] Based on the sub-window description information, update the window information corresponding to the second target detection window in the auxiliary window information.

[0139] Similarly, to improve the accuracy of the analysis, the target second detection window to be divided into sub-windows can be determined based on the historical detection results data corresponding to multiple rounds of image detection.

[0140] Taking historical detection result data, specifically the detection result data corresponding to the previous round of image detection, as an example, the historical second detection window corresponding to this historical detection result data refers to the second detection window set in the previous round of image detection.

[0141] For example, based on historical detection results data, we can analyze the target image regions of interest in the image to be detected. These target image regions could include blurred areas in the image that are more likely to exhibit blurriness, or blurred areas that exhibit regular blurriness, and so on. Furthermore, from the historical second detection windows corresponding to the historical detection results, we can determine the historical second detection window corresponding to the target image region, and then select the target second detection window from it to be divided into sub-windows.

[0142] The sub-window description information of the second detection window refers to relevant information about the sub-windows when the second detection window is divided into multiple sub-windows. For example, the sub-window description information may include information such as the number of sub-windows, window size information, and window weight information.

[0143] For example, if the target image area identified by analyzing historical detection data is a regularly blurred area, then the method for dividing the target image area into sub-windows can be determined based on this blurring pattern, thereby determining the sub-window description information for the target image area's second detection window. In this way, since the deployment method of the sub-windows obtained after dividing the target image area into sub-windows matches the blurring pattern, it helps improve the detection sensitivity and accuracy when subsequently detecting blur in the image area within the target image area's second detection window.

[0144] For example, if the target image area determined by analyzing historical detection data is an area with a higher probability of displaying blurred images, then the specific method for dividing the target image area into sub-windows in the second detection window can include: determining the sub-window settings within the second detection window based on the probability obtained from the analysis; for example, setting the number of sub-windows to be greater as the probability increases, and then determining the sub-window description information for the second detection window. In this way, since the deployment method of the sub-windows obtained after dividing the second target window matches the probability of image blur, it helps to improve the detection sensitivity and accuracy when subsequently detecting image blur in the image area within the second detection window.

[0145] After determining the sub-window description information of the target second detection window, the window information corresponding to the target second detection window in the auxiliary window information can be further updated based on the sub-window description information. Specifically, the second detection window corresponding to the target second detection window can be determined in the second detection window of this round of image detection, and the window information corresponding to the second detection window can be updated based on the determined sub-window description information. This ensures that the second detection window used for detecting the image to be detected, determined subsequently based on the updated auxiliary window information, includes the sub-window corresponding to the sub-window description information.

[0146] 104. Extract the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window.

[0147] In this application, the term "first sharpness feature" can be used to refer to the sharpness feature used when performing image blur detection on an image region within a first detection window. Similarly, the term "second sharpness feature" can be used to refer to the sharpness feature used when performing image blur detection on an image region within a second detection window.

[0148] The sharpness feature of a scene area refers to the characteristics that reflect the sharpness of that area. For example, the sharpness feature of a scene area can be calculated using a focus evaluation function. In practical applications, there are various types of focus evaluation functions, such as grayscale step functions, informatics functions, frequency domain functions, and statistical functions.

[0149] As an example, the focus value (FV) of a scene area can be calculated using a focus evaluation function, and the calculated FV value can be used to characterize the sharpness of that scene area. In other words, the FV value of a scene area can be used as a feature of the sharpness of that scene area.

[0150] It is worth noting that image blur can be considered the opposite of image sharpness; therefore, image blur can be detected based on the image sharpness characteristics. Specifically, when detecting image blur in a region of the first detection window, it can be based on the degree of blur change in that region, and thus, it can also be based on the degree of sharpness change within the first detection window. Specifically, the step "extracting the first sharpness feature corresponding to the region of the first detection window" can include:

[0151] Based on the historical detection results data of the image to be detected, the initial sharpness features corresponding to the image area in the first detection window are determined;

[0152] Extract the current sharpness features corresponding to the image region in the first detection window;

[0153] Based on the initial sharpness features and the current sharpness features, the first sharpness features corresponding to the image area in the first detection window are determined.

[0154] Here, the initial sharpness feature refers to the criterion used to determine the degree of change in image sharpness. For example, if we take the historical detection result data as the detection result data corresponding to the previous round of image detection, then the sharpness feature of the image area in the first detection window at the end of the previous round of image detection can be used as the initial sharpness feature required to calculate the first sharpness feature of the first detection window. As an example, the FV value FV1 of the image area in the first detection window at the end of the previous round of image detection can be used as the initial sharpness feature required to calculate the first sharpness feature of the first detection window.

[0155] The current sharpness feature refers to the current sharpness feature of the image region in the first detection window during this round of image detection. As an example, the current FV value (FV2) of the image region in the first detection window during this round of image detection can be used as the current sharpness feature corresponding to that image region in the first detection window.

[0156] Furthermore, based on the initial and current sharpness features, the first sharpness feature corresponding to the image region in the first detection window can be determined. For example, the sharpness change of the image region in the first detection window can be calculated based on the initial and current sharpness features, and then the first sharpness feature can be determined based on the calculation result. As an example, △FV = FV2 - FV1 can be used as the first sharpness feature.

[0157] As another example, in practical applications, the degree of sharpness variation can be normalized, and the result of the normalization process can be used as the first sharpness feature. As yet another example, considering that the first detection window is determined based on the region of interest in the image to be detected, and that different regions of interest in the image can be assigned different weights in practical applications, the first detection window can also have corresponding weight settings. In this way, when determining the first sharpness feature corresponding to the image region in the first detection window based on the initial and current sharpness features, the weight information corresponding to the first detection window can also be taken into account. For example, if the weight corresponding to the first detection window is 'a', then 'a*(FV2-FV1)' can be used as the first sharpness feature.

[0158] Similarly, the step "extracting the second sharpness feature corresponding to the image region in the second detection window" may include: determining the initial sharpness feature corresponding to the image region in the second detection window based on the historical detection result data of the image to be detected; extracting the current sharpness feature corresponding to the image region in the second detection window; and determining the second sharpness feature corresponding to the image region in the second detection window based on the initial sharpness feature and the current sharpness feature. For details, please refer to the aforementioned explanation of the step "extracting the first sharpness feature corresponding to the image region in the first detection window," which will not be repeated here.

[0159] 105. Based on the first and second resolution features, determine the detection result of the image to be detected.

[0160] Specifically, the detection result of the image blur of the image to be detected can be determined based on the first sharpness feature and the second sharpness feature. For example, the image to be detected can be determined to have reached a preset blur level, or the image to be detected can be determined to have not reached a preset blur level.

[0161] Since the first sharpness feature corresponding to the image area in the first detection window can specifically describe the degree of sharpness change in the image area in the first detection window, and the first sharpness feature corresponding to the image area in the second detection window can specifically describe the degree of sharpness change in the image area in the first detection window, when determining the detection result of the image to be detected, the first detection window and the second detection window can be used to realize the hierarchical detection of the image to be detected.

[0162] For example, see Figure 5The illustrated judgment process first determines whether the image to be detected reaches a preset blur level based on the first feature verification result obtained by verifying the first sharpness feature. If so, the first feature verification result specifically indicates that the detection result of the image to be detected is determined based on the first sharpness feature, thus triggering an automatic focusing algorithm. Otherwise, if the first feature verification result cannot determine whether the image to be detected reaches the preset blur level, further judgment can be made by combining the second sharpness feature. Specifically, if the first feature verification result indicates that the detection result of the image to be detected can be further determined based on the second sharpness feature, then the second feature verification result obtained by verifying the second sharpness feature can be used to determine whether the image to be detected reaches the preset blur level. If so, an automatic focusing algorithm can be triggered; otherwise, it can be determined that the image to be detected does not reach the preset blur level, and automatic focusing is not required. Conversely, if the first feature verification result indicates that the detection result of the image to be detected does not need to be further determined based on the second sharpness feature, then it can be determined that the image to be detected does not reach the preset blur level, and automatic focusing is not required.

[0163] In one embodiment, a feature verification can be performed on a first sharpness feature that describes the degree of sharpness variation in a region of the image within a first detection window. By verifying whether the first sharpness feature meets preset conditions, the detection result of the image to be detected can be determined. Specifically, the step "determining the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature" may include:

[0164] Determine the verification interval information for feature verification targeting the first resolution feature;

[0165] Based on the verification interval information, feature verification is performed on the first sharpness feature to obtain the first feature verification result of the image to be detected.

[0166] Based on the first feature verification result and the second clarity feature, the detection result of the image to be detected is determined.

[0167] The verification interval information for feature verification of the first sharpness feature describes the interval required to verify the first sharpness feature. Specifically, the interval can be determined by defining the endpoints of the interval. For example, if the endpoints of the verification interval specifically include preset sharpness change thresholds ΔFV1 and ΔFV2 (where ΔFV1≥ΔFV2≥0), then the verification interval for feature verification of the first sharpness feature can specifically include the three intervals (ΔFV1, +∞), [0, ΔFV2), and [ΔFV2, ΔFV1].

[0168] Furthermore, based on the verification interval information for feature verification of the first sharpness feature, feature verification is performed on the first sharpness feature. Specifically, feature verification can be performed on the first sharpness feature according to the determined verification interval. For example, when the first sharpness feature specifically indicates a decrease in the sharpness of the image area in the first detection window, feature verification can be performed on the first sharpness feature by determining which verification interval the decrease falls into.

[0169] As an example, we can take the first sharpness feature as equal to the current sharpness feature FV2 of the image area in the first detection window minus the initial sharpness feature FV1 of the image area in the first detection window. Since the first sharpness feature specifically indicates a decrease in sharpness of the image area in the first detection window, i.e., FV2 < FV1, we can perform feature verification on the first sharpness feature by determining which verification interval the value of |FV2 - FV1| falls within. Specifically, if |FV2 - FV1| falls within the verification interval (ΔFV1, +∞), it means that the sharpness of the image area in the first detection window has decreased beyond the threshold ΔFV1. Therefore, it can be determined that the image to be detected has reached the preset blur level, and thus an automatic focusing algorithm can be triggered for the image to be detected. However, if |FV2 - FV1| falls within the verification interval [0, ΔFV2), it means that the sharpness of the image area in the first detection window has not decreased beyond the threshold ΔFV2. Therefore, it can be determined that the image to be detected has not reached the preset blur level, and thus it is determined that no automatic focusing algorithm needs to be triggered for the image to be detected.

[0170] In the above example, whether |FV2-FV1| falls within the verification interval (△FV1, +∞) or |FV2-FV1| falls within the verification interval [0, △FV2), the first feature verification result indicates that the detection result of the image to be detected can be determined based on the first sharpness feature. However, when the first feature verification result indicates that the detection result of the image to be detected cannot be determined based on the first sharpness feature, the detection result of the image to be detected can be further determined based on the second sharpness feature. That is, when |FV2-FV1| falls within the verification interval [△FV2, △FV1], the first feature verification result indicates that the detection result of the image to be detected needs to be determined based on the second sharpness feature.

[0171] In one embodiment, if the first feature verification result indicates that the detection result of the image to be detected is determined based on the second sharpness feature, then the detection result of the image to be detected can be further determined by performing feature verification on the second sharpness feature. Specifically, the step "determining the detection result of the image to be detected based on the first feature verification result and the second sharpness feature" may include:

[0172] Determine the verification interval information for feature verification targeting the second-resolution feature;

[0173] Based on the verification interval information, feature verification is performed on the second clarity feature to obtain the second feature verification result of the image to be detected.

[0174] Based on the second verification result, the detection result of the image to be detected is determined.

[0175] Similarly, the verification interval information for feature verification of the second sharpness feature describes the interval required to verify the second sharpness feature. Specifically, the interval can be determined by defining the endpoints of the interval. For example, if the endpoints of the verification interval specifically include a preset sharpness change threshold ΔFV3 (where ΔFV3≥0), then the verification interval for feature verification of the second sharpness feature can specifically include the two intervals (ΔFV3, +∞) and [0, ΔFV3].

[0176] Furthermore, based on the verification interval information for feature verification of the second sharpness feature, feature verification is performed on the second sharpness feature. Specifically, feature verification can be performed on the second sharpness feature according to the determined verification interval. For example, when the second sharpness feature specifically indicates a decrease in the sharpness of a region of the image in the second detection window, feature verification can be performed by determining which verification interval the maximum value of the decrease falls into.

[0177] As an example, consider the second sharpness feature corresponding to the second detection window as equal to the current sharpness feature FV4 of the image area within the second detection window minus the initial sharpness feature FV3 of the image area within the second detection window. Since the second sharpness feature specifically indicates a decrease in sharpness in the image area within the second detection window (i.e., FV4 < FV3), the value of |FV4 - FV3| represents the magnitude of the sharpness decrease for that second detection window. When the first feature verification result indicates that the detection result of the image to be detected is determined based on the second sharpness feature, the detection result of the image to be detected can be determined based on the second sharpness feature corresponding to each second detection window by identifying which verification interval the maximum value of the sharpness decrease falls within the multiple second detection windows of the image to be detected.

[0178] Specifically, if the maximum value falls within the verification interval (△FV3, +∞), it indicates that the maximum decrease in sharpness of the image area in the second detection window exceeds the threshold △FV3. Therefore, it can be determined that the image to be detected has reached the preset blur level, and thus an automatic focusing algorithm can be triggered for the image to be detected. However, if |FV2-FV1| falls within the verification interval [0, △FV3], it indicates that the maximum decrease in sharpness of the image area in the second detection window does not exceed the threshold △FV3. Therefore, it can be determined that the image to be detected has not reached the preset blur level, and thus it is determined that no automatic focusing algorithm needs to be triggered for the image to be detected.

[0179] It is worth noting that the above only illustrates the process of determining the detection result of the image to be detected based on the first and second sharpness features, without considering the corresponding window weights of the first and second sharpness features. In practical applications, the window weights corresponding to the first detection window can be taken into account to determine the first sharpness feature, and the window weights corresponding to the second detection window can be taken into account to determine the second sharpness feature. Then, based on the determined first and second sharpness features, the detection result of the image to be detected can be determined.

[0180] In addition, see Figure 5 and Figure 8 As shown in the flowchart, after each automatic focusing is triggered by the algorithm, the sharpness features of the image area in the first detection window and the image area in the second detection window can be recorded. That is, the FV values ​​of the image area in the first detection window and the image area in the second detection window can be recorded as the criteria for determining the first and second sharpness features in the next round of image detection.

[0181] As can be seen from the above, this embodiment can obtain the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected; determine a first detection window for detecting the image to be detected based on the region of interest; determine a second detection window for detecting the image to be detected based on the auxiliary window information; extract a first sharpness feature corresponding to the image region in the first detection window and a second sharpness feature corresponding to the image region in the second detection window; and determine the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

[0182] This scheme combines a first detection window determined based on the region of interest (ROI) with a second detection window to assist in detecting image blur. For example, it can detect image blur, so that image blur detection no longer relies solely on the first detection window determined based on the ROI. In this way, even when the ROI selection does not include areas in the image with drastic changes in sharpness, changes in image blur can still be detected, thereby improving the reliability of image blur detection.

[0183] Furthermore, since this scheme detects image blur based on the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window, it can capture blur changes of different regions and degrees in the image and avoid false triggers, thereby improving the sensitivity of image blur detection. It can be seen that this scheme balances sensitivity and reliability in detecting image blur changes, thus improving the image focus effect. In addition, since this scheme can self-learn from historical detection result data of the image to be detected when determining the detection result based on the first and second sharpness features, it can dynamically adjust the second detection window in each round of image detection, thereby improving the learning and adaptability of the image detection system.

[0184] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.

[0185] In this embodiment, the example will be an image detection device integrated into a terminal, where the terminal captures the image to be detected via a camera. Figure 9 As shown, an image detection method has the following specific process:

[0186] 201. The terminal acquires the region of interest in the image to be detected captured by the camera, as well as the auxiliary window information of the image to be detected.

[0187] Cameras are widely used in all aspects of work and life. To obtain clear images, cameras are generally equipped with electrically controllable focusing hardware and software and optical systems. The autofocus strategy drives the lens to a designated position to achieve automatic focusing. However, when the parameters of the imaging system change, such as thermal expansion and contraction of the lens and structural components causing focus shift, if this is not detected in time, the image will become blurry, causing the monitoring function to fail.

[0188] In this application, the terminal can capture the image to be detected through a camera, determine the region of interest in the image to be detected, and the auxiliary window information of the image to be detected.

[0189] 202. The terminal determines the first detection window for detecting the screen to be detected based on the region of interest.

[0190] For example, see Figure 10 The first detection window determined based on the region of interest can be called the main window.

[0191] 203. The terminal determines at least one second detection window for detecting the screen to be detected based on the auxiliary window information, so as to cover the entire screen area in the screen to be detected through at least one second detection window.

[0192] For example, see Figure 10 The second detection window can be called the auxiliary window, and the number of auxiliary windows can be set to M*N (where M and N are positive integers) to divide the screen to be detected into M*N smaller windows. In practical applications, the number of auxiliary windows can be set according to the system's hardware and software resources. In this way, compared with the main window, because the auxiliary window is small enough to cover the entire screen area to be detected, it can always be detected when the screen is blurred for some reason, instead of being ignored because the detection window is too large and the proportion of small local FV changes within the large window is too small.

[0193] 204. The terminal extracts the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window.

[0194] For example, if the sharpness of a region in the main window decreases compared to the previous image detection, the decrease in sharpness of that region can be used as the first sharpness feature. Optionally, in practical applications, it can be further multiplied by the window weight corresponding to the main window, and the calculation result can be used as the first sharpness feature corresponding to that main window.

[0195] Similarly, if the sharpness of a region in the auxiliary window decreases compared to the previous image detection, the decrease in sharpness of that region in the auxiliary window can be used as the second sharpness feature. Optionally, in practical applications, it can be further multiplied by the window weight corresponding to the auxiliary window, and the calculation result can be used as the second sharpness feature corresponding to the auxiliary window.

[0196] 205. The terminal determines the detection result of the image to be detected based on the first resolution feature and the second resolution feature.

[0197] For example, see Figure 10 The determination process shown is used to determine the detection result of the image to be detected.

[0198] In real-world projects, lens temperature drift can cause slight image blur. Lowering the FV threshold of the main window can lead to frequent refocusing. To avoid frequent refocusing and detect blur promptly, the image to be detected can be divided into 6*8 auxiliary windows. 48 windows are sufficiently subdivided to ensure that subtle changes in the image can be detected. To prevent the auxiliary windows from being too small and the changes from being unrepresentative, when the FV value of the auxiliary window drops to a set threshold, it is still necessary to check whether the FV value of the main window drops to a certain threshold. In this way, by using multi-window combination judgment, the focus shift caused by lens temperature drift can be identified, thereby triggering autofocus.

[0199] For example Figure 4 The gray area in the image represents the Region of Interest (ROI), also known as the main window, while 48 auxiliary windows cover the entire image area. Because the ROI area is relatively large, it may contain objects with rich detail as well as those with less detail. For example, the most frequently observed object might not have very rich detail, such as a person. When the lens becomes out of focus due to thermal expansion and contraction, the ROI's FV value doesn't decrease significantly. The 48 small windows are small enough that objects with more detail will fall into them, resulting in a noticeable decrease in FV value. Combining this with a slight decrease in the ROI's FV value, it's possible to determine that the image is blurry.

[0200] As can be seen from the above, the embodiments of this application combine a second detection window for assisting in the detection of image blur, based on the first detection window determined by the region of interest, to detect the image, such as image blur. This means that the detection of image blur no longer relies solely on the first detection window determined by the region of interest. In this way, even when the selection of the region of interest does not include areas in the image with drastic changes in sharpness, changes in image blur can still be detected, thereby improving the reliability of image blur detection.

[0201] Furthermore, since the image blur detection in this embodiment is specifically based on the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window, it can capture blur changes of different areas and degrees in the image and avoid false triggers, thereby improving the sensitivity of image blur detection. Therefore, this solution balances sensitivity and reliability in detecting image blur changes, thus improving the image focus effect.

[0202] To better implement the screen detection method provided in this application, one embodiment also provides a screen detection device, which can be integrated into a computer device, such as a terminal. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle computer, etc., but is not limited to these. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The meanings of the relevant terms are the same as in the screen detection method described above; specific implementation details can be found in the descriptions in the method embodiments.

[0203] In one embodiment, an image detection device is provided, which can be specifically integrated into a computer device, such as... Figure 11 As shown, the image detection device may include: an acquisition unit 301, a first determination unit 302, a second determination unit 303, an extraction unit 304, and a result determination unit 305, as detailed below:

[0204] The acquisition unit 301 can be used to acquire the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected;

[0205] The first determining unit 302 can be used to determine a first detection window for detecting the image to be detected based on the region of interest;

[0206] The second determining unit 303 can be used to determine a second detection window for detecting the image to be detected based on the auxiliary window information.

[0207] The extraction unit 304 can be used to extract the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window.

[0208] The result determination unit 305 can be used to determine the detection result of the image to be detected based on the first clarity feature and the second clarity feature.

[0209] In one embodiment, the result determination unit 305 may include:

[0210] The interval determination subunit can be used to determine the verification interval information for feature verification of the first sharpness feature;

[0211] The feature verification subunit can be used to perform feature verification on the first clarity feature based on the verification interval information to obtain the first feature verification result of the image to be detected.

[0212] The result determination subunit can be used to determine the detection result of the image to be detected based on the first feature verification result and the second clarity feature.

[0213] In one embodiment, the first feature verification result indicates that the detection result of the image to be detected is determined based on the second sharpness feature; the result determination subunit can be used for:

[0214] Determine the verification interval information for feature verification of the second clarity feature; perform feature verification on the second clarity feature according to the verification interval information to obtain the second feature verification result of the image to be detected; determine the detection result of the image to be detected according to the second verification result.

[0215] In one embodiment, the extraction unit 304 may include:

[0216] The initial determination subunit can be used to determine the initial sharpness features corresponding to the image area in the first detection window based on the historical detection result data of the image to be detected.

[0217] The currently determined subunit can be used to extract the current sharpness features corresponding to the image area in the first detection window;

[0218] The feature determination subunit can be used to determine the first sharpness feature corresponding to the image region in the first detection window based on the initial sharpness feature and the current sharpness feature.

[0219] In one embodiment, the second determining unit 303 may include:

[0220] The result acquisition subunit can be used to acquire historical detection result data of the image to be detected.

[0221] The information update subunit can be used to update the auxiliary window information based on the historical detection result data;

[0222] The window determination subunit can be used to determine a second detection window for detecting the image to be detected based on the updated auxiliary window information.

[0223] In one embodiment, the auxiliary window information includes the number of windows in the second detection window; the information update subunit can be used to:

[0224] Determine the number of historical windows corresponding to the historical detection result data; analyze the number of historical windows based on the historical detection result data; update the number of windows of the second detection window in the auxiliary window information based on the analysis results.

[0225] In one embodiment, the auxiliary window information includes the window weight information of the second detection window; the information update subunit can be used to:

[0226] Determine the historical window weight information corresponding to the historical detection result data; based on the historical window weight information, determine the target second detection window whose window weight needs to be updated from the historical second detection window corresponding to the historical detection result data; update the window weight information corresponding to the target second detection window in the auxiliary window information.

[0227] In one embodiment, the auxiliary window information includes the window size information of the second detection window; the information update subunit can be used to:

[0228] Based on the historical detection results data, the target screen area for adjusting the window size is determined from the screen to be detected; based on the area location information of the target screen area, the window size information of the second detection window in the auxiliary window information is updated.

[0229] In one embodiment, the information update subunit can be used to:

[0230] Based on the historical detection result data, a target second detection window to be divided into sub-windows is determined from the historical second detection window corresponding to the historical detection result data; the sub-window description information of the target second detection window is determined; and the window information corresponding to the target second detection window in the auxiliary window information is updated based on the sub-window description information.

[0231] In one embodiment, the acquisition unit 301 may include:

[0232] The collection can be used to retrieve a preset set of auxiliary window information.

[0233] The information determination subunit can be used to determine the device parameter information of the screen display device corresponding to the screen to be detected;

[0234] The information query subunit can be used to query the auxiliary window information corresponding to the device parameter information from the auxiliary window information set.

[0235] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0236] As can be seen from the above, in the image detection device of this embodiment, the acquisition unit 301 acquires the region of interest in the image to be detected and the auxiliary window information of the image to be detected; the first determination unit 302 determines a first detection window for detecting the image to be detected based on the region of interest; the second determination unit 303 determines a second detection window for detecting the image to be detected based on the auxiliary window information; the extraction unit 304 extracts a first sharpness feature corresponding to the image region in the first detection window and a second sharpness feature corresponding to the image region in the second detection window; and the result determination unit 305 determines the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

[0237] This scheme, based on a first detection window determined by the region of interest (ROI), incorporates a second detection window to assist in detecting image blur. For example, it can detect image blur, meaning blur detection no longer relies solely on the first detection window based on the ROI. This allows for the detection of blur changes even when the ROI does not include areas with drastic changes in sharpness, thus improving the reliability of blur detection. Furthermore, since this scheme specifically performs blur detection based on the first sharpness features corresponding to the image area in the first detection window and the second sharpness features corresponding to the image area in the second detection window, it can capture blur changes of different regions and degrees within the image, avoiding false triggers and improving the sensitivity of blur detection. Therefore, this scheme balances sensitivity and reliability in detecting image blur changes, thereby improving the focus of the image.

[0238] Furthermore, embodiments of this application also provide a computer device, which may be a terminal or the like. Figure 12 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically:

[0239] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 12The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0240] The processor 401 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, thereby providing overall monitoring of the computer device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0241] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0242] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0243] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0244] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:

[0245] Obtain the region of interest (ROI) in the image to be detected, and the auxiliary window information of the image to be detected; determine a first detection window for detecting the image to be detected based on the ROI; determine a second detection window for detecting the image to be detected based on the auxiliary window information; extract a first sharpness feature corresponding to the image region in the first detection window and a second sharpness feature corresponding to the image region in the second detection window; determine the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

[0246] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0247] As can be seen from the above, the computer device in this embodiment, based on the first detection window determined by the region of interest, combines a second detection window for assisting in detecting image blur. For example, it can detect image blur, so that image blur detection no longer relies solely on the first detection window determined by the region of interest. This allows for the detection of image blur changes even when the selected region of interest does not include areas with drastic changes in image sharpness, thereby improving the reliability of image blur detection. Furthermore, since the computer device performs image blur detection specifically based on the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window, it can capture blur changes of different regions and degrees in the image and avoid false triggers, thus improving the sensitivity of image blur detection. Therefore, the computer device balances detection sensitivity and reliability when detecting image blur changes, thereby improving the image focus effect.

[0248] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0249] Therefore, embodiments of this application also provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the screen detection methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0250] Obtain the region of interest (ROI) in the image to be detected, and the auxiliary window information of the image to be detected; determine a first detection window for detecting the image to be detected based on the ROI; determine a second detection window for detecting the image to be detected based on the auxiliary window information; extract a first sharpness feature corresponding to the image region in the first detection window and a second sharpness feature corresponding to the image region in the second detection window; determine the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

[0251] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0252] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0253] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the screen detection methods provided in the embodiments of this application, the beneficial effects that any of the screen detection methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0254] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the above-described screen detection aspect.

[0255] The foregoing has provided a detailed description of a screen detection method, apparatus, computer device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for detecting images, characterized in that, include: Obtain the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected; Based on the region of interest, a first detection window is determined for detecting the image to be detected; Based on the auxiliary window information, a second detection window is determined for detecting the image to be detected, wherein the second detection window is obtained by dividing the image to be detected, and the size of the second detection window is smaller than that of the first detection window; Extract the first sharpness feature corresponding to the image region in the first detection window and the second sharpness feature corresponding to the image region in the second detection window; Based on the first clarity feature and the second clarity feature, the detection result of the image to be detected is determined.

2. The image detection method according to claim 1, characterized in that, Extracting the first sharpness feature corresponding to the image region in the first detection window, including: Based on the historical detection result data of the image to be detected, the initial sharpness features corresponding to the image area in the first detection window are determined; Extract the current sharpness features corresponding to the image region in the first detection window; Based on the initial sharpness feature and the current sharpness feature, the first sharpness feature corresponding to the image region in the first detection window is determined.

3. The image detection method according to claim 1, characterized in that, Based on the auxiliary window information, a second detection window is determined for detecting the image to be detected, including: Obtain historical detection result data of the image to be detected; The auxiliary window information is updated based on the historical detection results data; Based on the updated auxiliary window information, a second detection window is determined for detecting the image to be detected.

4. The image detection method according to claim 3, characterized in that, The auxiliary window information includes the number of windows in the second detection window; Based on the historical detection results data, the auxiliary window information is updated, including: Determine the number of historical windows corresponding to the historical detection result data; Based on the historical detection results data, the information on the number of historical windows is analyzed; Based on the analysis results, the window quantity information of the second detection window in the auxiliary window information is updated.

5. The image detection method according to claim 3, characterized in that, The auxiliary window information includes the window weight information of the second detection window; Based on the historical detection results data, the auxiliary window information is updated, including: Determine the historical window weight information corresponding to the historical detection result data; Based on the historical window weight information, the target second detection window whose window weight needs to be updated is determined from the historical second detection window corresponding to the historical detection result data; The window weight information corresponding to the second detection window of the target in the auxiliary window information is updated.

6. The image detection method according to claim 3, characterized in that, The auxiliary window information includes the window size information of the second detection window; Based on the historical detection results data, the auxiliary window information is updated, including: Based on the historical detection results data, determine the target screen area from the screen to be detected, which is the area where the window size needs to be adjusted. Based on the regional location information of the target image area, the window size information of the second detection window in the auxiliary window information is updated.

7. The image detection method according to claim 3, characterized in that, Based on the historical detection results data, the auxiliary window information is updated, including: Based on the historical detection result data, determine the target second detection window to be divided into sub-windows from the historical second detection window corresponding to the historical detection result data; Determine the sub-window description information of the second detection window for the target; Based on the sub-window description information, the window information corresponding to the second target detection window in the auxiliary window information is updated.

8. The image detection method according to claim 1, characterized in that, Obtaining auxiliary window information of the image to be detected includes: Retrieve a preset set of auxiliary window information; Determine the device parameter information of the display device corresponding to the image to be detected; Query the auxiliary window information corresponding to the device parameter information from the auxiliary window information set.

9. The image detection method according to claim 1, characterized in that, Based on the first sharpness feature and the second sharpness feature, the detection result of the image to be detected is determined, including: Determine the verification interval information for feature verification targeting the first sharpness feature; Based on the verification interval information, feature verification is performed on the first clarity feature to obtain the first feature verification result of the image to be detected. Based on the first feature verification result and the second clarity feature, the detection result of the image to be detected is determined.

10. The image detection method according to claim 9, characterized in that, The first feature verification result indicates that the detection result of the image to be detected is determined based on the second sharpness feature; Based on the first feature verification result and the second sharpness feature, the detection result of the image to be detected is determined, including: Determine the verification interval information for feature verification targeting the second sharpness feature; Based on the verification interval information, feature verification is performed on the second clarity feature to obtain the second feature verification result of the image to be detected; Based on the second feature verification result, the detection result of the image to be detected is determined.

11. An image detection device, characterized in that, include: The acquisition unit is used to acquire the region of interest in the image to be detected, as well as the auxiliary window information of the image to be detected; The first determining unit is configured to determine a first detection window for detecting the image to be detected based on the region of interest. The second determining unit is configured to determine a second detection window for detecting the image to be detected based on the auxiliary window information, wherein the second detection window is obtained by dividing the image to be detected, and the size of the second detection window is smaller than that of the first detection window. The extraction unit is used to extract the first sharpness feature corresponding to the image area in the first detection window and the second sharpness feature corresponding to the image area in the second detection window. The result determination unit is used to determine the detection result of the image to be detected based on the first sharpness feature and the second sharpness feature.

12. A computer device, characterized in that, It includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to perform the screen detection method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which is loaded by a processor to perform the screen detection method according to any one of claims 1 to 10.