Method, apparatus, storage medium, and terminal device for enhancing visual effect of an image

By filtering and adjusting images that affect visual effects in PPT, using pre-trained target recognition model and simple algorithms, the problem of poor visual effects when users watch PPT from a distance is solved, and the image display effect is improved without increasing costs.

CN114092452BActive Publication Date: 2025-06-10SHENZHEN HUASHENG SOFTWARE TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111412614.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-06-10
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

In the conference scene, when the user watches PPT from a distance, the visual effect is confused due to the proximity of the colors between different patterns, which affects the user's viewing effect. Existing solutions rely on better performance chips or manual tuning, which are costly or poorly practical.

Method used

By filtering out images that affect the user's visual effects in PPT, and adjusting these images using pre-trained target recognition models and simple algorithms, the contrast and visual effects of the images are improved.

Benefits of technology

Without increasing costs, the display effect of images in the conference scene is targeted and the user's long-distance viewing experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092452B_ABST
    Figure CN114092452B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method, an apparatus, a storage medium, and a terminal device for enhancing the visual effect of an image. The method includes: obtaining an image to be processed; inputting the image to be processed into a pre-trained target recognition model for target recognition operations, and outputting a recognition result; judging whether there is an area to be adjusted in the image to be processed according to the recognition result; when it is judged that there is an area to be adjusted in the image to be processed, performing an image enhancement operation on the area to be adjusted according to a preset adjustment strategy corresponding to the area to be adjusted to obtain a target image. By screening out images that significantly affect the visual effect of users in a PPT composed of multiple images and using a simple algorithm to adjust the screened images, the embodiment of the present application realizes targeted improvement of the display effect of images in a meeting scenario without increasing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic communication technologies, and in particular, to a technology for enhancing the visual effect of images, and particularly to a method, device, storage medium, and terminal device for enhancing the visual effect of images. Background Art

[0002] In a meeting scenario, it is often necessary to use a display device to present a PPT. In order to make the presentation effect of the PPT better, designers often use some transitional colors. Although adding transitional colors can make the viewing effect better when users view it closely, when users view the PPT from a distance, due to the close colors between different patterns, it will cause a visual effect of different patterns mixing, affecting the viewing effect of users. Analyzing from a technical level, the reason why adding transitional colors affects the long-distance viewing effect is mainly that the visual effect of an image is affected by the contrast of the image. The greater the contrast of the image, the clearer the image will be, and the more vivid the colors will be. The smaller the contrast of the image, the grayer the picture will appear, and the visual effect will be poor. To solve the above problems, most of the current traditional solutions are to use a chip with better performance to improve the overall image quality, such as using black level extension, edge correction, or local dimming, etc., to improve the visual effect of the image. Although this solution can optimize and improve the long-distance viewing effect of users on the image, it also has relatively high requirements for the performance and cost of the chip. Summary of the Invention

[0003] Embodiments of this application provide a method, device, storage medium, and terminal device for enhancing the visual effect of images. By screening out the images that significantly affect the visual effect of users in a PPT composed of multiple images, and using a simple algorithm to adjust the screened images, it is possible to specifically improve the display effect of the images in a meeting scenario without increasing costs.

[0004] One aspect of the embodiments of this application provides a method for enhancing the visual effect of images, including:

[0005] Obtain an image to be processed, input the image to be processed into a pre-trained target recognition model for target recognition operations, and output a recognition result;

[0006] Judge whether there is an area to be adjusted in the image to be processed according to the recognition result;

[0007] When it is judged that there is an area to be adjusted in the image to be processed, perform an image enhancement operation on the area to be adjusted according to a preset adjustment strategy corresponding to the area to be adjusted to obtain a target image.

[0008] In the method for enhancing the visual effect of an image according to an embodiment of the present application, before obtaining the image to be processed, the method further includes:

[0009] Obtain an original image and determine the display attribute of the original image;

[0010] If the display attribute is dynamic display, obtain the image frame sequence of the original image, and use each image frame in the image frame sequence as the image to be processed.

[0011] In the method for enhancing the visual effect of an image according to an embodiment of the present application, after determining the display attribute of the original image, the method further includes:

[0012] If the display attribute is static display, use the original image as the image to be processed.

[0013] In the method for enhancing the visual effect of an image according to an embodiment of the present application, before inputting the image to be processed into a pre-trained target recognition model for target recognition operation, the method further includes:

[0014] Obtain training samples of the target recognition model to be trained, where the training samples include images set with preset labels, and the preset labels are used to indicate the categories of the regions to be adjusted in the images;

