Picture detection method and device for vehicle instrument and storage medium
Through edge detection algorithms and pixel expansion technology, the gap in abnormal display detection of new energy vehicle instruments has been solved, and accurate abnormality detection and timely alarm of the instrument screen have been achieved, ensuring the normal display of vehicle instruments.
Patent Information
- Application Number
- CN202510523964.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-09-09
AI Technical Summary
The existing technology lacks a mechanism for detecting abnormal displays of new energy vehicle instruments, especially screen display anomalies caused by hardware and software cannot be effectively verified.
The image contour of the instrument target area is obtained through the edge detection algorithm, and pixel expansion is performed. Combined with the standard contour map comparison, the total number of valid contour pixels is determined to achieve anomaly detection.
The accuracy of instrument screen detection is improved, and abnormal displays can be discovered and reported in a timely manner to ensure the normal operation of vehicle instruments.
Smart Images

Figure CN120612342A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of new energy vehicle technology, and specifically to a method, processor, device, and storage medium for detecting images of vehicle instruments. Background Art
[0002] Currently, the instruments of new energy vehicles generally use LCD instruments to replace traditional mechanical (physical) instruments. At present, the display calibration of instruments in the industry is still in its early stages. That is, there is a lack of a calibration mechanism for instruments that cannot display normally due to hardware (such as screen damage, distorted screen, blue screen, white screen, etc.) or software (such as software bugs). Therefore, it is necessary to design a technical solution for detecting abnormal display of instruments in the working state. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a method, processor, device, and storage medium for detecting a screen of a vehicle instrument, so as to solve the technical problem in the prior art of how to detect abnormal display of an instrument in a working state.
[0004] In order to achieve the above-mentioned objectives, the present application provides, in a first aspect, a method for detecting a vehicle instrument screen, comprising:
[0005] Obtain an image to be detected of the target area of the instrument and a standard contour map corresponding to the image to be detected;
[0006] Determine the target contour map of the image to be detected based on the edge detection algorithm;
[0007] Expanding the empty pixel positions adjacent to the target contour pixels in the target contour map to obtain an expanded contour map;
[0008] Determine the corresponding positions of the pixels to be detected in the expanded contour image according to the pixel positions of the pixels of the standard contour in the standard contour image;
[0009] When the pixel value of the pixel position to be detected meets the pixel value of the standard contour pixel, the pixel at the pixel position to be detected is determined to be a valid contour pixel, so as to obtain the total number of valid contour pixels of the image to be detected;
[0010] The anomaly detection result of the image to be detected is determined based on the total number of valid contour pixels and the preset pixel number conditions.
[0011] In an embodiment of the present application, the image detection method also includes: when the image to be detected is a first-category instrument area image, pixel expansion of empty pixel positions adjacent to the target contour pixels in the target contour map; when the image to be detected is a second-category instrument area image, obtaining the alpha channel value of each target contour pixel in the target contour map, and the standard effective pixel number of the standard contour map, wherein the area of the first-category instrument area image is greater than or equal to the area of the second-category instrument area image; when the alpha channel value is greater than or equal to a preset alpha channel value, determining that the target contour pixel is a valid pixel; and determining the abnormality detection result of the image to be detected based on the effective pixel number and the standard effective pixel number.
[0012] In an embodiment of the present application, the image detection method further includes: determining the area ratio of the image to be detected and the instrument image based on the total area of the instrument image and the area of the image to be detected; when the area ratio is greater than or equal to a preset ratio threshold, determining that the image to be detected is a first-category instrument area image; when the area ratio is less than the preset ratio threshold, determining that the image to be detected is a second-category instrument area image.
[0013] In an embodiment of the present application, pixel expansion is performed on empty pixel positions adjacent to a target contour pixel in a target contour map to obtain an expanded contour map, including: when the eight neighborhoods of the target contour pixel are all empty pixels, pixel expansion is performed at the empty pixel positions; when there are other contour pixels on the four neighborhoods of the target contour pixel, pixel expansion is performed on the remaining pixel positions on the four neighborhoods, and pixel expansion is performed on pixel positions away from other contour pixels in the diagonal neighborhoods of the target contour pixel; when there are other contour pixels in the diagonal neighborhoods of the target contour pixel, pixel expansion is performed on pixel positions adjacent to the target contour pixel and other contour pixels based on the pixel average values of the target contour pixel and other contour pixels.
[0014] In an embodiment of the present application, the image detection method further includes: capturing an image of the instrument target area; grayscale processing the image to obtain a grayscale image; and smoothing the grayscale image to obtain an image to be detected of the instrument target area.
[0015] In an embodiment of the present application, the image detection method further includes: capturing an image of the instrument target area based on a screenshot instruction of the vehicle's onboard system; and preprocessing the image to obtain an image to be detected of the instrument target area.
[0016] In an embodiment of the present application, the abnormality detection result of the image to be detected is determined based on the total number of valid contour pixels and the preset number of pixels, including: obtaining the number of standard contour pixels of the standard contour image; when the ratio of the total number of valid contour pixels to the number of standard contour pixels is greater than or equal to the preset effective ratio, determining that the image to be detected is a normal image; when the ratio of the total number of valid contour pixels to the number of standard contour pixels is less than the preset effective ratio, determining that the image to be detected is an abnormal image, and triggering an alarm.
[0017] A second aspect of the present application provides a processor configured to call instructions from a memory and implement the screen detection method for a vehicle instrument provided in the first aspect of the present application when executing the instructions.
[0018] The third aspect of the present application provides a picture detection device for a vehicle instrument, comprising: the processor provided in the second aspect of the present application; an instrument, and a processor connected to a picture detection device for a vehicle instrument.
[0019] A fourth aspect of the present application provides a machine-readable storage medium having stored thereon instructions for enabling a machine to execute the image detection method for a vehicle instrument provided in accordance with the first aspect of the present application.
[0020] The above technical solution obtains the target contour map of the image to be detected through the edge detection algorithm, and expands the empty pixel positions adjacent to the target contour pixels according to the pixel values of the target contour pixels, thereby making up for the contour details missed by the edge detection algorithm, so that the total number of effective contour pixels of the image to be detected is closer to the number of pixels of its actual effective contour. Then, the pixels at the same position of the target contour map are compared with the standard contour map to obtain the total number of effective contour pixels in the target contour map, thereby realizing abnormality detection of the image to be detected based on the target contour map and the preset pixel number conditions.
[0021] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present application but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0023] Figure 1 The following schematically illustrates a flow chart of a method for detecting a vehicle instrument panel according to an embodiment of the present application;
[0024] Figure 2 The following schematically shows a flow chart of another method for detecting a picture of a vehicle instrument according to an embodiment of the present application;
[0025] Figure 3 The following schematically shows a flow chart of another method for detecting images of a vehicle instrument according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0027] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use such solutions.
[0028] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of this application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0029] Figure 1A schematic flow chart of a method for detecting vehicle instrument images according to an embodiment of the present application is shown. This method detects anomalies in an image to be detected by comparing a target contour map of the target area of the vehicle instrument image to be detected with a standard contour map. Because vehicle instruments may contain detailed patterns such as instrument needles and speedometer scales, the contours of these detailed patterns in the instrument may be somewhat ignored in the target contour map obtained by the edge detection algorithm, thereby reducing the number of pixels in the contours of these detailed patterns. If the image to be detected contains a large number of detailed patterns, such as an image of a speedometer with a needle and scale, the reduction in the number of outline pixels of multiple detailed patterns can cumulatively result in a significant loss of pixels, which can adversely affect the anomaly detection results of the instrument image. Therefore, the method for detecting vehicle instruments provided in an embodiment of the present application, after obtaining the target contour map of the image to be detected using the edge detection algorithm, performs pixel expansion at adjacent empty pixel positions based on the pixel values of the target contour pixels in the target contour map. This reduces the loss of contour pixels and thereby improves the accuracy of the image detection results. The image detection method for vehicle instruments provided in the embodiment of the present application can be executed by an on-board processor, and image detection can be performed regularly during vehicle operation, so that when there is an abnormality in the instrument screen, the detection results of the vehicle instrument screen abnormality can be provided to the vehicle and user in a timely manner.
[0030] like Figure 1 As shown, an embodiment of the present application provides a method for detecting a vehicle instrument panel image, which may include the following steps:
[0031] S102, obtaining an image to be detected of the target area of the instrument and a standard contour map corresponding to the image to be detected;
[0032] S104, determining a target contour map of the image to be detected based on an edge detection algorithm;
[0033] S106, performing pixel expansion on empty pixel positions adjacent to the target contour pixels in the target contour map to obtain an expanded contour map;
[0034] S108, determining the corresponding positions of each to-be-detected pixel in the expanded contour image according to the pixel positions of each standard contour pixel in the standard contour image;
[0035] S110, when the pixel value of the pixel position to be detected meets the pixel value of the standard contour pixel, determining the pixel at the pixel position to be detected as a valid contour pixel, so as to obtain the total number of valid contour pixels of the image to be detected;
[0036] S112. Determine an abnormality detection result of the image to be detected according to the total number of valid contour pixels and a preset pixel quantity condition.
[0037] The image detection method for vehicle instruments provided in the embodiment of the present application obtains a target contour map of the image to be detected through an edge detection algorithm, and compares the target contour map with the standard contour map at the same position of the pixels to obtain the total number of valid contour pixels in the target contour map, thereby determining the abnormality detection result of the image to be detected based on the target contour map and the preset pixel number condition. In the above process, the accuracy of the total number of valid contour pixels obtained will directly affect the abnormality detection result, so it is necessary to make the total number of valid contour pixels as close as possible to the number of pixels of the valid contour that actually exists in the image to be detected. Therefore, in the above method, according to the pixel value of the target contour pixel, the empty pixel position adjacent to the target contour pixel is pixel-expanded, thereby compensating for the contour details missed by the edge detection algorithm, so that the total number of valid contour pixels of the image to be detected is closer to the number of pixels of the valid contour that actually exists.
[0038] It will be appreciated that in step S102, the instrument panel display may be, for example, a fixed-resolution display, and the instrument target area may be an area of the display at a specific location relative to the instrument panel display, such as the speedometer area or tachometer area. Accordingly, the image to be detected may be an image of the speedometer or tachometer. The instrument target area may be, for example, a pre-set area within the instrument panel display, or a temporarily selected area within the instrument panel display. The size of the image to be detected and its corresponding location within the instrument panel display are identical to those of the standard outline image.
[0039] Specifically, obtaining an image to be detected of a target area of an instrument and a standard contour map corresponding to the image to be detected may include:
[0040] According to the position coordinates of the target area in the instrument screen, the image to be detected and the standard contour map in the instrument screen are obtained.
[0041] As an example, when the target area is a temporarily selected area in the instrument screen, obtaining the image to be detected and the standard contour map in the instrument screen according to the position coordinates of the target area in the instrument screen may include:
[0042] According to the position coordinates of the target area in the instrument screen, the image to be detected in the instrument screen is obtained;
[0043] A standard contour map corresponding to the target area is obtained from the overall standard contour map of the instrument screen according to the target area, wherein the overall standard contour map has the same resolution as that of the instrument screen.
[0044] It can be understood that the edge detection algorithm in step S104 may be, for example, a Sobel operator, a Canny edge detection, a Laplacian operator, an edge tracking algorithm, or the like.
[0045] It is understandable that the pixel value of the empty pixel position after pixel expansion in step S106 may be, for example, the pixel value of the target contour pixel. Accordingly, the pixel value of the pixel position to be detected in step S110 that meets the pixel value of the standard contour pixel may be, for example, the pixel value of the pixel position to be detected is the same as the pixel value of the standard contour pixel. Alternatively, the pixel value of the empty pixel position after pixel expansion in step S106 may be, for example, the difference between the pixel values of multiple target contour pixels adjacent to the empty pixel position. Accordingly, the pixel value of the pixel position to be detected in step S110 that meets the pixel value of the standard contour pixel may be, for example, the absolute value of the difference between the pixel value of the pixel position to be detected and the pixel value of the standard contour pixel is less than or equal to the preset pixel threshold.
[0046] It can be understood that the preset pixel number condition in step S112 may be, for example, a preset pixel number threshold corresponding to the standard contour map and the target area to be detected image; or the preset pixel number condition may be, for example, the ratio of the preset minimum valid contour pixel number to the total number of contour pixels in the standard contour map; or it may be, for example, the absolute value of the difference between the preset minimum valid contour pixel number and the total number of contour pixels in the standard contour map.
[0047] As an example, the preset pixel quantity condition is the ratio of the preset minimum number of valid contour pixels to the total number of contour pixels in the standard contour image. Accordingly, step S112 may include:
[0048] Get the number of standard contour pixels of the standard contour image;
[0049] When the ratio of the total number of valid contour pixels to the number of standard contour pixels is greater than or equal to a preset valid ratio, determining that the image to be detected is a normal image, wherein the preset valid ratio is the ratio of the preset minimum number of valid contour pixels to the total number of contour pixels in the standard contour image;
[0050] When the ratio of the total number of effective contour pixels to the number of standard contour pixels is less than a preset effective ratio, the image to be detected is determined to be an abnormal image and an alarm is triggered.
[0051] In some embodiments of the present application, Figure 2 As shown, the image detection method for vehicle instruments may further include:
[0052] When the image to be detected is a first-category instrument area image, pixel expansion is performed on the empty pixel positions adjacent to the target contour pixels in the target contour image;
[0053] S202: When the image to be inspected is a second-category instrument region image, obtaining an alpha channel value of each target contour pixel in the target contour image and a standard effective pixel number of the standard contour image, wherein the area of the first-category instrument region image is greater than or equal to the area of the second-category instrument region image;
[0054] S204: When the alpha channel value is greater than or equal to the preset alpha channel value, determine the target contour pixel as a valid pixel;
[0055] S206: Determine an abnormality detection result of the image to be detected according to the number of effective pixels and the standard number of effective pixels.
[0056] Since instrument clusters typically include warning icons like the unfastened seatbelt indicator and engine check light, these icons often occupy only a small portion of the screen and their display quality is dependent on the transparency channel value of the icon. Therefore, the effective pixels within the target outline pixels of the second type of instrument cluster image, such as the warning icons, can be determined by comparing the alpha channel value. The number of effective pixels and the standard effective pixel count are then used to determine the anomaly detection result for the image being inspected.
[0057] It is understood that the preset alpha channel value can be determined based on the display situation. For example, if the alpha channel value is 255, the pixel is fully displayed, so the preset alpha channel value can be set to 255. Alternatively, if the display brightness of the second-category instrument area image is low, but the image is still recognizable to occupants, the preset alpha channel value can be adjusted downward to some extent.
[0058] In some embodiments of the present application, images of various areas within the instrument display are pre-defined as either first-category instrument area images or second-category instrument area images, corresponding to different image detection methods. For example, the image corresponding to the speedometer area is classified as a first-category instrument area image, while the image corresponding to the engine check light area is classified as a second-category instrument area image.
[0059] In other embodiments of the present application, since the definition of the target area may not be strictly based on the speedometer, tachometer, and fault light, the target area may include multiple icons and dials with different functions, and the target area may also be a part of the dial. Therefore, in order to implement a universal method for defining the first type of instrument area image and the second type of instrument area image, as shown in FIG. Figure 3 As shown, the image detection method for vehicle instruments may further include:
[0060] Determining the area ratio of the image to be detected to the instrument image based on the total area of the instrument image and the area of the image to be detected;
[0061] When the area ratio is greater than or equal to a preset ratio threshold, determining that the image to be detected is a first-category instrument area image;
[0062] When the area ratio is less than the preset ratio threshold, it is determined that the image to be detected is a second-category instrument area image.
[0063] Based on the above steps, it is not necessary to consider how the target area is defined. It is only necessary to determine which type of instrument area image the image to be detected belongs to based on the area of the image to be detected in the target area and the total area of the instrument images.
[0064] It is understandable that the above-mentioned preset ratio threshold value may be, for example, 10%, 5%, or determined according to the ratio of the average area of prompt icons such as the unfastened seatbelt prompt light and the engine fault light to the total area of the instrument image.
[0065] In some embodiments of the present application, step S106 may include:
[0066] When the eight neighborhoods of the target contour pixel are all empty pixels, pixel expansion is performed at the empty pixel position;
[0067] When there are other contour pixels in the four neighborhoods of the target contour pixel, pixel expansion is performed at the remaining pixel positions in the four neighborhoods, and pixel expansion is performed at the pixel positions far away from other contour pixels in the diagonal neighborhoods of the target contour pixel;
[0068] When there are other contour pixels in the diagonal neighborhood of the target contour pixel, pixel expansion is performed at pixel positions adjacent to the target contour pixel and other contour pixels according to the pixel averages of the target contour pixel and other contour pixels.
[0069] Based on the above steps, the target contour pixels can be used to accurately supplement the adjacent empty pixel positions, thereby compensating for the pixels belonging to the contour part that were omitted during the edge detection process. In addition, the empty pixel positions adjacent to the target contour pixels are limited to the eight neighborhoods of the target contour pixels to prevent excessive pixel expansion. In the case where any empty pixel position falls into the diagonal neighborhoods of multiple target contour pixels at the same time, the pixel value of the empty pixel position can be determined by the pixel average of the multiple target contour pixels, thereby performing pixel expansion on the empty pixel position that needs to be pixel expanded using the pixel value of the target contour pixels based on the principle of minimum distance.
[0070] In some embodiments of the present application, in order to improve the accuracy of the edge detection algorithm and remove the influence of image noise on abnormality detection results, the image detection method for vehicle instrument may further include:
[0071] Capture an image of the target area of the instrument;
[0072] Grayscale the image to obtain a grayscale image;
[0073] The grayscale image is smoothed to obtain the image to be detected of the target area of the instrument.
[0074] In some embodiments of the present application, the image detection method for a vehicle instrument may further include:
[0075] Capturing an image of a target area of the instrument based on a screenshot command of the vehicle's onboard system;
[0076] The image is preprocessed to obtain the image to be detected of the target area of the instrument.
[0077] Through the above steps, the image to be detected is acquired on the vehicle hardware through the vehicle system, thereby avoiding acquiring the image to be detected through cloud processing methods, thereby reducing the risk of vehicle user data leakage.
[0078] It is understandable that the in-vehicle system screenshot instruction may be, for example, the screenshot command of the QNX system, the scrot command of the Linux system, etc.
[0079] An embodiment of the present application further provides a processor configured to call instructions from a memory and implement the screen detection method for a vehicle instrument provided in accordance with any one of the above embodiments when executing the instructions.
[0080] The embodiment of the present application further provides a picture detection device for a vehicle instrument, comprising: the above-mentioned processor and a meter. The meter is connected to the processor of the picture detection device for the vehicle instrument.
[0081] An embodiment of the present application further provides a machine-readable storage medium having stored thereon instructions for causing a machine to execute the image detection method for a vehicle instrument provided in any one of the above embodiments.
[0082] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0083] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0084] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0085] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0086] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0087] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0088] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0089] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0090] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for detecting a vehicle instrument screen, characterized in that: include: Acquire an image to be detected of a target area of an instrument and a standard contour map corresponding to the image to be detected; Determine a target contour map of the image to be detected based on an edge detection algorithm; Expanding the empty pixel positions adjacent to the target contour pixels in the target contour map to obtain an expanded contour map; Determining the corresponding positions of the pixels to be detected in the expanded contour image according to the pixel positions of the standard contour pixels in the standard contour image; When the pixel value of the pixel position to be detected meets the pixel value of the standard contour pixel, determining the pixel at the pixel position to be detected as a valid contour pixel to obtain the total number of valid contour pixels of the image to be detected; The abnormality detection result of the image to be detected is determined according to the total number of valid contour pixels and a preset pixel quantity condition.
2. The image detection method according to claim 1, wherein: The picture detection method further includes: In a case where the image to be detected is a first type of instrument area image, pixel expansion is performed on empty pixel positions adjacent to target contour pixels in the target contour image; In a case where the image to be detected is a second-category instrument area image, obtaining an alpha channel value of each target contour pixel in the target contour image and a standard effective pixel number of the standard contour image, wherein the area of the first-category instrument area image is greater than or equal to the area of the second-category instrument area image; In a case where the alpha channel value is greater than or equal to a preset alpha channel value, determining the target contour pixel as a valid pixel; An abnormality detection result of the image to be detected is determined according to the number of effective pixels and the standard number of effective pixels.
3. The image detection method according to claim 2, wherein: The picture detection method further includes: determining an area ratio of the image to be detected to the instrument image based on the total area of the instrument image and the area of the image to be detected; When the area ratio is greater than or equal to a preset ratio threshold, determining that the image to be detected is the first type of instrument area image; When the area ratio is smaller than the preset ratio threshold, it is determined that the image to be detected is the second-category instrument area image.
4. The image detection method according to claim 1, wherein: The pixel expansion of the empty pixel positions adjacent to the target contour pixels in the target contour map to obtain an expanded contour map includes: When eight neighborhoods of the target contour pixel are all empty pixels, pixel expansion is performed at the empty pixel positions; In the case where other contour pixels exist in the four neighborhoods of the target contour pixel, pixel expansion is performed on the remaining pixel positions in the four neighborhoods, and pixel expansion is performed on the pixel positions away from the other contour pixels in the diagonal neighborhoods of the target contour pixel; When there are other contour pixels in the diagonal neighborhood of the target contour pixel, pixel expansion is performed at pixel positions adjacent to the target contour pixel and the other contour pixels according to the pixel average of the target contour pixel and the other contour pixels.
5. The image detection method according to claim 1, wherein: The picture detection method further includes: capturing an image of a target area of the instrument; Performing grayscale processing on the image to obtain a grayscale image; The grayscale image is smoothed to obtain an image to be detected of the target area of the instrument.
6. The image detection method according to claim 1, wherein: The picture detection method further includes: capturing an image of the target area of the instrument based on a screenshot instruction of an onboard system of the vehicle; The image is preprocessed to obtain an image to be detected of the target area of the instrument.
7. The image detection method according to claim 1, wherein: The determining of the abnormality detection result of the image to be detected according to the total number of valid contour pixels and the preset pixel number condition includes: Obtaining the number of standard contour pixels of the standard contour image; When the ratio of the total number of effective contour pixels to the number of standard contour pixels is greater than or equal to a preset effective ratio, determining that the image to be detected is a normal image; When the ratio of the total number of effective contour pixels to the number of standard contour pixels is less than a preset effective ratio, the image to be detected is determined to be an abnormal image, and an alarm is triggered.
8. A processor, characterized in that: The processor is configured to call instructions from a memory and implement the screen detection method for a vehicle instrument according to any one of claims 1 to 7 when executing the instructions.
9. A picture detection device for vehicle instrument, characterized in that: include: The processor according to claim 8; The instrument is connected to the processor of the image detection device for the vehicle instrument.
10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores instructions for causing a machine to execute the image detection method for a vehicle instrument according to any one of claims 1 to 7.