Image display enhancement method, device, electronic device and storage medium
By identifying the subject color of the target image and applying the optimal image filter for color enhancement, the problem of image distortion in electronic paper display technology is solved, and high-quality image display on low-color depth display devices are achieved.
Patent Information
- Application Number
- CN202411035630.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Existing electronic paper display technology has limitations in color expressiveness, which can cause distortion in image display, especially when a scene with rich colors is needed.
By identifying the theme color of the target image to be displayed, and selecting the optimal image filter according to the theme color, the target image is color-enhanced, generating a filter effect image, and then jittering it and sending it to a low-color depth display device for show.
It effectively avoids the problem of distortion of images in low-color depth display devices, improves the visual quality and color expressiveness of images, and makes the images clearer and more realistic when displayed.
Smart Images

Figure CN118570111B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to an image display enhancement method, device, electronic device and storage medium. Background Art
[0002] With the development of electronic paper display technology, its application in electronic books, wearable devices, electronic price tags and other devices has become more and more extensive. Electronic paper screens display images and text by suspending microcapsules in liquid. This type of panel has significant advantages in extending the battery life of the device. It can not only restore the display effect of paper, but also be clearly visible in the sun and reduce the user's eye fatigue. However, in terms of color expression, electronic paper technology faces certain challenges. The current electronic paper display technology can only display a very limited color depth, which sometimes causes the displayed image to be distorted. Therefore, in order to avoid image display distortion, a new image display enhancement method is urgently needed. Summary of the invention
[0003] The invention provides an image display enhancement method, device, electronic equipment and storage medium.
[0004] According to one aspect of the present invention, there is provided an image display enhancement method, comprising:
[0005] Acquire a target image to be displayed, and determine a target theme color of the target image;
[0006] Determining an optimal image filter corresponding to the target image according to the target theme color;
[0007] Applying the optimal image filter to the target image to obtain a filter effect image;
[0008] The filter effect image is subjected to dithering processing, and the filter effect image after dithering processing is sent to a low color depth display device for display.
[0009] According to another aspect of the present invention, there is provided an image display enhancement device, comprising:
[0010] A theme color recognition module is used to obtain a target image to be displayed and determine a target theme color of the target image;
[0011] A filter selection module, used to determine the optimal image filter corresponding to the target image according to the target theme color;
[0012] A filter application module, used for applying the optimal image filter to the target image to obtain a filter effect image;
[0013] The dithering processing and sending module is used to perform dithering processing on the filter effect image, and send the filter effect image after dithering processing to a low color depth display device for display.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the image display enhancement method described in the embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image display enhancement method described in the embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention identifies the theme color of the target image to be displayed, selects the optimal image filter corresponding to the target image according to the theme color, and uses the optimal image filter to enhance the color of the target image. In this way, when the color-enhanced target image (i.e., the filter effect image) is sent to a low color depth display device for display, the problem of image distortion can be avoided.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of an image display enhancement method provided according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of providing images with different filter effects according to an embodiment of the present invention;
[0024] Figure 3is a flow chart of an image display enhancement method provided according to an embodiment of the present invention;
[0025] Figure 4 is a flow chart of an image display enhancement method provided according to an embodiment of the present invention;
[0026] Figure 5 is a flow chart of an image display enhancement method provided according to an embodiment of the present invention;
[0027] Figure 6 is a structural schematic diagram of an image display enhancement device provided according to an embodiment of the present invention;
[0028] Figure 7 It is a schematic diagram of the structure of an electronic device for implementing the image display enhancement method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] Embodiment 1
[0031] Figure 1 A flowchart of an image display enhancement method provided in an embodiment of the present invention. This embodiment can be applied to scenarios of enhancing image display effects in low color depth display devices. The method can be performed by an image display enhancement device. The image display enhancement device can be implemented in the form of hardware and / or software. The image display enhancement device can be configured in an electronic device. The electronic device can optionally be a mobile terminal or a server device. The electronic device can communicate directly or indirectly with the low color depth display device.
[0032] like Figure 1 As shown, the image display enhancement method includes:
[0033] S101: Acquire a target image to be displayed, and determine a target theme color of the target image.
[0034] In an embodiment of the present invention, the target image to be displayed may be an image to be sent to a low color depth display device for display, and a low color depth display device refers to an electronic device with relatively low color expression capability, which is mainly reflected in the lack of color types and color accuracy that it can display. In an embodiment of the present invention, the low color depth display device may be an electronic price tag equipped with an electronic paper screen. For the scenario where the low color depth display device is an electronic price tag equipped with an electronic paper screen, the target image may be a product image. For example, the target image may be an image of a certain kind of fruit or an image of a beverage.
[0035] It is understandable that in order to ensure the image display effect of the target image in the low color depth display device, the target image to be displayed may be acquired before the target image is sent to the low color depth display device for display.
[0036] After the target image is acquired, the target image can be subjected to theme color recognition to obtain the target theme color of the target image. Exemplarily, if the target image is a tomato image, the recognized target theme color can be red; if the target image is an office chair image, the recognized target theme color can be black. Optionally, the process of identifying the target theme color from the target image may include: predetermining the color value range corresponding to each color in a specified color space, wherein the specified color space may be one of an RGB color space, an HSV color space, and a YUV color space; traversing the pixels in the target image, and each time a pixel is traversed, obtaining the color value of the pixel (e.g., R, G, B value), and determining the color value range of the color value of the pixel, and then determining the color of the pixel; it can be understood that if the color value of the pixel does not correspond to the specified color space, the color value of the pixel needs to be converted, for example, if the specified color space is an HSV color space, and the color value of the pixel is an R, G, B value, then the R, G, B color value of the pixel needs to be converted to an H, S, V color value, and then the color value range of the color value of the pixel is determined. Furthermore, for any color in the color space, the number of all pixels in the target image whose color value is within the color value range corresponding to the color is counted, that is, the number of pixels corresponding to each color is determined; different colors are sorted according to the number of pixels, for example, in descending order of the number of pixels; the difference or quotient between the number of pixels of the first color and the number of pixels of the second color is determined, and if the difference or quotient is greater than a preset difference threshold or quotient threshold, it is considered that the number of pixels of the first color accounts for a large proportion in the target image, and the first color can be used as the target theme color. In another optional implementation, a theme color recognition model can be pre-trained, and the target theme color of the target image can be identified through the theme color recognition model.
[0037] It should be noted that the target theme color refers to the color that dominates, is most prominent, or appears frequently in the target image; the target theme color can convey the overall atmosphere, emotion, and visual focus of the target image, and has an important impact on the visual recognition and emotional expression of the target image. The target theme color can be a single color. The identification theme color refers to the specific color represented by the clear color value.
[0038] S102: Determine an optimal image filter corresponding to the target image according to the target theme color.
[0039] In the embodiment of the present invention, the optimal image filters corresponding to different theme colors can be predetermined, that is, the mapping relationship between different theme colors and image filters can be predetermined, and the mapping relationship can be saved in the form of a mapping table. For example, the specific mapping relationship can be seen in Table 1.
[0040] Table 1
[0041] Image theme color Image Filters C1 A C2 B C3 C C4 D C5 E ... ...
[0042] In this embodiment, the image filter corresponding to each theme color may include parameters such as brightness, contrast, saturation, color temperature, and hue, but the parameter values are different.
[0043] In an embodiment of the present invention, the process of determining the mapping relationship between a theme color and an image filter includes: first, for different theme colors, a corresponding sample image set is constructed, wherein each sample image set includes a plurality of images with different contents but the same theme color; it is understandable that in order to ensure the accuracy of the determined mapping relationship, for each theme color, a large number of different images with the same theme color can be collected to form a sample image set, and the specific method of collecting sample images is not specifically limited herein. For a sample image set under any theme color C1, sample images are obtained from the sample image set in turn, and each time a sample image is obtained, the sample image is processed using different image filters (such as image filters A, B, C, D, E, etc. in Table 1) to obtain a plurality of filter effect images. The plurality of filter effect images are sent to a user terminal for display, exemplarily, see Figure 2, which shows a schematic diagram of different filter effect images; the user selects the best filter effect image from the multiple filter effect images displayed by the user terminal, and votes for the image filter corresponding to the best filter effect image; it is understandable that the user can only vote for the best image filter, and when the display effects of multiple filter effect images are not much different, so that the user cannot determine the best image filter, the user can also vote for multiple image filters at the same time, for example, the user votes for the best image filter and the sub-optimal image filter. In response to the user's vote on the image filter, the cumulative number of votes for each image filter is recorded. It is understandable that after each sample image is obtained from the sample image set and multiple filter effect images are obtained by applying different image filters, they are sent to the user terminal for display so that the user can vote on the image filter. In this way, an image filter can be voted multiple times. Under the theme color C1, the number of votes for each image filter is counted, and the image filter with the most votes is used as the optimal image filter corresponding to the theme color. For example, it is found through statistics that image filter A has the most votes, so the mapping relationship between theme color C1 and image filter A can be established. In this way, the mapping relationship between the above-mentioned theme color and image filter can be obtained. It can be understood that the process of determining the mapping relationship is mainly based on the subjective evaluation of the user, that is, a certain number of users (i.e., observers) are invited to score or vote on images under different image filters, and then a mapping relationship is established based on the scoring results or voting results. The mapping relationship established in this way is closer to the evaluation result of human visual perception.
[0044] In addition, the process of determining the mapping relationship between the theme color and the image filter may also include: for a sample image set under any theme color, sequentially obtaining sample images from the sample image set, and each time a sample image is obtained, using different image filters to process the sample image to obtain multiple filter effect images; inputting the filter effect image into a pre-trained image quality assessment model (such as a deep learning model), determining the optimal filter effect image based on the quality of each filter effect image output by the image quality assessment model, and adding one to the number of times the image filter corresponding to the optimal filter effect image is selected; further, under the theme color, counting the number of times each image filter is selected, and using the image filter with the most selected times as the optimal image filter corresponding to the theme color, and establishing a mapping relationship between the subject color and the optimal image filter. It can be understood that the above process of determining the mapping relationship is determined without reference to the user's subjective evaluation.
[0045] When using the mapping relationship between the theme color and the image filter, the mapping relationship determined in any of the above-mentioned ways may be used, and no specific limitation is made here.
[0046] On this basis, according to the target theme color, determining the optimal image filter corresponding to the target image includes: determining the optimal image filter corresponding to the target image according to the predetermined mapping relationship and the target theme color determined in step S101. The optimal image filter may include: brightness value, contrast value, saturation value, color temperature value and hue value.
[0047] For example, if the target image is a yellow banana image and the target theme color is yellow, the optimal image filter determined according to the mapping relationship may be image filter A that enhances the color brightness of the target image; if the target image is a black office chair image and the target theme color is black, the optimal image filter determined according to the mapping relationship may be image filter B that enhances its texture.
[0048] S103: Apply the optimal image filter to the target image to obtain a filter effect image.
[0049] In this embodiment, after obtaining the optimal image filter corresponding to the target image, the target image can be color enhanced according to the filter parameter values in the optimal image filter to obtain a filter effect image. It can be understood that color enhancement of the target image according to its corresponding optimal image filter can ensure the display effect of the color enhancement image in a low color depth display device and avoid the problem of image distortion.
[0050] S104: performing dithering processing on the filter effect image, and sending the filter effect image after dithering processing to a low color depth display device for display.
[0051] In an embodiment of the present invention, before the obtained filter effect image is sent to a low color depth display device for display, the filter effect image can also be jittered to ensure that the image is visually closer to the original image when displayed in the low color depth display device.
[0052] In the embodiment of the present invention, the filter effect image is subjected to dithering processing, mainly by introducing noise or error diffusion to simulate more colors, thereby improving the visual quality of the image.
[0053] The specific process of dithering an image may include: first determining the color set supported by the low color depth display device; then performing quantization, specifically, traversing each pixel of the filter effect image, and for each traversed pixel, determining a target color closest to the original color of the pixel in the color set; setting the color of the pixel to the determined closest color. Further, calculating the quantization error, that is, subtracting the original pixel color from the quantized pixel color, and taking the difference as the error. Further, performing error diffusion, that is, dispersing the calculated error to adjacent pixels. The purpose of the error diffusion step is to minimize the impact of the quantization step on the visual quality of the image. Repeat the above steps until all pixels in the image are traversed. In this way, more colors can be simulated under color constraints, thereby improving the visual quality of the image.
[0054] After the filter effect image is dithered, the dithered image can be sent to a low color depth display device for display. Optionally, if the low color depth display device is an electronic price tag, the dithered filter effect image can be first sent to a base station, and then sent to a designated electronic price tag through the base station.
[0055] The solution of the present invention identifies the theme color of the target image to be displayed, selects the optimal image filter corresponding to the target image according to the theme color, and uses the optimal image filter to enhance the color of the target image. In this way, when the color-enhanced image is sent to a low color depth display device for display, the problem of image distortion can be avoided.
[0056] Embodiment 2
[0057] Figure 3 The present invention provides a flowchart of an image display enhancement method. This embodiment explains the specific implementation process of determining the target theme color of the target image. Figure 3 , the method comprises the following steps:
[0058] S201, obtaining a target image to be displayed, and determining a target theme color of the target image based on a pre-trained theme color recognition model.
[0059] In an embodiment of the present invention, the theme color recognition model is a machine learning model or a deep learning model; on this basis, based on the pre-trained theme color recognition model, the target theme color of the target image is determined, including: based on a clustering algorithm, a preset number of candidate theme colors are extracted from the target image; wherein the clustering algorithm can be a K-Means clustering algorithm or other clustering algorithms, which are not specifically limited here; the preset number can be set according to actual settings, for example, set to 5. Further, the color proportion of each candidate theme color in the target image is determined, for example, for any candidate theme color, the proportion of pixels belonging to the candidate theme color in the total pixels of the target image is used as the color proportion of the candidate theme color in the target image; each candidate theme color and the color proportion corresponding to each candidate theme color are used as the input of the theme color recognition model, and the target theme color is determined according to the output of the theme color recognition model. It should be noted that the output of the theme color recognition model includes the confidence of the target theme color in addition to the target theme color.
[0060] If the theme color recognition model is a convolutional neural network model, the target image can be adjusted to a fixed size, and then the adjusted target image can be directly input into the theme color recognition model to determine the target theme color based on the model output.
[0061] It should be noted that if the theme color recognition model is a machine learning model or a deep learning model, the training process of the theme color recognition model is as follows: obtain a sample image with a pre-labeled theme color, extract a preset number of candidate theme colors from the sample image based on a clustering algorithm; determine the color proportion of each candidate theme color in the sample image; use each candidate theme color and the color proportion corresponding to each candidate theme color as the input of the theme color recognition model, and the theme color recognition model outputs the theme color; compare the theme color output by the model with the labeled theme color of the sample image, determine the loss, and adjust the parameters of the theme color recognition model according to the loss. In this way, the final theme color recognition model can be obtained through multiple rounds of training.
[0062] If the theme color recognition model is a convolutional neural network model, the training process of the theme color recognition model is as follows: obtain a sample image that is pre-labeled with the theme color, and adjust the sample image to a fixed size, where the fixed size refers to a size that is suitable for the convolutional neural network model input; input the adjusted image into the convolutional neural network model, calculate the loss based on the model output result and the sample annotation, and adjust the parameters of the convolutional neural network model based on the loss; through multiple rounds of training, the final theme color recognition model is obtained.
[0063] S202: Determine an optimal image filter corresponding to the target image according to the target theme color.
[0064] S203: Apply the optimal image filter to the target image to obtain a filter effect image.
[0065] S204: Perform dithering processing on the filter effect image, and send the filter effect image after dithering processing to a low color depth display device for display.
[0066] In the embodiment of the present invention, the specific implementation process of steps S202-S204 can refer to the description of the above embodiment, which will not be repeated here.
[0067] In the embodiment of the present invention, the theme color of the target image is determined by using a pre-trained theme color recognition model, so that the efficiency and accuracy of the recognized theme color can be guaranteed.
[0068] Embodiment 3
[0069] Figure 4 A flowchart of an image display enhancement method is provided for an embodiment of the present invention. Figure 4 , the method comprises the following steps:
[0070] S301, obtaining a target image to be displayed, and determining a target theme color of the target image and a confidence level of the target theme color based on a pre-trained theme color recognition model.
[0071] In this embodiment, the pre-trained theme color recognition model can be selected from any one of a machine learning model, a deep learning model, and a convolutional neural network model. The specific recognition process and model training process can be referred to the above embodiment, which will not be repeated here.
[0072] In this embodiment, the theme color recognition model outputs the confidence of the target theme color in addition to the target theme color. The confidence is used to characterize the credibility of the model output result. If the confidence is low, it means that the theme color recognition model cannot accurately determine the theme color of the target image. This situation mainly occurs in scenes where the theme color of the target image is not single, that is, there is a mixture of multiple colors in the target image. Therefore, in order to ensure the accuracy of selecting the image filter, it can also be selected according to the size of the confidence. The specific process can be seen in steps S302-S303.
[0073] S302: In response to the confidence being greater than or equal to a preset confidence threshold, determining an optimal image filter corresponding to the target image according to a predetermined mapping relationship between theme colors and image filters and a target theme color of the target image.
[0074] In the embodiment of the present invention, the preset confidence threshold may be an empirical value determined through continuous trials. If the confidence is greater than or equal to the preset confidence threshold, it indicates that the accuracy of the target theme color output by the theme color recognition model is high, and the image filter corresponding to the target theme color can be directly determined based on the mapping relationship between the theme color and the image filter, and then used as the optimal image filter corresponding to the target image.
[0075] S303: In response to the confidence being less than a preset confidence threshold, using a predetermined default image filter as an optimal image filter corresponding to the target image.
[0076] In an embodiment of the present invention, if the confidence is less than a preset confidence threshold, it indicates that the accuracy of the target theme color output by the theme color recognition model is low, that is, the theme color of the target image is not single, but may be a mixture of multiple colors. At this time, the optimal image filter of the target image cannot be determined based on the mapping relationship between the theme color and the image filter. For scenes where the theme color may be a mixture of multiple colors, a predetermined default image filter can be used as the optimal image filter for the target image. The process of determining the default image filter is: constructing a set of sample images with a theme color of a mixture of multiple colors; for each sample image in the sample image set, processing it using different image filters to obtain multiple filter effect images; sending the multiple filter effect images to the user terminal so that the user can vote for the image filters corresponding to the different filter effect images; for example, voting for the image that the user feels has the best effect; and then determining the default image filter based on the number of votes for different image filters, for example, using the image filter with the most votes as the default image filter. It can be understood that when human intervention is not required, the process of determining the default image filter may include: constructing a set of sample images whose theme colors are a mixture of multiple colors; for each sample image in the sample image set, processing it using different image filters to obtain multiple filter effect images; estimating the quality of each filter effect image through a pre-trained image quality assessment model, and then selecting the optimal filter effect image based on the quality of each filter effect image, and adding one to the number of times the image filter corresponding to the minimum filter effect image is selected; finally, determining the default image filter based on the number of times each image filter is selected.
[0077] S304: Apply the optimal image filter to the target image to obtain a filter effect image.
[0078] S305: Perform dithering processing on the filter effect image, and send the filter effect image after dithering processing to a low color depth display device for display.
[0079] In the embodiment of the present invention, according to the confidence of the target theme color output by the theme color recognition model, the optimal image filter is selected in different ways, which can ensure the accuracy of the selected image filter and further ensure the accuracy of color enhancement of the target image.
[0080] Embodiment 4
[0081] Figure 5 A flowchart of an image display enhancement method is provided for an embodiment of the present invention. Figure 5 , the method comprises the following steps:
[0082] S401. Delimiting a color value range for standard primary colors supported by the low color depth display device in a specified color space to obtain a color value range corresponding to each standard primary color.
[0083] In the embodiment of the present invention, the specified color space may be an HSV color space. The number of standard primary colors supported by the low color depth display device may be multiple, and the standard primary colors are exemplarily red, green, black, white, etc. A color value range is defined for each standard primary color in the specified color space.
[0084] S402, obtaining a target image to be displayed, determining a standard primary color corresponding to the color of any pixel in the target image, and determining a vector distance between the color value of the pixel and the color value of the center point of a color value range corresponding to the standard primary color.
[0085] In an embodiment of the present invention, the pixel points of the target image are traversed in sequence, and each time a pixel point is traversed, the color value of the pixel point is obtained, and the standard primary color corresponding to the color of the pixel point is determined; then the vector distance between the color value of the pixel point and the color value range corresponding to the standard primary color is determined, for example, the vector distance is determined based on the color value of the pixel point and the color value of the center point of the color value range.
[0086] S403: Adjust the color value of the pixel point according to the vector distance so that the error between the adjusted color value of the pixel point and the color value of the center point is less than a preset value.
[0087] Optionally, the pixel color value is linearly or nonlinearly adjusted according to the vector distance, so that the adjusted pixel color is close to the standard base color. Exemplarily, the color of the pixel is light green, and the standard base color is positive green. Thus, according to the determined vector distance, the light green color value of the pixel is brought closer to the positive green, so that the color error between the two is less than a preset value.
[0088] It can be understood that steps S401-S403 are actually to enhance the primary colors of the target image, which is a special process for the characteristic of low color depth display devices that the color display is not strong.
[0089] In the embodiment of the present invention, in addition to the above-mentioned base color enhancement, the edge enhancement of the target image can also be performed. Specifically, a high-pass filter (such as Laplace operator) can be used to extract the high-frequency component of the target image; the high-frequency component is combined with the target image to enhance the edge portion of the target image. In this way, the overall target image can be made clearer.
[0090] S404: Determine a target theme color of the target image.
[0091] S405: Determine an optimal image filter corresponding to the target image according to the target theme color.
[0092] The optimal image filter includes: brightness value, contrast value, saturation value, color temperature value and hue value.
[0093] S406: Determine the brightness of the target image, and adjust the brightness value in the optimal image filter according to the brightness of the target image.
[0094] In the embodiment of the present invention, before applying the optimal image filter to the target image, the brightness of the target image may be determined first. If the brightness of the target image exceeds a preset threshold, the brightness value in the optimal image filter is adjusted, for example, reduced, to avoid overexposure of the target image after applying the optimal image filter to the target image. In addition, if the brightness of the target image is too low, the brightness value in the optimal image filter may be increased.
[0095] S407: Apply the optimal image filter to the target image to obtain a filter effect image.
[0096] S408: Perform dithering processing on the filter effect image, and send the filter effect image after dithering processing to a low color depth display device for display.
[0097] In an embodiment of the present invention, before identifying the theme color of the target image, the base color of the target image can be enhanced to ensure the display effect of the image; and by adjusting the brightness value in the optimal image filter, overexposure when the target image is displayed can be avoided.
[0098] Embodiment 5
[0099] Figure 6 The present invention provides a schematic diagram of the structure of an image display enhancement device. This embodiment can be applied to scenes where the image display effect of a low color depth display device is enhanced, such as Figure 6 As shown, the device comprises:
[0100] The theme color recognition module 501 is used to obtain a target image to be displayed and determine a target theme color of the target image;
[0101] A filter selection module 502, used to determine the optimal image filter corresponding to the target image according to the target theme color;
[0102] A filter application module 503 is used to apply the optimal image filter to the target image to obtain a filter effect image;
[0103] The dithering and sending module 504 is used to perform dithering on the filter effect image, and send the filter effect image after dithering to a low color depth display device for display.
[0104] In some embodiments, the theme color identification module 501 includes:
[0105] The model recognition unit is used to determine the target theme color of the target image based on a pre-trained theme color recognition model.
[0106] In some embodiments, the theme color recognition model is a machine learning model or a deep learning model;
[0107] The model identification unit is also used for:
[0108] Based on a clustering algorithm, extracting a preset number of candidate theme colors from the target image;
[0109] Determine the color proportion of each candidate theme color in the target image;
[0110] Each candidate theme color and the color proportion corresponding to each candidate theme color are used as inputs of the theme color recognition model, and the target theme color is determined according to the output of the theme color recognition model.
[0111] In some embodiments, the theme color recognition model is a convolutional neural network model;
[0112] The model identification unit is also used for:
[0113] Adjusting the size of the target image to a fixed size;
[0114] The adjusted target image is input into the theme color recognition model, and the target theme color is determined according to the output of the theme color recognition model.
[0115] In some embodiments, the filter selection module 502 includes:
[0116] The filter selection unit is used to determine the optimal image filter corresponding to the target image according to the target theme color and a predetermined mapping relationship between the theme color and the image filter.
[0117] In some embodiments, it also includes:
[0118] A confidence acquisition module, used to acquire the confidence of the target theme color output by the theme color recognition model;
[0119] Accordingly, the filter selection unit is further used for:
[0120] In response to the confidence being greater than or equal to a preset confidence threshold, determining an optimal image filter corresponding to the target image according to a predetermined mapping relationship between the theme color and the image filter and a target theme color of the target image;
[0121] In response to the confidence being less than a preset confidence threshold, a predetermined default image filter is used as an optimal image filter corresponding to the target image.
[0122] In some embodiments, a mapping relationship determination module is further included, wherein the mapping relationship determination module is used to:
[0123] For a sample image set under any theme color, sample images are sequentially acquired from the sample image set, and each acquired sample image is processed using different image filters to obtain a plurality of filter effect images;
[0124] Sending the multiple filter effect images to a user terminal for display, so that the user can select an optimal filter effect image from the multiple filter effect images displayed by the user terminal, and vote for the image filter corresponding to the optimal filter effect image;
[0125] Under the theme color, the number of votes for each image filter is counted, and the image filter with the largest number of votes is used as the optimal image filter corresponding to the theme color.
[0126] In some embodiments, the apparatus further comprises a primary color enhancement module, wherein the primary color enhancement module is configured to:
[0127] Delimiting the color value range of the standard primary colors supported by the low color depth display device in a specified color space to obtain a color value range corresponding to each standard primary color;
[0128] For any pixel in the target image, determine the standard primary color corresponding to the color of the pixel, and determine the vector distance between the color value of the pixel and the color value of the center point of the color value range corresponding to the standard primary color;
[0129] According to the vector distance, the color value of the pixel is adjusted so that the error between the adjusted color value of the pixel and the color value of the center point is less than a preset value.
[0130] In some embodiments, the apparatus further comprises an edge enhancement module, wherein the edge enhancement module is configured to:
[0131] Extracting high-frequency components of the target image using a high-pass filter;
[0132] The high frequency component is combined with the target image to enhance an edge portion in the target image.
[0133] In some embodiments, the optimal image filter includes: a brightness value, a contrast value, a saturation value, a color temperature value, and a hue value;
[0134] Accordingly, the device further comprises:
[0135] The filter adjustment module is used to determine the brightness of the target image and adjust the brightness value in the optimal image filter according to the brightness of the target image.
[0136] In some embodiments, the low color depth display device is an electronic price tag configured with an electronic paper screen.
[0137] The image display enhancement device provided in the embodiment of the present invention can execute the image display enhancement method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0138] Embodiment 6
[0139] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0140] like Figure 7As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0141] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0142] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as executing an image display enhancement method.
[0143] In some embodiments, the image display enhancement method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the image display enhancement method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the image display enhancement method in any other appropriate manner (e.g., by means of firmware).
[0144] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0145] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable image display enhancement device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0146] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0147] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0149] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0151] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for enhancing image display, characterized in that: include: Acquire a target image to be displayed, and determine a target theme color of the target image and a confidence level of the target theme color based on a pre-trained theme color recognition model; In response to the confidence being greater than or equal to a preset confidence threshold, determining an optimal image filter corresponding to the target image according to a predetermined mapping relationship between the theme color and the image filter and a target theme color of the target image; In response to the confidence being less than a preset confidence threshold, using a predetermined default image filter as an optimal image filter corresponding to the target image; Applying the optimal image filter to the target image to obtain a filter effect image; The filter effect image is subjected to dithering processing, and the filter effect image after dithering processing is sent to a low color depth display device for display.
2. The method according to claim 1, characterized in that The theme color recognition model is a machine learning model or a deep learning model; The determining the target theme color of the target image based on the pre-trained theme color recognition model includes: Based on a clustering algorithm, extracting a preset number of candidate theme colors from the target image; Determine the color proportion of each candidate theme color in the target image; Each candidate theme color and the color proportion corresponding to each candidate theme color are used as inputs of the theme color recognition model, and the target theme color is determined according to the output of the theme color recognition model.
3. The method according to claim 1, characterized in that The theme color recognition model is a convolutional neural network model; The determining the target theme color of the target image based on the pre-trained theme color recognition model includes: Adjusting the size of the target image to a fixed size; The adjusted target image is input into the theme color recognition model, and the target theme color is determined according to the output of the theme color recognition model.
4. The method according to claim 1, characterized in that The process of determining the mapping relationship between the theme color and the image filter includes: For a sample image set under any theme color, sample images are sequentially acquired from the sample image set, and each acquired sample image is processed using different image filters to obtain a plurality of filter effect images; Sending the multiple filter effect images to a user terminal for display, so that the user can select an optimal filter effect image from the multiple filter effect images displayed by the user terminal, and vote for the image filter corresponding to the optimal filter effect image; Under the theme color, the number of votes for each image filter is counted, and the image filter with the largest number of votes is used as the optimal image filter corresponding to the theme color.
5. The method according to claim 1, characterized in that Before determining the target theme color of the target image, the method further includes: Delimiting the color value range of the standard primary colors supported by the low color depth display device in a specified color space to obtain a color value range corresponding to each standard primary color; For any pixel in the target image, determine the standard primary color corresponding to the color of the pixel, and determine the vector distance between the color value of the pixel and the color value of the center point of the color value range corresponding to the standard primary color; According to the vector distance, the color value of the pixel is adjusted so that the error between the adjusted color value of the pixel and the color value of the center point is less than a preset value.
6. The method according to claim 1, characterized in that Before determining the target theme color of the target image, the method further includes: Extracting high-frequency components of the target image using a high-pass filter; The high frequency component is combined with the target image to enhance an edge portion in the target image.
7. The method according to claim 1, characterized in that The optimal image filter includes: brightness value, contrast value, saturation value, color temperature value and hue value; Accordingly, before applying the optimal image filter to the target image, the method further includes: The brightness of the target image is determined, and the brightness value in the optimal image filter is adjusted according to the brightness of the target image.
8. The method according to claim 1, characterized in that The low color depth display device is an electronic price tag equipped with an electronic paper screen.
9. An image display enhancement device, characterized in that: include: A theme color recognition module is used to obtain a target image to be displayed and determine a target theme color of the target image; A filter selection module, used to determine the optimal image filter corresponding to the target image according to the target theme color; A filter application module, used for applying the optimal image filter to the target image to obtain a filter effect image; A dithering and sending module, used for performing dithering on the filter effect image, and sending the filter effect image after dithering to a low color depth display device for display; The theme color recognition module includes: A model recognition unit, used to determine a target theme color of the target image based on a pre-trained theme color recognition model; The device further includes: a confidence acquisition module, configured to acquire the confidence of the target theme color output by the theme color recognition model; The filter selection module includes: A filter selection unit is used to determine, in response to the confidence being greater than or equal to a preset confidence threshold, the optimal image filter corresponding to the target image based on a predetermined mapping relationship between theme colors and image filters and a target theme color of the target image; in response to the confidence being less than the preset confidence threshold, a predetermined default image filter is used as the optimal image filter corresponding to the target image.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 8 when executed.
Citation Information
Patent Citations
Image processing method and device, computer equipment and storage medium
CN113538601A