[0015] Extract features of the images in the training samples through the target recognition model to be trained, and obtain image feature vectors corresponding to the images;

[0016] Through the target recognition model to be trained, identify the categories and attributes of the regions to be adjusted included in the images in the training samples based on the image feature vectors, and obtain the recognition results of the images;

[0017] Based on the recognition results and the preset labels of the images, adjust the parameters of the target recognition model to be trained to obtain the pre-trained target recognition model.

[0018] In the method for enhancing the visual effect of an image according to an embodiment of the present application, the step of judging whether there is a region to be adjusted in the image to be processed according to the recognition result includes:

[0019] Judge whether there is a preset identifier in the image to be processed according to the recognition result, where the preset identifier is used to indicate whether there is a region to be adjusted in the image to be processed, and the preset identifier includes the category and attributes of the region to be adjusted.

[0020] In the method for enhancing the visual effect of an image according to an embodiment of the present application, when the category of the area to be adjusted is a pattern and its corresponding attribute is color, the image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted includes:

[0021] Obtain the foreground pattern and the background pattern in the image to be processed;

[0022] Extract the chromaticity values of the foreground pattern and the background pattern respectively;

[0023] Determine whether the difference between the chromaticity values of the foreground image and the background pattern is less than or equal to a first preset threshold;

[0024] When it is determined that the difference between the chromaticity values is less than or equal to the first preset threshold, adjust the chromaticity values of the foreground pattern and the background pattern based on the preset adjustment strategy.

[0025] In the method for enhancing the visual effect of an image according to an embodiment of the present application, when the category of the area to be adjusted is a character and its corresponding attribute is font size, the image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted includes:

[0026] Determine whether the font size of the character is less than or equal to a second preset threshold;

[0027] When it is determined that the font size is less than or equal to the second preset threshold, adjust the font size of the character based on the preset adjustment strategy.

[0028] Correspondingly, another aspect of the embodiment of the present application further provides an apparatus for enhancing the visual effect of an image, including:

[0029] A target recognition module, configured to obtain an image to be processed, input the image to be processed into a pre-trained target recognition model for target recognition operations, and output a recognition result;

[0030] An image judgment module, configured to determine whether there is an area to be adjusted in the image to be processed according to the recognition result;

[0031] An image enhancement module, configured to, when it is determined that there is an area to be adjusted in the image to be processed, perform an image enhancement operation on the area to be adjusted according to a preset adjustment strategy corresponding to the area to be adjusted to obtain a target image.

[0032] Correspondingly, another aspect of the embodiment of the present application further provides a storage medium, which stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method for enhancing the visual effect of an image as described above.

[0033] Correspondingly, another aspect of the embodiments of the present application further provides a terminal device, including a processor and a memory. The memory stores multiple instructions, and the processor loads the instructions to execute the method for enhancing the visual effect of an image as described above.

[0034] The embodiments of the present application provide a method, device, storage medium, and terminal device for enhancing the visual effect of an image. The method includes obtaining an image to be processed; inputting the image to be processed into a pre-trained target recognition model for target recognition operations to output a recognition result; determining whether there is an area to be adjusted in the image to be processed according to the recognition result; and when it is determined that there is an area to be adjusted in the image to be processed, performing an image enhancement operation on the area to be adjusted according to a preset adjustment strategy corresponding to the area to be adjusted to obtain a target image. The embodiments of the present application screen out images that significantly affect the user's visual effect from a PPT composed of multiple images, and use a simple algorithm to adjust the screened images, thereby achieving targeted improvement of the display effect of images in a meeting scenario without increasing costs. Description of the Drawings

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0036] Figure 1 It is a flowchart of the method for enhancing the visual effect of an image provided by the embodiments of the present application.

[0037] Figure 2 It is a schematic structural diagram of the device for enhancing the visual effect of an image provided by the embodiments of the present application.

[0038] Figure 3 It is another schematic structural diagram of the device for enhancing the visual effect of an image provided by the embodiments of the present application.

[0039] Figure 4 It is a schematic structural diagram of the terminal device provided by the embodiments of the present application. Detailed Embodiments

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.

[0041] An embodiment of the present application provides a method for enhancing the visual effect of an image. The method for enhancing the visual effect of an image can be applied to a terminal device. The terminal device can be a device such as a smart phone or a computer.

