IMAGE PROCESSING METHOD, APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM
By acquiring and processing the target image in response to the SFX trigger operation, the color of the first target object is displayed on the second target object, which solves the problem of a single image display method in the prior art, and achieves a colorful image display effect.
Patent Information
- Application Number
- JP2024560500
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-04-12
- Filing Date
- 2023-03-07
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-03-07
AI Technical Summary
The prior art has a single display method when processing short videos or images, which cannot meet the diverse needs of users.
By in response to the SFX trigger operation, a processing target image of the target image is acquired, and when the first target object and the second target object are detected, the color of the first target object is displayed on the second target object.
It realizes colorful color display of target objects, improves the fun and diversity of image display, and meets the diverse needs of users.
Smart Images

Figure 2025513070000001_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority from Chinese Patent Application No. 202210382300.5 filed with the China Patent Office on April 12, 2022, the entire contents of which are incorporated herein by reference.
[0002] TECHNICAL FIELD The embodiments of the present disclosure relate to the technical field of image processing, for example, to an image processing method, device, electronic device, and storage medium. [Background technology]
[0003] 2. Description of the Related Art With the rapid development of new media technology on the Internet, short videos or images are deeply enjoyed by many users as a way of disseminating Internet content.
[0004] Currently, the display (presentation, display) content in a short video or image may include multiple display objects such as people, objects, and backgrounds, and each display object has a corresponding color attribute and is displayed independently of each other. However, the display method of the related technology is single and cannot meet the diverse needs of users. Summary of the Invention [Means for solving the problem]
[0005] In a first aspect, an embodiment of the present disclosure provides an image processing method, comprising: In response to an SFX trigger operation for activating the SFX of a target image, acquiring a processing target image corresponding to the SFX of the target image; In response to detecting that the image to be processed includes a first target object and a second target object, displaying a color of the first target object on the second target object.
[0006] In a second aspect, an embodiment of the present disclosure further provides an image processing apparatus, the apparatus comprising: a target image acquisition module configured to acquire a target image corresponding to the SFX of the target image in response to an SFX trigger operation for initiating the SFX of the target image; and a color display module configured to, in response to detecting that the image to be processed includes a first target object and a second target object, display a color of the first target object on the second target object.
[0007] In a third aspect, embodiments of the present disclosure further provide an electronic device, the electronic device comprising: one or more processors; a storage device configured to store one or more programs; The one or more programs, when executed by the one or more processors, cause the one or more processors to perform an image processing method according to any embodiment of the present disclosure.
[0008] In a fourth aspect, an embodiment of the present disclosure further provides a computer readable storage medium having stored thereon a computer program, the computer program being operable, when executed by a processor, to implement the image processing method according to any embodiment of the present disclosure. [Brief description of the drawings]
[0009] The drawings that need to be used to explain the embodiments are briefly described below. [Figure 1] 1 is a flowchart of an image processing method according to a first embodiment of the present disclosure. [Diagram 2] 11 is a flowchart of an image processing method according to a second embodiment of the present disclosure. [Diagram 3] 13 is a flowchart of an image processing method according to a third embodiment of the present disclosure. [Figure 4] 11A and 11B are schematic diagrams for comparing effects before and after processing of a processing target image according to the present disclosure. [Diagram 5] FIG. 11 is a structural schematic diagram of an image processing device according to a fourth embodiment of the present disclosure. [Figure 6]FIG. 11 is a structural schematic diagram of an electronic device according to a fifth embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, the embodiments of the present disclosure will be described with reference to the drawings. Although the drawings show certain embodiments of the present disclosure, it should be understood that the present disclosure can be realized in various forms and should not be interpreted as being limited to the embodiments described herein, but on the contrary, these embodiments are provided to allow the present disclosure to be more thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are merely illustrative and are not intended to limit the scope of protection of the present disclosure.
[0011] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in a different order and / or simultaneously, and that the method embodiments may include additional steps and / or omit performing steps as described, and the scope of the present disclosure is not limited in this respect.
[0012] As used herein, the term "comprises" and variations thereof are open inclusive, i.e., "including, but not limited to." The term "based on" means "based at least in part on." The term "in one embodiment" refers to "at least one embodiment," the term "in another embodiment" refers to "at least one other embodiment," and the term "in some embodiments" refers to "at least some embodiments." Relevant definitions of other terms are provided in the description below.
[0013] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are merely intended to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units. It should be noted that the modifiers "one" and "multiple" mentioned in the present disclosure are not limiting but exemplary, and should be understood as "at least one" unless otherwise clearly indicated in the context, as can be understood by a person skilled in the art.
[0014] The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
[0015] Example 1
[0016] FIG. 1 is a flowchart of an image processing method according to a first embodiment of the present disclosure, in which the present embodiment can colorfully display the colors of the target object in the processed image based on the SFX of the responded target image before image display, and the method can be performed by an image processing device, which can be realized by software and / or hardware, and can be disposed in a terminal and / or a server to implement the image processing method of the embodiment of the present disclosure.
[0017] As shown in FIG. 1, the method of this embodiment includes step S110 and step S120.
[0018] S110, in response to an SFX trigger operation for starting the SFX of the target image, a processing target image corresponding to the SFX of the target image is obtained.
[0019] The SFX of the target image can achieve the effect of colorfully displaying the color of the target object in the target image. For example, the SFX of the target image can change the display color of the target object to a color customized by the user, change the display color of the target object to a color randomly selected from a pre-defined color library, or change the display color of the target object to a color that includes other objects in the image, thereby improving the variety and freedom of the color of the target object in the target image.
[0020] In this embodiment, the SFX trigger operation is an operation for triggering the SFX of the target image. The SFX trigger operation includes two types: a contact operation and a non-contact operation.
[0021] (1) When the SFX trigger operation is a touch operation, an SFX trigger control such as a button, a slider, etc. can be displayed on the application display interface of the user terminal. The SFX trigger control corresponds to the SFX name of the SFX of the target image, and when the user has used a touch operation such as clicking a button or sliding a slider on the SFX trigger control, the SFX trigger operation is completed and the SFX of the target image is launched. For example, when the user terminal is a touch screen terminal, the user can directly click or slide a finger to select a position corresponding to the SFX trigger control on the screen, and when the user terminal is a non-touch screen terminal, an external input device such as a mouse or a keyboard can be used to send an operation command to the user terminal to select the SFX trigger control and realize the SFX trigger operation.
[0022] In order to display the image SFX more vividly, the SFX trigger control corresponding to the image SFX can be displayed in the form of an effect animation, thereby showing the change of the image before and after using the image SFX. Exemplarily, each displayed image SFX may include an SFX that switches the color of the second object with the color of the first object, for example, if the color of the first object is white and the color of the second object is red, when the SFX trigger control is displayed using the effect animation, the change process of the first object changing from white to the red of the second object can be displayed, and the color of the second object remains unchanged; or each image SFX may include an SFX in which two objects exchange colors, and when the SFX trigger control is displayed using the effect animation, the change process of the first object and the second object exchanging colors can be displayed, so that the user can intuitively and clearly understand the function of the image SFX.
[0023] In one example, a basic operation control displayed on an application display interface can be associated with the SFX of a target image, and when the basic operation control is triggered, the SFX of the target image can be launched. Exemplarily, the basic operation control can include at least one of an image capture control, an image upload control, and an image call control, and when the basic operation control associated with the SFX of a target image is operated, it corresponds to completing an SFX trigger operation and can launch the SFX of the target image. For example, when a floating button called "Capture" is displayed on an application display interface and the floating button is associated with the SFX of a target image, and an image is captured by clicking the floating button called "Capture", the captured image needs to be determined as an image to be processed, and the SFX of the target image needs to be launched and displayed after image processing.
[0024] (2) When the SFX trigger operation is a non-contact operation, it can be divided into a gesture recognition operation and / or a voice control operation. The user can operate according to the gesture indicated on the application display interface, and when the user terminal detects the operation, the SFX trigger operation is completed, and the user can further control the user terminal by voice to realize the SFX trigger operation, for example, when it detects that the user issues a voice command of "launch SFX of the target image", the SFX trigger operation is completed.
[0025] For example, when the image to be processed is an image that needs to be manipulated by applying the SFX of the target image, the image to be processed may be directly acquired by an image collector, and the image collector includes devices such as security cameras, cameras, mobile phones with imaging capabilities, computers, etc. Furthermore, an image stored in a user terminal may be uploaded to obtain the image to be processed, or a communication connection may be established with another device to share an image stored in the other device as the image to be processed.
[0026] In one embodiment, the implementation of obtaining the target image corresponding to the SFX of the target image is as follows: Obtaining a corresponding image for applying the SFX of the target image, which is uploaded by a user or captured by a predetermined imaging method, as a processing target image corresponding to the SFX of the target image; or Acquiring an image of each frame in a video for applying the SFX of a target image, which is uploaded by a user or recorded in real time, as a processing target image corresponding to the SFX of the target image; or The method includes a step of obtaining an image including the first target object and / or the second target object in a video uploaded by a user or recorded in real time to which the SFX of the target image is to be applied, as a processing target image corresponding to the SFX of the target image.
[0027] In the first type of method, the preset imaging method is a method for collecting the processing target image, and the user may select a different imaging method by performing custom setting in advance, or may use a preset default imaging method. For example, when distinguished based on the collection time, the preset imaging method may be divided into timing imaging and real-time imaging, when distinguished based on the mode for collecting the image, the preset imaging method may be divided into at least one of panoramic imaging, portrait imaging, and night scene imaging, and when distinguished based on the trigger type, the preset imaging method may be divided into at least one of click imaging, voice control imaging, and motion recognition imaging.
[0028] For example, after starting the SFX of the target image, an image uploaded by a user or captured in a preset imaging method can be determined as the image to be processed. When a user uploads or captures an image, there may be cases where the user captures the image multiple times and uploads it multiple times, so that multiple images to be processed can be provided, and an image uploaded by a user or captured in a preset imaging method that satisfies a preset condition can be acquired in order to avoid omissions when acquiring the image to be processed. For example, the preset condition may be an image acquired after starting the SFX of the target image and before performing an upload or capture end operation, or the preset condition may be an image acquired within a preset time period after starting the SFX of the target image. Acquiring an image that satisfies the preset condition ensures that the image to be processed is acquired accurately and comprehensively.
[0029] In one example, the number of images to be processed may be at least one. When only one image uploaded or captured by the user is obtained, the image can be determined as the image to be processed. When multiple images are obtained, each image can be processed as the image to be processed, and the similarity between each image can be determined. When the similarity is greater than a preset similarity threshold, the images uploaded by the user can be understood to be images of the same scene, and the image with the highest resolution and the highest color display effect is selected as the image to be processed.
[0030] In the second method, a video uploaded by a user or recorded in real time for applying the SFX of the target image is obtained, and each frame of image in the video is extracted as a processing target image corresponding to the SFX of the target image.
[0031] For example, an image of a part of frames in a video may be determined as an image to be processed. For example, the image to be processed may be determined according to an image of a specific frame in the video designated in advance by a user, or one or more images may be extracted from the video based on a preset extraction rule and determined as an image to be processed. The preset extraction rule may be to extract at equal time intervals, for example, extracting one frame image every second, or the preset extraction rule may be to extract at equal frame intervals, for example, extracting one image every five frames, or randomly, and by extracting an image of a part of frames, the amount of data processing is reduced.
[0032] In one example, the method of determining some frames in a video as target images further includes obtaining an image uploaded by a user or recorded in real time, in which the video to which the SFX of the target image is applied includes a first target object and / or a second target object, as a target image corresponding to the SFX of the target image. The method requires that the target object is preset, and the target object is a constituent object in the target image to which the SFX of the target image is applied. The number of target objects may be one or more, and may be at least one of plants, animals, people, and objects in the target image, or may be local components of animals, people, and objects.
[0033] In one embodiment, the target object includes a first target object and a second target object, and the first target object and the second target object may be different components in the processing target image. The color of the first target object can be displayed on the second target object by SFX of the target image. Based on the preset first target object and second target object, an image including the first target object and / or the second target object in a video acquired, uploaded by a user or recorded in real time can be the processing target image.
[0034] S120, when it is detected that the image to be processed includes a first target object and a second target object, the color of the first target object is displayed on the second target object.
[0035] In this embodiment, specific contents of the first target object and the second target object can be set in advance, and the setting method may include: a user setting specific contents of the first target object and the second target object in advance, and / or a user setting selection conditions for the first target object and the second target object in advance, and determining the first target object and the second target object based on the selection conditions.
[0036] For example, a user may directly input specific content and / or selection conditions of the target into a user terminal through an application setting function, or may complete pre-setting of the selection conditions or specific content of the target based on the candidate target information and / or candidate selection conditions displayed in the application interface.
[0037] Exemplarily, when responding to an SFX trigger operation of the SFX of the target image, candidate information such as each candidate name and candidate type of the first target object and the second target object is displayed on the application display interface, the candidate information corresponding to the first target object selected by the user is the first target object, and the candidate information corresponding to the second target object selected by the user is the second target object. The candidate type may include at least one of an animal type, a plant type, a person type, and an object type, the candidate name may include a face, a tree, a sky, etc., and the candidate information may include information such as an area, a shape, a size, a color, etc. of the candidate object. In response to an SFX trigger operation of the SFX of the target image, candidate selection conditions for the first target object and the second target object may be displayed on the application display interface, for example, the candidate selection conditions may include that a plant in the image to be processed is the first target object and a part of the image to be processed that has the largest area is the second target object, and the candidate selection conditions may include that the decision rule may further include that a circular object in the image to be processed is the first target object and a rectangular object in the image to be processed is the second target object, etc.
[0038] It should be noted that the first target object may be an image body included in the image to be processed, or may be at least one candidate object corresponding to the SFX of the target image, which is preset. When the first target object may be an image body included in the image to be processed, after acquiring the image to be processed, the user may select the first target object from it based on the displayed image to be processed, or may determine the first target object according to a selection condition preset. When the preset candidate objects corresponding to the SFX of the target image are two or more objects having different colors, the first target object may be determined in a manner customized by the user. For example, at least one candidate object control among the name, identifier, image, color, etc. of each candidate object may be displayed on the application display interface. When it is detected that one of the candidate object controls is triggered, the corresponding candidate object is determined as the first target object. In order to improve the variety and flexibility of the color of the first target object, an input frame may be directly displayed on the application display interface to allow the user to directly input information such as the name and identifier of the first target object, and the RGB color value of the desired first target object may be input into the input frame, and the object corresponding to the RGB color value may be determined as the first target object.
[0039] To illustrate the selection of multiple types of first and second target objects, in this embodiment, the first target object may include at least one of a handheld object, a salient object, and an image body belonging to a first pre-defined body type in the image to be processed.
[0040] The handheld object is an object that comes into contact with the user's hand, and when the user's hand comes into contact with multiple objects, one of the objects may be selected as the first target object, for example, the object with the largest area may be selected as the target object. The salient objects may include objects such as walls, ground, grass, desks, windows, beds, etc., whose areas are larger than a preset area threshold, and the preset area threshold may be determined based on the area of the acquired processing target image, and the larger the area of the processing target image, the larger the preset area threshold.
[0041] For example, an image body belonging to a first preset body type may be determined as the first target object. The first preset body type may be classified in multiple aspects, for example, when classified in terms of the external shape of the target object, the image body belonging to the first preset body type may include an image body having shape elements such as a square, a circle, a star, a ring, etc., or when classified in terms of the color of the target object, the image body belonging to the first preset body type may be an image body including elements of a cool color system and / or a warm color system, or when classified by the object attribute of the target object, the image body belonging to the first preset body type may include an image body belonging to a fruit, an ornament, or a building. For example, any object that belongs to the first preset body type and is an image body in the processing target image can be set as the first target object.
[0042] In one example, the second target object includes at least one of the body parts of the target user in the processing target image, the clothes of the target user, the background region of the processing target image, and the image body belonging to the second preset body type. The body parts of the target user may include parts such as hair, face, five senses, neck, and hands, the clothes may include items such as jackets, pants, necklaces, and bags, and the background region may be areas other than the target user, such as walls, buildings, grounds, and scenery. The second target object may be an image body belonging to the second preset body type, and the second preset body type may be the same type as the first preset body type, or may be different from the first preset body type.
[0043] For example, after acquiring a processing target image, image detection is performed on the processing target image by a preset recognition algorithm based on the specific contents of the predetermined first target object and second target object, thereby determining whether the processing target image includes the set first target object and second target object. A neural network model may be trained by performing sample processing on the image in advance, and the trained neural network model may recognize the first target object and the second target object in the sample-processed image. The processing target image is input to a neural network model for image recognition that has been previously trained, and whether the processing target image includes the first target object and the second target object is determined based on the output result of the neural network model.
[0044] If it is detected that the image to be processed contains a first target object and a second target object, the first target object and the second target object can be segmented according to a preset segmentation algorithm or a segmentation model that has been pre-trained, and the color of the first target object can be extracted and the color can be displayed on the second target object.
[0045] For example, when extracting the color of the first target object, it can be determined whether the first target object includes only one color, and if so, the only color can be determined as the color of the first target object. If the first target object includes two or more colors, a pixel point can be determined in the first target object, and the color corresponding to the pixel point can be the color of the first target object, in order to reduce the amount of calculation and improve the efficiency of color switching.
[0046] For example, one pixel point may be randomly determined, or a pixel point in the first target object that satisfies a preset condition may be determined, and a color corresponding to the pixel point is determined as the color of the first target object. For example, the preset condition may be a pixel point corresponding to a color with the largest difference from the color value of the second target object, or a pixel point in the second target object that is the furthest away from the first target object, and a color corresponding to a pixel position of the first target object designated by a user may be determined as the color of the first target object, and the color may be extracted and displayed on the second target object.
[0047] In order to more comprehensively consider the color features of the first target object and extract the features of the first target object, all colors included in the first target object may be displayed on the second target object. Exemplarily, color values at corresponding pixel positions may be determined in sequence based on the pixel arrangement order of the first target object, and colors corresponding to the color values may be displayed on corresponding pixel positions of the second target object. In one example, the color values may be RGB color mode values. If the area of the first target object is larger than that of the second target object, the color of the second target object only needs to be filled in, and no further extraction is required. If the area of the first target object is smaller than that of the second target object, after traversing all the pixels of the first target object, the colors at the pixel positions of the first target object may be repeatedly extracted and displayed on pixel positions in the second target object where no color has been added.
[0048] If the first target object and / or the second target object are not detected in the image to be processed, the action object of the SFX of the target image is insufficient, and the SFX operation cannot be realized. In order to notify the user in real time that the SFX of the target image cannot be completed, the presentation information can be displayed on the application display interface, or the failure of the SFX operation of the target image can be presented in the form of audio playback. In one example, the cause of the SFX failure can be displayed or broadcast by audio. For example, the application display interface can display and present text such as "No actionable object detected, suggest replacing image."
[0049] In this embodiment, when an SFX trigger operation is triggered to activate the SFX of the target image, a processing target image corresponding to the SFX of the target image is obtained, and if it is detected that the processing target image contains a first target object and a second target object, the color of the first target object is displayed in the second target object, thereby completing the conversion operation of the display color of the second target object, thereby avoiding the situation in related technologies that the image display method is bland and monotonous, and achieving the purpose of enriching (enhancing) the display color of the target object based on the SFX of the target image, improving the fun when displaying images, and meeting the diversified needs of users.
[0050] Example 2
[0051] 2 is a flowchart of an image processing method according to a second embodiment of the present disclosure, in which the step of displaying the color of the first target object on the second target object according to any of the embodiments of the present disclosure includes the steps of switching the color of the second target object to the color of the first target object or blending the color of the first target object into the color of the second target object. The interpretation of the same or corresponding terms in each of the above embodiments will not be described in detail here.
[0052] As shown in FIG. 2, the method of this embodiment includes step S210 and step S220.
[0053] S210, in response to an SFX trigger operation for starting the SFX of the target image, a processing target image corresponding to the SFX of the target image is obtained.
[0054] S220, if it is detected that the image to be processed contains a first target object and a second target object, the color of the second target object is switched to the color of the first target object, or the color of the first target object is blended with the color of the second target object.
[0055] In this embodiment, a color can be determined in the first target object and displayed on the second target object. For example, the central pixel point of the first target object can be determined, and the color of the central pixel can be set as the color of the first target object. The advantage of setting the color of the central pixel point of the first target object as the color of the first target object is that it reduces the amount of calculation required for color determination, and at the same time, it can avoid the interference of the colors of the objects adjacent to the first target object, which makes it impossible to realize the SFX of the target image, or the colors of the adjacent objects being displayed on the second target object.
[0056] For a first target object having a regular shape, such as a circular, rectangular, trapezoidal, etc. object, the central pixel point may be a pixel point in the first target object that is equidistant to the periphery of the first target object, for example, if the first target object is a circular object, the central pixel point is the circle center of the first target object. In addition, those skilled in the art may further determine the color corresponding to the pixel points of the centroid, orthocenter, and incenter of the first target object as the color of the first target object according to the actual application situation, which is not limited in this embodiment. For a first target object having an irregular shape, a frame having a regular shape may be used to surround the first target object, for example, a frame such as an inscribed circle or an inscribed rectangle of the first target object may be used to surround the first target object, and pixel points such as the centroid, orthocenter, and incenter of the frame having a regular shape may be determined as the central pixel point, or an equal area division line may be determined to divide the first target object into two parts with equal areas, and the midpoint of the equal area division line may be determined as the central pixel point.
[0057] In this embodiment, a series of examples of determining the central pixel point of the first target object includes segmenting the first target object from the processing target image, obtaining a target segmented image, and determining the central pixel point of the first target object based on the target segmented image.
[0058] The target segmented image includes an image obtained after the first target object is segmented, and a central pixel point of the target segmented image is determined as a central pixel point of the first target object. For example, an image segmentation algorithm or a neural network model that has been previously trained can be used to perform image segmentation on the target image. Exemplarily, the image segmentation algorithm may include an image edge segmentation algorithm, a region-based segmentation algorithm, an image threshold segmentation algorithm, etc. For example, an image edge segmentation algorithm such as Canny edge detection, Sobel edge detection, etc. can be used to complete the segmentation of the first target object.
[0059] In one embodiment, the method for determining the color of the first target object further includes traversing and reading the color value of each pixel point in a target area of the first target object, calculating an average value of the color values of all pixel points in the target area, and setting the color corresponding to the average value as the color of the first target object.
[0060] The target area can be preset according to actual application needs, and an area corresponding to any shape located at any position of the first target object can be the target area. For example, a rectangular area, a trapezoidal area, a circular area, or an irregular area of a preset area value on the first target object can be the target area. The number of pixel points included in the target area is less than or equal to the number of pixel points of the first target object.
[0061] For example, the target area may be a range consisting of a predetermined number of pixels closest to the central pixel point of the first target object, for example, the target area may be set to a square area consisting of eight pixel points closest to the central pixel point, and the target area may be an area consisting of two adjacent pixel points in the horizontal ordinate direction of the central pixel point and two adjacent pixel points in the vertical ordinate direction, for a total of five pixel points.
[0062] For example, in order to more accurately and comprehensively reflect the color of the target area, the average value of the color values of all pixel points in the target area can be set as the color value of the first target object. For example, the average value of the color values of the eight pixel points closest to the central pixel point and a square area consisting of the central pixel point can be determined, and the average value can be determined as the color of the first target object.
[0063] In this embodiment, after the color of the first target object is determined, the color of the first target object can be displayed as the color of the second target object by using two methods, namely, color switching or color fusion, and the steps of the two display methods are as follows:
[0064] When using the color switching method, one implementation is to clear the color of the second target object, add it back to the second target object according to the color of the first target object, and switch the color of the first target object.
[0065] When using the color blending method, one implementation is to determine a first color value of a first target object, traverse each pixel point in a second target object, respectively determine a second color value of each pixel point, and blend the first and second color values to obtain a blended color value of the pixel point of the second target object. For example, blending the first and second color values may be multiplication, addition, and multiplication-addition blending, etc., on the first and second color values. Weights may be assigned to the first and second color values, respectively, and the blended color value may be obtained in a weighted sum or weighted product manner, and the weights of the first and second color values are adjusted to enrich the color effect displayed on the second target object.
[0066] In this embodiment, the two color display methods of color switching and color fusion are used to further enrich the color effect displayed on the second target object, and improve the interest when displaying the image, and by dividing the first target object, the color of the first target object can be determined more accurately and effectively.
[0067] Example 3
[0068] 3 is a flow chart of an image processing method according to a third embodiment of the present disclosure, which further includes, according to any one of the embodiments of the present disclosure, obtaining a preset color-adjusted grayscale image after displaying the color of a first target object on a second target object, and displaying the color-adjusted grayscale image on the second target object. In one example, in order to make the second target object smoother, a Gaussian blur process is performed on the second target object after the color of the first target object is displayed on the second target object. In one example, a target filter effect can be added to the second target object to enhance the color display effect of the second target object.
[0069] The interpretation of the same or corresponding terms in each of the above embodiments will not be described in detail here.
[0070] As shown in FIG. 3, the method of this embodiment includes steps S310 to S350.
[0071] S310, in response to an SFX trigger operation for starting the SFX of the target image, obtain a processing target image corresponding to the SFX of the target image.
[0072] S320, when it is detected that the image to be processed includes a first target object and a second target object, the color of the first target object is displayed on the second target object.
[0073] S330, obtaining a preset color-adjusted grayscale image, and displaying the color-adjusted grayscale image to a second target object.
[0074] In order to enrich the display effect of the second target object and make the image more hierarchical, the color-adjusted grayscale image can be displayed on the second target object. The color-adjusted grayscale image can include two or more grayscale values, and the grayscale values range from [0,255]. The color-adjusted grayscale image can be obtained by adjusting the light transmittance of each part of the black picture through the black picture in which the color-adjusted grayscale image is pre-stored.
[0075] For example, the color-adjusted grayscale image may only include two parts, one with a grayscale value of 255 and the other with a grayscale value of 0, and the color-adjusted grayscale image is divided into two parts, black and white, and the black part and the white part of the color-adjusted grayscale image are respectively layered with the color of the second target object, so that the second target object becomes more hierarchical when displayed. The color-adjusted grayscale image may include two or more kinds of grayscale values, and the color-adjusted grayscale image is formed by the grayscale.
[0076] In this embodiment, the display shape of the grayscale in the color-adjusted grayscale image can be adjusted to enrich the hierarchical distribution when the second target object is displayed, for example, each grayscale in the color-adjusted grayscale image includes a wave-like, bar-like, and ring-like display form, and the color-adjusted grayscale image is obtained by combining grayscales of different shapes.
[0077] In this embodiment, the distribution of grayscales in the color-adjusted grayscale image can be further set to enrich the hierarchy when the second target object is displayed. For example, if the grayscale values of the grayscales can be joined in order from large to small to form the color-adjusted grayscale image, the grayscale values of the obtained second target object change regularly after the color-adjusted grayscale images are stacked, and if the color-adjusted grayscale values can be joined to form the color-adjusted grayscale values based on the interval order of the grayscale values "large, small, large, small", the contrast of the second target object is enhanced after the color-adjusted grayscale images are stacked. In one example, the distribution of grayscales can be determined based on the background scene of the image to be processed; if the background scene of the image to be processed is a daytime outdoor scene, the grayscale distribution in the color-adjusted grayscale image can be adjusted based on the distribution mode when sunlight is scattered; if the background scene of the image to be processed is an indoor scene with a lamp, the grayscale distribution in the color-adjusted grayscale image can be adjusted based on the light wave mode formed when light is irradiated, so that the second target object is better integrated with the imaging scene when it is displayed.
[0078] S340, performing Gaussian blur processing on the second target object.
[0079] In order to make the image smoother and softer when displaying the second target object and reduce image noise, the second target object can be subjected to Gaussian blurring. For example, the second target object can be convoluted with a Gaussian distribution to obtain an image obtained after Gaussian blurring is performed on the second target object.
[0080] S350, adds target filter effect to the second target.
[0081] The filters are used to achieve various SFX of the image, and the target filter effect may be a user specified filter effect.
[0082] For example, after displaying the color of a first target object on a second target object, various SFX that can act on the second target object can be provided for a user to select by generating image modification information in an application display interface, and when a target filter operation for activating a target filter effect is detected, the SFX corresponding to the target filter operation in each SFX can be determined as the target filter effect.
[0083] Exemplarily, the target filter effect may include at least one of a noise filter, a distortion filter, an extract filter, a rendering filter, a liquefy filter, and a blur filter. A noise filter is used to correct imperfections in the image processing process, such as removing spots, adding noise, etc., a distortion filter is used to distort or warp selected areas of an image to create a three-dimensional effect or other overall changes, an extract filter is used to cut out an image, such as extracting a stray hair in a complex background, a rendering filter is used to create texture fills to generate similar three-dimensional lighting effects, a liquefy filter is used to push, pull, rotate, reflect, fold, and expand any area of an image to modify the artistic effect of the image, and a blur filter is used to blur areas in an image that are too sharp or have too much contrast.
[0084] The above describes a corresponding embodiment of the image processing method, and the following provides an exemplary application scenario.
[0085] When a user captures an interesting image using the video capture application, the user clicks on a "circle" shaped identifier displayed on the display interface of the video capture application to indicate the start of capture, and the image to be processed including the user's face photo and background provided by the user can be obtained in a real-time capture format, and an image SFX control for performing image processing on the image to be processed can be displayed below the application display interface, and the user can perform an SFX trigger operation on the favorite image SFX control by clicking on the screen, making a gesture in the air, controlling by voice, etc., to launch the corresponding SFX. For example, SFX may include A SFX for converting the color of a target object, B SFX for performing facial deformation on the target object, C SFX for performing gender conversion on a face in the image to be processed, and D SFX for performing age prediction on a person appearing in the image to be processed, and the like, and name identifier controls and / or image identifier controls of A SFX, B SFX, C SFX, and D SFX, respectively, may be displayed below the application display interface, and when it is detected that any of the name identifier controls and / or image identifier controls are triggered, the corresponding SFX is launched.
[0086] Exemplarily, the function of the SFX of the target image is that the color of the first target object in the image to be processed can be superimposed on or switched to the color of the second target object in the image to be processed. When the user decides to select the SFX of the target image, the SFX of the target image can be determined as the SFX of the target image mentioned in this embodiment. In one example, the display page can be presented to the user to select the first target object and the second target object, for example, the user can click on the position of the handheld object in the image to be processed to select the handheld object as the first target object, and click on the position of the hair in the image to be processed to select the hair as the second target object.
[0087] FIG. 4 is a schematic diagram comparing the effects before and after processing of the processing target image according to the present disclosure, where the image on the left side of FIG. 4 is an image when no object is held in the hand, and the image on the right side of FIG. 4 is an effect diagram obtained after the user selects the SFX of the target image and then performs image processing based on the processing target image with different objects held in the hand.
[0088] As shown in FIG. 4, the right image is the effect image obtained after performing SFX on the target image. If the held object displayed in FIG. 4 is a tissue bag, the tissue bag can be the first target object, and the person's hair in the target graphic can be the second target object. Under the effect of SFX on the target image, the held object recognition algorithm is used to segment the tissue bag in the target image, and calculate the center coordinate of the tissue bag. If the determined center coordinate of the tissue bag is a dark-colored text part, the color of the text corresponding to the center coordinate is determined as the color of the tissue bag. Then, the hair segmentation algorithm is used to segment the hair part of the person in FIG. 4, and the color of the held object is displayed on the person's hair. Finally, after displaying the color of the possessions, the hair image obtained is subjected to color gradation, filter addition and Gaussian blur processing to obtain the right image of Fig. 4, as can be seen from Fig. 4, the tissue bag contains multiple colors, the text and the periphery of the tissue bag use dark colors, and the empty area uses white, the color of the text on the tissue bag is dark and dark, but the hair of the person in Fig. 4 is light and light. After the color of the text on the tissue bag is displayed on the person's hair, the hair color becomes correspondingly darker and the brightness is reduced, in this way, the SFX of the target image can generate color interactions between objects in the processed image, improving the fun of the user taking images and the variety of the image display results.
[0089] In this embodiment, by layering a color-adjusted grayscale image on the second target object, the hierarchical distribution is enriched when the second target object is displayed; by performing Gaussian blur processing on the second target object, the image is made smoother and softer when the second target object is displayed, and image noise is reduced; and by adding a target filter effect to the second target object, the image processed by SFX of the target image is made more colorful and interesting.
[0090] Example 4
[0091] 5 is a structural schematic diagram of an image processing device according to a fourth embodiment of the present disclosure, and the image processing device according to this embodiment may be realized by software and / or hardware, and may be disposed in a terminal and / or a server to execute the image processing method according to the fourth embodiment of the present disclosure. The device includes a processing target image acquisition module 510 and a color display module 520; the processing target image acquisition module 510 is configured to, in response to an SFX trigger operation for initiating an SFX of a target image, acquire a processing target image corresponding to the SFX of the target image; The color display module 520 is configured to display a color of the first target object on the second target object when detecting that the image to be processed contains a first target object and a second target object.
[0092] According to any one of the embodiments of the present disclosure, the processing object image acquisition module 510 includes: A first processing target image acquisition unit is configured to acquire a corresponding image for applying the SFX of the target image, the corresponding image being uploaded by a user or captured in a preset imaging manner, as a processing target image corresponding to the SFX of the target image; or A second processing target image acquisition unit is configured to acquire each frame image in a video for applying the SFX of the target image, which is uploaded by a user or recorded in real time, as a processing target image corresponding to the SFX of the target image; or The video uploaded by a user or recorded in real time to which the SFX of the target image is applied includes a third processed image acquisition unit configured to acquire an image including the first target object and / or the second target object as a processed image corresponding to the SFX of the target image.
[0093] According to any embodiment of the present disclosure, the color display module 520 comprises: a color switching unit configured to switch the color of the second target object to the color of the first target object; or A color blending unit configured to blend a color of the first target object with a color of the second target object.
[0094] According to any one of the embodiments of the present disclosure, the image processing device includes: a central pixel point determination module configured to determine a central pixel point of the first target object and to set a color of the central pixel to the color of the first target object; or and an average value calculation module configured to traverse and read color values of each pixel point in a target area of the first target object, calculate an average value of color values of all pixel points in the target area, and set a color corresponding to the average value as the color of the first target object.
[0095] According to any one of the embodiments of the present disclosure, the central pixel point determining module comprises: and a first target object segmentation unit configured to segment the first target object from the target image to obtain a target segmented image, and determine a central pixel point of the first target object based on the target segmented image.
[0096] According to any one of the embodiments of the present disclosure, the image processing device includes: The method further includes a color-adjusted grayscale image acquisition module configured to acquire a pre-defined color-adjusted grayscale image after the step of displaying the color-adjusted grayscale image to a second target object, and display the color-adjusted grayscale image to the second target object.
[0097] According to any one of the embodiments of the present disclosure, the image processing device includes: The method further comprises a second target object Gaussian blurring module configured to perform a Gaussian blurring process on the second target object after the step of displaying the color of the first target object on the second target object.
[0098] According to any one of the embodiments of the present disclosure, the image processing device includes: The method further comprises a second target object filter effect adding module configured to add a target filter effect to the second target object after the step of displaying a color of the first target object to the second target object.
[0099] Based on any of the embodiments of the present disclosure, the first target object includes at least one of a handheld object, a salient object, and an image body belonging to a first pre-defined body type in the processing target image.
[0100] Based on any of the embodiments of the present disclosure, the second target object includes at least one of a body part of the target user in the processing target image, an item worn by the target user, a background region of the processing target image, and an image body belonging to a second preset body type.
[0101] In this embodiment, when an SFX trigger operation is triggered to activate the SFX of the target image, a target image corresponding to the SFX of the target image is obtained, and if it is detected that the target image contains a first target object and a second target object, the color of the first target object is displayed in the second target object, thereby completing the conversion operation of the display color of the second target object, thereby avoiding the situation in the related technology that the image display method is bland and monotonous, and achieving the purpose of enriching the display color of the target object based on the SFX of the target image, improving the fun of image display, and meeting the diversified needs of users.
[0102] The above apparatus is capable of executing the method according to any embodiment of the present disclosure, and includes functional modules and beneficial effects corresponding to the execution of the method.
[0103] However, each unit and module included in the above device is merely distinguished according to functional logic and is not limited to the above distinctions as long as the corresponding function is realized. Furthermore, the specific names of each functional unit are merely intended to make it easier to distinguish from one another and are not intended to limit the scope of protection of the embodiments of the present disclosure.
[0104] Example 5
[0105] FIG. 6 is a structural schematic diagram of an electronic device according to a fifth embodiment of the present disclosure. Hereinafter, referring to FIG. 6, a structural schematic diagram of an electronic device (e.g., a terminal device or a server in FIG. 6) 600 suitable for implementing the embodiments of the present disclosure is shown. The terminal device of the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs, Personal Digital Assistants), tablet computers (PADs), portable multimedia players (PMPs, Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital televisions (TVs, Televisions) and desktop personal computers. The electronic device shown in FIG. 6 is merely an example and should not bring any restrictions on the functions and scope of use of the embodiments of the present disclosure.
[0106] 6, the electronic device 600 may include a processing unit (e.g., a central processor, a graphic processor, etc.) 601, which can perform various suitable operations and processes based on programs stored in a read-only memory (ROM, Read-Only Memory) 602 or uploaded from a storage device 608 to a random access memory (RAM, Random Access Memory) 603. The RAM 603 further stores various programs and data required for the operation of the electronic device 600. The processing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 605. An editing / output (I / O, Input / Output) interface 604 is also connected to the bus 605.
[0107] Typically, the following devices can be connected to the I / O interface 604: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 608 including, for example, a magnetic tape, hard disk, etc.; and communication devices 609. The communication devices 609 allow the electronic device 600 to exchange data with other devices by wireless or wired communication. Although FIG. 6 illustrates the electronic device 600 with various devices, it should be understood that the electronic device 600 is not required to implement or include all of the illustrated devices. More or fewer devices may alternatively be implemented or included.
[0108] In particular, according to an embodiment of the present disclosure, the above processes described with reference to the flowcharts may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product including a computer program included in a non-transitory computer readable medium, the computer program including program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network by the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, it performs the above functions defined in the method of the embodiment of the present disclosure.
[0109] The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0110] The electronic device according to the embodiments of the present disclosure and the image processing method according to the above embodiments belong to the same inventive concept, and the technical details not detailed in the present embodiments may refer to the above embodiments, and the present embodiment has the same beneficial effects as the above implementations.
[0111] Example 6
[0112] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon, the computer program being operable, when executed by a processor, to implement the image processing method according to the embodiment.
[0113] It should be explained that the computer readable medium of the present disclosure may be a computer readable signal medium, a computer readable storage medium, or any combination of the above. The computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. Examples of computer readable storage media include an electrical connection having one or more conductors, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, optical fiber, a portable compact disc read-only memory (CD-ROM), a portable electronic device (EOS ... In the present disclosure, a computer-readable storage medium may include, but is not limited to, a tangible medium that contains or stores a program, which may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal that is in baseband or propagated as part of a carrier wave, and that includes a computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code included in the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, an electrical wire, an optical cable, radio frequency (RF), or the like, or any suitable combination of the above.
[0114] In some embodiments, the clients and servers may communicate using any now known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected in any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), the Internet (e.g., the Internet), and an end-to-end network (e.g., an ad hoc end-to-end network), as well as any now known or future developed network.
[0115] The computer readable medium may be included in the electronic device or may exist separately but not assembled to the computing device.
[0116] The computer-readable medium includes one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: In response to an SFX trigger operation for activating the SFX of a target image, acquiring a processing target image corresponding to the SFX of the target image; When it is detected that the image to be processed includes a first target object and a second target object, a step of displaying a color of the first target object on the second target object is executed.
[0117] The storage medium may be a non-transitory storage medium.
[0118] Computer program code for carrying out the operations of the present disclosure may be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. When a remote computer is involved, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).
[0119] The flowcharts and block diagrams in the drawings illustrate possible system architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a specified logical function. It should be noted that in some alternative implementations, the functions depicted in the blocks may occur in a different order than the order depicted in the drawings. For example, two blocks shown one after the other may actually be executed essentially in parallel, or they may be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that executes the specified functions or operations, or by a combination of dedicated hardware and computer instructions.
[0120] The units related to the embodiments of the present disclosure may be realized in a software manner or a hardware manner. The names of the units do not limit the units themselves in certain circumstances, for example, the first acquisition unit may be described as a "unit for acquiring at least two Internet Protocol addresses".
[0121] The functionality described herein above may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary hardware logic components that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Parts (ASSPs), System on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
[0122] In the context of this disclosure, a machine-readable medium may be a tangible medium, and may contain or store a program used by or in combination with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0123] According to at least one embodiment of the present disclosure, [Example 1] provides an image processing method, the method comprising: In response to an SFX trigger operation for activating the SFX of a target image, acquiring a processing target image corresponding to the SFX of the target image; When it is detected that the image to be processed includes a first target object and a second target object, the color of the first target object is displayed on the second target object.
[0124] According to at least one embodiment of the present disclosure, [Example 2] provides an image processing method, the method comprising: Acquiring a corresponding image for applying the SFX of the target image, which is uploaded by a user or captured by a preset imaging method, as a processing target image corresponding to the SFX of the target image; or A step of obtaining each frame image in a video for applying the SFX of the target image, which is uploaded by a user or recorded in real time, as a processing target image corresponding to the SFX of the target image; or The method further includes a step of obtaining an image including the first target object and / or the second target object in a video uploaded by a user or recorded in real time to which the SFX of the target image is applied, as a processing target image corresponding to the SFX of the target image.
[0125] According to at least one embodiment of the present disclosure, [Example 3] provides an image processing method, the method comprising: The method further includes switching a color of the second target object to a color of the first target object or blending a color of the first target object to a color of the second target object.
[0126] According to at least one embodiment of the present disclosure, [Example 4] provides an image processing method, the method comprising: determining a central pixel point of the first target object and setting the color of the central pixel to the color of the first target object; or The method further includes a step of traversing and reading the color values of each pixel point in a target area of the first target object, calculating an average value of the color values of all pixel points in the target area, and setting the color corresponding to the average value as the color of the first target object.
[0127] According to at least one embodiment of the present disclosure, [Example 5] provides an image processing method, the method comprising: The method further includes the steps of: segmenting the first target object from the target image to obtain a target segmented image; and determining a central pixel point of the first target object based on the target segmented image.
[0128] According to at least one embodiment of the present disclosure, [Example 6] provides an image processing method, the method comprising: The method further includes obtaining a preset color-adjusted grayscale image, and displaying the color-adjusted grayscale image on the second target object.
[0129] According to at least one embodiment of the present disclosure, [Example 7] provides an image processing method, the method comprising: The method further includes performing a Gaussian blur process on the second target object.
[0130] According to at least one embodiment of the present disclosure, [Example 8] provides an image processing method, the method comprising: The method further includes adding a target filter effect to the second target object.
[0131] According to at least one embodiment of the present disclosure, [Example 9] provides an image processing method, the method comprising: The method further includes the step of: the first target object includes at least one of a hand-held object, a salient object, and an image body belonging to a first pre-defined body type in the image to be processed.
[0132] According to at least one embodiment of the present disclosure, [Example 10] provides an image processing method, the method comprising: The method further includes the step of selecting a second target object from among at least one of a body part of the target user in the processing target image, an item worn by the target user, a background region of the processing target image, and an image body belonging to a second predetermined body type.
[0133] According to at least one embodiment of the present disclosure, [Example 11] provides an image processing device, the device comprising: a target image acquisition module configured to acquire a target image corresponding to the SFX of the target image in response to an SFX trigger operation for initiating the SFX of the target image; and a color display module configured to, when detecting that the image to be processed includes a first target object and a second target object, display a color of the first target object on the second target object.
[0134] Those skilled in the art should understand that the disclosure scope of the present disclosure is not limited to the technical solution constituted by a specific combination of the above technical features, and should include other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept of the above disclosure, such as, for example, a technical solution formed by mutually substituting the above features with technical features having similar functions disclosed in the present disclosure (but not limited to these).
[0135] Also, although operations have been described in a particular sequence, it should not be understood that these operations are required to be performed in the particular sequence or order shown. In certain circumstances, multitasking and simultaneous processing may be advantageous. Similarly, although the above description includes a number of specific implementation details, these should not be construed as limiting the scope of the disclosure. Certain features described in the context of a single embodiment may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may be implemented in multiple embodiments independently or in any suitable subcombination manner.
[0136] Although the present subject matter has been described using language specific to structural features and / or methodological operations, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely example forms for implementing the claims.
Claims
1. 1. An image processing method, comprising: In response to an SFX trigger operation for activating the SFX of a target image, acquiring a processing target image corresponding to the SFX of the target image; in response to detecting that the image to be processed includes a first target object and a second target object, displaying a color of the first target object on the second target object.
2. The step of obtaining a processing target image corresponding to the SFX of the target image includes: Acquiring a corresponding image for applying the SFX of the target image, which is uploaded by a user or captured by a predetermined imaging method, as a processing target image corresponding to the SFX of the target image; or A step of obtaining an image of each frame in a video for applying the SFX of the target image, which is uploaded by a user or recorded in real time, as a processing target image corresponding to the SFX of the target image; or The method of claim 1, further comprising: acquiring an image, uploaded by a user or recorded in real time, including at least one of a first target object or a second target object in a video for applying the SFX of the target image, as a processing target image corresponding to the SFX of the target image.
3. The step of displaying the color of the first target object on the second target object comprises: switching the color of the second target object to the color of the first target object; or The method of claim 1 , further comprising blending a color of the first target object with a color of the second target object.
4. determining a central pixel point of the first target object and setting the color of the central pixel to the color of the first target object; or 4. The method of claim 1 or 3, further comprising the step of traversing and reading the color values of each pixel point in a target area of the first target object, calculating an average value of the color values of all pixel points in the target area, and setting the color corresponding to the average value as the color of the first target object.
5. The step of determining a central pixel point of the first target object comprises:
5. The method of claim 4, further comprising the steps of: segmenting the first target object from the target image to obtain a target segmented image; and determining a central pixel point of the first target object based on the target segmented image.
6. After the step of displaying the color of the first target object on the second target object, The method of claim 1 , further comprising obtaining a preset color-adjusted grayscale image and displaying the color-adjusted grayscale image on the second target object.
7. After the step of displaying the color of the first target object on the second target object, The method of claim 1 , further comprising the step of performing a Gaussian blur process on the second target object.
8. After the step of displaying the color of the first target object on the second target object, The method of claim 1 , further comprising adding a target filter effect to the second target object.
9. The method of claim 1 , wherein the first target object comprises at least one of a hand-held object, a salient object, and an image body belonging to a first pre-defined body type in the image to be processed.
10. 2. The method of claim 1, wherein the second target object includes at least one of a body part of the target user in the processing target image, an item worn by the target user, a background region of the processing target image, and an image body belonging to a second predefined body type.
11. An image processing device, a target image acquisition module configured to acquire a target image corresponding to the SFX of the target image in response to an SFX trigger operation for initiating the SFX of the target image; a color display module configured to, in response to detecting that the image to be processed includes a first target object and a second target object, display a color of the first target object on the second target object.
12. An electronic device, one or more processors; a storage device configured to store one or more programs; An electronic device that, when the one or more programs are executed by the one or more processors, causes the one or more processors to perform the image processing method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium implementing the image processing method according to any one of claims 1 to 10, when the computer program is executed by a processor.
Citation Information
Patent Citations
Face image portrait-buffing method and device thereof, computer equipment and storage medium
CN112150393A
Image processing method and device, electronic equipment and storage medium
CN112184540A
Device and method for generating photograph seal
JP2014131160A
Image processing apparatus
JP2015213232A