Full liquid crystal instrument image display method, device and equipment and storage medium
By acquiring and mapping image head information and color segmentation information, the problem of mismatch between image loading rate and screen refresh rate in the automotive instrument system is solved, and the image loading efficiency is improved, preventing lag and black screen phenomena, and improving the instrument stability.
Patent Information
- Application Number
- CN202411100442.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The image loading rate in the automotive instrument system does not match the screen refresh rate, resulting in image lag or black screen. The existing technology cannot effectively solve this problem.
By obtaining the image header information and color segmentation information of the target image, mapping it into an image file of a preset storage type, saving it in memory, and loading and displaying images from memory when receiving a display instruction, avoiding repeated mapping Or load the entire image to improve image loading efficiency.
Improve image loading efficiency, prevent lag or black screen caused by mismatch between the image loading rate and the screen refresh rate, and improve the normal working stability of the instrument.
Smart Images

Figure CN119127360A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image display technology, and in particular to a full liquid crystal instrument image display method, device, equipment and storage medium. Background Art
[0002] The complexity of automotive instrument systems is increasing with the innovation of electronic technology. The proportion of image resources in software systems is increasing, and image loading in the system will face many challenges. In practical applications, image freezing often occurs due to the mismatch between the image resource loading rate in the instrument system program and the screen refresh rate. To solve this problem, it is necessary to optimize the image loading method and increase the image loading rate.
[0003] The existing scheme proposes a method for detecting a black screen of an instrument. The camera and relay are connected to the terminal device through the USB interface respectively, and the instrument is connected to the relay. After the instrument is powered on, the log is read, the camera collects the image information of the instrument display screen, and the image is input into the AI classification and recognition model to detect whether the instrument has a black screen. This method only detects whether the instrument has a black screen, and does not propose a solution to the black screen. The solution to the instrument freezing or even black screen is not perfect enough. Under the current technical level, the instrument system freezing phenomenon often occurs. Solving the instrument freezing phenomenon can effectively improve the system reliability and stability.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a full liquid crystal instrument image display method, device, equipment and storage medium, aiming to solve the technical problem of how to achieve anti-stuttering function in the process of full liquid crystal instrument image display.
[0006] To achieve the above-mentioned purpose, the present application proposes a full liquid crystal instrument image display method, the full liquid crystal instrument image display method comprising:
[0007] Get the image header information and color segmentation information of the target image;
[0008] Mapping the target image to an image file of a preset storage type based on the image header information and the color segmentation information, and storing the image file in a memory;
[0009] When a display instruction of an image to be displayed is received, a target image file is loaded from the memory according to the display instruction, and the image to be displayed is displayed on the full LCD instrument based on the target image file, wherein the target image file is an image file corresponding to the image to be displayed.
[0010] In one embodiment, the step of obtaining image header information and color segmentation information of the target image includes:
[0011] Acquire an image format of a target image, determine whether the image format is a preset format, and obtain an image format determination result;
[0012] Processing the image format based on the image format determination result to obtain a preprocessed image, and acquiring image header information based on the preprocessed image;
[0013] Counting the pixel color of the preprocessed image to obtain pixel color statistical data, and determining whether the preprocessed image has a target color based on the pixel color statistical data to obtain a target color determination result;
[0014] Color segmentation is performed on the pixels of the preprocessed image based on the target color determination result to obtain color segmentation information.
[0015] In one embodiment, the step of processing the image format based on the image format determination result to obtain a preprocessed image includes:
[0016] When the image format determination result is that the image format is a preset format, using the target image as a pre-processed image, the preset format includes a first preset format and a second preset format, the first preset format supports a transparency channel, and the second preset format does not support a transparency channel;
[0017] When the image format determination result is that the image format is not a preset format and the image format supports a transparency channel, converting the image format into the first preset format to obtain a preprocessed image;
[0018] When the image format determination result is that the image format of the target image is not a preset format and the image format does not support the transparency channel, the image format is converted into the second preset format to obtain a preprocessed image.
[0019] In one embodiment, the step of counting the pixel color of the preprocessed image to obtain pixel color statistical data, determining whether the preprocessed image has a target color based on the pixel color statistical data, and obtaining a target color determination result includes:
[0020] Obtaining pixel colors of the preprocessed image, counting the number of occurrences of each pixel color in the preprocessed image, and obtaining pixel color statistical data;
[0021] Sort the number of times each pixel color appears based on the pixel color statistics to obtain a pixel color sorting result;
[0022] When there is a pixel color whose proportion of the total pixel colors reaches a preset proportion in the pixel color sorting result, a target color is determined from the pixel colors whose proportion reaches the preset proportion, and a target color determination result is determined that the preprocessed image has the target color;
[0023] When there is no pixel color whose proportion of the total pixel colors reaches a preset ratio in the pixel color sorting result, it is determined that the target color determination result is that the preprocessed image does not have the target color.
[0024] In one embodiment, the step of color segmenting the pixels of the preprocessed image based on the target color determination result to obtain color segmentation information includes:
[0025] When the target color determination result is that the preprocessed image has the target color, color segmenting is performed on the pixel points of the preprocessed image based on the target color to obtain color segmentation information;
[0026] When the target color determination result is that the preprocessed image does not have the target color, the pixel points of the target image are taken as single color segments to obtain the color segmentation information.
[0027] In one embodiment, when a display instruction of an image to be displayed is received, the step of loading a target image file from the memory according to the display instruction, and displaying the image to be displayed on the full liquid crystal instrument based on the target image file further includes:
[0028] When receiving a display instruction of an image to be displayed, determining whether a target image file exists in the memory, and obtaining a file correctness determination result;
[0029] When the result of the file correctness determination is that the target image file exists in the memory and the path of the target image file has not been loaded, the target image file is loaded from the memory into the cache according to the display instruction, a mutex lock corresponding to the target image file is created, and the mutex lock is locked;
[0030] The image to be displayed is displayed on the full liquid crystal instrument based on the target image file and the mutex lock is unlocked.
[0031] In one embodiment, the step of displaying the image to be displayed on the full liquid crystal instrument based on the target image file and unlocking the mutex lock includes:
[0032] When the target image file exists in the memory, the size of the target image file reaches a preset standard, and the target image file is successfully read, reading the image header information and the color segmentation information based on the target image file;
[0033] The image to be displayed is displayed on a full liquid crystal instrument based on the image header information and the color segmentation information, and the mutex lock is unlocked.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a full liquid crystal instrument image display device, the full liquid crystal instrument image display device comprising:
[0035] An information acquisition module, used to acquire image header information and color segmentation information of a target image;
[0036] An image mapping module, used for mapping the target image into an image file of a preset storage type based on the image header information and the color segmentation information, and storing the image file in a memory;
[0037] The image display module is used to load a target image file from the memory according to the display instruction when receiving a display instruction of an image to be displayed, and display the image to be displayed on the full liquid crystal instrument based on the target image file, wherein the target image file is an image file corresponding to the image to be displayed.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a full liquid crystal instrument image display device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the full liquid crystal instrument image display method described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the full liquid crystal instrument image display method described above are implemented.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the full liquid crystal instrument image display method described above are implemented.
[0041] One or more technical solutions proposed in this application have at least the following technical effects:
[0042] By acquiring the image header information and color segmentation information of the target image, mapping the target image to an image file of a preset storage type based on the image header information and the color segmentation information, and saving the image file in a memory, when receiving a display instruction of the image to be displayed, loading the target image file from the memory according to the display instruction, that is, the image file corresponding to the image to be displayed, and displaying the image to be displayed on the full LCD instrument based on the target image file, before displaying the image, mapping the target images from the data source to image files containing image header information and color segmentation information according to the image format mapping strategy and storing them in the memory, so that when the user needs, the stored image file can be directly read and displayed on the full LCD instrument without re-mapping or loading the entire image, which helps to improve the image loading efficiency, so as to avoid the image loading rate not matching the screen refresh rate, resulting in the image being unable to be refreshed in time, and causing freezes or even black screens during the image display process, affecting the normal operation of the instrument. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the full liquid crystal instrument image display method of the present application;
[0046] Figure 2 This is an image preprocessing flow chart of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0047] Figure 3 A color segmentation flow chart of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0048] Figure 4a This is a pre-optimization effect diagram of the image freeze repair comparison test of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0049] Figure 4b This is an optimized effect diagram of the image freeze repair comparison test of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0050] Figure 5aThis is a test effect diagram of the vehicle speed increase response time of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0051] Figure 5b This is a test effect diagram of the vehicle speed reduction response time of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0052] Figure 6a This is a test effect diagram of the vehicle speed increase response time under low-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0053] Figure 6b This is a test effect diagram of the vehicle speed reduction response time under low-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0054] Figure 7a This is a test effect diagram of the vehicle speed increase response time on urban roads of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0055] Figure 7b This is a test effect diagram of the vehicle speed reduction response time on urban roads of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0056] Figure 7c This is a test effect diagram of the acceleration condition response time of the full liquid crystal instrument image display method under urban roads provided in Example 1 of the present application;
[0057] Figure 7d This is a test effect diagram of the braking condition response time on urban roads of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0058] Figure 8a This is a test effect diagram of the vehicle speed increase response time under high-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0059] Figure 8b This is a test effect diagram of the vehicle speed reduction response time under high-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application;
[0060] Fig. 9 A schematic diagram of a flow chart provided for the second embodiment of the full liquid crystal instrument image display method of the present application;
[0061] Fig.10 An image loading flow chart of the full liquid crystal instrument image display method provided in the second embodiment of the present application;
[0062] Fig.11 This is a schematic diagram of the module structure of the full liquid crystal instrument image display device according to an embodiment of the present application;
[0063] Fig.12 Schematic diagram of the device structure of the hardware operating environment involved in the full liquid crystal instrument image display method in the embodiment of the present application.
[0064] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0065] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0066] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0067] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an image display control system, etc. The following takes the image display control system as an example to illustrate this embodiment and the following embodiments.
[0068] Based on this, the present application embodiment provides a full liquid crystal instrument image display method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the full liquid crystal instrument image display method of the present application.
[0069] In this embodiment, the full liquid crystal instrument image display method includes steps S10 to S30:
[0070] Step S10, obtaining image header information and color segmentation information of the target image;
[0071] It should be noted that in the prior art, the reliability and stability of the automobile instrument system are not high enough, which may cause the driver to be unable to accurately obtain key information, increasing the risk of accidents. Therefore, further research and development and innovation are needed to improve the reliability and stability of the automobile instrument system. Among them, black screen and freeze of the instrument are one of the common problems in the automobile instrument system, which may be caused by a variety of factors: one may be a hardware failure, such as display connection problems, power supply failure or chip damage; another may be a software problem, such as operating system errors, program crashes or data transmission problems. The solution provided in this application starts from the software perspective, improves the image loading rate in the system based on the image format mapping strategy, and fixes the freeze problem when drawing the speedometer image.
[0072] It should be understood that the target image refers to all images stored in the corresponding image path of the full LCD instrument panel. Before displaying the image in the image path, the image data in the image path will be mapped to image data in a specific storage format based on the image format mapping strategy, and the mapped image data will be directly saved in the memory. So that the stored image data can be directly read when needed next time, without having to remap or load the entire image. When the image format mapping strategy is applied to the instrument system, it is necessary to establish a mapping function containing image header information structure parameters and color segmentation information parameters, which can map a given target image to an object containing the above two parameter information. Before image mapping of the target image, it is necessary to obtain the image header information and color segmentation information of the target image. The image header information is usually embedded in the beginning of the image file, including file format identification, image size and color depth, etc., which record the basic attributes and characteristics of the image. The color segmentation information describes the areas or segments with similar color characteristics in the image.
[0073] In addition, it should be noted that the scheme of the present application uses the Qt framework to implement the instrument layer interface design. In the Qt framework, the QImage object can be used to implement image-related operations and process image data in various formats, such as PNG, JPG, etc. However, the QImage object will consume a lot of CPU resources and time when processing images in common compression formats, especially when processing a large number of image files or frequently loading images, the image loading rate will be greatly reduced. This is because common compressed format images need to be decoded when called, and the decoding process usually takes a lot of time. In order to ensure that the necessary information can be quickly provided to the driver in an emergency, the automotive instrument system, especially the full LCD instrument system, needs to have high performance and fast response capabilities. The time-consuming image decoding process will affect the performance and response speed of the system, especially in the instrument system that needs to frequently load and display images. The improvement of image loading speed is particularly critical, but the traditional image decoding method cannot meet the system's demand for fast response. The image format mapping strategy in the scheme of the present application optimizes the image decoding stage, and can map a given QImage object to a custom storage type QPair<QmlImageInformationHead,QByteArray> Among them, QPair is a simple container in the Qt framework, which is used to store a pair of elements. Specifically, QmlImageInformationHead is used to store image header information, and QByteArray is used to store serialized data of color segment information.
[0074] In a feasible implementation, step S10 may include steps S11 to S14:
[0075] Step S11, obtaining an image format of a target image, determining whether the image format is a preset format, and obtaining an image format determination result;
[0076] It should be noted that before obtaining the image header information and color segmentation information of the target image, it is necessary to check whether the image format of the target image is a preset format, and the image in the preset format can meet the subsequent image pixel processing requirements. For QImage objects, the preset format can be ARGB32 or RGB888, which are two common pixel formats that QImage objects can represent, and are relatively intuitive and easy to operate in image processing.
[0077] Step S12, processing the image format based on the image format determination result to obtain a preprocessed image, and acquiring image header information based on the preprocessed image;
[0078] It should be understood that after checking the image format of the target image, it is necessary to process the format of the target image based on its characteristics to obtain a target image of a preset format, i.e., a preprocessed image, to ensure that the preprocessed image can meet the subsequent image pixel processing requirements. After format processing, the attribute recording function can be used to record the basic attributes of the image, and the image header information can be obtained to obtain the parameter values of the image header information structure for subsequent processing and analysis.
[0079] In a feasible implementation manner, the step of processing the image format based on the image format determination result in step S12 to obtain a preprocessed image may include steps A11 to A13:
[0080] Step A11, when the image format determination result is that the image format is a preset format, using the target image as a pre-processed image, the preset format includes a first preset format and a second preset format, the first preset format supports a transparency channel, and the second preset format does not support a transparency channel;
[0081] It should be understood that when the image format of the target image is a preset format, it means that the target image in the source format can meet the subsequent image pixel processing requirements and can be directly used as a pre-processed image without additional format processing.
[0082] It should be noted that the target image of the image format that supports the transparency channel has a transparency channel and can store the transparency information of the image, while the target image of the image format that does not support the transparency channel does not have a transparency channel. The two need to be distinguished when processing image formats. Specifically, ARGB32 is suitable for processing images with transparency information, and RGB888 is suitable for processing images without transparency information.
[0083] Step A12: when the image format determination result is that the image format is not a preset format and the image format supports a transparency channel, converting the image format into the first preset format to obtain a preprocessed image;
[0084] It should be understood that when the image format of the target image is not a preset format and the image format supports a transparency channel, it is necessary to convert it into a format that meets the pixel processing requirements while retaining the transparency information of the target image, that is, the first preset format that supports the transparency channel.
[0085] Step A13: when the image format determination result is that the image format of the target image is not a preset format and the image format does not support the transparency channel, the image format is converted into the second preset format to obtain a preprocessed image.
[0086] It should be understood that when the image format of the target image is not the preset format and the image format does not support a transparency channel, it needs to be converted into a format that meets the pixel processing requirements, that is, a second preset format that does not support a transparency channel, so as to avoid generating redundant color information during the image format conversion process.
[0087] For example, please refer to Figure 2 , Figure 2 This is an image preprocessing flow chart of the full liquid crystal instrument image display method provided in Example 1 of this application. Figure 2 As shown, when the target image is preprocessed, it is first checked whether the format of the target image is correct. When the image format of the target image is correct, it is determined whether the image format is the preset format (ARGB32 or RGB888). When the image format is the preset format, it is used as a preprocessed image, the basic properties of the image are recorded, and the image header information is obtained; when the image format is not the preset format (ARGB32 or RGB888) and the image format supports a transparency channel, the image format is converted to the first preset format (ARGB32) and the step of checking whether the format of the target image is correct is returned; when the image format is not the preset format (ARGB32 or RGB888) and the image format does not support a transparency channel, the image format is converted to the second preset format (RGB888) and the step of checking whether the format of the target image is correct is returned.
[0088] Step S13, counting the pixel colors of the preprocessed image to obtain pixel color statistical data, and determining whether the preprocessed image has a target color based on the pixel color statistical data to obtain a target color determination result;
[0089] It should be noted that the pixel color statistics include the color value of each pixel in the preprocessed image and its number of occurrences. The target color refers to the main color of the preprocessed image, which is used as a basis for subsequent color segmentation processing in order to obtain color segmentation information.
[0090] In a feasible implementation, step S13 may include steps A21 to A24:
[0091] Step A21, obtaining the pixel color of the preprocessed image, counting the number of occurrences of each pixel color in the preprocessed image, and obtaining pixel color statistical data;
[0092] It should be noted that when counting the number of times each pixel color appears in the preprocessed image, you can call colorToUint32(image.pixelColor(x,y)) to convert each pixel color value into a 32-bit integer, that is, an integer of type quint32, and store it in the form of a key-value pair in rgbCountMap.<quint32,int> rgbCountMap counts the quint32 type keys and their corresponding occurrence times to obtain pixel color statistics.
[0093] For example, in the process of converting the color value of each pixel into an integer of type quint32, the four color channels of the QColor type can be regarded as a four-dimensional column vector P, and the formula is as follows:
[0094] P = (ARGB) T
[0095] Among them, A, R, G and B are used to represent the channel values of transparency, red, green and blue respectively.
[0096] Define a 4×4 matrix M for converting color types. The formula is as follows:
[0097]
[0098] The four-dimensional column vector P can be converted into an integer Q of type quint32 by matrix multiplication. The formula is as follows:
[0099]
[0100] Step A22, sorting the number of occurrences of each pixel color based on the pixel color statistical data to obtain a pixel color sorting result;
[0101] It should be noted that after obtaining the pixel color statistics, rgbCountMap can be converted into rgbCountVector and the sorting code std::sort can be used to sort rgbCountVector in descending order according to the number of times the color appears to obtain the pixel color sorting result. The key sorting code is as follows:
[0102] std::sort(
[0103] rgbCountVector.begin(),
[0104] rgbCountVector.end(),
[0105] [](const QPair<quint32,int> &a,const QPair<quint32,int> &b)
[0106] {return a.second>b.second;} );
[0108] Step A23, when there is a pixel color whose proportion of the total pixel colors reaches a preset proportion in the pixel color sorting result, a target color is determined from the pixel colors whose proportion reaches the preset proportion, and a target color determination result is determined that the preprocessed image has the target color;
[0109] It should be noted that the proportion of each pixel color in the total pixel colors in the preprocessed image can be calculated based on the pixel color sorting result. If the pixel color whose proportion of the total pixel colors in the preprocessed image reaches a preset proportion is obtained, the target color is determined therefrom. The target color refers to the color that appears most frequently in the image, that is, the main color. For the preprocessed image, at most two main colors are determined. That is, when there are no less than two pixel colors whose proportion reaches a preset proportion, the two pixel colors with the highest proportion are used as the main colors; when there is only one pixel color whose proportion reaches a preset proportion, the pixel color with the highest proportion is used as the main color. Among them, the main color with the highest proportion is used as the first main color, and the main color with the second highest proportion is used as the second main color.
[0110] Step A24, when there is no pixel color whose total pixel color accounts for a preset proportion in the pixel color sorting result, determining the target color determination result is that the preprocessed image does not have the target color.
[0111] It should be understood that if the pixel color whose proportion of the total pixel color in the preprocessed image reaches the preset proportion cannot be obtained, it means that the preprocessed image does not have the target color. Specifically, the preset proportion can be set to 10%. If there are no less than two pixel colors whose proportion of the total pixel color reaches 10%, the two pixel colors with the highest proportion will be used as the main colors of the preprocessed image; if there is only one pixel color whose proportion of the total pixel color reaches 10%, the pixel color with the proportion of 10% will be used as the main color of the preprocessed image; if there is no pixel color whose proportion of the total pixel color reaches 10%, the preprocessed image does not have a main color.
[0112] Exemplarily, when recording the primary color, the number of color types in rgbCountVector can be obtained. When the most frequently occurring pixel color accounts for more than 10% of the total number of pixels, result.first.imageHaveFirstPrimaryColor is set to true, and the most frequently occurring color is recorded in result.first.imageFirstPrimaryColor as the first primary color; when the second most frequently occurring pixel color accounts for more than 10% of the total number of pixels, result.first.imageHaveSecondPrimaryColor is set to true, and the second most frequently occurring color is recorded in result.first.imageHaveSecondPrimaryColor as the second primary color.
[0113] Step S14: color segmenting the pixels of the preprocessed image based on the target color determination result to obtain color segmentation information.
[0114] It should be understood that different target color determination results correspond to different numbers of color segments. When obtaining color segmentation information, a variable argbSegment can be defined to store color segmentation information, the first element of which is the color index, and the second element is the byte array of color data.
[0115] In a feasible implementation, step S14 may include: when the target color determination result is that the preprocessed image has the target color, color segmenting the pixel points of the preprocessed image based on the target color to obtain color segmentation information; when the target color determination result is that the preprocessed image does not have the target color, segmenting the pixel points of the target image as a single color to obtain the color segmentation information.
[0116] It should be understood that different color segmentation processes may be performed for different target color determination results. Figure 3 , Figure 3This is a color segmentation flow chart of the full liquid crystal instrument image display method provided in Example 1 of the present application, where the main color is the target color. When the preprocessed image has a main color, each pixel of the preprocessed image will be traversed. If the current pixel traversed is the same as the first main color or the second main color, and the 20 pixels adjacent to the current pixel are similar to the first main color or the second main color, the current pixel will be stored in the corresponding main color segment, and the next pixel will be traversed until all pixels are traversed, and the color segmentation information of all pixels will be obtained and stored; when the preprocessed image does not have a main color, all pixels of the preprocessed image will be regarded as a single color segment and stored, and it will be determined whether the preprocessed image has a transparency channel. If the image has a transparency channel, the color segmentation information will be stored in the order of blue, green, red, and transparency. If the image does not have a transparency channel, the color segmentation information will be stored in the order of red, green, and blue.
[0117] Step S20, mapping the target image into an image file of a preset storage type based on the image header information and the color segmentation information, and storing the image file in a memory;
[0118] It should be understood that the preset storage type refers to the storage type QPair<QmlImageInformationHead,QByteArray> , QmlImageInformationHead is used to store image header information, and QByteArray is used to store serialized data of color segmentation information. After the target image mapped by the image format mapping strategy is stored in the memory with the preset storage type, the stored image data can be directly read the next time it is needed without remapping or loading the entire image.
[0119] Step S30, when receiving a display instruction of an image to be displayed, loading a target image file from the memory according to the display instruction, and displaying the image to be displayed on the full LCD instrument based on the target image file, wherein the target image file is an image file corresponding to the image to be displayed.
[0120] It should be understood that when a display instruction of an image to be displayed is received, the image file corresponding to the image to be displayed will be queried and loaded from the memory according to the display instruction, and the image to be displayed will be rendered and displayed on the full LCD instrument to provide the visual information required by the user. Among them, the image file corresponding to the image to be displayed is an image file that has been mapped by the image format mapping strategy.
[0121] Exemplarily, the image format mapping strategy can be applied to the design of the speedometer in the full LCD instrument system. Specifically, the vehicle speed value can be obtained from an external data source through the QML language, and the speed value can be preprocessed, and the speed string can be updated when the speed value changes. The image path of the speedometer dial is formed by splicing, and the path consists of "qrc: / image / " plus the image file name corresponding to the current speed value, so as to dynamically select the corresponding image file according to the change of the speed value. In the process of actual measurement and analysis, the speedometer can be tested by sending the vehicle speed value and the hard-wired input frequency signal through the message. The message sending uses the test tool Vehicle spy to simulate the vehicle control unit (ECU) to send the actual vehicle speed data to the instrument system. The hard-wired input frequency signal simulates the vehicle motion state and provides actual motion input for the speedometer.
[0122] In a specific implementation, the speedometer can be subjected to a jam repair comparison test, a display accuracy test, and a response time test. For the jam repair comparison test, please refer to FIG. 4. Figure 4a This is a pre-optimization effect diagram of the image freeze repair comparison test of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 4b This is an optimized effect diagram of the image jamming repair comparison test of the full LCD instrument image display method provided in Example 1 of this application. Figure 4a In order to optimize the speedometer before the image decoding stage using the image format mapping strategy, there was an obvious stuttering phenomenon at this time, the numerical display was updated, and the image display was stuttering; Figure 4b In order to optimize the speed table after the image decoding stage by using the image format mapping strategy, it can be seen during the test that the speed display animation transitions smoothly without any lag, the display results are accurate, and the effect is ideal.
[0123] For the display accuracy test, the speedometer can be tested and verified 10 times based on different speeds, and the average value can be calculated. The vehicle speed signal can be obtained through the frequency signal of the hard-wire input. Table 1 shows the display accuracy test data of the speedometer part using the image format mapping strategy to optimize the image decoding stage. It can be seen from Table 1 that the displayed vehicle speed is basically consistent with the actual displayed vehicle speed, but both are slightly higher than the theoretical vehicle speed value. When the speedometer is actually designed, the vehicle speed value is amplified by 3%. The display accuracy test results show that the average error of the speedometer display accuracy is only 1.1%, and the speedometer display accuracy is 98.9%.
[0124] Table 1
[0125]
[0126] For the response time test, the speedometer before and after the image format mapping strategy optimization can be tested respectively. The theoretical vehicle speed values are 30, 50, 80, 100, 120, and 140 data. The vehicle speed value rises first and then falls. 10 tests are performed to verify and the average value is calculated. Please refer to Figure 5. Figure 5a This is a test effect diagram of the vehicle speed increase response time of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 5b This is a test result diagram of the vehicle speed drop response time of the full liquid crystal instrument image display method provided in Example 1 of this application. As shown in Figure 5, Figure 5a It shows that the average speed of the speedometer time peak before and after optimization is 140km / h, and the speedometer animation response time is proportional to the speed. The speedometer speed increase response time after optimization is up to 1.20s, and the speedometer speed increase response time before optimization is up to 1.40s. The speedometer speed increase response time after optimization is better than the traditional method. Figure 5b The maximum speed drop response time of the optimized speedometer is 1.00s, and the maximum speed increase response time of the speedometer before optimization is 1.10s. The speed drop response time after optimization is better than the traditional method. The speedometer response time designed by the image format mapping strategy of this application is lower than the speedometer response time designed by the traditional method under different conditions. The speed increase response time is reduced by an average of 0.14s, and the speed drop response time is reduced by an average of 0.12s, which proves the effectiveness of the image format mapping strategy.
[0127] In addition, in order to further verify the comprehensive performance of the speedometer designed based on the image format mapping strategy, the response time test can be carried out under three different working conditions, which are set as low-speed driving roads, urban roads, and high-speed driving roads respectively.
[0128] Please refer to Figures 6 to 8. Figure 6a This is a test effect diagram of the vehicle speed increase response time under low-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 6b This is a test effect diagram of the vehicle speed reduction response time under low-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 7a This is a test effect diagram of the vehicle speed increase response time on urban roads of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 7b This is a test effect diagram of the vehicle speed reduction response time on urban roads of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 7c This is a test effect diagram of the acceleration condition response time of the full liquid crystal instrument image display method under urban roads provided in Example 1 of the present application; Figure 7dThis is a test effect diagram of the braking condition response time on urban roads of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 8a This is a test effect diagram of the vehicle speed increase response time under high-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application; Figure 8b This is a test effect diagram of the time response to vehicle speed reduction under high-speed driving conditions of the full liquid crystal instrument image display method provided in Example 1 of the present application.
[0129] The speed of the vehicle on low-speed roads is set at 15 to 30 km / h; the speed of the vehicle on high-speed roads is set at 90 to 120 km / h; and the speed of the vehicle on urban roads is set at 45 to 60 km / h. Braking and acceleration often occur on urban roads, so the braking condition and the starting acceleration condition are set. The braking condition speed is from 45 km / h to 0 km / h, and the acceleration condition speed is from 0 km / h to 30 km / h, so as to achieve the starting acceleration of the vehicle and observe its speed response time.
[0130] The response time comparison test of low-speed driving condition is shown in Figure 6. Figure 6a is the response time of vehicle speed increase, Figure 6b The response time of the vehicle speed reduction. The response time comparison test of urban road conditions is shown in Figure 7. Figure 7a is the response time of vehicle speed increase, Figure 7b Response time to vehicle speed reduction, Figure 7c Response time of braking conditions, Figure 7d is the response time of starting acceleration. The response time comparison test of high-speed driving condition is shown in Figure 8. Figure 8a is the response time of vehicle speed increase, Figure 8b Response time to vehicle speed reduction.
[0131] In the above three working conditions, the speedometer optimized by the image format mapping strategy has a faster response rate and a more stable response time curve. This shows that by optimizing the loading and display efficiency of image resources, the optimized speedometer has been significantly improved in terms of response rate and display stability. At the same time, the response rate stability when the vehicle speed decreases is better than the stability when the vehicle speed increases in the three working conditions. During the deceleration process, the influence of external factors is relatively small, and the vehicle speed changes relatively slowly. By analyzing the test results of the three working conditions, the effectiveness of the image format mapping strategy can be verified, proving that the optimized speedometer performs better under various working conditions.
[0132] The present embodiment provides a method for displaying images of a full liquid crystal instrument, by acquiring image header information and color segmentation information of a target image, mapping the target image to an image file of a preset storage type based on the image header information and the color segmentation information, and storing the image file in a memory. When a display instruction of an image to be displayed is received, the target image file, i.e., the image file corresponding to the image to be displayed, is loaded from the memory according to the display instruction, and the image to be displayed is displayed on the full liquid crystal instrument based on the target image file. Before displaying the image, the target images from the data source are mapped to image files containing image header information and color segmentation information according to an image format mapping strategy and stored in the memory, so that when the user needs it, the stored image file can be directly read and displayed on the full liquid crystal instrument without re-mapping or loading the entire image, which helps to improve the image loading efficiency, so as to avoid the image loading rate not matching the screen refresh rate, resulting in the image being unable to be refreshed in time, and a freeze or even a black screen phenomenon occurring during the image display process, affecting the normal operation of the instrument.
[0133] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Fig. 9 , step S30 also includes steps S31 to S33:
[0134] Step S31, when receiving a display instruction of an image to be displayed, determining whether a target image file exists in the memory, and obtaining a file correctness determination result;
[0135] It should be understood that when a display instruction for an image to be displayed is received, before the image is displayed, it is first determined whether the image file corresponding to the image has been stored in the memory to obtain a file correctness determination result. If the image file of the specified storage path is found in the memory, the file correctness determination result will be that the target image file exists in the memory; if the image file of the specified storage path is not found in the memory, the file correctness determination result will be that the target image file does not exist in the memory.
[0136] Step S32, when the result of the file correctness determination is that the target image file exists in the memory and the path of the target image file has not been loaded, the target image file is loaded from the memory into the cache according to the display instruction, a mutex lock corresponding to the target image file is created, and the mutex lock is locked;
[0137] It should be noted that a cache image file path list is maintained in the memory, which records all the image file paths that have been loaded into the cache. When the file correctness determination result is that the target image file exists in the memory, the image file path corresponding to the target image file will be queried in the cache image file path list. Only when the image file path corresponding to the target image file is not queried in the cache image file path list, will the corresponding cache information object be created according to the display instruction, the target image file will be loaded from the memory into the cache, and the mutex lock corresponding to the target image file will be created and locked to prevent multiple threads from accessing or modifying the image data at the same time, thereby ensuring the safety of the threads.
[0138] It should be understood that when the result of the file correctness determination is that the target image file does not exist in the memory, the image loading process will be terminated, and the image file of the image to be displayed will be re-downloaded from the original data source such as the hard disk, network or other storage medium before loading the image. When the image file path corresponding to the target image file is queried in the cache image file path list, the image data of the image to be displayed will be directly read from the cache for display, and the image loading process will be terminated, thereby improving the efficiency of image display.
[0139] Step S33: displaying the image to be displayed on the full liquid crystal instrument based on the target image file and unlocking the mutex lock.
[0140] It should be understood that after the target image file is successfully loaded into the cache, the image data in the cache will be read, the image to be displayed will be rendered and displayed on the full LCD instrument, the mutex will be unlocked and the mutex pointer will be cleared, allowing other threads to access or update the image data.
[0141] In a feasible implementation, step S33 may include steps B11 to A12:
[0142] Step B11, when the target image file exists in the memory, the size of the target image file reaches a preset standard, and the target image file is successfully read, reading the image header information and the color segmentation information based on the target image file;
[0143] It should be noted that, in the process of loading the image to be displayed, after creating the cache information object and locking the corresponding mutex lock, it will be determined again whether there is an image file corresponding to the image to be displayed in the memory, that is, the target image file, to confirm that the image to be displayed has not been moved or replaced by other threads during the loading process. When it is determined that the target image file exists in the memory, the size of the image file is obtained and compared with the preset standard file size threshold. Among them, the file size threshold should be determined according to the image header information size of the image file. When the size of the image file is greater than the header information length, it means that the image file size can contain the image header information, and the image file will be tried to be opened in read-only form. When the image file is successfully opened, the image header information and color segmentation information of the image file are read.
[0144] It should be understood that when any of the conditions that the target image file does not exist in the memory, the size of the target image file does not meet the preset standard, and the target image file cannot be successfully read, the mutex lock will be directly unlocked to end the image loading process.
[0145] Step B12: displaying the image to be displayed on the full liquid crystal instrument based on the image header information and the color segmentation information and unlocking the mutex lock.
[0146] It should be understood that after reading the image header information and color segmentation information of the target image file, a QImage object containing the image header information and color segmentation information can be obtained. The QImage object is used to draw the image in the graphics rendering stage, and the image to be displayed is displayed on the full LCD instrument, the mutex lock is unlocked, and the mutex lock pointer is cleared.
[0147] For example, please refer to Fig.10 , Fig.10The image loading flow chart of the full liquid crystal instrument image display method provided in the second embodiment of the present application. In the process of loading the target image file, when receiving the display instruction of the image to be displayed, first check whether there is a cache file (i.e., the target image file) in the memory, and determine whether the path of the cache file has been loaded in the cache. When the cache file exists in the memory and the path of the cache file has not been loaded in the cache, create a cache information object corresponding to the cache file and lock its corresponding mutex, check again whether the cache file exists in the memory and the correctness of the cache file (whether the size is legal), and check whether the size of the cache file can contain the image header information and whether the cache file can be opened in read-only form. Only when the three conditions of the cache file existing in the memory and the cache file being correct, the size of the cache file can contain the image header information and the cache file can be opened in read-only form are met at the same time, read the image header information and color segmentation information of the cache file, convert the image header information and color segmentation information into an image object, display the image to be displayed in the full liquid crystal instrument based on the image object, unlock the mutex and clear the mutex pointer.
[0148] In the process of loading the target image file, this embodiment uses a mutex lock to synchronize the access of different threads to achieve asynchronous loading, thereby ensuring the consistency of image data and the security of threads, and avoiding freezes or even a black screen on the full LCD instrument system interface during the loading process.
[0149] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the full liquid crystal instrument image display method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0150] This application also provides a full liquid crystal instrument image display device, please refer to Fig.11 , the full liquid crystal instrument image display device comprises:
[0151] An information acquisition module 10 is used to acquire image header information and color segmentation information of a target image;
[0152] An image mapping module 20, configured to map the target image into an image file of a preset storage type based on the image header information and the color segmentation information, and store the image file in a memory;
[0153] The image display module 30 is used to load a target image file from the memory according to the display instruction when receiving a display instruction of an image to be displayed, and display the image to be displayed on the full LCD instrument based on the target image file, wherein the target image file is an image file corresponding to the image to be displayed.
[0154] The full liquid crystal instrument image display device provided by the present application adopts the full liquid crystal instrument image display method in the above embodiment, which can solve the technical problem of how to realize the anti-stuttering function in the process of displaying images by the full liquid crystal instrument. Compared with the prior art, the beneficial effects of the full liquid crystal instrument image display device provided by the present application are the same as the beneficial effects of the full liquid crystal instrument image display method provided by the above embodiment, and the other technical features in the full liquid crystal instrument image display device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0155] The present application provides a full liquid crystal instrument image display device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the full liquid crystal instrument image display method in the above-mentioned embodiment 1.
[0156] Reference below Fig.12 , which shows a schematic diagram of the structure of a full liquid crystal instrument image display device suitable for implementing the embodiment of the present application. The full liquid crystal instrument image display device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.12 The full liquid crystal instrument image display device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0157] like Fig.12As shown, the full liquid crystal instrument image display device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the full liquid crystal instrument image display device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the full liquid crystal instrument image display device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a full liquid crystal instrument image display device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0158] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0159] The full liquid crystal instrument image display device provided by the present application adopts the full liquid crystal instrument image display method in the above embodiment, which can solve the technical problem of how to realize the anti-stuttering function in the process of displaying images by the full liquid crystal instrument. Compared with the prior art, the beneficial effects of the full liquid crystal instrument image display device provided by the present application are the same as the beneficial effects of the full liquid crystal instrument image display method provided by the above embodiment, and the other technical features in the full liquid crystal instrument image display device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0160] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0162] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the full liquid crystal instrument image display method in the above-mentioned embodiment.
[0163] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0164] The computer-readable storage medium may be included in the full liquid crystal instrument image display device; or may exist independently without being assembled into the full liquid crystal instrument image display device.
[0165] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the full liquid crystal instrument image display device, the full liquid crystal instrument image display device: obtains the image header information and color segmentation information of the target image; maps the target image to an image file of a preset storage type based on the image header information and the color segmentation information, and saves the image file in a memory; when receiving a display instruction for an image to be displayed, loads the target image file from the memory according to the display instruction, and displays the image to be displayed on the full liquid crystal instrument based on the target image file, and the target image file is an image file corresponding to the image to be displayed.
[0166] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0168] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0169] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned full liquid crystal instrument image display method, and can solve the technical problem of how to realize the anti-stuttering function in the process of full liquid crystal instrument image display. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the full liquid crystal instrument image display method provided in the above-mentioned embodiment, and will not be repeated here.
[0170] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned full liquid crystal instrument image display method when executed by a processor.
[0171] The computer program product provided in this application can solve the technical problem of how to realize the anti-stuttering function in the process of displaying images in a full liquid crystal instrument. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the full liquid crystal instrument image display method provided in the above embodiment, and will not be repeated here.
[0172] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A full liquid crystal instrument image display method, characterized in that: The full liquid crystal instrument image display method comprises: Get the image header information and color segmentation information of the target image; Mapping the target image to an image file of a preset storage type based on the image header information and the color segmentation information, and storing the image file in a memory; When a display instruction of an image to be displayed is received, a target image file is loaded from the memory according to the display instruction, and the image to be displayed is displayed on the full LCD instrument based on the target image file, wherein the target image file is an image file corresponding to the image to be displayed.
2. The full liquid crystal instrument image display method according to claim 1, characterized in that: The step of obtaining the image header information and color segmentation information of the target image includes: Acquire an image format of a target image, determine whether the image format is a preset format, and obtain an image format determination result; Processing the image format based on the image format determination result to obtain a preprocessed image, and acquiring image header information based on the preprocessed image; Counting the pixel color of the preprocessed image to obtain pixel color statistical data, and determining whether the preprocessed image has a target color based on the pixel color statistical data to obtain a target color determination result; Color segmentation is performed on the pixels of the preprocessed image based on the target color determination result to obtain color segmentation information.
3. The full liquid crystal instrument image display method according to claim 2, characterized in that: The step of processing the image format based on the image format determination result to obtain a preprocessed image comprises: When the image format determination result is that the image format is a preset format, using the target image as a pre-processed image, the preset format includes a first preset format and a second preset format, the first preset format supports a transparency channel, and the second preset format does not support a transparency channel; When the image format determination result is that the image format is not a preset format and the image format supports a transparency channel, converting the image format into the first preset format to obtain a preprocessed image; When the image format determination result is that the image format of the target image is not a preset format and the image format does not support the transparency channel, the image format is converted into the second preset format to obtain a preprocessed image.
4. The full liquid crystal instrument image display method according to claim 2, characterized in that: The step of counting the pixel color of the preprocessed image to obtain pixel color statistical data, determining whether the preprocessed image has a target color based on the pixel color statistical data, and obtaining a target color determination result comprises: Obtaining pixel colors of the preprocessed image, counting the number of occurrences of each pixel color in the preprocessed image, and obtaining pixel color statistical data; Sort the number of times each pixel color appears based on the pixel color statistics to obtain a pixel color sorting result; When there is a pixel color whose proportion of the total pixel colors reaches a preset proportion in the pixel color sorting result, a target color is determined from the pixel colors whose proportion reaches the preset proportion, and a target color determination result is determined that the preprocessed image has the target color; When there is no pixel color whose proportion of the total pixel colors reaches a preset ratio in the pixel color sorting result, it is determined that the target color determination result is that the preprocessed image does not have the target color.
5. The full liquid crystal instrument image display method according to claim 2, characterized in that: The step of color segmenting the pixels of the preprocessed image based on the target color determination result to obtain color segmentation information comprises: When the target color determination result is that the preprocessed image has the target color, color segmenting is performed on the pixel points of the preprocessed image based on the target color to obtain color segmentation information; When the target color determination result is that the preprocessed image does not have the target color, the pixel points of the target image are taken as single color segments to obtain the color segmentation information.
6. The full liquid crystal instrument image display method according to claim 1, characterized in that: The step of loading a target image file from the memory according to the display instruction when receiving a display instruction of the image to be displayed, and displaying the image to be displayed on the full liquid crystal instrument based on the target image file, further includes: When receiving a display instruction of an image to be displayed, determining whether a target image file exists in the memory, and obtaining a file correctness determination result; When the result of the file correctness determination is that the target image file exists in the memory and the path of the target image file has not been loaded, the target image file is loaded from the memory into the cache according to the display instruction, a mutex lock corresponding to the target image file is created, and the mutex lock is locked; The image to be displayed is displayed on the full liquid crystal instrument based on the target image file and the mutex lock is unlocked.
7. The full liquid crystal instrument image display method according to claim 6, characterized in that: The step of displaying the image to be displayed on the full liquid crystal instrument based on the target image file and unlocking the mutex lock comprises: When the target image file exists in the memory, the size of the target image file reaches a preset standard, and the target image file is successfully read, reading the image header information and the color segmentation information based on the target image file; The image to be displayed is displayed on a full liquid crystal instrument based on the image header information and the color segmentation information, and the mutex lock is unlocked.
8. A full liquid crystal instrument image display device, characterized in that: The device comprises: An information acquisition module, used to acquire image header information and color segmentation information of a target image; An image mapping module, used for mapping the target image into an image file of a preset storage type based on the image header information and the color segmentation information, and storing the image file in a memory; The image display module is used to load a target image file from the memory according to the display instruction when receiving a display instruction of an image to be displayed, and display the image to be displayed on the full liquid crystal instrument based on the target image file, wherein the target image file is an image file corresponding to the image to be displayed.
9. A full liquid crystal instrument image display device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the full liquid crystal instrument image display method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the full liquid crystal instrument image display method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for quickly displaying startup animation by full liquid crystal instrument
CN110738975A
Image processing method and device, electronic equipment and storage medium
CN112017174A
Display safety control method and system of full liquid crystal instrument
CN113696729A
Method and system for optimizing display performance of full liquid crystal instrument
CN114996491A
Image format determination method and device and electronic equipment
CN115082294A