[0042] In some scenarios, such as a meeting scenario, it is often necessary to use a display device to present a PPT. In order to make the presentation effect of the PPT better, designers often use some transitional colors. Although adding transitional colors can make the viewing effect better when the user views it up close, when the user views the PPT from a distance, due to the close colors between different patterns, it will cause a visual effect of different patterns mixing, affecting the user's viewing effect. Analyzing from a technical level, the reason why adding transitional colors affects the viewing effect from a distance is mainly that the visual effect of an image is affected by the contrast of the image. The greater the contrast of the image, the clearer the image will be, and the more vivid the colors will be. The smaller the contrast of the image, the grayer the picture will appear, and the visual effect is poor. To solve the above problems, most of the current traditional solutions are to use a chip with better performance to improve the overall image quality, such as using black level extension, edge correction, or local dimming, etc., to improve the visual effect of the image. Although this solution can optimize and improve the user's viewing effect of the image from a distance, it also has high requirements for the performance and cost of the chip.

[0043] In addition to replacing the chip with better performance to improve the image display effect, the display effect of the PPT can also be adjusted manually. However, this method not only requires the staff to have certain image processing capabilities, but also consumes a lot of working time and energy of the staff, and its practicability is not strong.

[0044] To solve the above technical problems, an embodiment of the present application provides a method for enhancing the visual effect of an image. By using the method for enhancing the visual effect of an image provided by the embodiment of the present application, by calculating the scaling ratio of the reference object and performing scaling processing on the first image according to the obtained scaling ratio, after obtaining the second image with a unified standard ratio, then using the pre-trained weight recognition model to perform weight parameter recognition on the second image, it can avoid the staff from frequently contacting livestock directly, and the process of obtaining weight parameters is simple and has high accuracy.

[0045] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of the method for enhancing the visual effect of an image provided by the embodiment of the present application. The method for enhancing the visual effect of an image is applied to a terminal device, and the method may include the following steps:

[0046] Step 101, obtain an image to be processed, input the image to be processed into a pre-trained target recognition model for target recognition operation, and output a recognition result.

[0047] In some scenarios, such as meeting scenarios, it is often necessary to display PPTs with the help of display devices. In order to make the display effect of PPTs better, designers often use some transitional colors. Although adding transitional colors can make the viewing effect better when users view it up close, when users view the PPT from a distance, the colors between different patterns are close, resulting in a visual effect of different patterns being mixed, which affects the viewing effect of users. Analyzing from a technical level, the reason why adding transitional colors affects the long-distance viewing effect is mainly that the visual effect of an image is affected by the image contrast. The greater the image contrast, the clearer the image will be, and the more vivid the colors will be. The smaller the image contrast, the grayer the picture will appear, and the visual effect is poor. To solve the above problems, most of the current traditional solutions are to use chips with better performance to improve the overall picture quality of the image, such as using black level extension, edge correction, or local dimming, etc., to improve the visual effect of the image. Although this solution can optimize and improve the long-distance viewing effect of the image by users, it also has relatively high requirements for the performance and cost of the chip.

[0048] In addition to replacing the chip with better performance to improve the image display effect, the display effect of the PPT can also be adjusted manually. However, this method not only requires the staff to have certain image processing capabilities, but also consumes a large amount of working time and energy of the staff, and its practicability is not strong.

[0049] In order to reduce the cost of the chip or reduce the labor cost, the focus of this solution is not to completely rely on the image processing ability of the chip itself, nor to rely on manual adjustment by the staff. Instead, it changes the thinking, screens out the images that obviously affect the visual effect of users in the PPT composed of multiple images, and uses a simple algorithm to adjust the selected images, so as to achieve the targeted improvement of the image display effect in the meeting scenario without increasing the cost.

[0050] Specifically, by obtaining the image to be processed, inputting the image to be processed into a pre-trained target recognition model for target recognition operation, outputting the recognition result, and determining the image that needs to be adjusted according to the recognition result.

[0051] It should be explained that the target recognition model can be trained based on models such as CNN.

[0052] The specific training process of the target recognition model includes:

[0053] Obtain the training samples of the target recognition model to be trained. The training samples include images with preset labels, and the preset labels are used to indicate the category of the area to be adjusted in the image;

[0054] Extract the feature of the image in the training sample through the target recognition model to be trained, and obtain the image feature vector corresponding to the image;

[0055] Through the target recognition model to be trained, identify the category and attributes of the area to be adjusted included in the image in the training sample based on the image feature vector, and obtain the recognition result of the image;

[0056] Based on the recognition result and the preset label of the image, adjust the parameters of the target recognition model to be trained to obtain the pre-trained target recognition model.

[0057] It should be noted that the method for enhancing the visual effect of the image provided in this solution can be applied to both static display scenarios and dynamic display scenarios. For different display scenarios, the corresponding processing methods are different. Therefore, before obtaining the image to be processed, it is necessary to identify the display scenario.

