Image detection method and device, medium, equipment and product
By performing multiple abnormality detection on the display image, the problem of difficult to guarantee the stability and accuracy of the display display is solved, and more accurate abnormality detection and higher flexibility are achieved.
Patent Information
- Application Number
- CN202510258500.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-17
AI Technical Summary
The stability and accuracy of display screen displays are affected by factors such as complex data sources, diverse display forms and fluctuations in the network environment. It is difficult for the prior art to effectively detect abnormalities in displayed images.
An image detection method is adopted to determine whether the image is displayed abnormally by acquiring the image to be detected and detecting the image parameters according to a plurality of abnormal detection rules. The abnormal detection rules include the display content missing detection rules, the display content error detection rules, and the display effect abnormal detection rules.
Through parameter analysis based on actual display effects, abnormalities in the displayed image can be determined more accurately, and the flexibility and accuracy of detection are improved.
Smart Images

Figure CN120164028A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of electronic technologies, and in particular, to an image detection method, apparatus, medium, device, and product. Background Art
[0002] With the in-depth digital transformation of enterprises, information visualization has become an important tool for enterprise real-time monitoring, business analysis, and decision support. As the core carrier of information visualization, display screens (large-screen data) are widely used in scenarios such as enterprise operation monitoring, production scheduling, and data display. However, due to factors such as complex data sources, diverse display forms, and network environment fluctuations of display screens, the stability and accuracy of display screen displays often face many challenges.
[0003] To ensure the stability and accuracy of display screen displays, the background data sources of display screens can be analyzed. However, the background data may not be able to reflect whether the displayed images on the display screen are abnormal, and the adaptability is poor. Summary of the Invention
[0004] The present application provides an image detection method, apparatus, medium, device, and product for improving the flexibility of detecting abnormalities in displayed images.
[0005] To achieve the above object, the present application adopts the following technical solutions:
[0006] In a first aspect, an image detection method is provided. The method includes: obtaining an image to be detected; detecting image parameters of the image to be detected according to multiple anomaly detection rules to obtain a detection result corresponding to each anomaly detection rule; different anomaly detection rules correspond to different image parameters; based on the detection results corresponding to the multiple anomaly detection rules, determining whether the image to be detected is abnormally displayed. The anomaly detection rules include at least one of the following: a display content missing detection rule, a display content error detection rule, and a display effect anomaly detection rule.
[0007] Optionally, when the anomaly detection rule is a display content missing detection rule, detecting image parameters of the image to be detected according to multiple anomaly detection rules to obtain a detection result corresponding to each anomaly detection rule; includes: determining whether there is a first display defect in the image to be detected according to the mean and variance of the brightness of different pixels and the edge intensity; the first display defect is used to indicate that the display content of the image to be detected is missing; when there is a first display defect in the image to be detected, determining the first display defect as the detection result corresponding to the display content missing detection rule.
[0008] Optionally, the method further includes: determining that the image to be detected has a first display defect when the average value of the brightness of different pixels is less than the brightness threshold, the variance of the brightness of different pixels is less than the brightness threshold and less than the variance threshold, and the edge strength is greater than the edge strength threshold.
[0009] Optionally, the image parameters include text content and corresponding text format. When the anomaly detection rule is a display content error detection rule, the image parameters of the image to be detected are detected according to multiple anomaly detection rules, and the detection results corresponding to each anomaly detection rule are obtained, including: determining whether the image to be detected has a second display defect according to the text content and corresponding text format of the target area; the second display defect is used to indicate that the display content of the image to be detected is incorrect; when the image to be detected has a second display defect, the second display defect is determined as the detection result corresponding to the display content error detection rule.
[0010] Optionally, the method further includes: determining that the image to be detected has a second display defect when the text content of the target area does not match the preset text content or the text format does not match the preset text format.
[0011] Optionally, the image parameters include resolution, color histogram, sharpness, and contrast. When the anomaly detection rule is a display effect anomaly rule, the image parameters of the image to be detected are detected according to multiple anomaly detection rules, and the detection results corresponding to each anomaly detection rule are obtained, including: determining whether the image to be detected has a third display defect according to the resolution value of the image to be detected, the proportion of different colors in the color histogram, the sharpness value, and the contrast value; the third display defect is used to indicate that the display effect of the image to be detected is abnormal; when the image to be detected has a third display defect, the third display defect is determined as the detection result corresponding to the display effect anomaly rule.
[0012] Optionally, the method further includes: determining that the image to be detected has a third display defect when the image parameters meet a first preset condition; the first preset condition satisfies at least one of the following: the resolution value of the target area is less than the resolution threshold, the deviation value between the proportion of different colors in the color histogram and the proportion of the preconfigured color is greater than the deviation threshold, the sharpness value of the target area is less than the sharpness threshold, and the contrast value of the target area is less than the contrast threshold.
[0013] Based on the technical solution provided in this application, the abnormal items existing in the image to be detected are determined according to the image parameters of the image to be detected. Since the abnormal items are the items with display defects; the image parameters are used to characterize the actual display effect of the image to be detected. In this way, based on the parameters corresponding to the actual display effect, it can be reflected whether the displayed image of the display screen is abnormal. Compared with analyzing based on the background data of the display screen, this application can analyze according to the parameters of the real displayed image of the display screen and more accurately determine the abnormality of the displayed image.
[0014] In a second aspect, an image detection device is provided. The device includes: an acquisition unit and a processing unit; the acquisition unit is used to acquire the image to be detected; the processing unit is used to detect the image parameters of the image to be detected according to multiple abnormal detection rules to obtain the detection results corresponding to each abnormal detection rule; different abnormal detection rules correspond to different image parameters; the processing unit is further used to determine whether the image to be detected is abnormally displayed based on the detection results corresponding to the multiple abnormal detection rules.
[0015] Optionally, when the abnormal detection rule is a display content missing detection rule, the processing unit is specifically used to: determine whether the image to be detected has a first display defect according to the mean and variance of the brightness of different pixels and the edge intensity; the first display defect is used to indicate that the display content of the image to be detected is missing; when the image to be detected has the first display defect, the first display defect is determined as the detection result corresponding to the display content missing detection rule.
[0016] Optionally, the processing unit is further used to: determine that the image to be detected has a first display defect when the mean of the brightness of different pixels is less than the brightness threshold, the variance of the brightness of different pixels is less than the brightness threshold and less than the variance threshold, and the edge intensity is greater than the edge intensity threshold.
[0017] Optionally, the image parameters include the text content and the corresponding text format. When the abnormal detection rule is a display content error detection rule, the processing unit is specifically further used to: determine whether the image to be detected has a second display defect according to the text content and the corresponding text format of the target area; the second display defect is used to indicate that the display content of the image to be detected is incorrect; when the image to be detected has the second display defect, the second display defect is determined as the detection result corresponding to the display content error detection rule.
[0018] Optionally, the processing unit is further used to determine that the image to be detected has a second display defect when the text content of the target area does not match the preset text content or the text format does not match the preset text format.
[0019] Optionally, the image parameters include resolution, color histogram, sharpness, and contrast. When the anomaly detection rule is the display effect anomaly rule, the processing unit is specifically further configured to: determine whether there is a third display defect in the image to be detected according to the resolution value of the image to be detected, the proportions of different colors in the color histogram, the sharpness value, and the contrast value; the third display defect is used to indicate that the display effect of the image to be detected is abnormal; when there is a third display defect in the image to be detected, determine the third display defect as the detection result corresponding to the display effect anomaly rule.
[0020] Optionally, the processing unit is further configured to determine that there is a third display defect in the image to be detected when the image parameters meet a first preset condition; the first preset condition satisfies at least one of the following: the resolution value of the target area is less than the resolution threshold, the deviation value between the proportions of different colors in the color histogram and the proportions of pre-configured colors is greater than the deviation threshold, the sharpness value of the target area is less than the sharpness threshold, and the contrast value of the target area is less than the contrast threshold.
[0021] In a third aspect, an image detection device is provided. The image detection device can implement the functions performed by the image detection device in the above aspects or each possible design. The functions can be implemented by hardware. For example, in a possible design, the image detection device may include: a processor and a communication interface. The processor can be used to support the image detection device to implement the functions involved in the first aspect or any possible design of the first aspect.
[0022] In another possible design, the image detection device may further include a memory, and the memory is used to store necessary computer execution instructions and data of the image detection device. When the image detection device runs, the processor executes the computer execution instructions stored in the memory, so that the image detection device executes the image detection method in the first aspect or any possible image detection method of the first aspect.
[0023] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium can be a readable non-volatile storage medium. The computer-readable storage medium stores computer instructions or programs. When it runs on a computer, it enables the computer to execute the image detection method in the first aspect or any possible image detection method of the above aspect.
[0024] In a fifth aspect, a computer program product containing instructions is provided. When it runs on a computer, it enables the computer to execute the image detection method in the first aspect or any possible design of the above aspect.
[0025] In a sixth aspect, an electronic device is provided, which includes one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device is caused to execute the image detection method as described in the first aspect or any possible design of the first aspect.
[0026] In a seventh aspect, a chip system is provided, which includes a processor and a communication interface. The chip system can be used to implement the functions performed by the image detection device in the first aspect or any possible design of the first aspect. In a possible design, the chip system further includes a memory for storing program instructions and / or data. The chip system can be composed of chips or can include chips and other discrete devices, without limitation. Description of the Drawings
[0027] Figure 1 FIG. is a schematic structural diagram of an image detection system provided by an embodiment of the present application;
[0028] Figure 2 FIG. is a schematic structural diagram of an image detection device provided by an embodiment of the present application;
[0029] Figure 3 FIG. is a schematic flowchart of an image detection method provided by an embodiment of the present application;
[0030] Figure 4 FIG. is a schematic flowchart of another image detection method provided by an embodiment of the present application;
[0031] Figure 5 FIG. is a schematic flowchart of another image detection method provided by an embodiment of the present application;
[0032] Figure 6 FIG. is a schematic flowchart of another image detection method provided by an embodiment of the present application;
[0033] Figure 7 FIG. is a schematic structural diagram of another image detection device provided by an embodiment of the present application. Detailed Embodiments
[0034] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0035] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0036] It should also be understood that the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements and / or components.
[0037] First, the nouns involved in this application are explained.
[0038] 1. Color histogram: It refers to a color feature widely used in many image retrieval systems. What it describes is the proportion of different colors in the whole image.
[0039] 2. Edge intensity: It refers to the amplitude of the gradient of the edge points of an image. Edge points refer to those where the gray values of the pixels on both sides are significantly different. Edge points exist between such a pair of adjacent points, that is, one is inside a brighter area and the other is outside.
[0040] With the in-depth digital transformation of enterprises, information visualization has become an important tool for enterprise real-time monitoring, business analysis and decision support. And the display screen (large-screen data) display, as the core carrier of information visualization, is widely used in scenarios such as enterprise operation monitoring, production scheduling and data display. However, due to factors such as complex data sources, diverse display forms and network environment fluctuations of the display screen, the stability and accuracy of the display screen display often face many challenges.
[0041] In order to ensure the stability and accuracy of the display screen display, the background data source of the display screen can be analyzed. However, the background data may not be able to reflect whether the display image of the display screen is abnormal, and its adaptability is poor.
[0042] In one example, the stability and accuracy of the display screen display often face many challenges, which are mainly manifested as 1-4:
[0043] 1. Data loss: Due to reasons such as interface anomalies, data source update failures or system crashes, it may cause some content areas to fail to load normally, resulting in problems such as blank charts and un-displayed data.
[0044] 2. Data display errors: Common problems include data garbling, out-of-range values, and format anomalies, which usually stem from encoding errors, data transmission failures, or improper display rule configurations.
[0045] 3. Missing page components: Key modules on the page are not loaded or missing, such as missing charts, monitoring metrics, or navigation bars, directly affecting the integrity of data display.
[0046] 4. Abnormal page components: Page components may appear blurry, color-shifted, etc. due to network jitter, rendering anomalies, or resolution issues, affecting users' understanding of data.
[0047] Low development efficiency: During interface development, developers need to manually write a large amount of call code, which is not only time-consuming and laborious but also error-prone. In addition, the lack of unified development tools and plugin support also limits the improvement of development efficiency.
[0048] In some embodiments, inspection information can also be collected through methods such as QR codes, NFC, video monitoring, etc., and the inspection data can be uploaded to a remote processing platform for analysis. However, analyzing the inspection information collected by means of QR codes, NFC, video monitoring, etc. according to the remote processing platform has the following defects 1-6:
[0049] 1. Over-reliance on the recognition of physical tags, the system relies on QR code signs or NFC tags on the device. If the tags are damaged, blocked, or lost, the inspection function cannot be effectively completed.
[0050] 2. Lack of real-time performance, the collection and processing of data need to be uploaded to a remote server for analysis, which may not be able to respond to problems in real time due to network latency. The dependence on remote processing increases the requirements for the network environment, and data loss or latency is likely to occur in scenarios with unstable networks.
[0051] 3. Insufficient support for dynamic content. The current platform mainly records static information through the video monitoring module and the inspection information collection module, lacking the ability to process dynamically updated content (such as real-time data refreshing, chart changes, etc.). The analysis of video monitoring data relies on manual work and has a low degree of automation.
[0052] 4. Lack of anomaly detection and intelligent analysis capabilities. The existing platform lacks the automatic detection ability for anomalies in large-screen displays (such as data missing, format errors, component loss, etc.), and can only provide basic support for video or image records. And it cannot achieve in-depth intelligent analysis of inspection data.
[0053] 5. It does not support the visualization and interaction of inspection results. The platform functions mainly focus on data collection and uploading, lacking the visualization display and interaction functions for inspection results, and unable to intuitively present abnormal information. The lack of a user-friendly interface design is not conducive to improving the inspection efficiency.
[0054] 6. Poor generality and limited adaptability. The current design relies on specific inspection devices (such as devices with built-in QR code / NFC modules), and has poor adaptability to other types of inspection scenarios. It lacks general support for multi-scenarios and multi-data sources (such as large-screen data display).
[0055] In view of this, an embodiment of the present application provides an image detection method, including: obtaining an image to be detected; determining an abnormal item existing in the image to be detected according to the image parameters of the image to be detected; the abnormal item is an item with a display defect.
[0056] The method provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings of the specification.
[0057] It should be noted that the network system described in the embodiment of the present application is for more clearly explaining the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. Those skilled in the art can know that with the evolution of the network system and the emergence of other network systems, the technical solution provided by the embodiment of the present application is equally applicable to similar technical problems.
[0058] Figure 1 Shown is a schematic structural diagram of an image detection system 10 provided by an embodiment of the present application. As Figure 1 shown, the image detection system 10 may include a terminal device 11 and an image detection device 12.
[0059] Among them, the terminal device 11 can be used to display the image of the inspection area. It can also be called a terminal, a mobile station (MS), a mobile terminal (MT), etc., and is a device that provides voice and / or data connectivity to users. For example, the terminal device 11 can be a handheld device with a wireless connection function, a vehicle-mounted device, etc. Specifically, it can be: a smart phone, a pocket personal computer (PPC), a palm computer, a personal digital assistant (PDA), a notebook computer, a tablet computer, a wearable device, or a vehicle-mounted device, etc. The embodiments of the present application do not limit the specific technology, specific quantity, and specific device form adopted by the terminal device 11.
[0060] Among them, the image detection device 12 involved in the embodiments of the present application can be used to acquire the images displayed by the terminal device 11 and determine the abnormal items existing in the images according to the image parameters of the images. For example, it can be an electronic device with processing functions such as a computer or a server. For example, the image detection device 12 can be a computer, a server, etc. Among them, the server can be a single server, or it can also be a server cluster composed of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. The embodiments of the present application do not limit the specific technology, specific quantity, and specific device form of the image detection device 12.
[0061] The image detection system can include a user permission management module, an inspection task configuration module, a large screen screenshot and data collection module, an anomaly detection and analysis module, an anomaly feedback and work order generation module, and a model optimization module.
[0062] 1. The user permission management module is used to implement hierarchical control of user permissions to ensure that only authorized personnel can configure and view inspection tasks and results. By verifying the user identity and role, the security of system operations and the confidentiality of data are guaranteed. The management process of the user permission management module can include the following S1 - S2:
[0063] S1. The user permission management module is based on the user authentication and permission control of the enterprise's existing system.
[0064] The user permission management module can interface with the enterprise's single sign - on (SSO) system or OA system to obtain the existing accounts and account information of enterprise employees, avoid repeated registration, and use the OAuth2 or LDAP protocol for user identity verification.
[0065] Among them, the account information can include the employee id, full name, department name, job title, and phone number.
[0066] S2. Perform permission grading based on role - based access control (RBAC).
[0067] The user permission management module can set three main roles and their permission scopes. The three main roles can include administrators, ordinary users, and auditors.
[0068] Among them, the permission scope of the administrator can include: configuring inspection tasks, modifying system parameters (such as inspection frequency, anomaly handling rules), and viewing global inspection reports (tasks and reports of all users).
[0069] The permission scope of ordinary users may include: viewing the inspection tasks and results of specified tasks (which need to be bound to the department to which the user belongs), downloading or exporting inspection tasks and results.
[0070] The permission scope of auditors may include: viewing system logs and anomaly detection records, but unable to download or operate tasks.
[0071] 2. The inspection task configuration module is used to allow users to flexibly define inspection parameters such as inspection targets, frequencies, and screenshots, making the inspection tasks configurable and efficient to meet diverse requirements.
[0072] Users can define inspection parameters through the system interface. The inspection parameters can be as shown in Table 1 below:
[0073] Table 1 Schematic Table of Inspection Parameters
[0074]
[0075]
[0076] It should be noted that Table 1 is only for illustrative purposes, and the inspection parameters may also include other types of parameters, which are not restricted here.
[0077] Users can also define the configuration parameters corresponding to the inspection tasks through the system interface.
[0078] The configuration parameters may include screenshot resolution (screenshot_resolution), screenshot file save path (screenshot_save_path), whether to enable delayed capture of dynamic content (enable_delay_capture), and specified monitoring area.
[0079] Among them, the screenshot resolution supports manual input or selection of standard resolutions (such as 1920x1080, 1366x768).
[0080] The screenshot file save path can be automatically stored in the enterprise's unified data warehouse by default, or the user can specify the path (such as / screenshots / 2024 / task1 / ).
[0081] For dynamically refreshed pages (such as carousel), users can enable the delayed capture function. The option is True or False.
[0082] The specified monitoring area can be manually boxed by the user as the key detection area in the screenshot, such as the position of charts or tables. The coordinate range is represented by the upper left corner (x1, y1) and the lower right corner (x2, y2).
[0083] The inspection task configuration module can also flexibly define the execution time of inspection tasks using Cron expressions and supports the following scheduling modes: scheduled mode, manual mode, and trigger mode.
[0084] Among them, the scheduled mode is used to specify triggering inspections every day, hour, or minute. For example, 0 8,12,18*** means that the tasks are executed at 8:00, 12:00, and 18:00 every day.
[0085] Among them, the manual mode is triggered manually by the user through the interface. The trigger mode is used to automatically trigger after binding certain events (such as exception alarms).
[0086] The inspection task configuration module can also dynamically allocate computing resources based on task priorities to ensure that high-priority tasks are executed first. The parameter name can be task_priority, and the range can be 1-5 (1 being the highest).
[0087] 3. The large screen screenshot and data collection module is used to achieve efficient collection and storage of large screen content, support compatibility with multi-screen resolutions and dynamic content, and meet the data collection requirements in complex business scenarios.
[0088] For example, the large screen screenshot and data collection module can use Selenium or Puppeteer to control the browser to automatically load the target page. It supports mainstream browsers (such as Chrome, Edge) to ensure compatibility.
[0089] For pages with dynamic refreshes (such as carousel or animated content), dynamic content can be captured by means of delayed shooting and frame-by-frame screenshots.
[0090] Delayed shooting: By adding mechanisms such as time.sleep, wait for the dynamic content of the page to finish loading before taking a screenshot.
[0091] Frame-by-frame screenshot: Take frame-by-frame shots of the page changes within a short period of time and save them in the form of GIF or video.
[0092] Automatically adapt to different screen resolutions to ensure that the screenshot content is complete and distortion-free. The resolution parameters can be customized (such as 1920x1080 or 4K mode).
[0093] During the image compression process, the large screen screenshot and data collection module can use PNGQuant or OptiPNG to achieve lossless compression and reduce storage space. For situations that require fast loading, it supports conversion to JPEG format (lossy compression).
[0094] During the process of image storage, the large-screen screenshot and data collection module can be uniformly stored in the enterprise data warehouse or distributed file system (such as HDFS). Standardize the naming of file names and paths (such as company_task_YYYYMMDD_HHMM.png) to facilitate indexing and retrieval.
[0095] In some embodiments, the large-screen screenshot and data collection module can record metadata for each screenshot, including: screenshot time, resolution, task name, etc., to facilitate subsequent analysis.
[0096] 4. The anomaly detection and analysis module is used to detect four types of large-screen problems through artificial intelligence technology: data missing, abnormal data display, page component missing, and component display anomaly.
[0097] 5. The anomaly feedback and work order generation module is used for automated processing after anomaly detection, including generating anomaly reports and work orders, and providing multi-channel notification and anomaly tracking mechanisms to ensure timely response and closed-loop resolution of problems.
[0098] For example, the anomaly feedback and work order generation module can generate a specific description for each type of problem and extract the abnormal area in the screenshot. And based on the report template, automatically generate an inspection report combining text and graphics.
[0099] Among them, the inspection report includes problem summary, screenshot annotation, and recommended measures.
[0100] Among them, the problem summary includes problem type, occurrence time, and detection task. Screenshot annotation is used to highlight the abnormal area using a border or mask. Recommended measures are used to provide possible repair suggestions for users.
[0101] The output format of the inspection report can be PDF, HTML, etc., to facilitate cross-platform viewing.
[0102] Among them, the notification content of multi-channel notification can include anomaly summary, screenshot, report link, and priority level, etc.
[0103] The notification methods can include:
[0104] SMS: Push the summary of key problems and work order numbers.
[0105] Email: Attach the complete report and screenshot, and support one-click access to the work order page.
[0106] Enterprise OA system: Through API docking, send anomaly information to the specified work group or task system.
[0107] The push mechanism of the inspection report can be pushed through a message queue (such as Kafka or RabbitMQ) to ensure the timeliness and reliability of notifications.
[0108] During the process of work order generation, work orders can be automatically generated according to the exception classification and severity.
[0109] The work order content can include information such as exception description, screenshot link, and responsible department. Priority: High, medium, and low priorities are set according to the business impact of the problem.
[0110] Work order lifecycle management: It can include state transitions such as new, in process, and resolved. After the work order is completed, the system automatically archives and updates the detection result database.
[0111] The exception feedback and work order generation module can be docked with the work order management system within the enterprise (such as Jira, ZenTao) to achieve automatic synchronization of exception information.
[0112] 6. The model optimization module is used to continuously optimize the detection model based on the exception data generated during the inspection process and user feedback, improving the accuracy and adaptability of detection. Through the feedback mechanism and dynamic update process, the system can self-learn and adapt to different business scenarios.
[0113] In one example, for the first display defect, user feedback can include the misjudged area marked and the missed area supplemented.
[0114] The model optimization module can extract the image parameters (brightness of different pixels and edge intensity) of the user-marked area, add them to the training data, and optimize the threshold range of brightness mean and variance according to user feedback. Using the transfer learning technology of YOLOv8, the detection model is optimized.
[0115] In some embodiments, for the first display defect, user feedback can include the components that actually exist but are misjudged as missing marked by the user, and the missed components supplemented by the user (such as unrecognized custom charts).
[0116] The optimization method for identifying the first display defect includes: template library extension, target detection model optimization.
[0117] Template library extension refers to automatically updating the standard chart template library according to user feedback, grouping and classifying common chart types to improve the matching efficiency.
[0118] Target detection model optimization refers to using the missed detection data marked by the user to fine-tune the Detectron2 model. Adding more category samples during the training process to improve the generalization ability of the model.
[0119] In one example, for the second display defect, user feedback can include the misrecognized text, as well as the corrected correct numerical format or business scope.
[0120] The optimization methods for identifying the second display defect include: OCR model enhancement, rule base update, and transfer learning.
[0121] OCR model enhancement: It refers to retraining the OCR model by combining the actual text content corrected by the user in the feedback, and using a pre-trained multilingual OCR model (such as Google Vision API) to reduce the cold start problem.
[0122] Rule base update: It refers to dynamically expanding the regular expression rules to adapt to more business scenarios. Add context verification rules for specific businesses (such as the relationship between a certain KPI and other metrics).
[0123] Transfer learning: It refers to converting the feedback data into a small training set and using transfer learning methods to fine-tune the model.
[0124] In one example, for the third display defect, the user feedback may include that the actually clear components marked by the user are misjudged as blurred, and the correct color range of the abnormal color area pointed out by the user.
[0125] The optimization methods for identifying the third display defect include: updating the image quality assessment model and optimizing the color detection model.
[0126] Updating the image quality assessment model: It refers to adjusting the clarity detection threshold for the misjudged areas marked by the user and adding detection adaptation for dynamic blur (such as carousel) scenarios.
[0127] Optimizing the color detection model: It refers to expanding the color histogram template according to the user marks to accommodate more color variations, and adding a recognition and tolerance adjustment mechanism for specific color distributions in the model.
[0128] The model optimization module also includes a dynamic update and iteration mechanism. The dynamic update and iteration mechanism includes data cleaning, regular fine-tuning, model evaluation and verification.
[0129] Data cleaning: It refers to regularly cleaning and normalizing the feedback data to remove duplicate or invalid samples.
[0130] Regular fine-tuning: It refers to using the cleaned feedback data to periodically fine-tune the detection model.
[0131] Model evaluation and verification: It refers to verifying the performance improvement through A / B testing before the updated model goes online. A testing includes changes in detection accuracy, omission rate, and misjudgment rate. B testing includes the satisfaction score of user feedback.
[0132] Specifically, when implemented, Figure 1 each device in Figure 2 can adopt the composition structure shown in Figure 2 or include the components shown inFigure 2 The following is a schematic structural diagram of an image detection device 200 provided by an embodiment of the present application. The image detection device 200 may be a network device, or the image detection device 200 may be a chip or a system-on-chip in a network device. As Figure 2 shown, the image detection device 200 includes a processor 201, a communication interface 202, and a communication line 203.
[0133] Furthermore, the image detection device 200 may further include a memory 204. Among them, the processor 201, the memory 204, and the communication interface 202 may be connected through the communication line 203.
[0134] Among them, the processor 201 is a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0135] The communication interface 202 is used to communicate with other devices or other communication networks. The communication interface 202 may be a module, a circuit, a communication interface, or any device capable of implementing communication.
[0136] The communication line 203 is used to transmit information between the components included in the image detection device 200.
[0137] The memory 204 is used to store instructions. Among them, the instructions may be computer programs.
[0138] Among them, the memory 204 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, without limitation.
[0139] It should be noted that the memory 204 can exist independently of the processor 201 or be integrated with the processor 201. The memory 204 can be used to store instructions, program codes, or some data, etc. The memory 204 can be located inside the image detection device 200 or outside the image detection device 200, without limitation. The processor 201 is configured to execute the instructions stored in the memory 204 to implement the image detection method provided in the following embodiments of the present application.
[0140] In one example, the processor 201 may include one or more CPUs. For example, Figure 2 CPU0 and CPU1 in
[0141] As an alternative implementation, the image detection device 200 includes multiple processors. For example, in addition to Figure 2 the processor 201 in
[0142] It should be noted that Figure 2 the shown component structure does not constitute a limitation on each device in Figure 1 In addition to Figure 2 the components shown in Figure 1 each device in Figure 2 may include more or fewer components than
[0143] In the embodiments of the present application, the chip system may be composed of chips or may include chips and other discrete devices.
[0144] In addition, actions, terms, etc. involved between the embodiments of the present application can be referred to each other without limitation. The message names or parameter names in the messages for interaction between each device in the embodiments of the present application are only examples, and other names can also be adopted in specific implementations without limitation.
[0145] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical items or similar items with basically the same functions and effects. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different.
[0146] It should be noted that in the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0147] In this application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the relationship between associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.
[0148] Next, in combination with Figure 1 the image detection system shown below, the image detection method provided in the embodiments of this application will be described.
[0149] Figure 3 is a schematic flowchart of an image detection method provided in the embodiments of this application. As shown in Figure 3 below, this method includes the following S301 - S303:
[0150] S301. Obtain the image to be detected.
[0151] Among them, the image to be detected can be an image corresponding to any video frame in the video data.
[0152] As a possible implementation, the image detection method can be based on using a screenshot tool to capture the required image frame on the display interface to obtain the image to be detected.
[0153] Among them, the screenshot tool can be set according to needs. For example, it can be Selenium or Puppeteer.
[0154] In some embodiments, the image to be detected can be a page with dynamic refreshing (such as a carousel or animated content).
[0155] The image detection device can wait for the dynamic content of the page to finish loading and then take a screenshot by adding mechanisms such as time.sleep. Or, it can take sequential screenshots of the page changes within a short period of time and save them in the form of a GIF or video.
[0156] After obtaining the image to be detected, the image detection device can directly save the image to be detected at a preset address.
[0157] The preset address can be set according to needs. For example, it can be an enterprise data warehouse or a distributed file system (such as HDFS), etc.
[0158] In some embodiments, in order to reduce the memory load, the image detection device may also compress the image to be detected and save the compressed image to be detected at a preset address.
[0159] It should be noted that in order to distinguish different images to be detected, the image detection device may store the image metadata of the images to be detected. The image metadata may include: screenshot time, resolution, task name, etc.
[0160] S302. Detect the image parameters of the image to be detected according to multiple anomaly detection rules, and obtain the detection result corresponding to each anomaly detection rule.
[0161] Among them, different anomaly detection rules correspond to different image parameters. The anomaly detection rules include at least one of the following: display content missing detection rule, display content error detection rule, display effect anomaly detection rule.
[0162] Different anomaly detection rules are used to detect different display defects. For example, the display defects may include a first display defect, a second display defect, and a third display defect. The first display defect is used to indicate that the display content of the image to be detected is missing. The second display defect is used to indicate that the display content of the image to be detected is incorrect. The third display defect is used to indicate that the display effect of the image to be detected is abnormal.
[0163] As a possible implementation, the types of image parameters are multiple. For each of the multiple image parameters, the image detection device may determine whether the image parameter matches a preset image parameter, and in the case where the image parameter does not match the preset image parameter, determine the display defect corresponding to the image parameter as an anomaly item existing in the image to be detected, and in the case where the image parameter matches the preset image parameter, determine the display defect corresponding to the image parameter as an anomaly item not existing in the image to be detected.
[0164] In one example, the types of image parameters may include first-type image parameters, second-type image parameters, and third-type image parameters. The image detection device may determine whether the first-type image parameters match the preset first-type image parameters, and in the case where the first-type image parameters do not match the preset first-type image parameters, determine the first display defect corresponding to the first-type image parameters as an anomaly item existing in the image to be detected.
[0165] The image detection device may also determine whether the second-type image parameters match the preset second-type image parameters, and in the case where the second-type image parameters do not match the preset second-type image parameters, determine the second display defect corresponding to the second-type image parameters as an anomaly item existing in the image to be detected.
[0166] The image detection device can also determine whether the third type of image parameter matches the preset third type of image parameter, and in the case where the third type of image parameter does not match the preset third type of image parameter, determine the third display defect corresponding to the third type of image parameter as an abnormal item existing in the image to be detected.
[0167] In some embodiments, the image detection device can determine the image parameters within the target area of the image to be detected, and determine the abnormal items of the image to be detected according to the image parameters within the target area of the image to be detected.
[0168] Wherein, the target area is the text display area of the image to be detected. The text display area may include text, charts, text boxes, etc.
[0169] In one example, the image detection device can obtain the target area of the image to be detected according to a pre-trained object detection model.
[0170] The pre-trained object detection model can be set according to needs. For example, it can be YOLOv8, etc.
[0171] It should be noted that the specific description of determining the abnormal items of the image to be detected according to the image parameters within the target area of the image to be detected can refer to the description in the subsequent part, and will not be elaborated here.
[0172] After determining the abnormal items existing in the image to be detected, the image detection device can also automatically generate a detection report combining pictures and texts based on a report template, and send the detection report to the management personnel.
[0173] Wherein, in the case where the image to be detected is a screenshot in an inspection video, the detection report may include specific descriptions (problem type, occurrence time, detection task) generated for each type of abnormal item, abnormal areas in the image to be detected (such as can be highlighted with a border or mask), repair suggestions, etc.
[0174] For the convenience of viewing, the format of the detection report can be set according to needs. For example, it can be PDF, HTML, etc.
[0175] It should be noted that the notification methods for sending the detection report to the management personnel may include but are not limited to at least one of the following: text message, email, enterprise OA system.
[0176] In order to ensure the timeliness and reliability of sending the detection report, the image detection device can send the detection report to the management personnel based on a real-time push mechanism.
[0177] Wherein, the real-time push mechanism can be to send the detection report to the management personnel through a preset message queue. The preset message queue can be Kafka or RabbitMQ, etc.
[0178] S303. Determine whether the image to be detected is abnormally displayed based on the detection results corresponding to multiple anomaly detection rules.
[0179] As a possible implementation, the image detection device can determine that the image to be detected is abnormally displayed when any of the detection results corresponding to multiple anomaly detection rules indicates that there is an anomaly in the image to be detected. When the detection results corresponding to multiple anomaly detection rules indicate that there is no anomaly in the image to be detected, it is determined that the image to be detected is normally displayed.
[0180] Based on the technical solution provided in this application, the anomaly items existing in the image to be detected are determined according to the image parameters of the image to be detected. Since the anomaly items are the items with display defects; the image parameters are used to characterize the actual display effect of the image to be detected. In this way, it is possible to reflect whether the displayed image on the display screen is abnormal based on the parameters corresponding to the actual display effect. Compared with analyzing based on the background data of the display screen, this application can analyze according to the parameters of the real displayed image on the display screen and more accurately determine the anomaly of the displayed image.
[0181] A possible embodiment is as Figure 4 shown. In order to determine the anomaly items of the image to be detected, this application may further include the following S401 - S402.
[0182] S401. Determine whether the image to be detected has a first display defect according to the mean and variance of the brightness of different pixels, and the edge intensity.
[0183] Among them, the first display defect is used to indicate the missing display content of the image to be detected. For example, the missing display content may be that the target area is blank.
[0184] As a possible implementation, the image detection device can determine that the image to be detected has a first display defect when the mean of the brightness of different pixels is less than the brightness threshold, the variance of the brightness of different pixels is less than the brightness threshold and less than the variance threshold, and the edge intensity is greater than the edge intensity threshold.
[0185] It should be noted that the brightness threshold, variance threshold, and edge intensity threshold can be set as needed. For example, the brightness threshold can be 300 nit, etc. The variance threshold can be 0.1, etc., and the edge intensity threshold can be 50, etc.
[0186] It should be noted that in the process of determining the edge intensity, the image detection device can use an edge detection algorithm to determine the edge intensity threshold.
[0187] The edge detection algorithm can be set as needed. For example, it can be the Canny edge detection algorithm.
[0188] In some embodiments, the image parameters may further include page components. The image detection device may determine that the template matching algorithm matches the page components in the image to be detected with the page component template, and determine whether there is a first display defect.
[0189] For example, when the matching degree between the page components in the image to be detected and the page component template is less than the matching degree threshold, it is determined that the page components are missing and there is a first display defect. When the matching degree between the page components in the image to be detected and the page component template is greater than or equal to the matching degree threshold, it is determined that there is no first display defect.
[0190] Among them, the page component template may include ORB feature points of page components (such as charts).
[0191] S402. When there is a first display defect in the image to be detected, determine the first display defect as the detection result corresponding to the display content missing detection rule.
[0192] In one example, after determining the abnormal items of the image to be detected, the image detection may generate an abnormal report for the image to be detected. The content of the abnormal report may include: the detection result corresponding to the display content missing detection rule of the image to be detected is the first display defect.
[0193] A possible embodiment is as Figure 5 shown. The image parameters include text content and the corresponding text format. To determine whether the image to be detected is abnormally displayed, this application may further include the following S501-S502.
[0194] S501. Determine whether there is a second display defect in the image to be detected according to the text content and the corresponding text format of the target area.
[0195] Among them, the second display defect is used to indicate that the display content of the image to be detected is incorrect. The text content may include characters and numerical values.
[0196] As a possible implementation, the image detection device may use an OCR tool to extract the text content of the target area. When the text content of the target area does not match the preset text content, or the text format does not match the preset text format, it is determined that there is a second display defect in the image to be detected.
[0197] When the text content of the target area matches the preset text content and the text format matches the preset text format, it is determined that there is a second display defect in the image to be detected.
[0198] Among them, the OCR tool can be set according to needs. For example, it can be Tesseract, EasyOCR, etc.
[0199] The determination process of whether the text content of the target area matches the preset text content or whether the text format matches the preset text format will be introduced through parts 1-2 as follows:
[0200] 1. Whether the text content of the target area matches the preset text content.
[0201] The image detection device can determine whether the text format of the text content in the target area matches the preset text format based on a regular expression.
[0202] In one example, the preset text format corresponding to the regular expression can be \d+(\.\d+)? The image detection device can determine that the text format of the text content in the target area matches the preset text format when the text format of the text content in the target area is \d+(\.\d+)?; and determine that the text format of the text content in the target area does not match the preset text format when the text format of the text content in the target area is not \d+(\.\d+)?.
[0203] In one example, the image detection device can construct a composeapplication object according to the application parameters input by the user. Generate capability information through the method of dynamic proxy. Further, complete authentication (such as token calculation) and message assembly (such as assembly of request headers and request bodies, etc.), run the call file, and call the interface to be called.
[0204] 2. Determine whether the text format of the target area matches the preset text format.
[0205] The image detection device can set a reasonable preset range through business logic and determine this preset range as the preset text content. When the text content in the target area is within the preset range, it is determined that the text format of the target area matches the preset text format; when the text content in the target area is outside the preset range, it is determined that the text format of the target area does not match the preset text format.
[0206] Exemplarily, the preset range can be 0%-100%. When the text content in the target area is within 0%-100%, it is determined that the text format of the target area matches the preset text format; when the text content in the target area is outside 0%-100%, it is determined that the text format of the target area does not match the preset text format.
[0207] S502. When there is a second display defect in the image to be detected, determine the second display defect as the detection result corresponding to the display content error detection rule.
[0208] In one example, after determining the abnormal item of the image to be detected, the image detection device may generate an abnormal report for the image to be detected. The content of the abnormal report may include: the abnormal item of the image to be detected is the second display defect.
[0209] A possible embodiment is as Figure 6 shown. The image parameters include resolution, color histogram, sharpness, and contrast. In order to determine the abnormal items existing in the image to be detected, this application may further include the following S601 - S602.
[0210] S601. Determine whether there is a third display defect in the image to be detected according to the resolution value of the image to be detected, the proportion of different colors in the color histogram, the sharpness value, and the contrast value.
[0211] Among them, the third display defect is used to indicate that the display effect of the image to be detected is abnormal.
[0212] As a possible implementation manner, the image detection device may determine that there is a third display defect in the image to be detected when the image parameters meet the first preset condition.
[0213] The first preset condition satisfies at least one of the following: the resolution value of the target area is less than the resolution threshold, the deviation value between the proportion of different colors in the color histogram and the proportion of the pre - configured color is greater than the deviation threshold, the sharpness value of the target area is less than the sharpness threshold, and the contrast value of the target area is less than the sharpness threshold.
[0214] It should be noted that the resolution threshold, deviation threshold, and sharpness threshold can be set as needed.
[0215] The following introduces the process of determining the resolution value, color histogram, sharpness value, and contrast value of the target area according to the following 1 - 4 parts:
[0216] 1. The sharpness value of the target area.
[0217] The image detection device may calculate the sharpness value of the image to be detected by Laplace transform.
[0218] When the sharpness value is less than the set threshold, it is determined that there is a blur problem with the image component to be detected, that is, it belongs to the abnormal display effect corresponding to the third display defect. When the sharpness value is greater than or equal to the set threshold, it is determined that there is no blur problem with the image component to be detected.
[0219] For example, the image detection device may convert the image to be detected into a grayscale image, use the Laplace operator to transform the grayscale image, calculate the variance of the image after Laplace transform, and determine the variance of the image after Laplace transform as the resolution value of the target area.
[0220] 2. Color histogram of the target area.
[0221] The image detection device can read the image to be detected by using a color histogram acquisition tool and calculate the color histogram of the image.
[0222] The color histogram acquisition tool can be set as needed. For example, it can be the OpenCV library, etc.
[0223] When the deviation value between the proportions of different colors in the color histogram of the target area and the proportions of the pre-configured colors is greater than the deviation threshold, it is determined that there is a problem with the color display of the image component to be detected, that is, it belongs to the abnormal display effect corresponding to the third display defect. When the deviation value between the proportions of different colors in the color histogram of the target area and the proportions of the pre-configured colors is less than or equal to the set threshold, it is determined that there is no problem with the color display of the image component to be detected.
[0224] In one example, if the color deviation value exceeds the set range (such as RGB deviation > 20%), it is determined as color abnormality.
[0225] 3. Resolution value of the target area.
[0226] In one example, the image detection device can determine the product of the pixel density and the image size and determine the product of the pixel density and the image size as the resolution value of the target area.
[0227] Confirm whether the resolution meets the requirements by calculating the pixel density.
[0228] 4. Contrast value of the target area.
[0229] In one example, the image detection device can use a contrast detection algorithm to obtain the contrast value of the target area.
[0230] For example, the contrast detection algorithm can be the Weber contrast algorithm, etc.
[0231] S602. When there is a third display defect in the image to be detected, determine the third display defect as the detection result corresponding to the abnormal display effect rule.
[0232] In one example, after determining the abnormal items of the image to be detected, the image detection device can generate an abnormal report of the image to be detected. The content of the abnormal report can include: the detection result corresponding to the abnormal display effect rule is the third display defect.
[0233] Embodiments of the present application can divide the image detection device into functional modules or functional units according to the above method examples. For example, each functional module or functional unit can be corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware, or in the form of a software functional module or functional unit. Among them, the division of modules or units in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0234] In the case of dividing each functional module corresponding to each function, Figure 7 FIG. 5 shows a schematic structural diagram of an image detection device 700. The image detection device can be an image detection device, or a chip, a processor, etc. applied to the image detection device. The image detection device 700 can be used to execute the functions of the image detection device involved in the above embodiments. Figure 7 The shown image detection device 700 may include: an acquisition unit 701 and a processing unit 702; the acquisition unit 701 is used to acquire an image to be detected; the processing unit 702 is used to detect the image parameters of the image to be detected according to a plurality of anomaly detection rules, and obtain a detection result corresponding to each anomaly detection rule; different anomaly detection rules correspond to different image parameters; the processing unit 702 is further used to determine whether the image to be detected is abnormally displayed based on the detection results corresponding to the plurality of anomaly detection rules.
[0235] Optionally, in the case where the anomaly detection rule is a display content missing detection rule, the processing unit 702 is specifically used to: determine whether the image to be detected has a first display defect according to the mean and variance of the brightness of different pixels, and the edge intensity; the first display defect is used to indicate that the display content of the image to be detected is missing; in the case where the image to be detected has the first display defect, the first display defect is determined as the detection result corresponding to the display content missing detection rule.
[0236] Optionally, the processing unit 702 is further used to: determine that the image to be detected has a first display defect when the mean of the brightness of different pixels is less than the brightness threshold, the variance of the brightness of different pixels is less than the variance threshold, and the edge intensity is greater than the edge intensity threshold.
[0237] Optionally, the image parameters include text content and the corresponding text format. When the anomaly detection rule is the display content error detection rule, the processing unit 702 is further specifically configured to: determine whether the image to be detected has a second display defect according to the text content of the target area and the corresponding text format; the second display defect is used to indicate an error in the display content of the image to be detected; when the image to be detected has a second display defect, determine the second display defect as the detection result corresponding to the display content error detection rule.
[0238] Optionally, the processing unit 702 is further configured to determine that the image to be detected has a second display defect when the text content of the target area does not match the preset text content or the text format does not match the preset text format.
[0239] Optionally, the image parameters include resolution, color histogram, sharpness, and contrast; when the anomaly detection rule is the display effect anomaly rule, the processing unit 702 is further specifically configured to: determine whether the image to be detected has a third display defect according to the resolution value of the image to be detected, the proportion of different colors in the color histogram, the sharpness value, and the contrast value; the third display defect is used to indicate an anomaly in the display effect of the image to be detected; when the image to be detected has a third display defect, determine the third display defect as the detection result corresponding to the display effect anomaly rule.
[0240] Optionally, the processing unit 702 is further configured to determine that the image to be detected has a third display defect when the image parameters meet a first preset condition; the first preset condition satisfies at least one of the following: the resolution value of the target area is less than the resolution threshold, the deviation value between the proportion of different colors in the color histogram and the proportion of the pre-configured color is greater than the deviation threshold, the sharpness value of the target area is less than the sharpness threshold, and the contrast value of the target area is less than the contrast threshold.
[0241] The embodiments of the present application also provide a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by a computer program instructing relevant hardware. This program can be stored in the above computer-readable storage medium. When this program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be an internal storage unit of any of the foregoing embodiments of the image detection device (including the data sending end and / or the data receiving end), such as the hard disk or memory of the image detection device. The above computer-readable storage medium can also be an external storage device of the above terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the above terminal device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above image detection device and the external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above image detection device. The above computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.
[0242] It should be noted that the terms "first", "second", etc. in the description, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0243] It should be understood that in the present application, "at least one (item)" means one or more, "a plurality" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (one)" or its similar expression below refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0244] From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0245] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0246] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0247] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0248] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks or optical discs that can store program codes.
[0249] The above are only the specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. An image detection method, characterized in that: The method comprises: Acquire the image to be detected; Detecting image parameters of the image to be detected according to multiple anomaly detection rules to obtain a detection result corresponding to each anomaly detection rule; different anomaly detection rules correspond to different image parameters; Based on the detection results corresponding to the multiple abnormality detection rules, it is determined whether the image to be detected is displayed abnormally.
2. The method according to claim 1, characterized in that: The anomaly detection rule includes at least one of the following: Display content missing detection rules, display content error detection rules, display effect abnormality detection rules.
3. The method according to claim 2, characterized in that In the case where the abnormality detection rule is the display content missing detection rule, detecting the image parameters of the image to be detected according to multiple abnormality detection rules to obtain the detection result corresponding to each abnormality detection rule includes: Determining whether the image to be detected has a first display defect according to the mean and variance of the brightness of the different pixels and the edge strength; the first display defect is used to indicate that display content of the image to be detected is missing; In a case where the image to be detected has the first display defect, the first display defect is determined as a detection result corresponding to the display content missing detection rule.
4. The method according to claim 3, characterized in that: The method further comprises: When the mean of the brightness of the different pixels is less than a brightness threshold, the variance of the brightness of the different pixels is less than a brightness threshold and less than a variance threshold, and the edge strength is greater than an edge strength threshold, it is determined that the image to be detected has the first display defect.
5. The method according to any one of claims 1 to 4, characterized in that The image parameters include text content and a corresponding text format. When the anomaly detection rule is the display content error detection rule, the image parameters of the image to be detected are detected according to multiple anomaly detection rules to obtain a detection result corresponding to each anomaly detection rule, including: Determining whether the image to be detected has a second display defect according to the text content and the corresponding text format of the target area; the second display defect is used to indicate that the display content of the image to be detected is wrong; In a case where the image to be detected has the second display defect, the second display defect is determined as a detection result corresponding to the display content error detection rule.
6. The method according to claim 5, characterized in that The method further comprises: When the text content of the target area does not match the preset text content, or the text format does not match the preset text format, it is determined that the image to be detected has the second display defect.
7. The method according to claim 2, characterized in that: The image parameters include resolution, color histogram, clarity, and contrast; when the abnormality detection rule is the display effect abnormality rule, the image parameters of the image to be detected are detected according to multiple abnormality detection rules to obtain a detection result corresponding to each abnormality detection rule, including: Determine whether the image to be detected has a third display defect according to the resolution value of the image to be detected, the ratio of different colors in the color histogram, the clarity value, and the contrast value; the third display defect is used to indicate that the display effect of the image to be detected is abnormal; In a case where the image to be detected has the third display defect, the third display defect is determined as a detection result corresponding to the display effect abnormality rule.
8. The method according to claim 7, characterized in that The method further comprises: When the image parameters satisfy a first preset condition, it is determined that the image to be detected has the third display defect; the first preset condition satisfies at least one of the following: the resolution value of the target area is less than a resolution threshold, the deviation value between the proportion of different colors in the color histogram and the proportion of preconfigured colors is greater than a deviation threshold, the clarity value of the target area is less than a clarity threshold, and the contrast value of the target area is less than a contrast threshold.
9. An image detection device, characterized in that: The device comprises: an acquisition unit and a processing unit; The acquisition unit is used to acquire the image to be detected; The processing unit is used to detect the image parameters of the image to be detected according to multiple anomaly detection rules to obtain the detection result corresponding to each anomaly detection rule; different anomaly detection rules correspond to different image parameters; The processing unit is further used to determine whether the image to be detected is displayed abnormally based on the detection results corresponding to the multiple abnormality detection rules.
10. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 8 is implemented.
11. An electronic device, characterized in that: include: A processor, a memory and a communication interface; wherein the communication interface is used for the electronic device to communicate with other devices or networks; The memory is used to store one or more programs, which include computer-executable instructions. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory to enable the electronic device to perform the method described in any one of claims 1-8.
12. A computer program product, comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Control panel detection method, device and system and computer readable storage medium
CN120448209A