Image processing method and device, electronic equipment and storage medium
By adjusting the color attributes of food videos or images to reduce their visual appeal, the problem of food content stimulating users' appetite on electronic devices is solved, and support for weight loss and healthy diet is achieved.
Patent Information
- Application Number
- CN202411319753.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-10
AI Technical Summary
Food videos or images may stimulate users' appetite when displayed on electronic devices and affect the progress of weight loss or healthy eating, especially for users who are losing weight or need to avoid food.
When obtaining food videos or images, adjust the color attributes of the food image according to the color attribute transformation information, reduce its visual attraction, and replace it with food images with lower visual attraction and display it to the user to suppress appetite.
Effectively suppress users' appetite, help users reduce the temptation of food during weight loss or healthy eating, and avoid requirements that affect the weight loss process or healthy eating.
Smart Images

Figure CN119295566A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of electronic device technology and mobile Internet, videos or images have become popular among users, and more and more users can view various types of content through videos or images recommended by applications in electronic devices. However, when applications show gourmet videos or images to users who are in the process of losing weight, these gourmet videos or images will stimulate the user's appetite to a certain extent, affecting the user's weight loss process. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and storage medium, which can prevent the food videos or images displayed to the user from stimulating the user's appetite and affecting the user's weight loss process.
[0004] In a first aspect, an embodiment of the present application provides an image processing method, comprising:
[0005] Acquire a first object, where the first object includes at least one of the following: a video or an image;
[0006] In the case where the first object includes a first food image, adjusting the color attribute of the first food image according to the color attribute transformation information to obtain a second food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image;
[0007] replacing the first food image in the first object with the second food image to obtain a second object;
[0008] Display the second object.
[0009] In a second aspect, an embodiment of the present application provides an image processing device, including:
[0010] An acquisition module, used to acquire a first object, where the first object includes at least one of the following: a video or an image;
[0011] an adjustment module, configured to adjust the color attribute of the first food image according to the color attribute transformation information to obtain a second food image when the first object includes the first food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image;
[0012] a replacement module, configured to replace the first food image in the first object with the second food image to obtain a second object;
[0013] The display module is used to display the second object.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method shown in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the image processing method shown in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the image processing method shown in the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the image processing method shown in the first aspect.
[0018] In an embodiment of the present application, a first object is obtained, and the first object includes at least one of the following: a video, an image; when the first object includes a first food image, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain a second food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image; then, the first food image in the first object is replaced with the second food image to obtain and display the second object. In this way, when a gourmet video or image is displayed to a user who is in the process of losing weight or a user who needs to abstain from food due to illness, the color attribute of the first food image to be displayed can be adjusted to a second food image with lower visual attractiveness according to the color attribute transformation information. In this way, when a user who is hungry or needs to abstain from food due to illness browses the second food image with lower visual attractiveness, the food displayed in the second food image cannot be presented in an attractive state, thereby achieving the effect of suppressing the user's appetite. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flowchart of an image processing method provided for some embodiments of the present application;
[0020] Figure 2 A schematic diagram of an interface showing a food color change control panel for an image processing method provided in some embodiments of the present application;
[0021] Figure 3 A schematic diagram of the structure of an image processing device provided in some embodiments of the present application;
[0022] Figure 4 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application;
[0023] Figure 5 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0026] In order to solve the problems in the related art, the embodiments of the present application provide an image processing method, device and electronic device. Figures 1 to 5 , the image processing method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.
[0027] First, combine Figure 1 An image processing method provided in an embodiment of the present application is described in detail.
[0028] Figure 1 A flowchart of an image processing method provided for some embodiments of the present application.
[0029] like Figure 1 As shown, the image processing method provided in the embodiment of the present application can be applied to electronic devices. Based on this, the image processing method can include steps 110 and 140 as shown below.
[0030] Step 110, obtaining a first object, the first object including at least one of the following: a video, an image; Step 120, when the first object includes a first food image, adjusting the color attribute of the first food image according to the color attribute transformation information to obtain a second food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image; Step 130, replacing the first food image in the first object with the second food image to obtain a second object; Step 140, displaying the second object.
[0031] Therefore, when food videos or images are displayed to users who are in the process of losing weight or who are ill and need to abstain from food, the color attribute of the first food image to be displayed can be adjusted to a second food image with lower visual appeal based on the color attribute transformation information. In this way, when a hungry user browses the second food image with lower visual appeal, the food shown in the second food image will not appear tempting, thereby achieving the effect of suppressing the user's appetite.
[0032] The above steps are described in detail below, as shown below.
[0033] Involving step 110, the image processing method provided in the embodiment of the present application can be applied to a scenario in which an electronic device displays food images. Based on this scenario, the first object can be a short video including food images provided by an application that provides a video playback function, such as a long video playback application or a short video playback application, or it can be a food image provided by an image display application, such as a photo album or a social application.
[0034] Here, taking the first object as a video, where the video is a short video played in a short video application as an example, the conditions for triggering the execution of step 110 when a user browses a short video through the short video playback application are described in detail.
[0035] In some embodiments of the present application, the first object includes a second short video. Based on this, before step 110, the image processing method may further include step 201, in which, when the first short video is displayed in the application interface of the short video application, a first input from a user is received, where the first input is an input for switching from the first short video to the second short video. Based on this, step 110 may specifically include:
[0036] In response to the first input, a second short video is obtained.
[0037] For example, if the first short video, i.e., short video 1, is displayed, when the user wants to view the short video, the user can swipe upward to trigger the switching display of other short videos. At this time, the electronic device can receive the first input of the user and obtain short video 2. In this way, the video content of the short video 2 can be recognized by the artificial intelligence recognition model in the electronic device. If the short video 2 includes the first food image, such as a hamburger image, the color attribute of the hamburger image is adjusted through the steps involved in step 120 to obtain a color-changed hamburger image with a lower visual appeal than the hamburger image. At this time, the color-changed hamburger image can be reinserted into the short video 2 through step 130 to obtain the second object, i.e., short video 2', so that the short video 2' including the color-changed hamburger image can be displayed.
[0038] In this way, when a user browses a short video in a short video application, the color attribute of the first food image to be displayed can be adjusted to a second food image with lower visual appeal. In this way, when the user browses the second food image with lower visual appeal, the food displayed in the second food image will not appear attractive, thereby achieving the effect of suppressing the user's appetite.
[0039] In step 120, in some embodiments of the present application, the hue, saturation and brightness of a food image, such as a first food image, can be adjusted to achieve an effect in which the food in the food image is not attractive or even looks unpalatable.
[0040] Based on this, the color attribute transformation information in the embodiment of the present application includes at least one of the following: reference hue, reference saturation, and reference brightness.
[0041] Here, in the embodiment of the present application, the hue, saturation and brightness of the first food image can be adjusted according to the color attribute transformation information to obtain the second food image. The specific adjustment process is as follows.
[0042] Since the saturation of an image is the purity of its color, in the embodiment of the present application, by reducing the saturation of the first food image or the saturation of the image area including food in the first food image, that is, adjusting the saturation of the first food image to below the reference saturation for suppressing appetite, the color of the first food image appears more bland, thereby achieving the effect of making the food look unappealing.
[0043] The color tone of the first food image is adjusted according to the reference color tone for suppressing appetite. Specifically, in the embodiment of the present application, the color balance of the first food image can be changed, such as increasing the contrast of cold colors (such as blue and purple) or reducing the brightness of warm colors (such as red and orange), so as to achieve the effect of making the food look unappealing.
[0044] In the embodiment of the present application, the brightness of the first food image is adjusted to below the reference brightness for suppressing appetite, so that the food in the first food image can look darker and less shiny, thereby achieving the effect of reducing the user's appetite.
[0045] In addition, the color attribute transformation information in the embodiment of the present application may also include a reference contrast, that is, the contrast of the saturation of the first food image or the image area including food in the first food image can be reduced, that is, the contrast of the first food image is adjusted to below the reference contrast, so that the color transition of the food is smoother, the difference between sensitivities is reduced, and the effect of making the food look unappealing can also be achieved.
[0046] It should be noted that the reference hue, reference saturation, reference brightness, and contrast preset for suppressing appetite in the embodiments of the present application can be used alone or in combination.
[0047] In this way, by adjusting the color attributes of the first food image, a second food image with lower visual appeal than the food in the first food image can be obtained. In this way, the food shown in the second food image will not appear attractive, thereby achieving the effect of suppressing the user's appetite.
[0048] In addition, the embodiment of the present application also provides the following at least six prerequisites for triggering the execution of step 120, which are described below respectively.
[0049] In some embodiments of the present application, before step 120 , the image processing method may further include steps 1501 and 1502 .
[0050] Step 1501, displaying a food color change control on a first interface, the first interface comprising at least one of the following: a setting interface provided by an operating system of an electronic device or an application interface of a third-party application in the electronic device.
[0051] For example, the user can click on the food color change control based on their own needs to trigger the food color change service to be turned on or off. The food color change control can be added to the setting interface of a third-party application such as a short video application for user selection. The food color change control can also be added to the setting interface provided by the operating system of the electronic device.
[0052] Step 1502, receiving a first input to a food color change control, where the first input is an input for starting a function of the food color change control.
[0053] For example, Figure 2As shown, if the first interface 20 is a third-party application that is a short video application, then when the user's first input to the food color change control is received, it can be detected whether the first object of the third-party application that the user has pre-browsed includes a first food image during the user's browsing of the third-party application, and if the first object includes the first food image, the color attribute of the first food image in the third-party application is changed to obtain a second food image whose visual appeal is lower than the visual appeal of the food in the first food image, thereby displaying the second object for reducing the user's appetite through the interface of the third-party application.
[0054] If the first interface is an interface provided by the operating system of the electronic device, then when a first input from the user to the food color change control is received, any food image that the user is browsing in the electronic device can be adjusted according to the color attribute transformation information, thereby obtaining a second food image whose visual appeal is lower than that of the food in the first food image.
[0055] Based on this, step 120 may specifically include:
[0056] In response to the first input, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain a second food image.
[0057] In this way, the color attribute of the first food image to be displayed can be adjusted to a second food image with lower visual appeal based on the color attribute transformation information. In this way, the food displayed in the second food image will not appear attractive, thereby achieving the effect of suppressing the user's appetite.
[0058] In some embodiments of the present application, before step 120 , the image processing method may further include steps 1503 and 1504 .
[0059] Step 1503, obtaining the user's first physiological characteristic information and user behavior information.
[0060] Among them, the first physiological characteristic information includes at least one of the following: weight, body fat percentage, and limb circumference, and the user behavior information includes at least one of the following: user diet information and user exercise information.
[0061] Furthermore, the limb circumference may include at least one of the following: waist circumference, leg circumference, and arm circumference. The user's dietary information may include at least one of the following: the user's meal time, food intake, and water intake. The user's exercise information may include at least one of the following: the user's exercise frequency and the user's exercise duration.
[0062] Step 1504, when the first physiological characteristic information meets the first preset condition and the user behavior information meets the second preset condition, it is determined that the user is in at least one of the following preset states: weight loss state, fat loss state, and body shaping state.
[0063] Exemplarily, the first physiological characteristic information, such as body weight, body fat percentage, and limb circumference, shows a downward trend within a first preset time period, and it can be determined that the first physiological characteristic information meets the first preset condition.
[0064] When the user's dietary information, such as the user's water intake increases within the second preset time period, the user's meal time becomes longer, the food intake decreases, the user's water intake increases, the user's exercise frequency increases, and the user's exercise duration increases, it can be determined that the first physiological characteristic information meets the second preset condition.
[0065] It should be noted that the first physiological characteristic information and user behavior information involved above may be manually recorded by the user on the electronic device, or may be obtained from a device for measuring user behavior information (such as a body fat scale) and recorded on the electronic device.
[0066] Based on this, step 120 may specifically include:
[0067] When it is determined that the user is in a preset state, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain a second food image.
[0068] Therefore, it is possible to determine whether the user is in a state of weight loss, fat loss, body shaping, etc., where diet control is required, based on the physiological characteristic information and user behavior information. When it is determined that the user is in a state of weight loss, fat loss, body shaping, etc., where diet control is required, the color attribute of the first food image originally to be displayed can be adjusted to a second food image with lower visual appeal based on the color attribute transformation information. In this way, when a user in a diet control state browses the second food image with lower visual appeal, the food displayed in the second food image will not be attractive, thereby achieving the effect of suppressing the user's appetite.
[0069] In some embodiments of the present application, the first object is an object in a first application. Based on this, before step 120, the image processing method may further include step 1505, obtaining an application type of the first application.
[0070] Among them, the application types in the embodiments of the present application may include life applications, social applications, office applications, photography applications, music and video applications, video applications, entertainment applications, shopping applications, travel applications or financial applications.
[0071] Based on this, step 120 may specifically include:
[0072] When the application type is a preset application type, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
[0073] For example, the preset application type may be a video application or an entertainment application. When the application type of the first application is a video application or an entertainment application, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image. When the application type of the first application is a social application, it does not match the preset application type and the food image color change is not triggered.
[0074] In this way, the user's appetite can be suppressed while the user can use the electronic device normally.
[0075] In some embodiments of the present application, before step 120, the color attribute of the first food image may be adjusted by time period, for example, the adjustment may be triggered during night time, but not during day time, so as to prevent the user from taking food at an inappropriate time. For another example, the adjustment may be triggered during a preset meal time period, but not during a non-preset meal time period. Based on this, the image processing method may further include step 1506:
[0076] Records the first time the first object is obtained.
[0077] Based on this, step 120 may specifically include:
[0078] In a case where the first time of acquiring the first object is within a preset meal time period, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain a second food image.
[0079] Among them, the preset meal time period in the embodiment of the present application includes at least one of the following: breakfast time period, lunch time period, dinner time period, and supper time period.
[0080] For example, if the first time is 10:45 p.m., and the preset dining time period is the midnight snack time period, i.e., 9 p.m. to 5 a.m. the next day, then the color attribute of the first food image can be adjusted to obtain the second food image, thereby avoiding triggering the user's appetite in the evening. If the first time period is 12 noon, and the lunch time period is 11 a.m. to 2 p.m., then the color attribute of the first food image can be adjusted to obtain the second food image, thereby avoiding triggering the user's appetite in the evening. If the first time is 9:30 a.m., and the preset dining time period includes the breakfast time period from 6 a.m. to 9 a.m. and the lunch time period from 11 a.m. to 2 p.m., at this time, the color attribute of the first food image can be adjusted without triggering, thereby ensuring that the user can browse these food videos or images normally.
[0081] It should be noted that the preset time period in the embodiment of the present application can be set by the user based on user needs, or it can be generated by the operating system of the electronic device based on user behavior habits.
[0082] In some embodiments of the present application, before step 120 , the image processing method may further include steps 1507 and 1508 .
[0083] Step 1507, obtaining the second physiological characteristic information of the user, wherein the second physiological characteristic indicator information may include at least one of the following: blood oxygen level, blood sugar level.
[0084] Step 1508: When the second physiological characteristic information satisfies the third preset condition, it is determined that the user is not in a full state.
[0085] Exemplarily, when the blood oxygen level is less than a preset blood oxygen level, it is determined that the user is not in a full stomach state. When the blood sugar level is less than a preset blood sugar level, it is determined that the user is not in a full stomach state.
[0086] It should be noted that the second physiological characteristic information mentioned above can be obtained from a wearable device (such as a smart watch) connected to the electronic device, as well as an electronic blood pressure meter and an electronic blood glucose meter, and the physiological characteristic indicator information is recorded on the electronic device.
[0087] Based on this, step 120 may specifically include:
[0088] When it is determined that the user is not in a full stomach state, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
[0089] For example, if it is determined that the user is not full, the color attribute of the first food image will not be adjusted. On the contrary, if it is determined that the user is not full, that is, hungry, the color attribute of the first food image will be adjusted.
[0090] In some embodiments of the present application, the image processing method provided in the embodiments of the present application can be applied to scenarios such as slimming, body shaping, and weight loss of users, and can also be applied to scenarios where users need to avoid certain foods due to illness, such as eating less sweets for diabetics and eating less seafood for gout. Based on this, before step 120, the image processing method can also include:
[0091] Obtain the user's medical information, including the disease and drug name;
[0092] Based on this, step 120 may specifically include:
[0093] When the food type in the first food image matches the forbidden food type corresponding to the case information, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
[0094] For example, diabetic patients should eat less desserts, so when the first food image includes cake, the color attribute of the first food image can be triggered. If the first food image includes green vegetables, it may not be adjusted.
[0095] In this way, when a food video or image is displayed to a user who is ill and needs to abstain from food, the color attribute of the first food image to be displayed is adjusted to a second food image with lower visual appeal based on the color attribute transformation information. In this way, when the user who is ill and needs to abstain from food browses the second food image with lower visual appeal, the food shown in the second food image will not appear tempting, thereby achieving the effect of suppressing the user's appetite.
[0096] It should be noted that the aforementioned prerequisites for triggering the execution of step 120 may be used alone or in combination as shown above.
[0097] In step 130, in some embodiments of the present application, the first food image in the first object may be directly replaced with the second food image to obtain the second object. In other embodiments of the present application, the color attribute of the first food image may be adjusted and the shape of the food in the food image may be changed, that is, the state of the food may be changed on the second food image that has been adjusted with the color attribute transformation information. Based on this, step 130 may specifically include steps 1301 and 1303.
[0098] Step 1301: Replace the first food image in the first object with the second food image to obtain a third object.
[0099] Step 1302: acquiring an appetite suppressing image matching the food attribute according to the food attribute identified by the first food image.
[0100] Exemplarily, still taking the first food image as a hamburger image as an example, an appetite sticker image corresponding to the hamburger can be obtained, such as a meat paste sticker image, a fly sticker image, a rotten vegetable leaf sticker image, etc.
[0101] Step 1303: superimpose the appetite suppressing image on the first image region of the second food image in the third object to obtain a second object.
[0102] For example, a meat paste sticker image, a fly sticker image, and a rotten vegetable leaf sticker image can be superimposed on a hamburger in the second food image in the third object to obtain a second object that can be displayed. In this way, the state of the food in the third food image that has been adjusted by the color attribute transformation information is changed to make the food appear unpalatable, thereby reducing the dwelling time on such a displayed video or image, and achieving the effect of suppressing the user's appetite.
[0103] Then, step 140 is involved. In some embodiments of the present application, if the first object can be a video, then only the color attribute of at least one frame of food in the video can be adjusted, and the image that does not include food in the video does not need to be adjusted. If the first object is an image, then if the image is a first food image including food, then the color attribute of the entire first food image can be adjusted according to the color attribute transformation information to obtain a second food image, or only the image of the region that only includes food in the image can be adjusted, that is, at this time, the first food image is a region image of the first object, then the color attribute of the region image can be adjusted, and the region of the first object other than the first food image including food still maintains the color attribute of the first object.
[0104] In order to better illustrate the image processing method provided in the embodiment of the present application, the image processing method provided in the embodiment of the present application is illustrated by taking the example of recommending short videos to users who are on a weight loss diet.
[0105] Step 1: receiving a first input from a user to a food color change control of a short video application, wherein the first input is an input for enabling a function of the food color change control. In response to the first input, enabling a food color change service in the short video application.
[0106] Step 2: Receive input of a user sliding to browse a short video, and use the artificial intelligence recognition model to identify the short video as a food video. If the short video is not identified as a food video, no processing is done on the video content, and the video is played normally; if the short video is identified as a food video, execute step 3.
[0107] Step 3: Obtain the user's first physiological characteristic information and user behavior information through an artificial intelligence recognition model.
[0108] At this time, if the following situations do not occur, no processing is done on the video content and the video is played normally; otherwise, if the following situations occur, it is determined that the user is in at least one of the following preset states: weight loss state, body shaping state, and slimming state, and step 4 is executed. The specific situations are as follows:
[0109] The first physiological characteristic information, such as body weight, body fat percentage, and limb circumference, shows a downward trend within the first preset time period; the user diet information in the user behavior information, such as the user's water intake, shows an increase within the second preset time period, the user's meal time becomes longer, and the food intake decreases; the user exercise information, such as the user's water intake increases, the user's exercise frequency becomes higher, and the user's exercise duration becomes longer.
[0110] Step 4: If it is determined that the user is in a state of losing weight, adjusting the color attribute of the first food image in the short video according to the color attribute transformation information to obtain a second food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image. The first food image in the short video is replaced with the second food image to obtain a short video with adjusted color attributes.
[0111] Step 5: Display the short video after the color attributes are adjusted.
[0112] In this way, the image processing method provided in the embodiment of the present application can automatically change the color of food when the user sees a food-related short video, making the food no longer appear attractive, thereby achieving the effect of suppressing the user's appetite and avoiding affecting the user's weight loss process.
[0113] It should be noted that the image processing method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, wearable devices, etc. In some embodiments of the present application, the image processing method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the image processing method as an example.
[0114] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the device of the image processing method provided in the embodiment of the present application.
[0115] The present application also provides an image processing device. Figure 3 Provide detailed explanation.
[0116] Figure 3 A schematic diagram of the structure of an image processing device provided in some embodiments of the present application.
[0117] like Figure 3 As shown, the image processing device 30 can be applied to an electronic device, and the image processing device 30 can specifically include:
[0118] An acquisition module 301 is used to acquire a first object, where the first object includes at least one of the following: a video or an image;
[0119] an adjustment module 302, configured to adjust the color attribute of the first food image according to the color attribute transformation information to obtain a second food image when the first object includes the first food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image;
[0120] A replacement module 303, configured to replace the first food image in the first object with the second food image to obtain a second object;
[0121] The display module 303 is configured to display the second object.
[0122] The image processing device 30 in the embodiment of the present application is described in detail below, as shown below.
[0123] In some embodiments of the present application, the acquisition module 301 is further used to acquire first physiological characteristic information and user behavior information of the user, the first physiological characteristic information includes at least one of the following: weight, body fat percentage, limb circumference, and the user behavior information includes at least one of the following: user diet information and user exercise information;
[0124] The image processing device 30 further includes a determination module for determining that the user is in at least one of the following preset states: a weight loss state, a fat loss state, and a body shaping state when the first physiological characteristic information satisfies a first preset condition and the user behavior information satisfies a second preset condition;
[0125] The adjustment module 302 is specifically configured to, when it is determined that the user is in a preset state, adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image.
[0126] In some embodiments of the present application, the acquisition module 301 is used to acquire the application type of the first application when the first object is an object in the first application;
[0127] The adjustment module 302 is specifically configured to, when the application type is a preset application type, adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image.
[0128] In some embodiments of the present application, the adjustment module 302 is specifically used to adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image when the first time of acquiring the first object is within a preset meal time period.
[0129] In some embodiments of the present application, the acquisition module 301 is further used to acquire second physiological characteristic information of the user, where the second physiological characteristic information includes at least one of the following: blood sugar value, blood oxygen level;
[0130] The image processing device 30 further includes a determination module, which is used to determine that the user is in a non-full state when the second physiological characteristic information satisfies a third preset condition;
[0131] The adjustment module 302 is specifically configured to adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image when it is determined that the user is not in a full stomach state.
[0132] In some embodiments of the present application, the replacement module 303 is specifically used to replace the first food image in the first object with the second food image to obtain a third object;
[0133] The acquisition module 301 is also used to acquire an appetite suppressing image matching the food attribute according to the food attribute identified by the first food image;
[0134] The image processing device 30 further includes a processing module for superimposing the appetite suppressing image on the first image region of the second food image in the third object to obtain the second object.
[0135] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0136] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0137] The image processing device provided in the embodiment of the present application can achieve Figure 1 to Figure 2The various processes implemented in the illustrated embodiment of the image processing method achieve the same technical effect, and will not be described again here to avoid repetition.
[0138] Based on this, the image processing device provided in the embodiment of the present application can obtain a first object, and the first object includes at least one of the following: a video, an image; when the first object includes a first food image, the first food image in the first object is replaced with a second food image according to the color attribute transformation information, and the second object is obtained and displayed. In this way, when displaying food videos or images to users who are in the process of losing weight or users who need to abstain from food due to illness, the color attribute of the first food image to be displayed can be adjusted to a second food image with lower visual appeal according to the color attribute transformation information. In this way, when a user who is hungry browses the second food image with lower visual appeal, the food displayed in the second food image will not be attractive, thereby achieving the effect of suppressing the user's appetite.
[0139] Optional, such as Figure 4 As shown, an embodiment of the present application further provides an electronic device 40, including a processor 401 and a memory 402, wherein the memory 402 stores programs or instructions that can be executed on the processor 401, and when the program or instructions are executed by the processor 401, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0140] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0141] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0142] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510 and other components.
[0143] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system.
[0144] Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0145] In an embodiment of the present application, the processor 510 is used to obtain a first object, and the first object includes at least one of the following: a video, an image. The processor 510 can also be used to, when the first object includes a first food image, adjust the color attribute of the first food image according to the color attribute transformation information to obtain a second food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image. The processor 510 can also be used to replace the first food image in the first object with the second food image to obtain a second object. The display unit 506 is used to display a second object, and the second object includes a second food image, and the second food image is used to reduce the user's appetite.
[0146] The electronic device 500 is described in detail below, as shown below.
[0147] In some embodiments of the present application, the processor 510 is further configured to obtain first physiological characteristic information and user behavior information of the user, where the first physiological characteristic information includes at least one of the following: weight, body fat percentage, and limb circumference, and the user behavior information includes at least one of the following: user diet information and user exercise information;
[0148] When the first physiological characteristic information satisfies a first preset condition and the user behavior information satisfies a second preset condition, determining that the user is in at least one of the following preset states: a weight loss state, a fat loss state, and a body shaping state;
[0149] When it is determined that the user is in a preset state, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain a second food image.
[0150] In some embodiments of the present application, the processor 510 is configured to obtain an application type of the first application when the first object is an object in the first application;
[0151] When the application type is a preset application type, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
[0152] In some embodiments of the present application, the processor 510 is specifically used to adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image when the first time of acquiring the first object is within a preset meal time period.
[0153] In some embodiments of the present application, the processor 510 is further used to obtain second physiological characteristic information of the user, where the second physiological characteristic information includes at least one of the following: blood sugar level, blood oxygen level;
[0154] When the second physiological characteristic information satisfies a third preset condition, determining that the user is in a non-full state;
[0155] When it is determined that the user is not in a full stomach state, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
[0156] In some embodiments of the present application, the processor 510 is specifically configured to replace the first food image in the first object with the second food image to obtain a third object;
[0157] According to the food attribute identified by the first food image, obtaining an appetite suppressing image matching the food attribute;
[0158] The appetite suppressing image is superimposed on the first image region of the second food image in the third object to obtain the second object.
[0159] It should be understood that the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static image or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel, and the display panel may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch display. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume display button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0160] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 509 can include a volatile memory or a non-volatile memory, or the memory 509 can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0161] The processor 510 may include one or more processing units; optionally, the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless display signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.
[0162] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned image processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0163] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0164] In addition, an embodiment of the present application further provides a chip, which includes a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0165] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0166] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0167] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0168] In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
[0169] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0170] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image processing method, characterized in that: include: Acquire a first object, where the first object includes at least one of the following: a video or an image; In the case where the first object includes a first food image, adjusting the color attribute of the first food image according to the color attribute transformation information to obtain a second food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image; replacing the first food image in the first object with the second food image to obtain a second object; The second object is displayed.
2. The method according to claim 1, characterized in that Before adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image, the method further includes: Acquire first physiological characteristic information and user behavior information of the user, wherein the first physiological characteristic information includes at least one of the following: weight, body fat percentage, and limb circumference, and the user behavior information includes at least one of the following: user diet information and user exercise information; When the first physiological characteristic information satisfies a first preset condition and the user behavior information satisfies a second preset condition, determining that the user is in at least one of the following preset states: a weight loss state, a fat loss state, and a body shaping state; The step of adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image includes: When it is determined that the user is in the preset state, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
3. The method according to claim 1, characterized in that: The first object is an object in the first application program; before adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image, the method further includes: Obtaining an application type of the first application; The step of adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image includes: In a case where the application type is a preset application type, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
4. The method according to claim 1, characterized in that: The step of adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image includes: In a case where the first time of acquiring the first object is within a preset meal time period, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
5. The method according to claim 1, characterized in that: Before adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image, the method further includes: Acquire second physiological characteristic information of the user, where the second physiological characteristic information includes at least one of the following: blood sugar level and blood oxygen level; When the second physiological characteristic information satisfies a third preset condition, determining that the user is in a state of not being full; The step of adjusting the color attribute of the first food image according to the color attribute transformation information to obtain the second food image includes: When it is determined that the user is in the non-full state, the color attribute of the first food image is adjusted according to the color attribute transformation information to obtain the second food image.
6. The method according to claim 1, characterized in that The step of replacing the first food image in the first object with the second food image to obtain the second object includes: replacing the first food image in the first object with the second food image to obtain a third object; According to the food attribute identified by the first food image, acquiring an appetite suppressing image matching the food attribute; The appetite suppressing image is superimposed on the first image region of the second food image in the third object to obtain the second object.
7. A data processing device, characterized in that: include: An acquisition module, configured to acquire a first object, wherein the first object includes at least one of the following: a video or an image; an adjustment module, configured to adjust the color attribute of a first food image according to the color attribute transformation information to obtain a second food image when the first object includes the first food image, wherein the visual attractiveness of the food in the second food image is lower than the visual attractiveness of the food in the first food image; a replacement module, configured to replace the first food image in the first object with the second food image to obtain a second object; A display module is used to display the second object.
8. The device according to claim 7, characterized in that The acquisition module is further used to acquire first physiological characteristic information and user behavior information of the user, wherein the first physiological characteristic information includes at least one of the following: weight, body fat percentage, and limb circumference, and the user behavior information includes at least one of the following: user diet information and user exercise information; The display device further includes a determination module for determining that the user is in at least one of the following preset states: a weight loss state, a fat loss state, and a body shaping state when the first physiological characteristic information satisfies a first preset condition and the user behavior information satisfies a second preset condition; The adjustment module is specifically configured to, when it is determined that the user is in the preset state, adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image.
9. The device according to claim 7, characterized in that The acquisition module is used to acquire the application type of the first application when the first object is an object in a first application; The adjustment module is specifically configured to, when the application type is a preset application type, adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image.
10. The device according to claim 7, characterized in that The adjustment module is specifically configured to adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image when the first time of acquiring the first object is within a preset meal time period.
11. The device according to claim 7, characterized in that The acquisition module is also used to acquire second physiological characteristic information of the user, wherein the second physiological characteristic information includes at least one of the following: blood sugar value and blood oxygen level; The display device further includes a determination module, which is used to determine that the user is in a non-full state when the second physiological characteristic information satisfies a third preset condition; The adjustment module is specifically configured to, when it is determined that the user is in the non-full state, adjust the color attribute of the first food image according to the color attribute transformation information to obtain the second food image.
12. The device according to claim 7, characterized in that The replacement module is specifically configured to replace the first food image in the first object with the second food image to obtain a third object; The acquisition module is further used to acquire, according to the food attribute identified by the first food image, an appetite suppressing image matching the food attribute; The display device further comprises a processing module for superimposing the appetite suppressing image into a first image region of a second food image in the third object to obtain the second object.
13. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method according to any one of claims 1 to 6 are implemented.