[0058] In some embodiments, before obtaining the image to be processed, the method further includes: obtaining the original image, and determining the display attribute of the original image; if the display attribute is dynamic display, obtain the image frame sequence of the original image, and use each image frame in the image frame sequence as the image to be processed. When the display attribute of the original image is determined to be dynamic display, each image frame in the image frame sequence constituting the original image is used as the image to be processed, and after the image enhancement operation is completed for each image frame, a dynamic image is re-synthesized and displayed in the original sorting order.

[0059] In some embodiments, after determining the display attribute of the original image, the method further includes: if the display attribute is static display, use the original image as the image to be processed. When the display attribute of the original image is static display, the original image is directly used as the image to be processed for subsequent operation steps.

[0060] Step 102, determine whether there is an area to be adjusted in the image to be processed according to the recognition result.

[0061] In order to reduce the cost of the chip or labor cost, the focus of this solution is not to rely entirely on the image processing ability of the chip itself, nor on manual adjustment by staff. Instead, the idea is changed to screen out the images that significantly affect the user's visual effect in the PPT composed of multiple images, without the need to perform image enhancement operations on all images to be processed, so as to achieve targeted improvement of the display effect of images in the meeting scenario without increasing costs. In this embodiment, it is possible to determine whether there is a preset identifier in the image to be processed based on the obtained recognition result, where the preset identifier is used to indicate whether there is an area to be adjusted in the image to be processed, and the preset identifier includes the category and attributes of the area to be adjusted.

[0062] It should be explained that the category refers to the category of the constituent elements in an image, such as patterns or characters, etc. The attribute refers to the key factors affecting the visualization effect in this solution, such as the chromaticity value of a pattern, the font size of a character, etc.

[0063] Step 103, when it is determined that there is an area to be adjusted in the image to be processed, perform an image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted to obtain a target image.

[0064] In this embodiment, when the category of the area to be adjusted is a pattern and its corresponding attribute is color, the performing an image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted specifically includes: obtaining the foreground pattern and the background pattern in the image to be processed; respectively extracting the chromaticity values of the foreground pattern and the background pattern; determining whether the difference between the chromaticity values of the foreground image and the background pattern is less than or equal to a first preset threshold; when it is determined that the difference in chromaticity values is less than or equal to the first preset threshold, adjusting the chromaticity values of the foreground pattern and the background pattern based on the preset adjustment strategy. By determining whether the colors between the foreground pattern and the background pattern in the image to be processed are too close, it is further determined whether it is necessary to make corresponding adjustments to the chromaticity values of the foreground pattern and the background pattern to prevent the user from having difficulty distinguishing due to the color contact between the foreground pattern and the background pattern. The specific adjustment strategy can be preset according to the actual situation. For example, when it is determined that the difference in chromaticity values between the foreground pattern and the background pattern is less than or equal to 2, it can be determined that the colors between them are too close, and a chromaticity compensation value can be given to one of the foreground pattern or the background pattern, and at the same time, the size of the compensation value should be controlled to avoid the color difference from being too large compared with the original, affecting the aesthetics.

[0065] In another embodiment, when the category of the area to be adjusted is a character and the corresponding attribute is the font size, the image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted specifically includes: determining whether the font size of the character is less than or equal to a second preset threshold; when it is determined that the font size is less than or equal to the second preset threshold, adjusting the font size of the character based on the preset adjustment strategy. The specific operation of this solution is similar to the above method for the category of pattern and will not be elaborated here. The difference is that in this embodiment, the visualization effect is improved by adjusting the thickness or color depth of the character.

[0066] All of the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated one by one here.

[0067] During specific implementation, the present application is not limited by the execution order of the described steps. Without conflict, some steps can also be performed in other orders or simultaneously.

[0068] As can be seen from the above, the method for enhancing the visual effect of an image provided by the embodiment of the present application obtains a to-be-processed image, inputs the to-be-processed image into a pre-trained target recognition model for target recognition operation, and outputs a recognition result; determines whether there is an area to be adjusted in the to-be-processed image according to the recognition result; when it is determined that there is an area to be adjusted in the to-be-processed image, performs an image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted to obtain a target image. The embodiment of the present application screens out images that significantly affect the user's visual effect in a PPT composed of multiple images, and uses a simple algorithm to adjust the screened images, thereby achieving targeted improvement of the display effect of images in a meeting scenario without increasing costs.

[0069] The embodiment of the present application further provides a device for enhancing the visual effect of an image. The device for enhancing the visual effect of an image can be integrated in a terminal device. The terminal device can be a television, a smart phone, a tablet computer, or the like.

