Special effect processing method and apparatus, electronic device, storage medium and program product
By determining the unobstructed areas to present special effects during image processing, the problem of inaccurate special effects rendering when overlapping images are present is solved, and accurate rendering of special effects and rich rendering methods are achieved, thereby improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/138789
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-08
- Filing Date
- 2024-12-12
- Publication Date
- 2025-10-16
AI Technical Summary
In the existing technology, the special effects rendering method in image processing or video production is relatively simple, and it is impossible to accurately render the special effects to the target screen when there are overlapping screens in the image, which affects the user experience.
By acquiring the first and second image areas in the image to be processed, determining the portion of the first area that is blocked by the second area, and presenting the target special effect only in the unblocked third area, precise rendering of the special effect is achieved.
When there are overlapping images in the image, special effects can be accurately rendered to the target image, enriching the special effects rendering method and improving the user experience.
Smart Images

Figure CN2024138789_16102025_PF_FP_ABST
Abstract
Description
Special effect processing method and device, electronic equipment, storage medium and program product
[0001] The present application claims priority to Chinese Patent Application No. 202410418319.X, filed on April 8, 2024, the disclosure of which is incorporated herein in its entirety as part of the present application. TECHNICAL FIELD
[0002] Embodiments of the present disclosure relate to a special effect processing method, device, electronic equipment, storage medium and program product. BACKGROUND
[0003] In the image processing or video production scene, the application of special effects is favored by users. The selected special effect can be used to process images or videos, so that the resulting images or videos present special effect effects corresponding to the special effect.
[0004] In related technologies, when performing special effect rendering, all image contents in the obtained to-be-processed image are usually processed by special effects, so as to obtain complete special effect effects. For example, a face special effect acts on all faces contained in the to-be-processed image. Such a special effect processing manner makes the presentation manner of the special effect effect relatively single, has certain limitations, and affects the special effect use experience of users. SUMMARY
[0005] The present disclosure provides a special effect processing method, device, electronic equipment, storage medium and program product to realize accurate rendering of special effects to target pictures in the case of overlapping pictures in the image, and other pictures do not render the effect of special effects, that is, to present the effect of special effect separation rendering for overlapping pictures.
[0006] In a first aspect, the embodiments of the present disclosure provide a special effect processing method, which comprises:
[0007] In response to a rendering request for a target special effect, a to-be-processed image is obtained; wherein the to-be-processed image comprises a first image region and a second image region; the first image region is a region to which the target special effect is to be added;
[0008] In the case that at least part of the first image region is occluded by the second image region, the special effect effect of the target special effect is presented in a third image region; wherein the third image region is a region of the first image region except the second image region.
[0009] In a second aspect, the embodiments of the present disclosure also provide a special effect processing device, which comprises:
[0010] An image acquisition module is configured to acquire a to-be-processed image in response to a rendering request for a target special effect, wherein the to-be-processed image comprises a first image region and a second image region, and the first image region is a region to which the target special effect is to be added.
[0011] A special effect presentation module is configured to present a special effect effect of the target special effect in a third image region in a case where at least part of the first image region is occluded by the second image region, wherein the third image region is a region of the first image region other than the second image region.
[0012] In a third aspect, an electronic device is provided, and the electronic device comprises:
[0013] One or more processors;
[0014] A storage device configured to store one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the special effect processing method according to any of the embodiments of the present disclosure.
[0016] In a fourth aspect, a storage medium containing computer executable instructions is provided, and the computer executable instructions are used to perform the special effect processing method according to any of the embodiments of the present disclosure when executed by a computer processor.
[0017] In a fifth aspect, a computer program product is provided, and the computer program product comprises a computer program, and the computer program implements the special effect processing method according to any of the embodiments of the present disclosure when executed by a processor. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.
[0019] FIG. 1 is a flow diagram of a special effect processing method according to an embodiment of the present disclosure;
[0020] FIG. 2 is a diagram of a to-be-processed image according to an embodiment of the present disclosure;
[0021] FIG. 3 is another diagram of a to-be-processed image according to an embodiment of the present disclosure;
[0022] FIG. 4 is a flow diagram of another special effect processing method according to an embodiment of the present disclosure;
[0023] FIG. 5 is a flow diagram of another special effect processing method according to an embodiment of the present disclosure;
[0024] FIG. 6 is an effect diagram of a mask image according to an embodiment of the present disclosure;
[0025] FIG. 7 is a structural diagram of a special effect processing apparatus according to an embodiment of the present disclosure; and
[0026] FIG. 8 is a structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] Embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. While certain embodiments of the present disclosure will be shown and described, it is to be understood that the present disclosure is not limited to the embodiments, but instead can be embodied in various forms. Therefore, specific details disclosed herein are not to be interpreted as limiting the scope of the present disclosure.
[0028] It should be understood that each of the steps in the method embodiments of the present disclosure can be performed in a different order and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] As used herein, the term "includes" and its variants are to be read to be equivalent to "including but not limited to." The term "based on" is to be interpreted as "based, at least in part, on." The term "one embodiment" means "at least one embodiment." The term "another embodiment" means "at least one additional embodiment." The term "some embodiments" means "at least some embodiments." Related terms have analogous meanings.
[0030] It should be noted that the terms "first", "second", and the like in the present disclosure are used only to distinguish different devices, modules or units, and do not imply the order or interdependence of the functions performed by these devices, modules or units.
[0031] It should be noted that the terms "one", "more than one" in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly stated in the context.
[0032] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0033] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0034] For example, in response to receiving the active request of the user, the prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user. Thus, the user can autonomously select whether to provide the personal information to the software or hardware such as the electronic device, application program, server or storage medium, etc. performing the operation of the technical solutions of the present disclosure according to the prompt information.
[0035] As an optional but non-limiting implementation manner, in response to receiving the active request of the user, the manner of sending the prompt information to the user may, for example, be the manner of a pop-up window, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry selection controls for the user to select "agree" or "disagree" to provide the personal information to the electronic device.
[0036] It can be understood that the above notification and obtaining of the authorization of the user are only illustrative, and do not limit the implementation manners of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation manners of the present disclosure.
[0037] It can be understood that the data (including but not limited to the data itself, the obtaining or use of the data) involved in the present technical solution should comply with the requirements of the relevant laws and regulations and the relevant provisions.
[0038] Before introducing the technical solution, the application scenario can be exemplarily described. The technical solution can be applied to any scene of performing special effect processing on images or videos including at least two image display areas. In order to more clearly introduce the technical solution, the execution process of the technical solution can be described by taking a live broadcast scene as an example. Exemplarily, in the live broadcast scene, the image display interface includes a first image area and a second image area, wherein the first live broadcast area is used to display the picture content of the live video stream corresponding to the first live broadcast account, and the second live broadcast area is used to display the picture content of the live video stream corresponding to the second live broadcast account. In the case of detecting a triggering operation for a target special effect, a rendering request corresponding to the target special effect is generally generated, and a to-be-processed image is obtained, at this time, the to-be-processed image includes the first image area and the second image area. Further, the to-be-processed image is processed according to the target special effect. Since the input source of the special effect processing is a single image, the special effect rendering is generally performed on the entire image to obtain a special effect image. However, in the case that at least part of the first image area is occluded by the second image area, the target special effect is added to the first image area in the to-be-processed image, and the second image area is not added with the target special effect, the special effect processing of the to-be-processed image based on the above processing manner will cause the second image area which does not add the target special effect to also be rendered by the target special effect. Thus, the demand of the user for special effect rendering on part of the image area in the image cannot be met, and there is a certain limitation.
[0039] At this time, based on the technical solution of the embodiment of the present disclosure, in the case of detecting a rendering request for a target special effect, the to-be-processed image is obtained in response to the rendering request, at this time, the to-be-processed image can include a first image area and a second image area, and the first image area is a region to which the target special effect is to be added. Further, in the case that at least part of the first image area is occluded by the second image area, the other regions in the first image area except the second image area can be determined, and the special effect effect of the target special effect can be presented in the region. Thus, the effect of accurately rendering the special effect to the target picture and not rendering the special effect to other pictures is realized in the case that there are overlapping pictures in the image, that is, the effect of special effect separate rendering for overlapping pictures is presented, the special effect rendering manner is enriched, and the special effect interaction experience is improved.
[0040] FIG. 1 is a flowchart of a special effect processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to a case of performing special effect processing on any picture in the case that there are overlapping pictures in the image. The method can be executed by a special effect processing device, which can be realized in the form of software and / or hardware, and can be realized by an electronic device, which can be a mobile terminal, a PC terminal, or a server, etc. As shown in FIG. 1, the method of the present embodiment can specifically include:
[0041] S110, in response to a rendering request for a target special effect, obtaining a to-be-processed image; wherein the to-be-processed image includes a first image region and a second image region.
[0042] The target special effect can be understood as a special effect triggered by a user and to be applied to an image. In the embodiments of the present disclosure, the special effect displayed in the interface can be set to a selectable trigger state in advance. Further, in the case where a selection trigger operation for any special effect is detected, the selected special effect can be taken as the target special effect. The rendering request can be understood as a request message sent by the client to the server, which is used to request the server to render the target special effect. The to-be-processed image can be an image to be processed by a special effect. Optionally, the to-be-processed image can be an image collected based on a terminal device, or an image obtained from a target storage space (such as an image library of application software, or a terminal album, etc.) in response to a trigger operation of a user, or an image received from an external device uploaded, etc.
[0043] The first image region can be understood as a region in the to-be-processed image for presenting picture content. Moreover, the first image region can be a region in the to-be-processed image to which the target special effect is to be added. The second image region can also be understood as a region in the to-be-processed image for presenting picture content, which is different from the first image region. Optionally, the first image region and the second image region can be regions in the to-be-processed image for presenting different picture content, respectively. Specifically, the first image region and the second image region can be used to present picture content of different video frames of the same video stream. For example, the first image region and the second image region can be used to respectively display picture content corresponding to different video frames of the same video under different video frames. Alternatively, the first image region and the second image region can be used to present picture content of different video streams. In different service scenarios, the video streams corresponding to the first image region and the second image region are different. In order to more clearly introduce the to-be-processed image, the first image region and the second image region, the to-be-processed image, the first image region and the second image region will be described by taking a live broadcast scenario as an example.
[0044] Optionally, the to-be-processed image includes a live broadcast image corresponding to a first live broadcast account; the first image region is used to display picture content of a live broadcast video stream corresponding to the first live broadcast account; and the second image region is used to display picture content of a live broadcast video stream corresponding to a second live broadcast account.
[0045] The first live account can be understood as an account corresponding to a live page watched by a target special effect triggering audience end. The live image can be image content presented in a live interface corresponding to the first live account. The second live account can be a live account in a connected state with the first live account. The live video stream can be understood as a corresponding media data stream in a live process, or as content of a live video stream presented in a live display area, i.e., a live picture.
[0046] In the embodiments of the present disclosure, in a case where an entry triggering operation for a live room of a live account is detected, the triggered live account can be taken as a first live account, and a live image corresponding to the first live account is displayed. In a case where the first live account is not connected with other live accounts, a to-be-processed image can be taken as a first image region, i.e., the to-be-processed image is picture content of a live video stream corresponding to the first live account. In a case where the first live account is connected with at least one other live account, the at least one other live account connected with the first live account can be taken as a second live account, and a live video stream corresponding to the second live account is obtained. At this time, the to-be-processed image can include a first image region and a second image region. The first image region can be used to display picture content of a live video stream corresponding to the first live account. The second image region can be used to display picture content of a live video stream corresponding to the second live account.
[0047] It should be noted that the display form of the first image region and the second image region in the to-be-processed image can include multiple forms. Optionally, the display form of the first image region and the second image region in the to-be-processed image can include adjusting the display size of the first image region in the to-be-processed image, and displaying the second image region at a preset position of the to-be-processed image. The preset position can be any position in the to-be-processed image, for example, the left side, the right side, or the bottom of the adjusted first image region, etc. Alternatively, based on the total number of the first image region and the second image region, the to-be-processed image is equally divided into multiple regions, and the corresponding regions are taken as the first image region and the second image region. Alternatively, the first image region is displayed in a large screen in the to-be-processed image, and the second image region is displayed in a small screen and suspended in the first image region, so that the target positional relationship between the first image region and the second image region is that at least part of the first image region is blocked by the second image region. For example, FIG. 2 is a schematic diagram of an effect of a to-be-processed image provided in the embodiments of the present disclosure. As shown in FIG. 2, the to-be-processed image 20 includes three image regions, namely, region 1, region 2, and region 3. The region 1 can be the first image region, and the regions 2 and 3 are the second image regions. Moreover, the target positional relationship between the three regions is that at least part of the region 1 is blocked by the regions 2 and 3.
[0048] It should be noted that the distribution of the image region in the image to be processed can be set by the user or can be set by the application software by default, and the embodiments of the present disclosure do not make specific limitations.
[0049] In the embodiments of the present disclosure, in the case that the trigger operation for the target special effect is detected, a rendering request for the target special effect can be generated. Further, in response to the rendering request, the image to be processed is obtained, and the image to be processed is processed according to the rendering request to add the target special effect to the first image region.
[0050] In the case that at least part of the first image region is blocked by the second image region, the third image region presents the special effect effect of the target special effect.
[0051] The third image region can be a region in the first image region other than the second image region. For example, as shown in FIG. 2, in the case that region 1 is the first image region and regions 2 and 3 are the second image region, the shaded part of region 1 is the third image region.
[0052] In actual application, in the case that the image to be processed includes the first image region and the second image region, the first image region and the second image region can be determined in order to determine the image region to which the target special effect is added. Further, the target special effect can be added to the first image region to make the first image region present the special effect effect of the target special effect. However, when the first image region and the second image region are arranged in the image to be processed, there can be a case that at least part of the first image region is blocked by the second image region. At this time, when all the pixel points in the first image region are taken as the processing object, the target special effect can also be rendered to the second image region included in the first image region.
[0053] To solve the above problem, in the embodiments of the present disclosure, in the case that it is determined that at least part of the first image region is blocked by the second image region, a region in the first image region other than the second image region can be determined as the third image region. Further, the third image region can be rendered according to the target special effect to make the third image region present the special effect effect of the target special effect.
[0054] It should be noted that the case that at least part of the first image region is blocked by the second region can exist in multiple manners. Optionally, the first image region includes all regions in the second image region. For example, referring to FIG. 2, the region 1 includes all regions of the region 2 and the region 3. Alternatively, the first image region includes part of the regions in the second image region. For example, FIG. 3 is another schematic diagram of an effect of a to-be-processed image according to an embodiment of the present disclosure. As shown in FIG. 3, it is assumed that the to-be-processed image 20 includes two image regions, namely, a region 4 and a region 5. The region 4 can be regarded as the first image region, and the region 5 can be regarded as the second image region. As shown in FIG. 3, the region 4 includes part of the region 5, and it can be determined that at least part of the region 4 is blocked by the region 5.
[0055] It should be further noted that the determination of whether at least part of the first image region is blocked by the second image region can exist in multiple manners. Optionally, it can be determined whether the picture content presented by the first image region is consistent. In a case where it is determined that there are at least two picture contents in the first image region, it can be determined that at least part of the first image region is blocked by the second image region. Alternatively, it can be determined whether there is an overlapping region between the first image region and the second image region and the positional relationship between the display layers. Further, in a case where it is determined that there is an overlapping region between the first image region and the second image region and the display layer corresponding to the second image region is located on the upper layer of the display layer of the first image region, it can be determined that at least part of the first image region is blocked by the second image region. Alternatively, the determination of whether at least part of the first image region is blocked by the second image region can be performed in other manners, which are not limited in the present disclosure.
[0056] It should be further noted that the number of the second image regions included in the first image region can be less than or equal to the number of the second image regions included in the to-be-processed image. For example, it is assumed that the to-be-processed image includes the first image region and three second image regions. In this case, the number of the second image regions included in the first image region can be zero, one, two, or three.
[0057] In the embodiment of the present disclosure, after obtaining the to-be-processed image, in a case where it is determined that the first image region is not blocked by the second image region, the special effect effect of the target special effect is presented in the first image region. That is, the picture content presented by the first image region is processed according to the target special effect, so that the first image region presents the special effect effect of the target special effect.
[0058] In the embodiments of the present disclosure, in the case that the image to be processed includes a first image region and a second image region, the region display information of the first image region and the second image region can be set by default by the application software, or can be adjusted according to the user's demand. Optionally, before responding to the rendering request for the target special effect, or after the third image region presents the special effect effect of the target special effect, the region display information of the first image region and / or the second image region in the image display interface is updated in response to the display adjustment operation for the first image region and / or the second image region.
[0059] The display adjustment operation can be understood as an operation of adjusting the display of the image region in the display interface. Optionally, the display adjustment operation can include at least a display size adjustment operation and / or a display position adjustment operation. The display size adjustment operation can be an operation of adjusting the display size of the image region. Further, the display size can include one or more of the display length, the display width, the display radius, and the display area. The display position adjustment operation can be an operation of adjusting the display position of the image region in the display interface. Further, the display position can be determined based on the coordinates of one or more preset key points (such as the region center point, the region vertex, or any point in the region) in the image region in the display interface. The region display information can be used to represent the specific display of the image region in the display interface. The region display information can include at least the display size and / or the display position. The image display interface can be understood as an interface presented to the user for displaying images. The image display interface can be an interface for displaying the image to be processed. It should be noted that the image display interface can also display other multimedia information while displaying the image to be processed. The multimedia information can be at least one of an image, a video, a text, and an audio.
[0060] In the embodiments of the present disclosure, the display adjustment operation can be implemented in various ways, which can include parameter editing and / or drag trigger operation, etc. For example, when the display adjustment operation for the first image region is detected, a parameter editing page corresponding to the first image region can be displayed, which can include at least a display position editing item and a display size editing item. The user can input the corresponding display parameters based on the corresponding editing items. Further, when the trigger operation for the editing completion control is detected, the display information of the first image region in the image display interface can be updated according to the display parameters included in the parameter editing page. Alternatively, when the selection trigger operation for the second image region is detected, the selected second image region can be dragged to any position in the image display interface through the drag trigger operation. Further, when the selected second image region stops moving, the position at which the second image region stops moving can be used as the adjusted display position of the second image region, and the display position of the second image region in the image display interface can be updated.
[0061] As an optional implementation in the embodiments of the present disclosure, before responding to the rendering request for the target special effect, the display adjustment operation can be input for the first image region and / or the second image region. Further, when the display adjustment operation input for the first image region and / or the second image region is detected, the display information of the first image region and / or the second image region in the image display interface can be updated according to the input display adjustment operation.
[0062] As another optional implementation in the embodiments of the present disclosure, after the third image region presents the special effect effect of the target special effect, the display adjustment operation can also be input for the first image region and / or the second image region. Further, when the display adjustment operation input for the first image region and / or the second image region is detected, the display information of the first image region and / or the second image region in the image display interface can be updated according to the input display adjustment operation. The advantage of such a setting is that the self-defined adjustment of the display information of the image display region is realized, and further, the display information of the image rendering region is adaptively adjusted, and the flexibility of the image rendering mode is improved.
[0063] In the embodiments of the present disclosure, for the case that the first image region is not blocked by the second image region, after the image to be processed is obtained, the special effect effect of the target special effect is presented in the first image region when the first image region is not blocked by the second image region.
[0064] As an optional implementation in the embodiments of the present disclosure, after the image to be processed is acquired, in the case that the first image region is not blocked by the second image region, all the pixel points in the first image region can be directly rendered with the target special effect according to the target special effect, so that the first image region presents the special effect effect of the target special effect. The advantage of such setting is that the target special effect is guaranteed to present the special effect effect in the first image region and the target special effect will not affect the picture content of the second image region, realizing the local processing of the image to be processed and the accurate rendering of the target special effect.
[0065] The technical scheme of the embodiments of the present disclosure acquires the image to be processed in response to the rendering request for the target special effect. The image to be processed includes a first image region and a second image region, and can display various image contents based on the image regions included in the image, enriching the display mode of the image content. Further, in the case that at least part of the first image region is blocked by the second image region, the third image region presents the special effect effect of the target special effect, solving the problem of single special effect effect presentation mode in the related art, realizing the fine processing of the image to be processed, accurately rendering the special effect to the third image region in the case that there is an overlapping picture in the image, and not covering the picture content of the second image region, that is, presenting the effect of special effect separation rendering for the overlapping picture, enriching the special effect rendering mode, increasing the content level of the image after special effect processing, and improving the special effect interaction experience.
[0066] FIG. 4 is a flowchart of another special effect processing method provided by the embodiments of the present disclosure. The technical scheme of the present embodiment is based on the above-mentioned embodiments. After the image to be processed is acquired, and before the third image region presents the special effect effect of the target special effect, the first image region and the second image region in the image to be processed can be determined, and the target position relationship between the first image region and the second image region can be determined. Then, the target special effect can be added to the first image region according to the target position relationship. The specific implementation can be referred to the description of the present embodiment. The technical features same as or similar to the foregoing embodiments are not described herein. As shown in FIG. 4, the method of the present embodiment can specifically include:
[0067] S210, acquiring the image to be processed in response to the rendering request for the target special effect.
[0068] S220, determining the first image region and the second image region in the image to be processed, and determining the first position relationship and the second position relationship between the first image region and the second image region.
[0069] The first position relationship is used to indicate whether there is an overlapping area in the first image area and the second image area. The second position relationship is used to indicate a position relationship between display layers corresponding to the first image area and the second image area. Optionally, the second position relationship can include that the display layer corresponding to the first image area is displayed in a lower layer of the display layer corresponding to the second image area; or the display layer corresponding to the first image area is displayed in an upper layer of the display layer corresponding to the second image area.
[0070] In the embodiments of the present disclosure, there can be multiple ways to determine the first image area and the second image area. Optionally, in response to a region division operation input for the image display interface or the to-be-processed image, the to-be-processed image is divided into at least two image display regions; and in response to a region selection operation input for the image display region, the first image area and / or the second image area in the to-be-processed image are determined based on the region selection operation. The advantage of this setting is that it realizes self-defined setting of the first image area and the second image area, enriches the display form of the to-be-processed image, realizes flexible setting of the rendering position of the target special effect, and enriches the rendering effect of the target special effect.
[0071] The region division operation can be understood as an operation of dividing the interface or the image into several regions. The region selection operation can be a selection trigger operation input for any image display region. In the embodiments of the present disclosure, before responding to the rendering request of the target special effect, the to-be-processed image has not been obtained, and the region division operation can be input for the image display interface, so that after the to-be-processed image is obtained, the to-be-processed image can be divided into at least two image display regions based on the input region division operation. Alternatively, after the to-be-processed image is obtained, the region division operation can be input for the to-be-processed image, and then the to-be-processed image can be divided into at least two image display regions based on the input region division operation. It should be noted that the implementation manner of the region division operation can include division parameter input and / or directly inputting a division trigger operation for the image display interface or the to-be-processed image, so as to determine a region boundary based on the division trigger operation. For example, after the to-be-processed image is obtained, a touch device or a touch point can directly act on the to-be-processed image, and a division trigger operation can be input for the to-be-processed image. Further, a region boundary can be determined according to the input division trigger operation. Then, the to-be-processed image can be divided into at least two image display regions according to the region boundary.
[0072] It should be noted that the first image area and the second image area can be determined based on the region selection operation; or the first image area or the second image area can be determined based on the region selection operation.
[0073] As an optional implementation of the embodiment of the present disclosure, after the image to be processed is divided into at least two image display regions, the first image region and the second image region can be determined based on the region selection operation in the case that the region selection operation is detected for any image display region.
[0074] As another optional implementation of the embodiment of the present disclosure, after the image to be processed is divided into at least two image display regions, in the case that the region selection operation is detected for any image display region, the selected image display region can be determined as the first image region (or the second image region) based on the region selection operation. Furthermore, the unselected image display region can be determined as the second image display region (or the first image region).
[0075] As an optional implementation of the embodiment of the present disclosure, for different image processing scenarios, the region layout mode of the image display interface including multiple image display regions can be preset. Furthermore, the first image region and the second image region in the image to be processed can be determined according to the region layout mode of the multiple image display regions in the image display interface.
[0076] In order to more clearly introduce the determination mode of the first image region and the second image region, the live broadcast scenario can be taken as an example for illustration: for example, in the live broadcast scenario, the image to be processed can include the live broadcast image of a first live broadcast account. Further, in the case that the first live broadcast account and at least one second live broadcast account are in a connected state, in order to simultaneously display the picture content of the live broadcast video stream corresponding to the first live broadcast account and the picture content of the live broadcast video stream corresponding to the second live broadcast account in the image to be processed. Furthermore, the image display region displaying the picture content of the live broadcast video stream corresponding to the first live broadcast account can be determined as the first image region, and the image display region displaying the picture content of the live broadcast video stream corresponding to the second live broadcast account can be determined as the second image region. The first live broadcast account can be understood as the account corresponding to the live broadcast page watched by the audience end triggering the target special effect. The second live broadcast account can be a live broadcast account in a connected state with the first live broadcast account. The region layout mode (including the display position and / or the display size, etc.) of the image display region in the image display interface for displaying the picture content of the live broadcast video stream corresponding to the first live broadcast account and the image display region for displaying the picture content of the live broadcast video stream corresponding to the second live broadcast account can be a default region layout mode preset in advance or a region layout mode customized by the user.
[0077] In the embodiments of the present disclosure, after the first image region and the second image region in the image to be processed are determined, in order to determine whether the second image region is displayed within the first image, or whether there is an overlapping region in the first image region and the second image region, the first positional relationship between the first image region and the second image region can be determined. It should be noted that the first image region and the second image region can be used to present the picture content of the same video stream, or can be used to present the picture content of different video streams.
[0078] Based on this, in the embodiments of the present disclosure, the first positional relationship between the first image region and the second image region can be determined based on the region key points and the size information of the first image region and the second image region. Optionally, determining the first positional relationship between the first image region and the second image region comprises: determining the first key points and the first size information of the first image region, and the second key points and the second size information of the second image region; and determining the first positional relationship between the first image region and the second image region according to the first key points, the second key points, the first size information and the second size information.
[0079] The first key points can be any key points in the first image region. Optionally, the first key points can be region vertices or region center points, etc. The second key points can be any key points in the second image region. Optionally, the second key points can be region vertices or region center points. It should be noted that in order to determine the first positional relationship between the first image region and the second image region through the first key points and the second key points, the selected first key points and the second key points can be key points with certain positional relationship. That is, the position of the first key points relative to the first image region and the position of the second key points relative to the second image region are the same. For example, assuming that the position of the first key points relative to the first image region is the lower left of the image, that is, the first key points are the lower left corner vertices of the first image region. Correspondingly, the position of the selected second key points relative to the second image region is also the lower left of the image, that is, the second key points are the lower left corner vertices of the second image region. The first size information can be information representing the area size of the first image region. The second size information can be information representing the area size of the second image region. The first size information and the second size information can both include region length, region width, region radius or region area, etc.
[0080] In the embodiments of the present disclosure, the determination manner of the first key points, the second key points, the first size information and the second size information can include multiple manners. Optionally, it can be determined directly based on the display information of the first image region and the second image region in the image to be processed; or the stored display information of the first image region and the second image region is called, etc.
[0081] In the embodiments of the present disclosure, for each second image region included in the to-be-processed image, the position information and the first size information of the first key point of the first image region in the to-be-processed image can be determined, the second key point of the second image region can be determined according to the position of the first key point relative to the first image region, and the position information and the second size information of the second key point in the to-be-processed image can be determined. Further, the position information corresponding to all first preset key points in the first image region can be determined according to the position information and the first size information corresponding to the first key point, and the position information corresponding to all second preset key points in the second image region can be determined according to the position information and the second size information corresponding to the second key point. Further, the first position relationship between the first image region and the second image region can be determined according to the position information corresponding to all first preset key points and the position information corresponding to all second preset key points. The position information can be represented by the coordinate information of the key point in the image. The preset key point can be a region vertex. The advantage of such a setting is that the effect of quickly determining whether there is an overlapping region in the first image region and the second image region is achieved, the rendering calculation amount is reduced, and thus the rendering efficiency is improved.
[0082] It should be noted that the determination manner of the position information corresponding to the first key point, the position information corresponding to the second key point, the first size information and the second size information can include multiple manners. Optionally, the display information of the first image region and the second image region in the to-be-processed image can be directly determined; or the display information stored by the first image region and the second image region can be called, etc.
[0083] As an optional implementation in the embodiments of the present disclosure, the first key point comprises a top-right corner vertex of the first image region, and the first size information comprises a first region width and a first region height; the second key point comprises a top-right corner vertex of the second image region, and the second size information comprises a second region width and a second region height. A first value is obtained by adding the horizontal coordinate of the first key point to the first region width, and the first value is compared with the horizontal coordinate of the second key point to determine the size relationship between the two values. A second value is obtained by adding the horizontal coordinate of the second key point to the second region width, and the second value is compared with the horizontal coordinate of the first key point to determine the size relationship between the two values. A third value is obtained by adding the vertical coordinate of the first key point to the first region height, and the third value is compared with the vertical coordinate of the second key point to determine the size relationship between the two values. A fourth value is obtained by adding the vertical coordinate of the second key point to the second region height, and the fourth value is compared with the vertical coordinate of the second key point to determine the size relationship between the two values. Further, in the case that the first value is less than the horizontal coordinate of the second key point, the second value is less than the horizontal coordinate of the first key point, the third value is less than the vertical coordinate of the second key point, the fourth value is less than the vertical coordinate of the second key point, and the first region width is greater than the second region width, it can be determined that the first position relationship between the first image region and the second image region is that there is an overlapping region in the first image region and the second image region. In the case that any one of the above conditions is not met, it can be determined that the first position relationship between the first image region and the second image region is that there is no overlapping region in the first image region and the second image region.
[0084] In the embodiments of the present disclosure, after the first image region and the second image region are determined, the display position of the display layer corresponding to the first image region and the display position of the display layer corresponding to the second image region can be determined respectively. Then, the relative position relationship between the two display positions can be determined. Further, the relative position relationship can be taken as the second position relationship between the first image region and the second image region.
[0085] As an optional implementation of the embodiments of the present disclosure, determining the second position relationship between the first image region and the second image region comprises: in response to a layer editing trigger operation for the first image region and the second image region, and based on the layer editing trigger operation, determining the second position relationship between the first image region and the second image region.
[0086] The layer editing trigger operation can be an operation of editing the display position of the display layer corresponding to the image display region.
[0087] In the embodiments of the present disclosure, the layer editing trigger operation can be input for the first image region and the second image region. Further, in a case where the layer editing trigger operation for the first image region and the second image region is detected, the display position relationship of the display layer corresponding to the first image display region relative to the display position of the display layer corresponding to the second image display region is determined based on the layer editing trigger operation. Furthermore, the second position relationship of the first image region and the second image region can be determined.
[0088] As another optional implementation of the embodiments of the present disclosure, the second position relationship of the first image region and the second image region is determined, including: determining the region display order of the first image region and the second image region in the to-be-processed image; and determining the second position relationship of the first image region and the second image region based on the display order.
[0089] The region display order can be understood as the order in which the image region appears and is displayed in the to-be-processed image. The region display order can be determined according to the time when the image region starts to be displayed in the to-be-processed image.
[0090] In the embodiments of the present disclosure, the region display order of the first image region and the second image region in the to-be-processed image can be determined according to the time when the first image region starts to be displayed in the to-be-processed image and the time when the second image region starts to be displayed in the to-be-processed image. Further, the display position relationship of the display layer corresponding to the first image display region relative to the display position of the display layer corresponding to the second image display region can be determined according to the region display order. Furthermore, the second position relationship of the first image region and the second image region can be determined. For example, assuming that the region display order corresponding to the first image region and the second image region is that the first image region is displayed before the second image region, it can be determined that the second position relationship of the first image region and the second image region is that the display layer corresponding to the first image region is displayed below the display layer corresponding to the second image region. Assuming that the region display order corresponding to the first image region and the second image region is that the second image region is displayed before the first image region, it can be determined that the second position relationship of the first image region and the second image region is that the display layer corresponding to the first image region is displayed above the display layer corresponding to the second image region.
[0091] S230, determining a target position relationship between the first image region and the second image region according to the first position relationship and the second position relationship; wherein the target position relationship includes that at least part of the first image region is occluded by the second image region, or the first image region is not occluded by the second image region.
[0092] The target position relationship can be used to represent a relationship of a display position of the second image region relative to a display position of the first image region. The target position relationship includes that at least a partial region of the first image region is occluded by the second image region, or that the first image region is not occluded by the second image region.
[0093] In the embodiments of the present disclosure, in a case where it is determined that the first position relationship is that there is an overlapping region in the first image region and the second image region, and the second position relationship is that the display layer corresponding to the first image region is displayed in a lower layer of the display layer corresponding to the second image region, it can be determined that the target position relationship between the first image region and the second image region is that at least a partial region of the first image region is occluded by the second image region. In a case where any one of the above conditions is not met, it can be determined that the target position relationship between the first image region and the second image region is that the first image region is not occluded by the second image region.
[0094] In a case where at least a partial region in the first image region is occluded by the second image region, the third image region presents a special effect effect of the target special effect.
[0095] The technical scheme of the embodiments of the present disclosure determines the first image region and the second image region in the to-be-processed image, and determines the first position relationship and the second position relationship of the first image region and the second image region. The first position relationship is used to indicate whether there is an overlapping region in the first image region and the second image region. The second position relationship is used to indicate a position relationship between display layers corresponding to the first image region and the second image region. Further, the target position relationship between the first image region and the second image region is determined according to the first position relationship and the second position relationship. The target position relationship includes that at least a partial region of the first image region is occluded by the second image region, or that the first image region is not occluded by the second image region. Further, in a case where at least a partial region in the first image region is occluded by the second image region, the third image region presents a special effect effect of the target special effect. The embodiments of the present disclosure achieve the effect of quickly determining the first image region, the second image region, and the target position relationship therebetween, and improve the accuracy of rendering the special effect to the target image region.
[0096] FIG. 5 is a flowchart of another special effect processing method provided by the embodiments of the present disclosure. The technical scheme of the present embodiment is based on the above-mentioned embodiments, and generates a mask image according to the display positions of the first image region and the second image region in the to-be-processed image. The target pixel points in the first image region that belong to the third image region are determined according to the mask image, the target pixel points are rendered with the target special effect, and the special effect effect is presented. The specific implementation can be referred to the description of the present embodiment. The technical features same as or similar to the foregoing embodiments are not described herein. As shown in FIG. 5, the method can specifically include:
[0097] S310, in response to the rendering request for the target special effect, obtaining a to-be-processed image; wherein the to-be-processed image includes a first image region and a second image region.
[0098] S320, in a case where at least part of the first image region is occluded by the second image region, generating a mask image according to display positions of the first image region and the second image region in the to-be-processed image.
[0099] The mask image is used to identify the second image region in the first image region. The mask image can be an image obtained after distinguishing the first image region and the second image region in the image. It should be noted that the image size of the mask image can be greater than or equal to the image size of the first image region. Specifically, the value of a pixel point located in the second image region can be set to a first numerical value according to the display position of the second image region, and the pixel value of a pixel point in a region (i.e., a third image region) of the first image region other than the second image region can be set to a second numerical value. Exemplarily, the first numerical value is 0, and the second numerical value is 1; or the first numerical value is 1, and the second numerical value is 0.
[0100] FIG. 6 is a schematic diagram of a mask image of a to-be-processed image provided by an embodiment of the present disclosure. As shown in FIG. 6, assuming that region 1 is a first image region, and regions 2 and 3 are second image regions, the transparency of all region pixel points of region 1 can be adjusted to 0, and the transparency of all region pixel points of regions 2 and 3 can be adjusted to 1, that is, the schematic diagram shown in FIG. 6 can be obtained.
[0101] It should be noted that the display positions of the first image region and the second image region in the to-be-processed image can be determined according to the interface layout of a plurality of image display regions in an image display interface, or according to a region division result of the to-be-processed image.
[0102] S330, determining a target pixel point belonging to the third image region in the first image region according to the mask image, performing special effect rendering on the target pixel point according to the target special effect, and presenting a special effect.
[0103] In the embodiment of the present disclosure, for each region pixel point in the first image region, whether it belongs to the target pixel point of the third image region can be determined according to the pixel value of the region pixel point in the mask image. If it belongs to the target pixel point of the third image region, the target special effect is used for special effect rendering, otherwise the target special effect is not used for special effect rendering. For example, assuming that the pixel value of the pixel point of the first image region in the mask image is 0, and the pixel value of the pixel point of the second image region is 1, at this time, for each region pixel point in the first image region, if the pixel value of the region pixel point in the mask image is 0, the target special effect is used for special effect rendering, if the pixel value of the region pixel point in the mask image is 1, the target special effect is not used for special effect rendering.
[0104] The technical scheme of the embodiment of the present disclosure can simply and effectively determine the region that needs to be rendered with special effects and the region that does not need to be rendered with special effects by generating a mask image according to the display positions of the first image region and the second image region in the to-be-processed image in the case that at least part of the first image region is blocked by the second image region. Further, the target pixel point of the third image region in the first image region is determined according to the mask image, the target pixel point is rendered with special effects according to the target special effect, and the special effect effect is presented, thereby realizing the effect of accurately and quickly determining the image display region that needs to be rendered with special effects, and further improving the accuracy of rendering special effects to the target image region, making the overlapping picture present the effect of special effect separation rendering, enriching the special effect rendering mode, and improving the special effect interaction experience.
[0105] FIG. 7 is a structural schematic diagram of a special effect processing device provided by an embodiment of the present disclosure. As shown in FIG. 7, the device comprises an image acquisition module 410 and a special effect presentation module 420. The image acquisition module 410 is configured to acquire a to-be-processed image in response to a rendering request for a target special effect, wherein the to-be-processed image comprises a first image region and a second image region, and the first image region is a region to which the target special effect is to be added. The special effect presentation module 420 is configured to present a special effect effect of the target special effect in a third image region in the case that at least part of the first image region is blocked by the second image region, wherein the third image region is a region in the first image region except the second image region.
[0106] On the basis of each of the optional technical solutions above, the device further comprises an image region determination module and a position relationship determination module. The image region determination module is configured to, after the image to be processed is acquired, determine a first image region and a second image region in the image to be processed and determine a first position relationship and a second position relationship of the first image region and the second image region before the target special effect is rendered in the third image region; the first position relationship is used to indicate whether there is an overlapping region in the first image region and the second image region; the second position relationship is used to indicate a position relationship between display layers corresponding to the first image region and the second image region; the position relationship determination module is configured to determine a target position relationship between the first image region and the second image region according to the first position relationship and the second position relationship; the target position relationship includes that at least part of the first image region is blocked by the second image region or the first image region is not blocked by the second image region.
[0107] On the basis of each of the optional technical solutions above, the image region determination module comprises a region division unit and a region determination unit. The region division unit is configured to divide the image to be processed into at least two image display regions in response to a region division operation input for the image display interface or the image to be processed; the region determination unit is configured to determine a first image region and / or a second image region in the image to be processed based on a region selection operation for the image display regions in response to the region selection operation.
[0108] On the basis of each of the optional technical solutions above, the image region determination module comprises a size information determination unit and a first position relationship determination unit. The size information determination unit is configured to determine a first key point and first size information of the first image region and a second key point and second size information of the second image region; the first key point has the same position relative to the first image region as the second key point has relative to the second image region; the first position relationship determination unit is configured to determine a first position relationship of the first image region and the second image region according to the first key point, the second key point, the first size information, and the second size information.
[0109] On the basis of each of the optional technical solutions above, the special effect presentation module 420 comprises: a mask image generation unit and a special effect presentation unit. The mask image generation unit is configured to generate a mask image according to the display positions of the first image region and the second image region in the to-be-processed image; the mask image is used to identify the second image region in the first image region; the special effect presentation unit is configured to determine target pixel points in the first image region that belong to the third image region according to the mask image, perform special effect rendering on the target pixel points according to the target special effect, and present the special effect effect.
[0110] On the basis of each of the optional technical solutions above, the device further comprises a region adjustment module. The region adjustment module is configured to, before the response to the rendering request for the target special effect, or after the presentation of the special effect effect of the target special effect, update region display information of the first image region and / or the second image region in an image display interface in response to a display adjustment operation for the first image region and / or the second image region, wherein the display information at least comprises a display position and / or a display size.
[0111] On the basis of each of the optional technical solutions above, the device further comprises a special effect presentation module. The special effect presentation module is configured to, after the acquisition of the to-be-processed image, present the special effect effect of the target special effect in the first region in the case that the first image region is not occluded by the second image region.
[0112] On the basis of each of the optional technical solutions above, the first image region and the second image region are used to present picture content of different video streams.
[0113] On the basis of each of the optional technical solutions above, the to-be-processed image comprises a live image corresponding to a first live account; the first image region is used to display picture content of a live video stream corresponding to the first live account; and the second image region is used to display picture content of a live video stream corresponding to a second live account.
[0114] The technical scheme of the embodiments of the present disclosure, in response to a rendering request for a target special effect, acquires a to-be-processed image; wherein the to-be-processed image includes a first image region and a second image region, and can display various image contents based on the image regions included in the image, thereby enriching the display mode of the image content. Further, in the case that at least part of the first image region is blocked by the second image region, the special effect effect of the target special effect is presented in a third image region, thereby solving the problem of single special effect effect presentation mode in the related art, realizing fine processing of the to-be-processed image, accurately rendering the special effect to the third image region in the case that there is an overlapping picture in the image, and not covering the picture content of the second image region, that is, presenting the effect of special effect separation rendering for the overlapping picture, thereby enriching the special effect rendering mode, increasing the content level of the image after special effect processing, and improving the special effect interaction experience.
[0115] The special effect processing apparatus provided in the embodiments of the present disclosure can execute the special effect processing method provided in any of the embodiments of the present disclosure, and has the function modules and beneficial effects corresponding to the execution method. It should be noted that each unit and module included in the apparatus is only divided according to the function logic, but is not limited to the above division, as long as the corresponding functions can be implemented; in addition, the specific names of each function unit are only for convenient mutual distinction, and do not limit the protection scope of the embodiments of the present disclosure.
[0116] FIG. 8 is a structural schematic diagram of an electronic device provided in the embodiments of the present disclosure. Referring to FIG. 8, a structural schematic diagram of an electronic device (for example, a terminal device or a server in FIG. 8) 500 suitable for implementing the embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (for example, vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in FIG. 8 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.
[0117] As shown in FIG. 8, the electronic device 500 can include a processing apparatus (for example, a central processor, a graphics processor, and the like) 501, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or loaded into a random access memory (RAM) 503 from a storage apparatus 508. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing apparatus 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An editing / output (I / O) interface 505 is also connected to the bus 504.
[0118] Generally, the following devices can be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, a magnetic tape, a hard disk, and the like; and communication devices 509. The communication devices 509 can allow the electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although FIG. 8 illustrates the electronic device 500 with various devices, it is understood that all of the illustrated devices are not required to be implemented or possessed. More or fewer devices can be alternatively implemented or possessed.
[0119] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 509, or installed from the storage devices 508, or installed from the ROM 502. When the computer program is executed by the processing devices 501, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0120] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0121] The electronic device provided by the embodiments of the present disclosure and the special effect processing method provided by the above-described embodiments belong to the same inventive concept, and the technical details not described in detail in the embodiments of the present disclosure can be referred to the above-described embodiments, and the present embodiments have the same beneficial effects as the above-described embodiments.
[0122] The embodiments of the present disclosure provide a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the special effect processing method provided by the above-described embodiments.
[0123] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium that can send, propagate or transfer the program for use by or in connection with the instruction execution system, apparatus or device. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the above.
[0124] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0125] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device, and not be assembled into the electronic device.
[0126] The computer readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to: in response to a rendering request for a target special effect, acquire a to-be-processed image; wherein the to-be-processed image includes a first image region and a second image region; the first image region is a region to which the target special effect is to be added; in a case where at least part of the first image region is occluded by the second image region, present a special effect effect of the target special effect in a third image region; wherein the third image region is a region of the first image region other than the second image region.
[0127] Computer program code for carrying out operations of the present disclosure can be written in any of one or more programming languages or combinations of languages including object or visual programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0128] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0129] The units described in the embodiments of the present disclosure can be implemented in the form of software, or can be implemented in the form of hardware. In some cases, the names of the units do not constitute a limitation on the units themselves. For example, the first obtaining unit can also be described as a unit that obtains at least two Internet protocol addresses.
[0130] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that can be used include: Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0131] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage media can include, without limitation, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include, but are not limited to, an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] According to one or more embodiments of the present disclosure, example one provides a special effect processing method, comprising: in response to a rendering request for a target special effect, obtaining a to-be-processed image; wherein the to-be-processed image comprises a first image region and a second image region; the first image region is a region to which the target special effect is to be added; in the case that at least part of the first image region is occluded by the second image region, presenting a special effect effect of the target special effect in a third image region; wherein the third image region is a region of the first image region other than the second image region.
[0133] According to one or more embodiments of the present disclosure, example two provides the method of example one, further comprising: optionally, after the obtaining the to-be-processed image, before the rendering the special effect effect of the target special effect in the third image region, further comprising: determining a first image region and a second image region in the to-be-processed image, and determining a first position relationship and a second position relationship of the first image region and the second image region; wherein the first position relationship is used to indicate whether there is an overlapping region in the first image region and the second image region; the second position relationship is used to indicate a position relationship between display layers corresponding to the first image region and the second image region; determining a target position relationship between the first image region and the second image region according to the first position relationship and the second position relationship; wherein the target position relationship includes that at least a partial region of the first image region is occluded by the second image region, or the first image region is not occluded by the second image region.
[0134] According to one or more embodiments of the present disclosure, example three provides the method of example two, further comprising: optionally, the determining the first image region and the second image region in the to-be-processed image comprises: in response to an area division operation input for an image display interface or the to-be-processed image, dividing the to-be-processed image into at least two image display regions; in response to an area selection operation for the image display region, determining the first image region and / or the second image region in the to-be-processed image based on the area selection operation.
[0135] According to one or more embodiments of the present disclosure, example four provides the method of example two, further comprising: optionally, the determining the first position relationship between the first image region and the second image region comprises: determining a first key point and first size information of the first image region, and a second key point and second size information of the second image region; wherein the position of the first key point relative to the first image region and the position of the second key point relative to the second image region are the same; determining the first position relationship of the first image region and the second image region according to the first key point, the second key point, the first size information, and the second size information.
[0136] According to one or more embodiments of the present disclosure, example five provides the method of example one, further including: optionally, the presenting the special effect effect of the target special effect in the third image region includes: generating a mask image according to display positions of the first image region and the second image region in the to-be-processed image; wherein the mask image is used to identify the second image region in the first image region; determining target pixel points belonging to the third image region in the first image region according to the mask image, performing special effect rendering on the target pixel points according to the target special effect, and presenting the special effect effect.
[0137] According to one or more embodiments of the present disclosure, example six provides the method of example one, further including: optionally, before the responding to the rendering request for the target special effect, or after the presenting the special effect effect of the target special effect in the third image region, further including: in response to a display adjustment operation for the first image region and / or the second image region, updating region display information of the first image region and / or the second image region in an image display interface, wherein the display information at least includes a display position and / or a display size.
[0138] According to one or more embodiments of the present disclosure, example seven provides the method of example one, further including: optionally, after the obtaining the to-be-processed image, further including: in a case where the first image region is not occluded by the second image region, presenting the special effect effect of the target special effect in the first image region.
[0139] According to one or more embodiments of the present disclosure, example eight provides the method of example one, further including: optionally, the first image region and the second image region are used to present picture content of different video streams.
[0140] According to one or more embodiments of the present disclosure, example nine provides the method of example eight, further including: optionally, the to-be-processed image includes a live image corresponding to a first live account; the first image region is used to display picture content of a live video stream corresponding to the first live account; and the second image region is used to display picture content of a live video stream corresponding to a second live account.
[0141] According to one or more embodiments of the present disclosure, example ten provides a special effect processing apparatus, comprising: an image acquisition module configured to acquire a to-be-processed image in response to a rendering request for a target special effect; wherein the to-be-processed image comprises a first image region and a second image region; the first image region is a region to which the target special effect is to be added; and a special effect presentation module configured to present a special effect effect of the target special effect in a third image region in a case where at least part of the first image region is occluded by the second image region; wherein the third image region is a region of the first image region other than the second image region.
[0142] The above description is merely illustrative of the exemplary embodiments of the present disclosure and the principles of the technology involved. It should be understood by those skilled in the art that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or equivalent features, without departing from the above disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions.
[0143] In addition, although each operation is depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination.
[0144] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely illustrative of exemplary forms of implementing the claims.
Claims
1. A special effects processing method, comprising: In response to a rendering request for a target special effect, an image to be processed is obtained; wherein the image to be processed includes a first image area and a second image area; the first image area is the area to which the target special effect is to be added; When at least part of the first image area is blocked by the second image area, the special effect of the target special effect is presented in the third image area; wherein the third image area is the area of the first image area excluding the second image area.
2. The special effect processing method according to claim 1, wherein: After acquiring the image to be processed and before presenting the special effect of the target special effect in the third image area, the method further includes: Determining a first image area and a second image area in the image to be processed, and determining a first positional relationship and a second positional relationship between the first image area and the second image area; wherein the first positional relationship is used to indicate whether there is an overlapping area between the first image area and the second image area; and the second positional relationship is used to indicate a positional relationship between display layers corresponding to the first image area and the second image area; A target position relationship between the first image area and the second image area is determined based on the first position relationship and the second position relationship; wherein the target position relationship includes at least a portion of the first image area being obscured by the second image area, or the first image area is not obscured by the second image area.
3. The special effect processing method according to claim 2, wherein: The determining of the first image area and the second image area in the image to be processed includes: In response to an area division operation input on an image display interface or the image to be processed, dividing the image to be processed into at least two image display areas; In response to an area selection operation for the image display area, a first image area and / or a second image area in the image to be processed is determined based on the area selection operation.
4. The special effect processing method according to claim 2 or 3, wherein: Determining a first positional relationship between a first image region and a second image region in the image to be processed includes: Determining a first key point and first size information of the first image region, and a second key point and second size information of the second image region; wherein a position of the first key point relative to the first image region is the same as a position of the second key point relative to the second image region; A first positional relationship between the first image area and the second image area is determined according to the first key point, the second key point, the first size information, and the second size information.
5. The special effect processing method according to any one of claims 1 to 4, wherein: The presenting of the target special effect in the third image area includes: generating a mask image according to display positions of the first image area and the second image area in the image to be processed; wherein the mask image is used to identify the second image area in the first image area; A target pixel point in the first image area that belongs to the third image area is determined according to the mask image, and special effects rendering is performed on the target pixel point according to the target special effect to present a special effect.
6. The special effect processing method according to any one of claims 1 to 5, wherein: Before responding to the rendering request for the target special effect, or after presenting the special effect of the target special effect in the third image area, the method further includes: In response to a display adjustment operation on the first image area and / or the second image area, the area display information of the first image area and / or the second image area in the image display interface is updated, wherein the display information includes at least a display position and / or a display size.
7. The special effect processing method according to any one of claims 1 to 6, wherein: After acquiring the image to be processed, the method further includes: When the first image area is not blocked by the second image area, the special effect of the target special effect is presented in the first image area.
8. The special effect processing method according to any one of claims 1 to 7, wherein: The first image area and the second image area are used to present picture contents of different video streams.
9. The special effect processing method according to claim 8, wherein: The image to be processed includes a live broadcast image corresponding to a first live broadcast account; the first image area is used to display the screen content of the live broadcast video stream corresponding to the first live broadcast account; and the second image area is used to display the screen content of the live broadcast video stream corresponding to a second live broadcast account.
10. A special effects processing device, comprising: An image acquisition module is configured to acquire an image to be processed in response to a rendering request for a target special effect; wherein the image to be processed includes a first image area and a second image area; the first image area is the area to which the target special effect is to be added; The special effects presentation module is configured to present the special effects of the target special effects in a third image area when at least a portion of the first image area is blocked by the second image area; wherein the third image area is the area of the first image area excluding the second image area.
11. An electronic device comprising: one or more processors; A storage device configured to store one or more programs, wherein When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the special effect processing method according to any one of claims 1 to 9.
12. A storage medium containing computer-executable instructions, wherein: When the computer executable instructions are executed by a computer processor, they are used to execute the special effect processing method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the computer program implements the special effect processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Live broadcast display method and device, electronic equipment and storage medium
CN111901624A
Image rendering method and device, equipment and storage medium
CN115311397A
Live broadcast special effect rendering method, device and equipment, readable storage medium and product
CN115442637A
Editing method and device of special effect layer, electronic equipment and storage medium
CN115953493A
Special effect processing method and device, electronic equipment and storage medium
CN116360661A