[0070] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of the device for enhancing the visual effect of an image provided by the embodiment of the present application. The device 30 for enhancing the visual effect of an image can include:

[0071] A target recognition module 31, configured to obtain a to-be-processed image, input the to-be-processed image into a pre-trained target recognition model for target recognition operation, and output a recognition result;

[0072] An image judgment module 32, configured to determine whether there is an area to be adjusted in the to-be-processed image according to the recognition result;

[0073] An image enhancement module 33, configured to perform an image enhancement operation on a to-be-adjusted area in the to-be-processed image according to a preset adjustment strategy corresponding to the to-be-adjusted area to obtain a target image when it is determined that the to-be-adjusted area exists in the to-be-processed image.

[0074] In some embodiments, the apparatus further includes a first determination module, configured to obtain an original image and determine a display attribute of the original image; if the display attribute is dynamic display, obtain an image frame sequence of the original image, and use each image frame in the image frame sequence as the to-be-processed image.

[0075] In some embodiments, the apparatus further includes a second determination module, configured to use the original image as the to-be-processed image if the display attribute is static display.

[0076] In some embodiments, the apparatus further includes a pre-training module, configured to obtain training samples of a target recognition model to be trained, where the training samples include images set with preset labels, and the preset labels are used to indicate the categories of to-be-adjusted areas in the images; extract image feature vectors corresponding to the images in the training samples through the target recognition model to be trained; identify the categories and attributes of the to-be-adjusted areas included in the images in the training samples through the target recognition model to be trained based on the image feature vectors to obtain recognition results of the images; and adjust parameters of the target recognition model to be trained based on the recognition results and the preset labels of the images to obtain the pre-trained target recognition model.

[0077] In some embodiments, the image judgment module 32 is configured to judge whether a preset identifier exists in the to-be-processed image according to the recognition result, where the preset identifier is used to indicate whether the to-be-adjusted area exists in the to-be-processed image, and the preset identifier includes the category and attributes of the to-be-adjusted area.

[0078] In some embodiments, the image enhancement module 33 is configured to obtain a foreground pattern and a background pattern in the to-be-processed image; respectively extract chromaticity values of the foreground pattern and the background pattern; judge whether a difference between the chromaticity values of the foreground image and the background pattern is less than or equal to a first preset threshold; and when it is judged that the difference between the chromaticity values is less than or equal to the first preset threshold, adjust the chromaticity values of the foreground pattern and the background pattern based on the preset adjustment strategy.

[0079] In some embodiments, the image enhancement module 33 is configured to judge whether a font size of a character is less than or equal to a second preset threshold; and when it is judged that the font size is less than or equal to the second preset threshold, adjust the font size of the character based on the preset adjustment strategy.

[0080] In specific implementation, each of the above modules can be implemented as an independent entity, or can be arbitrarily combined and implemented as the same or several entities.

[0081] As can be seen from the above, the device 30 for enhancing the visual effect of an image provided by the embodiment of the present application obtains the image to be processed through the target recognition module 31, inputs the image to be processed into a pre-trained target recognition model for target recognition operations, and outputs the recognition result; the image judgment module 32 judges whether there is an area to be adjusted in the image to be processed according to the recognition result; when it is judged that there is an area to be adjusted in the image to be processed, the image enhancement module 33 performs an image enhancement operation on the area to be adjusted according to a preset adjustment strategy corresponding to the area to be adjusted to obtain a target image.

[0082] Please refer to Figure 3 , Figure 3 which is another structural schematic diagram of the device for enhancing the visual effect of an image provided by the embodiment of the present application. The device 30 for enhancing the visual effect of an image includes a memory 120, one or more processors 180, and one or more application programs, wherein the one or more application programs are stored in the memory 120 and are configured to be executed by the processor 180; the processor 180 may include a target recognition module 31, an image judgment module 32, and an image enhancement module 33. For example, the structures and connection relationships of the above components can be as follows:

[0083] The memory 120 can be used to store application programs and data. The application programs stored in the memory 120 contain executable codes. The application programs can form various functional modules. The processor 180 executes various functional applications and data processing by running the application programs stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 120 may further include a memory controller to provide the processor 180 with access to the memory 120.

[0084] The processor 180 is the control center of the device, connects various parts of the entire terminal using various interfaces and lines, executes various functions of the device and processes data by running or executing the application programs stored in the memory 120 and calling the data stored in the memory 120, thereby performing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modulation and demodulation processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc.

[0085] Specifically, in this embodiment, the processor 180 will load the executable code corresponding to the processes of one or more application programs into the memory 120 according to the following instructions, and the processor 180 will run the application programs stored in the memory 120 to implement various functions:

[0086] A target recognition module 31, configured to obtain an image to be processed, input the image to be processed into a pre-trained target recognition model for target recognition operations, and output a recognition result;

[0087] An image judgment module 32, configured to judge whether there is a region to be adjusted in the image to be processed according to the recognition result;

[0088] An image enhancement module 33, configured to, when it is judged that there is a region to be adjusted in the image to be processed, perform an image enhancement operation on the region to be adjusted according to a preset adjustment strategy corresponding to the region to be adjusted to obtain a target image.

[0089] In some embodiments, the apparatus further includes a first determination module, configured to obtain an original image and determine the display attribute of the original image; if the display attribute is dynamic display, obtain the image frame sequence of the original image, and use each image frame in the image frame sequence as the image to be processed.

[0090] In some embodiments, the apparatus further includes a second determination module, configured to, if the display attribute is static display, use the original image as the image to be processed.

[0091] In some embodiments, the apparatus further includes a pre-training module, configured to obtain training samples of a target recognition model to be trained, where the training samples include images set with preset labels, and the preset labels are used to indicate the categories of regions to be adjusted in the images; perform feature extraction on the images in the training samples through the target recognition model to be trained to obtain image feature vectors corresponding to the images; through the target recognition model to be trained, identify the categories and attributes of the regions to be adjusted included in the images in the training samples based on the image feature vectors to obtain the recognition results of the images; and adjust the parameters of the target recognition model to be trained based on the recognition results and the preset labels of the images to obtain the pre-trained target recognition model.

[0092] In some embodiments, the image judgment module 32 is configured to judge whether there is a preset identifier in the image to be processed according to the recognition result, where the preset identifier is used to indicate whether there is the region to be adjusted in the image to be processed, and the preset identifier includes the category and attributes of the region to be adjusted.

[0093] In some embodiments, the image enhancement module 33 is configured to obtain the foreground pattern and the background pattern in the image to be processed; extract the chromaticity values of the foreground pattern and the background pattern respectively; determine whether the difference between the chromaticity values of the foreground image and the background pattern is less than or equal to a first preset threshold; and when it is determined that the difference between the chromaticity values is less than or equal to the first preset threshold, adjust the chromaticity values of the foreground pattern and the background pattern based on the preset adjustment strategy.

[0094] In some embodiments, the image enhancement module 33 is configured to determine whether the font size of the character is less than or equal to a second preset threshold; and when it is determined that the font size is less than or equal to the second preset threshold, adjust the font size of the character based on the preset adjustment strategy.

[0095] An embodiment of the present application further provides a terminal device. The terminal device may be a device such as a smart phone, a computer, a tablet computer, etc.

[0096] Please refer to Figure 4 , Figure 4 which shows a schematic structural diagram of the terminal device provided by the embodiment of the present application. The terminal device can be used to implement the method for enhancing the visual effect of the image provided in the above embodiment. The terminal device 1200 may be a television, a smart phone or a tablet computer.

[0097] As Figure 4 shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190 and other components. Those skilled in the art can understand that Figure 4 the structure of the terminal device 1200 shown in

[0098] does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components. Among them:

[0099] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method for enhancing the visual effect of images in the above embodiments. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. It can automatically select a vibration reminder mode according to the current scene where the terminal device is located to enhance the visual effect of images. This can not only ensure that there is no interference in scenarios such as meetings, but also ensure that the user can perceive incoming calls, improving the intelligence of the terminal device. The memory 120 may include a high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 120 may further include a memory remotely set relative to the processor 180, and these remote memories can be connected to the terminal device 1200 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.

[0100] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touchpad, can collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch-sensitive surface 131), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 180, and can receive commands sent by the processor 180 and execute them. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch-sensitive surface 131. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power-on keys, etc.), trackballs, mice, joysticks, etc.

[0101] The display unit 140 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the terminal device 1200. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 can cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 4 the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to perform input and output functions, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to implement input and output functions.

[0102] The terminal device 1200 may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light. The proximity sensor can turn off the display panel 141 and / or the backlight when the terminal device 1200 is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the terminal device 1200 can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.

[0103] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 1200. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, and the speaker 161 converts it into a sound signal for output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and then converted into audio data. After the audio data is output to the processor 180 for processing, it is sent to another terminal, for example, via the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earphone jack to provide communication between the peripheral earphone and the terminal device 1200.

[0104] The terminal device 1200 can help users send and receive emails, browse the web, access streaming media, etc. through a transmission module 170 (such as a Wi-Fi module), providing users with wireless broadband Internet access. Although Figure 4 the transmission module 170 is shown, it can be understood that it does not belong to the essential components of the terminal device 1200 and can be completely omitted within the scope of not changing the essence of the invention according to needs.

[0105] The processor 180 is the control center of the terminal device 1200, connecting various parts of the entire mobile phone through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the terminal device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 180 either.

[0106] The terminal device 1200 further includes a power supply 190 for supplying power to each component. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, thereby realizing functions such as discharging management and power consumption management through the power management system. The power supply 190 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0107] Although not shown, the terminal device 1200 may further include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 further includes a memory 120, and one or more programs, where one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. The one or more programs include instructions for performing the following operations:

[0108] A target recognition instruction, for obtaining an image to be processed, inputting the image to be processed into a pre-trained target recognition model for target recognition operations, and outputting a recognition result;

[0109] An image judgment instruction, for judging whether there is a region to be adjusted in the image to be processed according to the recognition result;

[0110] An image enhancement instruction, which is used to perform an image enhancement operation on a to-be-adjusted area in the to-be-processed image according to a preset adjustment strategy corresponding to the to-be-adjusted area to obtain a target image when it is determined that there is a to-be-adjusted area in the to-be-processed image.

[0111] In some embodiments, the program further includes a first determination instruction, which is used to obtain an original image and determine the display attribute of the original image; if the display attribute is dynamic display, obtain the image frame sequence of the original image, and use each image frame in the image frame sequence as the to-be-processed image.

[0112] In some embodiments, the program further includes a second determination instruction, which is used to use the original image as the to-be-processed image if the display attribute is static display.

[0113] In some embodiments, the program further includes a pre-training instruction, which is used to obtain training samples of a to-be-trained target recognition model, the training samples include images set with preset labels, and the preset labels are used to indicate the categories of to-be-adjusted areas in the images; perform feature extraction on the images in the training samples through the to-be-trained target recognition model to obtain image feature vectors corresponding to the images; through the to-be-trained target recognition model, identify the categories and attributes of the to-be-adjusted areas included in the images in the training samples based on the image feature vectors to obtain the recognition results of the images; based on the recognition results and the preset labels of the images, adjust the parameters of the to-be-trained target recognition model to obtain the pre-trained target recognition model.

[0114] In some embodiments, the image judgment instruction is used to judge whether there is a preset identifier in the to-be-processed image according to the recognition result, the preset identifier is used to indicate whether there is the to-be-adjusted area in the to-be-processed image, and the preset identifier includes the category and attributes of the to-be-adjusted area.

[0115] In some embodiments, the image enhancement instruction is used to obtain the foreground pattern and background pattern in the to-be-processed image; respectively extract the chromaticity values of the foreground pattern and the background pattern; judge whether the difference between the chromaticity values of the foreground image and the background pattern is less than or equal to a first preset threshold; when it is judged that the difference between the chromaticity values is less than or equal to the first preset threshold, adjust the chromaticity values of the foreground pattern and the background pattern based on the preset adjustment strategy.

[0116] In some embodiments, the image enhancement instruction is used to judge whether the font size of the character is less than or equal to a second preset threshold; when it is judged that the font size is less than or equal to the second preset threshold, adjust the font size of the character based on the preset adjustment strategy.

[0117] The embodiments of the present application also provide a terminal device. The terminal device may be a device such as a smart phone or a computer.

[0118] As can be seen from the above, the embodiments of the present application provide a terminal device 1200, and the terminal device 1200 performs the following steps:

[0119] The embodiments of the present application also provide a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the method for enhancing the visual effect of an image described in any of the above embodiments.

[0120] It should be noted that for the method for enhancing the visual effect of an image according to the present application, those of ordinary skill in the art can understand that all or part of the process of implementing the method for enhancing the visual effect of an image described in the embodiments of the present application can be completed by controlling related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, such as stored in the memory of the terminal device and executed by at least one processor in the terminal device. During the execution process, it may include the process of the embodiments of the method for enhancing the visual effect of an image. Among them, the storage medium may be a magnetic disk, an optical disc, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.

[0121] For the device for enhancing the visual effect of an image according to the embodiments of the present application, its various functional modules may be integrated in a processing chip, or each module may exist physically alone, or two or more modules may be integrated in one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disc.

[0122] The above has introduced in detail the method, device, storage medium, and terminal device for enhancing the visual effect of an image provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A method for enhancing the visual effect of an image, characterized in that, it includes: Obtain the image to be processed, input the image to be processed into a pre-trained target recognition model for target recognition operation, and output the recognition result; Judge whether there is an area to be adjusted in the image to be processed according to the recognition result; When it is judged that there is an area to be adjusted in the image to be processed, perform an image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted to obtain the target image; The judging whether there is an area to be adjusted in the image to be processed according to the recognition result includes: Judge whether there is a preset label in the image to be processed according to the recognition result, and the preset label is used to indicate whether there is the area to be adjusted in the image to be processed. The preset label includes the category and attributes of the area to be adjusted; the category refers to the category of the constituent elements in the image, and the attribute refers to the factor affecting the visual effect of the image. The category includes patterns or characters, and the attribute includes the chromaticity value of the image or the font size of the character.

2. The method for enhancing the visual effect of an image according to claim 1, characterized in that, Before obtaining the image to be processed, the method further includes: Obtain the original image and determine the display attribute of the original image; If the display attribute is dynamic display, obtain the image frame sequence of the original image, and use each image frame in the image frame sequence as the image to be processed.

3. The method for enhancing the visual effect of an image according to claim 2, characterized in that, After determining the display attribute of the original image, the method further includes: If the display attribute is static display, use the original image as the image to be processed.

4. The method for enhancing the visual effect of an image according to claim 1, characterized in that, Before inputting the image to be processed into a pre-trained target recognition model for target recognition operation, the method further includes: Obtain the training samples of the target recognition model to be trained, and the training samples include images set with preset labels, and the preset labels are used to indicate the category of the area to be adjusted in the images; Extract the image feature vectors corresponding to the images in the training samples through the target recognition model to be trained; Through the target recognition model to be trained, identify the category and attributes of the area to be adjusted included in the images in the training samples based on the image feature vectors to obtain the recognition results of the images; Based on the recognition results and the preset labels of the images, adjust the parameters of the target recognition model to be trained to obtain the pre-trained target recognition model.

5. The method for enhancing the visual effect of an image according to claim 1, characterized in that, When the category of the area to be adjusted is a pattern and its corresponding attribute is color, the performing an image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted includes: Obtain the foreground pattern and background pattern in the image to be processed; Extract the chromaticity values of the foreground pattern and the background pattern respectively; Determine whether the difference in chromaticity values between the foreground pattern and the background pattern is less than or equal to a first preset threshold; When it is determined that the difference in chromaticity values is less than or equal to the first preset threshold, adjust the chromaticity values of the foreground pattern and the background pattern based on the preset adjustment strategy.

6. The method for enhancing the visual effect of an image according to claim 1, wherein, when the category of the area to be adjusted is a character and its corresponding attribute is font size, the image enhancement operation on the area to be adjusted according to the preset adjustment strategy corresponding to the area to be adjusted includes: Determine whether the font size of the character is less than or equal to a second preset threshold; When it is determined that the font size is less than or equal to the second preset threshold, adjust the font size of the character based on the preset adjustment strategy.

7. An apparatus for enhancing the visual effect of an image, wherein, comprising: A target recognition module, configured to obtain a to-be-processed image, input the to-be-processed image into a pre-trained target recognition model for target recognition operations, and output a recognition result; An image judgment module, configured to judge whether there is an area to be adjusted in the to-be-processed image according to the recognition result; An image enhancement module, configured to, when it is judged that there is an area to be adjusted in the to-be-processed image, perform an image enhancement operation on the area to be adjusted according to a preset adjustment strategy corresponding to the area to be adjusted to obtain a target image; The image judgment module is used for: Judging whether there is a preset label in the to-be-processed image according to the recognition result, where the preset label is used to indicate whether there is the area to be adjusted in the to-be-processed image, and the preset label includes the category and attribute of the area to be adjusted; the category refers to the category of the constituent elements in the image, the attribute refers to the factor affecting the visual effect of the image, the category includes a pattern or a character, and the attribute includes the chromaticity value of the image or the font size of the character.

8. A computer-readable storage medium, wherein, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method for enhancing the visual effect of an image according to any one of claims 1 to 6.

9. A terminal device, wherein, Comprising a processor and a memory, the memory stores multiple instructions, and the processor loads the instructions to execute the method for enhancing the visual effect of an image according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Display method and device for image data and device for image data display

    CN107562877A

  • Picture display method and electronic equipment

    CN111523286A

  • Portrait-based image repairing method and device, electronic equipment and storage medium

    CN112330573A

  • Image processing method and apparatus, computer readable storage medium, and computer device

    WO2019233341A1