WO2025213822A1 - 特效处理方法、装置、电子设备、存储介质及程序产品 - Google Patents

特效处理方法、装置、电子设备、存储介质及程序产品

Info

Publication number
WO2025213822A1
WO2025213822A1 PCT/CN2024/138789 CN2024138789W WO2025213822A1 WO 2025213822 A1 WO2025213822 A1 WO 2025213822A1 CN 2024138789 W CN2024138789 W CN 2024138789W WO 2025213822 A1 WO2025213822 A1 WO 2025213822A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
image area
area
special effect
processed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/138789
Other languages
English (en)
French (fr)
Inventor
谢理想
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Publication of WO2025213822A1 publication Critical patent/WO2025213822A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/816Monomedia components thereof involving special video data, e.g 3D video
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas

Definitions

  • the embodiments of the present disclosure relate to a special effects processing method, device, electronic device, storage medium, and program product.
  • special effects rendering typically involves applying special effects processing to the entire image content of the image being processed, resulting in a complete presentation of the special effects. For example, a facial special effect would be applied to all faces within the image being processed. This approach to special effects processing results in a relatively limited presentation method, which has certain limitations and impacts the user experience.
  • the present disclosure provides a special effects processing method, device, electronic device, storage medium and program product to achieve the effect of accurately rendering special effects into the target picture when there are overlapping pictures in the image, and not rendering special effects into other pictures, that is, presenting the effect of separate rendering of special effects for overlapping pictures.
  • an embodiment of the present disclosure provides a special effects processing method, the method comprising:
  • 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;
  • 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.
  • an embodiment of the present disclosure further provides a special effects processing device, the 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;
  • a special effects presentation module is used to present the special effects of the target special effects in a third image area when at least part 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.
  • an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the special effects processing method as described in any one of the embodiments of the present disclosure.
  • an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the special effects processing method as described in any one of the embodiments of the present disclosure.
  • an embodiment of the present disclosure further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the special effects processing method as described in any one of the embodiments of the present disclosure.
  • FIG1 is a schematic flow chart of a special effects processing method provided by an embodiment of the present disclosure
  • FIG2 is a schematic diagram of an effect of an image to be processed provided by an embodiment of the present disclosure
  • FIG3 is another schematic diagram of the effect of an image to be processed provided by an embodiment of the present disclosure.
  • FIG4 is a flow chart of another special effects processing method provided by an embodiment of the present disclosure.
  • FIG5 is a flow chart of another special effects processing method provided by an embodiment of the present disclosure.
  • FIG6 is a schematic diagram of an effect of a mask image provided by an embodiment of the present disclosure.
  • FIG7 is a schematic structural diagram of a special effects processing device provided by an embodiment of the present disclosure.
  • FIG8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the term “including” and its variations are open-ended, i.e., “including but not limited to.”
  • the term “based on” means “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,” and the term “some embodiments” means “at least some embodiments.”
  • Other terms are defined in the following description.
  • a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
  • the prompt information in response to receiving a user's active request, may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form.
  • the pop-up window may also contain a selection control for the user to select "agree” or “disagree” to provide personal information to the electronic device.
  • the application scenario can be first described.
  • the technical solution can be applied to any scenario in which special effects processing is performed on an image or video including at least two image display areas.
  • the execution process of the present technical solution can be described by taking the live broadcast scenario as an example.
  • 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 screen content of the live video stream corresponding to the first live broadcast account, and the second live broadcast area is used to display the screen content of the live video stream corresponding to the second live broadcast account.
  • the image to be processed includes the first image area and the second image area. Furthermore, special effects processing is performed on the image to be processed according to the target special effect. Since the input source of the special effects processing is a single image, the entire image is generally rendered with special effects to obtain a special effects image.
  • the image to be processed when a rendering request for a target special effect is detected, an image to be processed is obtained in response to the rendering request.
  • the image to be processed may include a first image area and a second image area, and the first image area is the area to which the target special effect is to be added.
  • the special effect of the target special effect can be presented in the area.
  • the special effect is accurately rendered into the target picture, and the special effect is not rendered on other pictures, that is, the effect of separate rendering of special effects for overlapping pictures is presented, which enriches the special effect rendering method and improves the special effect interactive experience.
  • Figure 1 is a flow chart of a special effects processing method provided by an embodiment of the present disclosure.
  • the present disclosure embodiment is applicable to the case where special effects processing is performed on any image when there are overlapping images in the image.
  • the method can be executed by a special effects processing device, which can be implemented in the form of software and/or hardware.
  • a special effects processing device which can be implemented in the form of software and/or hardware.
  • it can be implemented by an electronic device, which can be a mobile terminal, PC, or server.
  • the method of this embodiment may specifically include:
  • the target special effect can be understood as the special effect to be applied to the image triggered by the user.
  • the special effects displayed in the interface can be set in advance to a selectable trigger state.
  • the selected special effect can be used 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 image to be processed can be an image to be processed with special effects.
  • the image to be processed can be an image captured based on the terminal device, or it can be an image obtained from the target storage space (such as the image library of the application software, or the terminal album, etc.) in response to the user's trigger operation, or it can be an image uploaded from an external device, etc.
  • the target storage space such as the image library of the application software, or the terminal album, etc.
  • the first image area can be understood as the area in the image to be processed that is used to present the screen content. Furthermore, the first image area can be the area in the image to be processed to which the target special effects are added.
  • the second image area can also be understood as the area in the image to be processed that is different from the first image area and is used to present the screen content.
  • the first image area and the second image area can be areas in the image to be processed that respectively present different screen contents.
  • the first image area and the second image area can be used to present the screen content of different video frames of the same video stream. For example, the screen content corresponding to different video frames of the same video can be displayed based on the first image area and the second image area.
  • the first image area and the second image area can be used to present the screen content of different video streams.
  • the first image area and the second image area correspond to different video streams.
  • the first image area and the second image area, the image to be processed, the first image area and the second image area can be explained using a live broadcast scenario as an example.
  • the image to be processed includes a live image corresponding to the first live account; the first image area is used to display the screen content of the live video stream corresponding to the first live account; and the second image area is used to display the screen content of the live video stream corresponding to the second live account.
  • the first live broadcast account can be understood as the account corresponding to the live broadcast page viewed by the viewer who triggered the target special effect.
  • the live broadcast image can be the image content displayed in the live broadcast interface corresponding to the first live broadcast account.
  • the second live broadcast account can be a live broadcast account that is connected to the first live broadcast account.
  • the live video stream can be understood as the media data stream corresponding to the live broadcast process, or it can be understood as the content of the live video stream displayed in the live broadcast display area, that is, the live screen.
  • the triggered live broadcast account when a trigger operation for entering the live broadcast room of a live broadcast account is detected, the triggered live broadcast account can be used as the first live broadcast account, and the live broadcast image corresponding to the first live broadcast account can be displayed.
  • the image to be processed can be used as the first image area, that is, the image to be processed is the screen content of the live broadcast video stream corresponding to the first live broadcast account.
  • the first live broadcast account is connected to at least one other live broadcast account
  • at least one other live broadcast account connected to the first live broadcast account can be used as the second live broadcast account, and the live broadcast video stream corresponding to the second live broadcast account can be obtained.
  • the image to be processed may include a first image area and a second image area.
  • the first image area can be used to display the screen content of the live broadcast video stream corresponding to the first live broadcast account.
  • the second image area can be used to display the screen content of the live broadcast video stream corresponding to the second live broadcast account.
  • first image area and the second image area can be displayed in a variety of ways within the image to be processed.
  • the first image area and the second image area can be displayed within the image to be processed by adjusting the display size of the first image area within the image to be processed and displaying the second image area at a preset position within the image to be processed.
  • the preset position can be any position within the image to be processed, for example, to the left, right, or bottom of the adjusted first image area.
  • the image to be processed can be divided into multiple areas, with the corresponding areas being designated as the first and second image areas.
  • FIG. 2 is a schematic diagram of an effect of a processed image provided by an embodiment of the present disclosure.
  • the image to be processed 20 includes three image areas: area 1, area 2, and area 3.
  • Area 1 can be the first image area, and areas 2 and 3 are both second image areas.
  • the target position relationship among the three areas is that at least a portion of area 1 is blocked by areas 2 and 3 .
  • the distribution of image areas in the image to be processed can be customized by the user; or, it can be set by default by the application software, and the embodiments of the present disclosure do not specifically limit this.
  • a rendering request for the target special effect may be generated. Further, in response to the rendering request, a to-be-processed image is obtained and processed according to the rendering request to add the target special effect to the first image region.
  • the third image area may be an area in the first image area excluding the second image area.
  • the shaded area in area 1 is the third image area.
  • the image to be processed includes a first image area and a second image area
  • the first image area and the second image area can be determined.
  • the target special effect can be added to the first image area so that the first image area presents the special effect of the target special effect.
  • the target special effect may also be rendered into the second image area included in the first image area.
  • an area other than the second image region in the first image region can be determined and used as a third image region. Furthermore, special effects rendering can be performed on the third image region based on a target special effect, so that the third image region exhibits the target special effect.
  • the first image area includes the entire area in the second image area; exemplarily, continuing to refer to Figure 2, area 1 includes the entire area of area 2 and area 3.
  • the first image area includes a part of the second image area.
  • Figure 3 is another effect schematic diagram of the image to be processed provided by an embodiment of the present disclosure. As shown in Figure 3, it is assumed that the image to be processed 20 includes two image areas, namely area 4 and area 5. Among them, area 4 can be used as the first image area, and area 5 can be used as the second image area. As can be seen from Figure 3, area 4 includes part of area 5. At this time, it can be determined that at least part of area 4 is blocked by area 5.
  • the first image area is obscured by the second image area.
  • the display layer corresponding to the second image area is located above the display layer of the first image area
  • the number of second image regions included in the first image region may be less than or equal to the number of second image regions included in the image to be processed.
  • the number of second image regions included in the first image region may be zero, one, two, or three, etc.
  • a target special effect is presented in the first image area. That is, special effects processing is performed on the screen content presented in the first image area according to the target special effect, so that the first image area presents the target special effect.
  • the area display information of the first image area and the second image area can be set by default by the application software, or can be customized based on user needs.
  • the area display information of the first image area and/or the second image area in the image display interface is updated.
  • the display adjustment operation can be understood as an operation for adjusting the display of the image area in the display interface.
  • the display adjustment operation may include at least a display size adjustment operation and/or a display position adjustment operation.
  • the display size adjustment operation may be an operation for adjusting the display size of the image area.
  • the display size may include one or more of display length, display width, display radius, and display area.
  • the display position adjustment operation may be an operation for adjusting the display position of the image area in the display interface.
  • the display position may be determined based on the coordinates of one or more preset key points in the image area (e.g., the center point of the area, a vertex of the area, or any point in the area) in the display interface.
  • the area display information can be used to characterize the specific display of the image area in the display interface.
  • the area display information may include at least the display size and/or display position.
  • the image display interface can be understood as an interface presented to the user for displaying an image.
  • the image display interface may be an interface for displaying the image to be processed. It should be noted that while the image display interface displays the image to be processed, other multimedia information may also be displayed.
  • the multimedia information may be at least one of images, videos, text, and audio.
  • display adjustment operations can be implemented in a variety of ways, including, optionally, parameter editing and/or drag-triggering operations.
  • a parameter editing page corresponding to the first image area can be displayed, which can include at least a display position editing item and a display size editing item.
  • the user can enter corresponding display parameters based on the corresponding editing items.
  • the area display information of the first image area in the image display interface can be updated based on the display parameters included in the parameter editing page.
  • the selected second image area upon detecting a selection trigger operation for a second image area, can be dragged to any location in the image display interface via a drag-triggering operation. Furthermore, upon detecting that the selected second image area has stopped moving, the stopped position can be used as the adjusted display position of the second image area, and the display position of the second image area in the image display interface can be updated.
  • a display adjustment operation may be input for the first image area and/or the second image area. Furthermore, upon detecting a display adjustment operation input for 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 may be updated based on the input display adjustment operation.
  • a display adjustment operation can also be input for the first image area and/or the second image area. Furthermore, when a display adjustment operation input for the first image area and/or the second image area is detected, the regional display information of the first image area and/or the second image area in the image display interface can be updated according to the input display adjustment operation.
  • the advantage of such a setting is that it achieves the effect of customized adjustment of the regional display information of the image display area, thereby enabling adaptive adjustment of the regional display information of the image rendering area, thereby improving the flexibility of the image rendering method.
  • the special effect of the target special effect is presented in the first image area when the first image area is not blocked by the second image area.
  • special effects rendering can be performed directly on all pixels in the first image area according to the target special effect, so that the first image area presents the special effects of the target special effect.
  • the technical solution of the embodiment of the present disclosure obtains an image to be processed by responding 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, and can display a variety of image contents based on the image areas included in the image, thereby enriching the display method of the image content. Furthermore, 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, which solves the problem of a single special effect presentation method in related technologies and realizes refined processing of the image to be processed.
  • the special effect is accurately rendered to the third image area without covering the picture content of the second image area, that is, the effect of separate rendering of special effects for the overlapping pictures is presented, enriching the special effect rendering method, increasing the content layering of the image after special effect processing, and improving the special effect interactive experience.
  • FIG4 is a flow chart of another special effects processing method provided by an embodiment of the present disclosure.
  • the technical solution of this embodiment is based on the above-mentioned embodiment.
  • the first image area and the second image area in the image to be processed can be determined, and the target position relationship between the first image area and the second image area can be determined.
  • the target special effects can be added to the first image area based on the target position relationship.
  • the method of this embodiment may specifically include:
  • the first positional relationship indicates whether there is an overlapping area between the first image area and the second image area.
  • the second positional relationship indicates the positional relationship between the display layers corresponding to the first image area and the second image area.
  • the second positional relationship may include the display layer corresponding to the first image area being displayed below the display layer corresponding to the second image area; or the display layer corresponding to the first image area being displayed above the display layer corresponding to the second image area.
  • the image to be processed in response to a region division operation on the image display interface or the input of the image to be processed, is divided into at least two image display areas; in response to a region selection operation on the image display area, the first image area and/or the second image area in the image to be processed is determined based on the region selection operation.
  • the advantage of this setting is that it enables customized settings of the first image area and the second image area, enriches the display form of the image to be processed, and enables flexible settings of the rendering position of the target special effect, thereby enriching the rendering effect of the target special effect.
  • the area division operation can be understood as an operation of dividing the interface or image into several areas.
  • the area selection operation can be a selection trigger operation input for any image display area.
  • a region division operation can be input for the image display interface, so that after acquiring the image to be processed, the image to be processed can be divided into at least two image display areas based on the input region division operation.
  • a region division operation can be input for the image to be processed, and then, the image to be processed can be divided into at least two image display areas based on the input region division operation.
  • the implementation method of the region division operation may include inputting division parameters and/or directly inputting a division trigger operation for the image display interface or the image to be processed, so as to determine the region dividing line based on the division trigger operation.
  • the image to be processed can be directly acted on by a touch device or a touch point, and a division trigger operation can be input for the image to be processed.
  • the region dividing line can be determined based on the input division trigger operation.
  • the image to be processed may be divided into at least two image display areas according to the area boundary line.
  • first image area and the second image area may be determined based on the area selection operation; or, the first image area or the second image area may be determined based on the area selection operation.
  • the first image area and the second image area can be determined respectively based on the area selection operation.
  • the selected image display area can be used as the first image area (or the second image area) based on the area selection operation. Furthermore, the unselected image display area can be used as the second image display area (or the first image area).
  • a regional layout of multiple image display areas can be pre-set in an image display interface for different image processing scenarios. Furthermore, the first image area and the second image area in the image to be processed are determined based on the pre-set regional layout of the multiple image display areas in the image display interface.
  • the image to be processed may include the live video of a first live streaming account.
  • the image display area displaying the live video stream content corresponding to the first live streaming account may be used as the first image area
  • the image display area displaying the live video stream content corresponding to the second live streaming account may be used as the second image area.
  • the first live streaming account can be understood as the account corresponding to the live streaming page viewed by the viewer that triggers the target special effect.
  • the second live streaming account can be a live streaming account that is connected to the first live streaming account.
  • the layout (including display position and/or display size, etc.) of the image display area for displaying the live video stream content corresponding to the first live streaming account and the image display area for displaying the live video stream content corresponding to the second live streaming account in the image display interface can be a pre-set default layout or a user-defined layout.
  • a first positional relationship between the first image region and the second image region can be determined in order to determine whether the second image region is displayed within the first image, or whether there is an overlapping area between the first image region and the second image region. It should be noted that the first image region and the second image region can be used to present the image content of the same video stream or the image content of different video streams.
  • a first positional relationship between the first image area and the second image area can be determined based on the area key points and size information of the first image area and the second image area.
  • determining the first positional relationship between the first image area and the second image area includes: determining a first key point and first size information of the first image area, and a second key point and second size information of the second image area; and determining the first positional relationship between the first image area and the second image area based on the first key point, the second key point, the first size information, and the second size information.
  • the first key point can be any key point in the first image region.
  • the first key point can be a vertex or center point of the region.
  • the second key point can be any key point in the second image region.
  • the second key point can be a vertex or center point of the region. It should be noted that in order to determine the first positional relationship between the first and second image regions using the first and second key points, the selected first and second key points can be key points that have a certain positional relationship. That is, 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.
  • the first size information can be information indicating the area size of the first image region.
  • the second size information can be information indicating the area size of the second image region. Both the first size information and the second size information can include area length, area width, area radius, or area.
  • the first key point, the second key point, the first size information, and the second size information can be determined in a variety of ways.
  • the determination can be made directly based on display information of the first image region and the second image region in the image to be processed; or by retrieval of stored display information of the first image region and the second image region, etc.
  • the position information and first size information of a first key point of the first image region in the image to be processed can be determined. Based on the position of the first key point relative to the first image region, a second key point of the second image region can be determined, and the position information and second size information of the second key point in the image to be processed can also be determined. Furthermore, based on the position information and first size information corresponding to the first key point, the position information corresponding to all first preset key points in the first image region can be determined. Based on the position information and second size information corresponding to the second key point, the position information corresponding to all second preset key points in the second image region can be determined.
  • a first positional relationship between the first image region and the second image region can be determined.
  • 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 determination can be made directly based on the display information of the first image region and the second image region in the image to be processed; or, alternatively, the determination can be made by retrieval of the display information stored in the first image region and the second image region.
  • the first key point includes the lower right corner vertex of the first image area, and the first size information includes the first area width and the first area height;
  • the second key point includes the lower right corner vertex of the second image area, and the second size information includes the second area width and the second area height.
  • the horizontal coordinate of the first key point is added to the first area width to obtain a first value, and the first value is compared with the horizontal coordinate of the second key point to determine the size relationship between the two values.
  • the horizontal coordinate of the second key point is added to the second area width to obtain a second value, and the second value is compared with the horizontal coordinate of the first key point to determine the size relationship between the two values.
  • the vertical coordinate of the first key point is added to the first area height to obtain a third value, and the third value is compared with the vertical coordinate of the second key point to determine the size relationship between the two values.
  • the vertical coordinate of the second key point is added to the second area height to obtain a fourth value, and the fourth value is compared with the vertical coordinate of the second key point to determine the size relationship between the two values.
  • the first positional relationship between the first image region and the second image region can be determined as an overlap between the first and second image regions. If none of the above conditions are met, then the first positional relationship between the first image region and the second image region can be determined as an overlap between the first and second image regions.
  • the display position of the display layer corresponding to the first image area and the display position of the display layer corresponding to the second image area can be determined, respectively.
  • the relative positional relationship between these two display positions can then be determined. This relative positional relationship can then be used as the second positional relationship between the first and second image areas.
  • determining the second positional relationship between the first image area and the second image area includes: responding to a layer editing trigger operation for the first image area and the second image area, and determining the second positional relationship between the first image area and the second image area based on the layer editing trigger operation.
  • the layer editing triggering operation may be an operation for editing the display position of the display layer corresponding to the image display area.
  • a layer editing trigger operation can be input for a first image area and a second image area. Further, when a layer editing trigger operation is detected for the first image area and the second image area, a relationship between a display position of a display layer corresponding to the first image display area and a display position of a display layer corresponding to the second image display area is determined based on the layer editing trigger operation. Furthermore, a second positional relationship between the first image area and the second image area can be determined.
  • determining the second positional relationship between the first image area and the second image area includes: determining the regional display order of the first image area and the second image area in the image to be processed; and determining the second positional relationship between the first image area and the second image area based on the display order.
  • the region display order can be understood as the order in which the image regions appear and are displayed in the image to be processed.
  • the region display order can be determined based on the time when the image regions start to be displayed in the image to be processed.
  • the region display order of the first image region and the second image region in the image to be processed can be determined based on the time when the first image region begins to be displayed in the image to be processed and the time when the second image region begins to be displayed in the image to be processed. Furthermore, the relationship between the display position of the display layer corresponding to the first image display region and the display position of the display layer corresponding to the second image display region can be determined based on the region display order. Furthermore, a second positional relationship between the first image region and the second image region can be determined.
  • the second positional relationship between the first image region and the second image region can be such that the display layer corresponding to the first image region is displayed below the display layer corresponding to the second image region.
  • the second positional relationship between the first image region and the second image region can be such that the display layer corresponding to the first image region is displayed above the display layer corresponding to the second image region.
  • S230 Determine a target position relationship between the first image area and the second image area 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 blocked by the second image area, or the first image area is not blocked by the second image area.
  • the target position relationship may be used to characterize the relationship between the display position of the second image area and the display position of the first image area.
  • 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 not being obscured by the second image area.
  • the target positional relationship between the first image area and the second image area can be determined to be at least partially obscured by the second image area. If none of the above conditions are met, the target positional relationship between the first image area and the second image area can be determined to be that the first image area is not obscured by the second image area.
  • the technical solution of the embodiment of the present disclosure is to determine the first image area and the second image area in the image to be processed, and determine the first position relationship and the second position relationship between the first image area and the second image area; wherein 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 the position relationship between the display layers corresponding to the first image area and the second image area; further, determine the target position relationship between the first image area and the second image area based on the first position relationship and the second position relationship; wherein the target position relationship includes at least a part of the first image area being blocked by the second image area, or the first image area not being blocked by the second image area; further, when at least a 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, thereby achieving the effect of quickly determining the target position relationship between the first image area, the second image area and therebetween, and improving the accuracy of rendering the special effect into the target image
  • FIG5 is a flow chart of another special effects processing method provided by an embodiment of the present disclosure.
  • the technical solution of this embodiment is based on the above embodiment, and generates a mask image according to the display position of the first image area and the second image area in the image to be processed. And based on the mask image, the target pixel points in the first image area belonging to the third image area are determined, and the target pixel points are rendered with special effects according to the target special effects, and the special effects are presented.
  • the specific implementation method please refer to the description of this embodiment. Among them, the technical features that are the same or similar to the above embodiments are not repeated here.
  • the method may specifically include:
  • S310 In response to a rendering request for a target special effect, obtain an image to be processed; wherein the image to be processed includes a first image area and a second image area.
  • S320 When at least a portion of the first image region is blocked by the second image region, generate a mask image according to display positions of the first image region and the second image region in the image to be processed.
  • the mask image is used to identify the second image area in the first image area.
  • the mask image can be an image obtained by distinguishing the first image area and the second image area in the image.
  • the image size of the mask image can be greater than or equal to the image size of the first image area.
  • the value of the pixel points located in the second image area can be set to a first value according to the display position of the second image area, and the pixel value of the pixel points in the area other than the second image area in the first image area (i.e., the third image area) can be set to a second value.
  • the first value is 0 and the second value is 1; or, the first value is 1 and the second value is 0.
  • Figure 6 is a schematic diagram of a mask image of an image to be processed, provided by an embodiment of the present disclosure. As shown in Figure 6, assuming that region 1 is the first image region and regions 2 and 3 are the second image regions, the transparency of all pixels in region 1 can be adjusted to 0, and the transparency of all pixels in regions 2 and 3 can be adjusted to 1, resulting in the schematic diagram shown in Figure 6.
  • the display positions of the first image area and the second image area in the image to be processed can be determined according to the interface layout of multiple image display areas in the image display interface, or according to the area division result of the image to be processed.
  • the target special effect is used to render it, otherwise the target special effect is not used to render it.
  • the target special effect is used to render it, and if its pixel value in the mask image is 1, the target special effect is not used to render it.
  • the technical solution of the disclosed embodiment can simply and effectively determine the areas that need to be rendered with special effects and the areas that do not need to be rendered with special effects by generating a mask image according to the display positions of the first image area and the second image area in the image to be processed when at least part of the area in the first image area is blocked by the second image area.
  • the target pixel points in the first image area that belong to the third image area are determined according to the mask image, the target pixel points are rendered with special effects according to the target special effects, and the special effects effect is presented, thereby achieving the effect of accurately and quickly determining the image display area that needs to be rendered with special effects, thereby improving the accuracy of rendering special effects into the target image area, so that the overlapping screen presents the effect of special effects separate rendering, enriching the special effects rendering method, and improving the special effects interactive experience.
  • FIG7 is a schematic structural diagram of a special effect processing device provided by an embodiment of the present disclosure.
  • the device includes: an image acquisition module 410 and a special effect rendering module 420.
  • the image acquisition module 410 is used to obtain an image to be processed in response to a rendering request for a target special effect;
  • 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 effect rendering module 420 is used to render the special effect of the target special effect in a third image area when at least part of the first image area is blocked by the second image area;
  • the third image area is the area of the first image area excluding the second image area.
  • the device further includes: an image area determination module and a position relationship determination module.
  • the image area determination module is used to determine the first image area and the second image area in the image to be processed after the image to be processed is acquired and before the special effect of the target special effect is presented in the third image area, and to determine the first position relationship and the second position relationship between the first image area and the second image area; wherein the first position relationship is used to indicate whether there is an overlapping area between the first image area and the second image area; the second position relationship is used to indicate the position relationship between the display layers corresponding to the first image area and the second image area; the position relationship determination module is used to determine the target position relationship between the first image area and the second image area 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 blocked by the second image area, or the first image area is not blocked by the second image area.
  • the image region determination module optionally includes: 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 on the image display interface or the image to be processed; and the region determination unit is configured to determine the first image region and/or the second image region in the image to be processed based on a region selection operation on the image display region in response to the region selection operation.
  • the image region determination module includes: 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; 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; and the first position relationship determination unit is configured to determine a first position relationship between the first image region and the second image region based on the first key point, the second key point, the first size information, and the second size information.
  • the special effect rendering module 420 optionally includes: a mask image generation unit and a special effect rendering unit.
  • the mask image generation unit is configured to generate a mask image based on the display positions of the first image area and the second image area in the image to be processed; the mask image is used to identify the second image area within the first image area; and the special effect rendering unit is configured to determine, based on the mask image, target pixels within the first image area that belong to the third image area, perform special effect rendering on the target pixels according to the target special effect, and present the special effect.
  • the apparatus may further include a region adjustment module, wherein the region adjustment module is configured to update region display information of the first image region and/or the second image region in the image display interface in response to a display adjustment operation on the first image region and/or the second image region before responding to a rendering request for a target special effect or after presenting the special effect of the target special effect, wherein the display information includes at least a display position and/or a display size.
  • the region adjustment module is configured to update region display information of the first image region and/or the second image region in the image display interface in response to a display adjustment operation on the first image region and/or the second image region before responding to a rendering request for a target special effect or after presenting the special effect of the target special effect, wherein the display information includes at least a display position and/or a display size.
  • the apparatus may further include a special effect rendering module, wherein the special effect rendering module is configured to, after acquiring the image to be processed, render the special effect of the target special effect in the first area if the first image area is not blocked by the second image area.
  • the special effect rendering module is configured to, after acquiring the image to be processed, render the special effect of the target special effect in the first area if the first image area is not blocked by the second image area.
  • the first image area and the second image area are used to present picture contents of different video streams.
  • 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 the second live broadcast account.
  • the technical solution of the embodiment of the present disclosure obtains an image to be processed by responding 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, and can display a variety of image contents based on the image areas included in the image, thereby enriching the display method of the image content. Furthermore, 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, which solves the problem of a single special effect presentation method in related technologies and realizes refined processing of the image to be processed.
  • the special effect is accurately rendered to the third image area without covering the picture content of the second image area, that is, the effect of separate rendering of special effects for the overlapping pictures is presented, enriching the special effect rendering method, increasing the content layering of the image after special effect processing, and improving the special effect interactive experience.
  • the special effects processing device can execute the special effects processing method provided by any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method. It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as they can achieve the corresponding functions; in addition, the specific names of the various functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the embodiments of the present disclosure.
  • FIG8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure.
  • a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG8 ) 500 suitable for implementing an embodiment of the present disclosure is shown below.
  • the terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG8 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503.
  • ROM read-only memory
  • RAM random access memory
  • Various programs and data required for the operation of electronic device 500 are also stored in RAM 503.
  • Processing device 501, ROM 502, and RAM 503 are connected to each other via a bus 504.
  • An input/output (I/O) interface 505 is also connected to bus 504.
  • the following devices may be connected to the I/O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509.
  • the communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data.
  • FIG8 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart.
  • the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
  • the electronic device provided by the embodiment of the present disclosure and the special effects processing method provided by the above embodiment belong to the same inventive concept.
  • An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon.
  • the program is executed by a processor, the special effect processing method provided in the above embodiment is implemented.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • a computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above.
  • Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • the program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
  • the client and server can communicate using any currently known or later 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).
  • HTTP Hyper Text Transfer Protocol
  • Examples of communication networks include a local area network ("LAN”), a wide area network ("WAN”), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
  • the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the electronic device When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: obtain the image to be processed in response to a rendering request for the 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; 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 in the first image area excluding the second image area.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages.
  • the program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server.
  • the remote computer may 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • Internet service provider e.g., AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function.
  • the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
  • each box in the block diagram and/or flowchart, and the combination of the boxes in the block diagram and/or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in this disclosure may be implemented in software or hardware.
  • the name of a unit does not limit the unit itself.
  • the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses.”
  • exemplary types of hardware logic components include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs systems on chip
  • CPLDs complex programmable logic devices
  • a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment.
  • a machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing.
  • a more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM portable compact disk read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the foregoing.
  • Example 1 provides a special effects processing method, including: in response to a rendering request for a target special effect, obtaining an image to be processed; 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 a third image area; wherein, the third image area is the area in the first image area excluding the second image area.
  • Example 2 provides the method of Example 1, further including: optionally, after acquiring the image to be processed, before presenting the special effect of the target special effect in the third image area, it also includes: determining the first image area and the second image area in the image to be processed, and determining the first position relationship and the second position relationship between the first image area and the second image area; wherein the first position relationship is used to indicate whether there is an overlapping area between the first image area and the second image area; the second position relationship is used to indicate the position relationship between the display layers corresponding to the first image area and the second image area; determining the target position relationship between the first image area and the second image area 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.
  • Example 3 provides the method of Example 2, further including: optionally, determining the first image area and the second image area in the image to be processed includes: in response to an area division operation on the image display interface or the input of 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 on the image display area, determining the first image area and/or the second image area in the image to be processed based on the area selection operation.
  • Example 4 provides the method of Example 2, further including: optionally, determining the first positional relationship between the first image area and the second image area includes: determining a first key point and first size information of the first image area, and a second key point and second size information of the second image area; wherein the position of the first key point relative to the first image area and the position of the second key point relative to the second image area are the same; and determining the first positional relationship between the first image area and the second image area based on the first key point, the second key point, the first size information and the second size information.
  • Example 5 provides the method of Example 1, further including: optionally, presenting the special effect of the target special effect in the third image area, including: generating a mask image according to the 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; determining the target pixel points in the first image area belonging to the third image area 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.
  • Example 6 provides the method of Example 1, further including: optionally, before the response to the rendering request for the target special effect, or after the third image area presents the special effect of the target special effect, it also includes: in response to the display adjustment operation for the first image area and/or the second image area, updating the area display information of the first image area and/or the second image area in the image display interface, wherein the display information includes at least the display position and/or the display size.
  • Example 7 provides the method of Example 1, further including: optionally, after obtaining the image to be processed, further including: presenting the special effect of the target special effect in the first image area when the first image area is not blocked by the second image area.
  • Example 8 provides the method of Example 1, further including: optionally, the first image area and the second image area are used to present picture contents of different video streams.
  • Example 9 provides the method of Example 8, further including: optionally, the image to be processed includes a live image corresponding to a first live account; the first image area is used to display the screen content of the live video stream corresponding to the first live account; and the second image area is used to display the screen content of the live video stream corresponding to the second live account.
  • Example 10 provides a special effects processing device, including: an image acquisition module, used 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; a special effects presentation module, used to present the special effects of the target special effect in a third image area when at least part of the first image area is blocked by the second image area; wherein, the third image area is the area in the first image area excluding the second image area.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种特效处理方法、装置、电子设备、存储介质及程序产品。其中,该特效处理方法包括:响应于针对目标特效的渲染请求,获取待处理图像;其中,待处理图像包括第一图像区域和第二图像区域(S110);在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,在第三图像区域呈现目标特效的特效效果;其中,第三图像区域为第一图像区域中除第二图像区域之外的区域(S120)。上述方法在图像中存在重叠画面的情况下,能够将特效精准渲染至第三图像区域,且不覆盖第二图像区域的画面内容,即呈现出针对重叠画面进行特效分离渲染的效果,丰富了特效渲染方式,增加了特效处理后的图像的内容层次感,提升了特效交互体验。

Description

特效处理方法、装置、电子设备、存储介质及程序产品
本申请要求于2024年4月8日递交的中国专利申请第202410418319.X号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开实施例涉及一种特效处理方法、装置、电子设备、存储介质及程序产品。
背景技术
在图像处理或视频制作场景中,特效的应用备受用户青睐。可以采用所选择的特效对图像或视频进行处理,以使所得到的图像或视频呈现出与该特效相对应的特效效果。
相关技术中,在进行特效渲染时,通常是对获取到的待处理图像中的全部图像内容进行特效处理,从而获得呈现出完整的特效效果。例如,面部特效会作用于待处理图像中包含所有面部。这样的特效处理方式,使得特效效果的呈现方式较为单一,存在一定的局限性,影响用户的特效使用体验。
发明内容
本公开提供了一种特效处理方法、装置、电子设备、存储介质及程序产品,以实现在图像中存在重叠画面的情况下,将特效精准渲染至目标画面中,且其他画面不渲染特效的效果,即呈现出针对重叠画面进行特效分离渲染的效果。
第一方面,本公开实施例提供了一种特效处理方法,该方法包括:
响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;
在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
第二方面,本公开实施例还提供了一种特效处理装置,该装置包括:
图像获取模块,用于响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;
特效呈现模块,用于在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
第三方面,本公开实施例还提供了一种电子设备,该电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开实施例中任一所述的特效处理方法。
第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,该计算机可执行指令在由计算机处理器执行时用于执行如本公开实施例中任一所述的特效处理方法。
第五方面,本公开实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序在被处理器执行时实现如本公开实施例中任一所述的特效处理方法。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例所提供的一种特效处理方法的流程示意图;
图2为本公开实施例所提供的待处理图像的一种效果示意图;
图3为本公开实施例所提供的待处理图像的另一种效果示意图;
图4为本公开实施例所提供的另一种特效处理方法的流程示意图;
图5为本公开实施例所提供的另一种特效处理方法的流程示意图;
图6为本公开实施例所提供的遮罩图像的一种效果示意图;
图7为本公开实施例所提供的一种特效处理装置的结构示意图;以及
图8为本公开实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
在介绍本技术方案之前,可以先对应用场景进行示例性说明。该技术方案可以应用于任意对包括至少两个图像显示区域的图像或视频进行特效处理的场景中。为了更加清晰地介绍本技术方案,可以以直播场景为例来对本技术方案的执行过程进行说明。示例性的,在直播场景中,图像显示界面包括第一图像区域和第二图像区域,其中,第一直播区域用于展示第一直播账户对应的直播视频流的画面内容,第二直播区域用于展示第二直播账户对应的直播视频流的画面内容。在检测到针对目标特效的触发操作的情况下,通常是生成与目标特效对应的渲染请求,并获取待处理图像,此时,待处理图像包括第一图像区域和第二图像区域。进一步的,根据目标特效对待处理图像进行特效处理,由于特效处理的输入源为单张图像,一般是会对整张图像进行特效渲染,以得到特效图像。然而,在第一图像区域中的至少部分区域被第二图像区域遮挡,所触发的目标特效是添加至待处理图像中的第一图像区域,且第二图像区域不添加目标特效的情况下,基于上述特效处理方式对待处理图像进行特效处理,会导致不添加目标特效的第二图像区域也被目标特效渲染。从而,无法满足用户对图像中的部分图像区域进行特效渲染的需求,存在一定的局限性。
此时,基于本公开实施例的技术方案,在检测到针对目标特效的渲染请求的情况下,响应于该渲染请求,获取待处理图像,此时,待处理图像可以包括第一图像区域和第二图像区域,第一图像区域为待添加目标特效的区域。进一步的,在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,可以确定第一图像区域中除第二图像区域之外的其他区域,进而,可以该区域呈现目标特效的特效效果。从而,实现了在图像中存在重叠画面的情况下,将特效精准渲染至目标画面中,且其他画面不渲染特效的效果,即呈现出针对重叠画面特效分离渲染的效果,丰富了特效渲染方式,提升了特效交互体验。
图1为本公开实施例所提供的一种特效处理方法的流程示意图,本公开实施例适用于对图像中存在重叠画面的情况下,对任意画面进行特效处理的情形,该方法可以由特效处理装置来执行,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等。如图1所示,本实施例的方法具体可包括:
S110、响应于针对目标特效的渲染请求,获取待处理图像;其中,待处理图像包括第一图像区域和第二图像区域。
其中,目标特效可以理解为用户所触发的待作用于图像中的特效。在本公开实施例中,可以预先将界面中所显示的特效设置为可选择触发状态。进而,在检测到针对任意特效的选择触发操作的情况下,可以将选中的特效作为目标特效。渲染请求可以理解为客户端向服务端发送的请求报文,该请求报文用于请求服务端对目标特效进行渲染。待处理图像可以是待进行特效处理的图像。可选的,待处理图像可以是基于终端设备采集的图像,也可以是响应于用户的触发操作,从目标存储空间(如,应用软件的图像库,或者,终端相册等)中获取的图像,还可以是接收于外接设备上传的图像等。
其中,第一图像区域可以理解为待处理图像中用于呈现画面内容的区域。并且,第一图像区域可以为待处理图像中待添加目标特效的区域。第二图像区域也可以理解为待处理图像中区别于第一图像区域的用于呈现画面内容的区域。可选的,第一图像区域和第二图像区域可以为待处理图像中分别呈现不同画面内容的区域。具体的,第一图像区域和第二图像区域可以用于呈现同一视频流不同视频帧的画面内容。示例性的,可以基于第一图像区域和第二图像视频分别展示相同视频在不同视频帧下对应的画面内容。或者,第一图像区域和第二图像区域可以用于呈现不同视频流的画面内容。在不同的服务场景中,第一图像区域和第二图像区域所对应的视频流不同,为了更加清晰地介绍待处理图像、第一图像区域和第二图像区域,可以以直播场景为例对待处理图像、第一图像区域和第二图像区域进行说明。
可选的,待处理图像包括第一直播账户对应的直播图像;第一图像区域用于展示第一直播账户对应的直播视频流的画面内容;第二图像区域用于展示第二直播账户对应的直播视频流的画面内容。
其中,第一直播账户可以理解为触发目标特效的观众端所观看的直播页面对应的账户。直播图像可以是第一直播账户对应的直播界面中所呈现的图像内容。第二直播账户可以是与第一直播账户之间处于连线状态的直播账户。直播视频流可以理解为直播过程中对应的媒体数据流,也可以理解为在直播显示区域中呈现出的直播视频流的内容,即为直播画面。
在本公开实施例中,在检测到针对直播账户的直播间的进入触发操作的情况下,可以将所触发的直播账户作为第一直播账户,并显示第一直播账户对应的直播图像。在第一直播账户未与其他直播账户连线的情况下,可以将待处理图像作为第一图像区域,即,待处理图像即为第一直播账户对应的直播视频流的画面内容。在第一直播账户与至少一个其他直播账户连线的情况下,可以将与第一直播账户连线的至少一个其他直播账户均作为第二直播账户,并获取第二直播账户对应的直播视频流。此时,待处理图像可以包括第一图像区域和第二图像区域。其中,第一图像区域可以用于展示第一直播账户对应的直播视频流的画面内容。第二图像区域可用于展示第二直播账户对应的直播视频流的画面内容。
需要说明的是,第一图像区域和第二图像区域在待处理图像中的展示形式可以包括多种。可选的,第一图像区域和第二图像区域在待处理图像中的展示形式可以包括:调整第一图像区域于待处理图像中的展示尺寸,并在待处理图像的预设位置展示第二图像区域。其中,预设位置可以是待处理图像中的任意位置,例如,可以是调整后的第一图像区域的左侧、右侧或底部等。或者,基于第一图像区域和第二图像区域的总数量,将待处理图像均分为多个区域,并将相应的区域作为第一图像区域和第二图像区域。或者,将第一图像区域在待处理图像中大屏展示,将第二图像区域小屏悬浮展示在第一图像区域中,以使第一图像区域和第二图像区域之间的目标位置关系为第一图像区域中的至少部分区域被第二图像区域遮挡。示例性的,图2为本公开实施例所提供的待处理图像的一种效果示意图。如图2所示,待处理图像20包括三个图像区域,分别为区域1、区域2和区域3。其中,区域1可以为第一图像区域,区域2和区域3均为第二图像区域。并且,这三个区域之间的目标位置关系为区域1的至少部分区域被区域2和区域3遮挡。
还需说明的是,待处理图像中图像区域的分布情况可以由用户自定义设置;或者,也可以是应用软件默认设置的,本公开实施例对此不作具体限定。
在本公开实施例中,在检测到针对目标特效的触发操作的情况下,可以生成针对目标特效的渲染请求。进一步的,响应于该渲染请求,获取待处理图像,并根据渲染请求对待处理图像进行处理,以将目标特效添加至第一图像区域。
S120、在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,在第三图像区域呈现目标特效的特效效果。
其中,第三图像区域可以为第一图像区域中除第二图像区域之外的区域。示例性的,如图2所示,在区域1为第一图像区域,区域2和区域3为第二图像区域的情况下,区域1中阴影部分区域即为第三图像区域。
在实际应用中,在待处理图像包括第一图像区域和第二图像区域的情况下,为了确定目标特效所添加的图像区域,可以确定第一图像区域和第二图像区域。进一步的,可以将目标特效添加至第一图像区域,以使第一图像区域呈现目标特效的特效效果。然而,第一图像区域和第二图像区域在待处理图像中排布时,可能会存在第一图像区域中的至少部分区域被第二图像区域遮挡的情况,此时,在以第一图像区域中的全部像素点为待处理对象时,可能也会将目标特效渲染至第一图像区域所包括的第二图像区域中。
针对上述问题,在本公开实施例中,在确定第一图像区域中至少部分区域被第二图像区域遮挡的情况下,可以确定第一图像区域中除第二图像区域之外的其他区域,并将该区域作为第三图像区域。进一步的,可以根据目标特效对第三图像区域进行特效渲染,以使第三图像区域呈现目标特效的特效效果。
需要说明的是,第一图像区域中的至少部分区域被第二区域遮挡的情况可以存在多种:可选的,第一图像区域包括第二图像区域中的全部区域;示例性的,继续参照图2所示,区域1包括区域2和区域3的全部区域。或者,第一图像区域包括第二图像区域中的部分区域。示例性的,图3为本公开实施例所提供的待处理图像的另一种效果示意图。如图3所示,假设待处理图像20包括两个图像区域,分别为区域4和区域5。其中,可以将区域4作为第一图像区域,将区域5作为第二图像区域。由图3可以看出,区域4包括区域5的部分区域,此时,可以确定区域4中的至少部分区域被区域5遮挡。
还需说明的是,确定第一图像区域中的至少部分区域是否被第二图像区域遮挡,可以存在多种确定方式。可选的,确定第一图像区域所呈现的画面内容是否相一致,在确定第一图像区域中存在至少两种画面内容的情况下,可以确定第一图像区域中的至少部分区域被第二图像区域遮挡;或者,确定第一图像区域与第二图像区域中是否存在重叠区域以及显示图层之间的位置关系。进而,在确定第一图像区域和第二图像区域中存在重叠区域且第二图像区域对应的显示图层位于第一图像区域的显示图层的上层的情况下,可以确定第一图像区域中的至少部分区域被第二图像区域遮挡;或者,还可以是通过其他方式确定第一图像区域中的至少部分区域是否被第二图像区域遮挡,本公开实施例对此不作具体限定。
还需说明的是,第一图像区域中所包括的第二图像区域的数量可以小于或等于待处理图像中所包括的第二图像区域的数量。示例性的,假设待处理图像中包括第一图像区域和三个第二图像区域,此时,第一图像区域中所包括的第二图像区域的数量可以是零个、一个、两个或三个等。
在本公开实施例中,在获取待处理图像之后,在确定第一图像区域未被第二图像区域遮挡的情况下,在第一图像区域呈现目标特效的特效效果。即,根据目标特效对第一图像区域所呈现的画面内容进行特效处理,以使第一图像区域呈现目标特效的特效效果。
在本公开实施例中,在待处理图像包括第一图像区域和第二图像区域的情况下,第一图像区域和第二图像区域的区域显示信息可以是应用软件默认设置的,也可以基于用户需求进行自定义调整。可选的,在响应于针对目标特效的渲染请求之前,或者,在第三图像区域呈现目标特效的特效效果之后,响应于针对第一图像区域和/或第二图像区域的显示调整操作,更新第一图像区域和/或第二图像区域在图像显示界面中的区域显示信息。
其中,显示调整操作可以理解为针对图像区域在显示界面中的显示情况进行调整的操作。可选的,显示调整操作可以至少包括显示尺寸调整操作和/或显示位置调整操作。显示尺寸调整操作可以是针对图像区域的显示尺寸进行调整的操作。进一步的,显示尺寸可以包括显示长度、显示宽度、显示半径以及显示面积等一种或多种。显示位置调整操作可以是针对图像区域在显示界面中的显示位置进行调整的操作。进一步的,显示位置可以基于图像区域中的一个或多个预设关键点(如,区域中心点、区域顶点或者区域中任意一点等)在显示界面中的坐标确定。区域显示信息可以用于表征图像区域于显示界面中的具体显示情况。区域显示信息可以至少包括显示尺寸和/或显示位置。图像显示界面可以理解为呈现给用户的用于显示图像的界面。图像显示界面可以是用于展示待处理图像的界面。需要说明的是,在图像显示界面展示待处理图像的同时,还可以展示其他多媒体信息。多媒体信息可以为图像、视频、文本以及音频中的至少一种。
在本公开实施例中,显示调整操作可以通过多种方式来实现,可选的,包括参数编辑和/或拖拽触发操作等。示例性的,在检测到针对第一图像区域的显示调整操作的情况下,可以显示与第一图像区域对应的参数编辑页面,该页面中可以至少包括显示位置编辑项和显示尺寸编辑项。用户可以基于相应的编辑项输入相应的显示参数。进一步的,在检测到针对编辑完成控件的触发操作的情况下,即可根据参数编辑页面中所包括的显示参数更新第一图像区域在图像显示界面中的区域显示信息。或者,在检测到针对第二图像区域的选择触发操作的情况下,可以通过拖拽触发操作将选中的第二图像区域拖拽至图像显示界面中的任意位置。进而,在检测到选中的第二图像区域停止移动的情况下,可以此时停止的位置作为第二图像区域调整后的显示位置,并更新第二图像区域在图像显示界面中的显示位置。
作为本公开实施例中一种可选的实施方式,在响应于针对目标特效的渲染请求之前,可以针对第一图像区域和/或第二图像区域输入显示调整操作。进而,在检测到针对第一图像区域和/或第二图像区域输入的显示调整操作的情况下,可以根据输入的显示调整操作更新第一图像区域和/或第二图像区域在图像显示界面中的区域显示信息。
作为本公开实施例中另一种可选的实施方式,在第三图像区域呈现目标特效的特效效果之后,还可以针对第一图像区域和/或第二图像区域输入显示调整操作。进而,在检测到针对第一图像区域和/或第二图像区域输入的显示调整操作的情况下,可以根据输入的显示调整操作更新第一图像区域和/或第二图像区域在图像显示界面中的区域显示信息。这样设置的好处在于:实现了对图像显示区域的区域显示信息进行自定义调整的效果,进而,使得图像渲染区域的区域显示信息进行适应性调整,提高了图像渲染方式的灵活度。
在本公开实施例中,对于第一图像区域未被第二图像区域遮挡的情况,在获取待处理图像之后,在第一图像区域未未被第二图像区域遮挡的情况下,在第一图像区域呈现目标特效的特效效果。
作为本公开实施例中一种可选的实施方式,在获取待处理图像之后,在第一图像区域未被第二图像区域遮挡的情况下,即可直接根据目标特效对第一图像区域中的全部像素点进行特效渲染,以使第一图像区域呈现出目标特效的特效效果。这样设置的好处在于,保证了在第一图像区域中呈现出目标特效的特效效果且目标特效不会对第二图像区域的画面内容产生影响,实现了对待处理图像的局部处理,且实现了对目标特效的精准渲染。
本公开实施例的技术方案,通过响应于针对目标特效的渲染请求,获取待处理图像;其中,待处理图像包括第一图像区域和第二图像区域,能够基于图像中所包括的图像区域展示多种图像内容,丰富了图像内容的展示方式,进一步的,在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,在第三图像区域呈现目标特效的特效效果,解决了相关技术中特效效果呈现方式单一的问题,实现了对待处理图像的精细化处理,在图像中存在重叠画面的情况下,将特效精准渲染至第三图像区域,且不覆盖第二图像区域的画面内容,即呈现出针对重叠画面进行特效分离渲染的效果,丰富了特效渲染方式,增加了特效处理后的图像的内容层次感,提升了特效交互体验。
图4为本公开实施例所提供的另一种特效处理方法的流程示意图。本实施例的技术方案在上述实施例的基础上,在获取待处理图像之后,且在第三图像区域呈现目标特效的特效效果之前,可以确定待处理图像中的第一图像区域和第二图像区域,并确定第一图像区域和第二图像区域之间的目标位置关系。进而,可以根据目标位置关系,将目标特效添加至第一图像区域中。具体实施方式可以参见本实施例的说明。其中,与前述实施例相同或相似的技术特征在此不再赘述。如图4所示,本实施例的方法具体可包括:
S210、响应于针对目标特效的渲染请求,获取待处理图像。
S220、确定待处理图像中的第一图像区域和第二图像区域,并确定第一图像区域和第二图像区域的第一位置关系和第二位置关系。
其中,第一位置关系用于指示第一图像区域和第二图像区域中是否存在重叠区域。第二位置关系用于指示第一图像区域和第二图像区域对应的显示图层之间的位置关系。可选的,第二位置关系可以包括第一图像区域对应的显示图层显示于第二图像区域对应的显示图层的下层;或者,第一图像区域对应的显示图层显示于第二图像区域对应的显示图层的上层。
在本公开实施例中,第一图像区域和第二图像区域的确定方式可以有多种。可选地,响应于针对图像显示界面或者待处理图像输入的区域划分操作,将待处理图像划分为至少两个图像显示区域;响应于针对图像显示区域的区域选择操作,基于区域选择操作确定待处理图像中的第一图像区域和/或第二图像区域。这样设置的好处在于,实现了对第一图像区域和第二图像区域自定义设置,丰富了待处理图像的展示形式,实现了对目标特效的渲染位置的灵活设置,丰富了目标特效的渲染效果。
其中,区域划分操作可以理解为将界面或图像划分为若干个区域的操作。区域选择操作可以针对任意图像显示区域输入的选择触发操作。在本公开实施例中,在响应于针对目标特效的渲染请求之前,此时还没有获取到待处理图像,可以针对图像显示界面输入区域划分操作,以在获取到待处理图像之后可以基于已输入的区域划分操作将待处理图像划分为至少两个图像显示区域。或者,在获取待处理图像之后,可以针对待处理图像输入区域划分操作,进而,可以基于已输入的区域划分操作将待处理图像划分为至少两个图像显示区域。需要说明的是,区域划分操作的实现方式可以包括划分参数输入和/或直接针对图像显示界面或待处理图像输入划分触发操作,以基于划分触发操作确定区域分界线等方式。示例性的,在获取待处理图像之后,可以通过触控设备或触控点直接作用于待处理图像,并针对待处理图像输入划分触发操作。进一步的,可以根据已输入的划分触发操作确定区域分界线。进而,可以根据区域分界线将待处理图像划分为至少两个图像显示区域。
需要说明的是,基于区域选择操作可以确定第一图像区域和第二图像区域;或者,基于区域选择操作可以确定第一图像区域或第二图像区域。
作为本公开实施例一可选实施方式,在将待处理图像划分为至少两个图像显示区域之后,在检测到针对至少两个图像显示区域的区域选择操作,可以基于区域选择操作分别确定第一图像区域和第二图像区域。
作为本公开实施例另一可选实施方式,在将待处理图像划分为至少两个图像显示区域之后,在检测到针对任一图像显示区域的区域选择操作的情况下,可以基于区域选择操作将选中的图像显示区域作为第一图像区域(或第二图像区域)。进而,将未选中的图像显示区域作为第二图像显示区域(或第一图像区域)。
作为本公开实施例的一可选实施方式,针对不同的图像处理场景,可以预先设置图像显示界面中包括多个图像显示区域的区域布局方式。进而,根据预先设置的多个图像显示区域在图像显示界面的区域布局方式确定待处理图像中的第一图像区域和第二图像区域。
为了更加清晰地介绍第一图像区域和第二图像区域的确定方式,可以以直播场景为例进行说明:示例性的,在直播场景中,待处理图像可以包括第一直播账户的直播图像。进一步的,在第一直播账户和至少一个第二直播账户处于连线状态的情况下,为了可以将第一直播账户对应的直播视频流的画面内容和第二直播账户对应的直播视频流的画面内容同时展示在待处理图像中。进而,可以将展示第一直播账户对应的直播视频流的画面内容的图像显示区域作为第一图像区域,将展示第二直播账户对应的直播视频流的画面内容的图像显示区域作为第二图像区域。其中,第一直播账户可以理解为触发目标特效的观众端所观看的直播页面对应的账户。第二直播账户可以是与第一直播账户处于连线状态的直播账户。图像显示界面中用于显示第一直播账户对应的直播视频流的画面内容的图像显示区域和展示第二直播账户对应的直播视频流的画面内容的图像显示区域的区域布局方式(包括显示位置和/或显示尺寸等)可以是预先设置好的默认的区域布局方式也可以由用户自定义设置的区域布局方式。
在本公开实施例中,在确定待处理图像中的第一图像区域和第二图像区域之后,为了可以确定第二图像区域是否显示于第一图像之内,或者,第一图像区域和第二图像区域中是否存在重叠区域,可以确定第一图像区域与第二图像区域的第一位置关系。需要说明的是,第一图像区域和第二图像区域可以用于呈现同一视频流的画面内容,也可以用于呈现不同视频流的画面内容。
基于此,在本公开实施例中,可以基于第一图像区域和第二图像区域的区域关键点和尺寸信息来确定第一图像区域和第二图像区域之间的第一位置关系。可选的,确定第一图像区域和第二图像区域之间的第一位置关系,包括:确定第一图像区域的第一关键点和第一尺寸信息,以及,第二图像区域的第二关键点和第二尺寸信息;根据第一关键点、第二关键点、第一尺寸信息和第二尺寸信息,确定第一图像区域和第二图像区域的第一位置关系。
其中,第一关键点可以是第一图像区域中的任意关键点。可选的,第一关键点可以是区域顶点或区域中心点等。第二关键点可以是第二图像区域中的任意关键点。可选的,第二关键点可以是区域顶点或区域中心点。需要说明的是,为了能够通过第一关键点和第二关键点确定第一图像区域和第二图像区域的第一位置关系,所选择的第一关键点和第二关键点可以是存在一定位置关系的关键点。即,第一关键点相对于第一图像区域的位置和第二关键点相对于第二图像区域的位置相同。示例性的,假设第一关键点相对于第一图像区域的位置为图像左下,即,第一关键点为第一图像区域的左下角顶点。相应的,所选择的第二关键点相对于第二图像区域的位置同样为图像左下,即,第二关键点为第二图像区域的左下角顶点。第一尺寸信息可以是表征第一图像区域的区域面积大小的信息。第二尺寸信息可以是表征第二图像区域的区域面积大小的信息。第一尺寸信息和第二尺寸信息均可以包括区域长度、区域宽度、区域半径或区域面积等。
在本公开实施例中,第一关键点、第二关键点、第一尺寸信息和第二尺寸信息的确定方式可以包括多种。可选的,可以直接基于第一图像区域和第二图像区域在待处理图像中的显示信息确定;或者,调取第一图像区域和第二图像区域所存储的显示信息,等。
在本公开实施例中,针对待处理图像中所包括每个第二图像区域,可以确定第一图像区域的第一关键点在待处理图像中的位置信息以及第一尺寸信息,并根据第一关键点相对于第一图像区域的位置确定第二图像区域的第二关键点,并确定第二关键点在待处理图像中的位置信息和第二尺寸信息。进一步的,可以根据第一关键点对应的位置信息和第一尺寸信息确定第一图像区域中全部第一预设关键点对应的位置信息,并可以根据第二关键点对应的位置信息和第二尺寸信息确定第二图像区域中全部第二预设关键点对应的位置信息。进一步的,可以根据全部第一预设关键点对应的位置信息和全部第二预设关键点对应的位置信息,确定第一图像区域与第二图像区域的第一位置关系。其中,位置信息可以通过关键点在图像中的坐标信息来表示。预设关键点可以是区域顶点。这样设置的好处在于:实现了快速确定第一图像区域和第二图像区域中是否存在重叠区域的效果,降低了渲染计算量,进而,提高了渲染效率。
需要说明的是,第一关键点对应的位置信息、第二关键点对应的位置信息、第一尺寸信息和第二尺寸信息的确定方式可以包括多种。可选的,可以直接基于第一图像区域和第二图像区域在待处理图像中的显示信息确定;或者,调取第一图像区域和第二图像区域所存储的显示信息,等。
作为本公开实施例中一种可选的实施方式,第一关键点包括第一图像区域的右下角顶点,第一尺寸信息包括第一区域宽度和第一区域高度;第二关键点包括第二图像区域的右下角顶点,第二尺寸信息包括第二区域宽度和第二区域高度。将第一关键点的横坐标与第一区域宽度相加,得到第一数值,并将第一数值与第二关键点的横坐标进行比较,以确定这两个数值之间的大小关系。以及,将第二关键点的横坐标与第二区域宽度相加,得到第二数值,并将第二数值与第一关键点的横坐标进行比较,以确定这两个数值之间的大小关系。以及,将第一关键点的纵坐标与第一区域高度相加,得到第三数值,并将第三数值与第二关键点的纵坐标进行比较,以确定这两个数值之间的大小关系。以及,将第二关键点的纵坐标与第二区域高度相加,得到第四数值,并将第四数值与第二关键点的纵坐标进行比较,以确定这两个数值之间的大小关系。进一步的,在第一数值小于第二关键点的横坐标,且第二数值小于第一关键点的横坐标,且第三数值小于第二关键点的纵坐标,且第四数值小于第二关键点的纵坐标,且第一区域宽度大于第二区域宽度的情况下,可以确定第一图像区域与第二图像区域的第一位置关系为第一图像区域和第二图像区域中存在重叠区域。在未满足上述任意一个条件的情况下,可以确定第一图像区域与第二图像区域的第一位置关系为第一图像区域和第二图像区域中未存在重叠区域。
在本公开实施例中,在确定第一图像区域和第二图像区域之后,可以分别确定第一图像区域对应的显示图层的显示位置和第二图像区域对应的显示图层的显示位置。之后,可以确定这两个显示位置之间的相对位置关系。进而,可以将该相对位置关系作为第一图像区域和第二图像区域的第二位置关系。
作为本公开实施例一可选实施方式,确定第一图像区域和第二图像区域的第二位置关系,包括:响应于针对第一图像区域和第二图像区域的图层编辑触发操作,并基于图层编辑触发操作确定第一图像区域和第二图像区域的第二位置关系。
其中,图层编辑触发操作可以是针对图像显示区域对应的显示图层的显示位置进行编辑的操作。
在本公开实施例中,可以针对第一图像区域和第二图像区域输入图层编辑触发操作,进一步的,在检测到针对第一图像区域和第二图像区域的图层编辑触发操作的情况下,基于图层编辑触发操作确定第一图像显示区域对应的显示图层的显示位置相对于第二图像显示区域对应的显示图层的显示位置的关系。进而,可以确定第一图像区域和第二图像区域的第二位置关系。
作为本公开实施例另一可选实施方式,确定第一图像区域和第二图像区域的第二位置关系,包括:确定第一图像区域和第二图像区域于待处理图像中的区域显示顺序;基于显示顺序确定第一图像区域和第二图像区域的第二位置关系。
其中,区域显示顺序可以理解为图像区域在待处理图像中出现并显示的顺序。区域显示顺序可以依据图像区域在待处理图像中的开始显示的时间来确定。
在本公开实施例中,可以依据第一图像区域在待处理图像中开始显示的时间和第二图像区域在待处理图像中开始显示的时间,确定第一图像区域和第二图像区域于待处理图像中的区域显示顺序。进一步的,可以根据区域显示顺序确定第一图像显示区域对应的显示图层的显示位置相对于第二图像显示区域对应的显示图层的显示位置的关系。进而,可以确定第一图像区域和第二图像区域的第二位置关系。示例性的,假设第一图像区域的第二图像区域对应的区域显示顺序为第一图像区域先于第二图像区域进行显示,可以确定第一图像区域和第二图像区域的第二位置关系为第一图像区域对应的显示图层显示于第二图像区域对应的显示图层的下层;假设第一图像区域的第二图像区域对应的区域显示顺序为第二图像区域先于第一图像区域进行显示,可以确定第一图像区域和第二图像区域的第二位置关系为第一图像区域对应的显示图层显示于第二图像区域对应的显示图层的上层。
S230、根据第一位置关系和第二位置关系确定第一图像区域和第二图像区域之间的目标位置关系;其中,目标位置关系包括第一图像区域的至少部分区域被第二图像区域遮挡,或者,第一图像区域未被第二图像区域遮挡。
其中,目标位置关系可以用于表征第二图像区域的显示位置相对于第一图像区域的显示位置的关系。目标位置关系包括第一图像区域的至少部分区域被第二图像区域遮挡,或者,第一图像区域未被第二图像区域遮挡。
在本公开实施例中,在确定第一位置关系为第一图像区域和第二图像区域中存在重叠区域,且第二位置关系为第一图像区域对应的显示图层显示于第二图像区域对应的显示图层的下层的情况下,可以确定第一图像区域和第二图像区域之间的目标位置关系为第一图像区域的至少部分区域被第二图像区域遮挡。在未满足上述任意一个条件的情况下,可以确定第一图像区域和第二图像区域之间的目标位置关系为第一图像区域未被第二图像区域遮挡。
S240、在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,在第三图像区域呈现目标特效的特效效果。
本公开实施例的技术方案,通过确定待处理图像中的第一图像区域和第二图像区域,并确定第一图像区域和第二图像区域的第一位置关系和第二位置关系;其中,第一位置关系用于指示第一图像区域和第二图像区域中是否存在重叠区域;第二位置关系用于指示第一图像区域和第二图像区域对应的显示图层之间的位置关系;进一步的,根据第一位置关系和第二位置关系确定第一图像区域和第二图像区域之间的目标位置关系;其中,目标位置关系包括第一图像区域的至少部分区域被第二图像区域遮挡,或者,第一图像区域未被第二图像区域遮挡;进一步的,在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,在第三图像区域呈现目标特效的特效效果,实现了快速确定第一图像区域、第二图像区域及其之间的目标位置关系的效果,提高了将特效渲染至目标图像区域中的准确率。
图5为本公开实施例所提供的另一种特效处理方法的流程示意图。本实施例的技术方案在上述实施例的基础上,根据第一图像区域和第二图像区域在待处理图像中的显示位置生成遮罩图像。并根据遮罩图像确定出第一图像区域中属于第三图像区域的目标像素点,根据目标特效对目标像素点进行特效渲染,并呈现特效效果。具体实施方式可以参见本实施例的说明。其中,与前述实施例相同或相似的技术特征在此不再赘述。如图5所示,该方法具体可包括:
S310、响应于针对目标特效的渲染请求,获取待处理图像;其中,待处理图像包括第一图像区域和第二图像区域。
S320、在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,根据第一图像区域和第二图像区域在待处理图像中的显示位置生成遮罩图像。
其中,遮罩图像用于识别第一图像区域中的第二图像区域。遮罩图像可以是将图像中的第一图像区域和第二图像区域区别显示后得到的图像。需要说明的是,遮罩图像的图像尺寸可以大于或等于第一图像区域的图像尺寸。具体地,可以根据第二图像区域的显示位置将位于第二图像区域中的像素点的值设置为第一数值,将第一图像区域中除第二图像区域之外的区域(即第三图像区域)中的像素点的像素值设置为第二数值。示例性地,第一数值为0,第二数值为1;或者,第一数值为1,第二数值为0。
图6为本公开实施例提供的一种待处理图像的遮罩图像的示意图。如图6所示,假设区域1为第一图像区域,区域2和区域3为第二图像区域,可以将区域1的全部区域像素点的透明度调整为0,将区域2和区域3的全部区域像素点的透明度调整为1,即可得到图6所示的示意图。
需要说明的是,第一图像区域和第二图像区域在待处理图像中的显示位置可以根据图像显示界面中的多个图像显示区域的界面布局确定,或者,根据对待处理图像的区域划分结果确定。
S330、根据遮罩图像确定出第一图像区域中属于第三图像区域的目标像素点,根据目标特效对目标像素点进行特效渲染,并呈现特效效果。
在本公开实施例中,针对第一图像区域中的每个区域像素点,可以根据该区域像素点在遮罩图像中的像素值确定其是否属于第三图像区域的目标像素点。若其属于第三图像区域的目标像素点,则采用目标特效对其进行特效渲染,否则不采用目标特效对其进行特效渲染。示例性地,假设在遮罩图像中第一图像区域的像素点的像素值为0,第二图像区域的像素点的像素值为1,此时,针对第一图像区域中的每个区域像素点,若其在遮罩图像中的像素值为0,则采用目标特效对其进行特效渲染,若其在遮罩图像中的像素值为1,则不采用目标特效对其进行特效渲染。
本公开实施例的技术方案,通过在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,根据第一图像区域和第二图像区域在待处理图像中的显示位置生成遮罩图像,能够简单有效地确定出需要进行特效渲染的区域和不需要进行特效渲染的区域,进一步的,根据遮罩图像确定出第一图像区域中属于第三图像区域的目标像素点,根据目标特效对目标像素点进行特效渲染,并呈现特效效果,实现了精准且快速地确定出需要进行特效渲染的图像显示区域的效果,进而,提高了将特效渲染至目标图像区域中的准确率,使得重叠画面呈现出特效分离渲染的效果,丰富了特效渲染方式,提升了特效交互体验。
图7为本公开实施例所提供的一种特效处理装置的结构示意图。如图7所示,所述装置包括:图像获取模块410和特效呈现模块420。其中,图像获取模块410,用于响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;特效呈现模块420,用于在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
在上述各可选技术方案的基础上,可选地,所述装置还包括:图像区域确定模块和位置关系确定模块。其中,图像区域确定模块,用于在所述获取待处理图像之后,所述在第三图像区域呈现所述目标特效的特效效果之前,确定所述待处理图像中的第一图像区域和第二图像区域,并确定所述第一图像区域和所述第二图像区域的第一位置关系和第二位置关系;其中,所述第一位置关系用于指示所述第一图像区域和所述第二图像区域中是否存在重叠区域;所述第二位置关系用于指示所述第一图像区域和所述第二图像区域对应的显示图层之间的位置关系;位置关系确定模块,用于根据所述第一位置关系和所述第二位置关系确定所述第一图像区域和所述第二图像区域之间的目标位置关系;其中,所述目标位置关系包括所述第一图像区域的至少部分区域被所述第二图像区域遮挡,或者,所述第一图像区域未被所述第二图像区域遮挡。
在上述各可选技术方案的基础上,可选地,图像区域确定模块包括:区域划分单元和区域确定单元。其中,区域划分单元,用于响应于针对图像显示界面或者所述待处理图像输入的区域划分操作,将所述待处理图像划分为至少两个图像显示区域;区域确定单元,用于响应于针对所述图像显示区域的区域选择操作,基于所述区域选择操作确定所述待处理图像中的第一图像区域和/或所述第二图像区域。
在上述各可选技术方案的基础上,可选地,图像区域确定模块包括:尺寸信息确定单元和第一位置关系确定单元。其中,尺寸信息确定单元,用于确定所述第一图像区域的第一关键点和第一尺寸信息,以及,所述第二图像区域的第二关键点和第二尺寸信息;其中,所述第一关键点相对于所述第一图像区域的位置和所述第二关键点相对于所述第二图像区域的位置相同;第一位置关系确定单元,用于根据所述第一关键点、所述第二关键点、所述第一尺寸信息和所述第二尺寸信息,确定所述第一图像区域和所述第二图像区域的第一位置关系。
在上述各可选技术方案的基础上,可选地,特效呈现模块420包括:遮罩图像生成单元和特效呈现单元。其中,遮罩图像生成单元,用于根据所述第一图像区域和所述第二图像区域在所述待处理图像中的显示位置生成遮罩图像;其中,所述遮罩图像用于识别所述第一图像区域中的所述第二图像区域;特效呈现单元,用于根据所述遮罩图像确定出所述第一图像区域中属于第三图像区域的目标像素点,根据所述目标特效对所述目标像素点进行特效渲染,并呈现特效效果。
在上述各可选技术方案的基础上,可选地,所述装置还包括:区域调整模块。其中,区域调整模块,用于在所述响应于针对目标特效的渲染请求之前,或者,在所述呈现所述目标特效的特效效果之后,响应于针对所述第一图像区域和/或第二图像区域的显示调整操作,更新所述第一图像区域和/或第二图像区域在图像显示界面中的区域显示信息,其中,所述显示信息至少包括显示位置和/或显示尺寸。
在上述各可选技术方案的基础上,可选地,所述装置还包括:特效呈现模块。其中,特效呈现模块,用于在所述获取待处理图像之后,在所述第一图像区域未被所述第二图像区域遮挡的情况下,在所述第一区域呈现所述目标特效的特效效果。
在上述各可选技术方案的基础上,可选地,所述第一图像区域和所述第二图像区域用于呈现不同视频流的画面内容。
在上述各可选技术方案的基础上,可选地,所述待处理图像包括第一直播账户对应的直播图像;所述第一图像区域用于展示第一直播账户对应的直播视频流的画面内容;所述第二图像区域用于展示第二直播账户对应的直播视频流的画面内容。
本公开实施例的技术方案,通过响应于针对目标特效的渲染请求,获取待处理图像;其中,待处理图像包括第一图像区域和第二图像区域,能够基于图像中所包括的图像区域展示多种图像内容,丰富了图像内容的展示方式,进一步的,在第一图像区域中的至少部分区域被第二图像区域遮挡的情况下,在第三图像区域呈现目标特效的特效效果,解决了相关技术中特效效果呈现方式单一的问题,实现了对待处理图像的精细化处理,在图像中存在重叠画面的情况下,将特效精准渲染至第三图像区域,且不覆盖第二图像区域的画面内容,即呈现出针对重叠画面进行特效分离渲染的效果,丰富了特效渲染方式,增加了特效处理后的图像的内容层次感,提升了特效交互体验。
本公开实施例所提供的特效处理装置可执行本公开任意实施例所提供的特效处理方法,具备执行方法相应的功能模块和有益效果。值得注意的是,上述装置所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
图8为本公开实施例所提供的一种电子设备的结构示意图。下面参考图8,其示出了适于用来实现本公开实施例的电子设备(例如图8中的终端设备或服务器)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图8示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图8所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。编辑/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图8示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施例提供的电子设备与上述实施例提供的特效处理方法属于同一发明构思,未在本公开实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的特效处理方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(Hyper Text Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,示例一提供了一种特效处理方法,包括:响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
根据本公开的一个或多个实施例,示例二提供了示例一的方法,还包括:可选地,在所述获取待处理图像之后,所述在第三图像区域呈现所述目标特效的特效效果之前,还包括:确定所述待处理图像中的第一图像区域和第二图像区域,并确定所述第一图像区域和所述第二图像区域的第一位置关系和第二位置关系;其中,所述第一位置关系用于指示所述第一图像区域和所述第二图像区域中是否存在重叠区域;所述第二位置关系用于指示所述第一图像区域和所述第二图像区域对应的显示图层之间的位置关系;根据所述第一位置关系和所述第二位置关系确定所述第一图像区域和所述第二图像区域之间的目标位置关系;其中,所述目标位置关系包括所述第一图像区域的至少部分区域被所述第二图像区域遮挡,或者,所述第一图像区域未被所述第二图像区域遮挡。
根据本公开的一个或多个实施例,示例三提供了示例二的方法,还包括:可选的,所述确定所述待处理图像中的第一图像区域和第二图像区域,包括:响应于针对图像显示界面或者所述待处理图像输入的区域划分操作,将所述待处理图像划分为至少两个图像显示区域;响应于针对所述图像显示区域的区域选择操作,基于所述区域选择操作确定所述待处理图像中的第一图像区域和/或所述第二图像区域。
根据本公开的一个或多个实施例,示例四提供了示例二的方法,还包括:可选的,所述确定所述第一图像区域和所述第二图像区域之间的第一位置关系,包括:确定所述第一图像区域的第一关键点和第一尺寸信息,以及,所述第二图像区域的第二关键点和第二尺寸信息;其中,所述第一关键点相对于所述第一图像区域的位置和所述第二关键点相对于所述第二图像区域的位置相同;根据所述第一关键点、所述第二关键点、所述第一尺寸信息和所述第二尺寸信息,确定所述第一图像区域和所述第二图像区域的第一位置关系。
根据本公开的一个或多个实施例,示例五提供了示例一的方法,还包括:可选的,所述在第三图像区域呈现所述目标特效的特效效果,包括:根据所述第一图像区域和所述第二图像区域在所述待处理图像中的显示位置生成遮罩图像;其中,所述遮罩图像用于识别所述第一图像区域中的所述第二图像区域;根据所述遮罩图像确定出所述第一图像区域中属于第三图像区域的目标像素点,根据所述目标特效对所述目标像素点进行特效渲染,并呈现特效效果。
根据本公开的一个或多个实施例,示例六提供了示例一的方法,还包括:可选的,在所述响应于针对目标特效的渲染请求之前,或者,在所述第三图像区域呈现所述目标特效的特效效果之后,还包括:响应于针对所述第一图像区域和/或第二图像区域的显示调整操作,更新所述第一图像区域和/或第二图像区域在图像显示界面中的区域显示信息,其中,所述显示信息至少包括显示位置和/或显示尺寸。
根据本公开的一个或多个实施例,示例七提供了示例一的方法,还包括:可选的,在所述获取待处理图像后,还包括:在所述第一图像区域未被所述第二图像区域遮挡的情况下,在所述第一图像区域呈现所述目标特效的特效效果。
根据本公开的一个或多个实施例,示例八提供了示例一的方法,还包括:可选的,所述第一图像区域和第二图像区域用于呈现不同视频流的画面内容。
根据本公开的一个或多个实施例,示例九提供了示例八的方法,还包括:可选的,所述待处理图像包括第一直播账户对应的直播图像;所述第一图像区域用于展示第一直播账户对应的直播视频流的画面内容;所述第二图像区域用于展示第二直播账户对应的直播视频流的画面内容。
根据本公开的一个或多个实施例,示例十提供了一种特效处理装置,包括:图像获取模块,用于响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;特效呈现模块,用于在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (13)

  1. 一种特效处理方法,包括:
    响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;
    在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
  2. 根据权利要求1所述的特效处理方法,其中,在所述获取待处理图像之后,所述在第三图像区域呈现所述目标特效的特效效果之前,所述方法还包括:
    确定所述待处理图像中的第一图像区域和第二图像区域,并确定所述第一图像区域和所述第二图像区域的第一位置关系和第二位置关系;其中,所述第一位置关系用于指示所述第一图像区域和所述第二图像区域中是否存在重叠区域;所述第二位置关系用于指示所述第一图像区域和所述第二图像区域对应的显示图层之间的位置关系;
    根据所述第一位置关系和所述第二位置关系确定所述第一图像区域和所述第二图像区域之间的目标位置关系;其中,所述目标位置关系包括所述第一图像区域的至少部分区域被所述第二图像区域遮挡,或者,所述第一图像区域未被所述第二图像区域遮挡。
  3. 根据权利要求2所述的特效处理方法,其中,所述确定所述待处理图像中的第一图像区域和第二图像区域,包括:
    响应于针对图像显示界面或者所述待处理图像输入的区域划分操作,将所述待处理图像划分为至少两个图像显示区域;
    响应于针对所述图像显示区域的区域选择操作,基于所述区域选择操作确定所述待处理图像中的第一图像区域和/或所述第二图像区域。
  4. 根据权利要求2或3所述的特效处理方法,其中,所述确定所述待处理图像中的第一图像区域和第二图像区域的第一位置关系,包括:
    确定所述第一图像区域的第一关键点和第一尺寸信息,以及,所述第二图像区域的第二关键点和第二尺寸信息;其中,所述第一关键点相对于所述第一图像区域的位置和所述第二关键点相对于所述第二图像区域的位置相同;
    根据所述第一关键点、所述第二关键点、所述第一尺寸信息和所述第二尺寸信息,确定所述第一图像区域和所述第二图像区域的第一位置关系。
  5. 根据权利要求1-4任一项所述的特效处理方法,其中,所述在第三图像区域呈现所述目标特效的特效效果,包括:
    根据所述第一图像区域和所述第二图像区域在所述待处理图像中的显示位置生成遮罩图像;其中,所述遮罩图像用于识别所述第一图像区域中的所述第二图像区域;
    根据所述遮罩图像确定出所述第一图像区域中属于第三图像区域的目标像素点,根据所述目标特效对所述目标像素点进行特效渲染,并呈现特效效果。
  6. 根据权利要求1-5任一项所述的特效处理方法,其中,在所述响应于针对目标特效的渲染请求之前,或者,在所述第三图像区域呈现所述目标特效的特效效果之后,所述方法还包括:
    响应于针对所述第一图像区域和/或第二图像区域的显示调整操作,更新所述第一图像区域和/或第二图像区域在图像显示界面中的区域显示信息,其中,所述显示信息至少包括显示位置和/或显示尺寸。
  7. 根据权利要求1-6任一项所述的特效处理方法,其中,在所述获取待处理图像之后,所述方法还包括:
    在所述第一图像区域未被所述第二图像区域遮挡的情况下,在所述第一图像区域呈现所述目标特效的特效效果。
  8. 根据权利要求1-7任一项所述的特效处理方法,其中,所述第一图像区域和所述第二图像区域用于呈现不同视频流的画面内容。
  9. 根据权利要求8所述的特效处理方法,其中,所述待处理图像包括第一直播账户对应的直播图像;所述第一图像区域用于展示第一直播账户对应的直播视频流的画面内容;所述第二图像区域用于展示第二直播账户对应的直播视频流的画面内容。
  10. 一种特效处理装置,包括:
    图像获取模块,被配置为响应于针对目标特效的渲染请求,获取待处理图像;其中,所述待处理图像包括第一图像区域和第二图像区域;所述第一图像区域为待添加所述目标特效的区域;
    特效呈现模块,被配置为在所述第一图像区域中的至少部分区域被所述第二图像区域遮挡的情况下,在第三图像区域呈现所述目标特效的特效效果;其中,所述第三图像区域为所述第一图像区域中除所述第二图像区域之外的区域。
  11. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,被配置为存储一个或多个程序,其中,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1-9中任一项所述的特效处理方法。
  12. 一种包含计算机可执行指令的存储介质,其中,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-9中任一所述的特效处理方法。
  13. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现根据权利要求1-9中任一项所述的特效处理方法。
PCT/CN2024/138789 2024-04-08 2024-12-12 特效处理方法、装置、电子设备、存储介质及程序产品 Pending WO2025213822A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410418319.XA CN120780206A (zh) 2024-04-08 2024-04-08 特效处理方法、装置、电子设备、存储介质及程序产品
CN202410418319.X 2024-04-08

Publications (1)

Publication Number Publication Date
WO2025213822A1 true WO2025213822A1 (zh) 2025-10-16

Family

ID=97284116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/138789 Pending WO2025213822A1 (zh) 2024-04-08 2024-12-12 特效处理方法、装置、电子设备、存储介质及程序产品

Country Status (2)

Country Link
CN (1) CN120780206A (zh)
WO (1) WO2025213822A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901624A (zh) * 2020-08-06 2020-11-06 广州虎牙科技有限公司 直播显示方法和装置、电子设备及存储介质
CN115311397A (zh) * 2022-08-09 2022-11-08 北京字跳网络技术有限公司 用于图像渲染的方法、装置、设备和存储介质
CN115442637A (zh) * 2022-09-06 2022-12-06 北京字跳网络技术有限公司 直播特效渲染方法、装置、设备、可读存储介质及产品
CN115953493A (zh) * 2022-12-29 2023-04-11 北京字跳网络技术有限公司 特效图层的编辑方法、装置、电子设备及存储介质
CN116360661A (zh) * 2023-03-14 2023-06-30 北京字跳网络技术有限公司 特效处理方法、装置、电子设备及存储介质
US20240073513A1 (en) * 2022-08-23 2024-02-29 Douyin Vision Co., Ltd. Information display method and apparatus, electronic device, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901624A (zh) * 2020-08-06 2020-11-06 广州虎牙科技有限公司 直播显示方法和装置、电子设备及存储介质
CN115311397A (zh) * 2022-08-09 2022-11-08 北京字跳网络技术有限公司 用于图像渲染的方法、装置、设备和存储介质
US20240073513A1 (en) * 2022-08-23 2024-02-29 Douyin Vision Co., Ltd. Information display method and apparatus, electronic device, and storage medium
CN115442637A (zh) * 2022-09-06 2022-12-06 北京字跳网络技术有限公司 直播特效渲染方法、装置、设备、可读存储介质及产品
CN115953493A (zh) * 2022-12-29 2023-04-11 北京字跳网络技术有限公司 特效图层的编辑方法、装置、电子设备及存储介质
CN116360661A (zh) * 2023-03-14 2023-06-30 北京字跳网络技术有限公司 特效处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN120780206A (zh) 2025-10-14

Similar Documents

Publication Publication Date Title
CN109460233B (zh) 页面的原生界面显示更新方法、装置、终端设备及介质
CN111833459B (zh) 一种图像处理方法、装置、电子设备及存储介质
CN110070593B (zh) 图片预览信息的显示方法、装置、设备及介质
WO2025180141A1 (zh) 特效处理方法、装置、电子设备及存储介质
WO2024083127A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN116302268A (zh) 媒体内容的展示方法、装置、电子设备和存储介质
CN111258519B (zh) 屏幕分屏实现方法、装置、终端和介质
WO2025148556A1 (zh) 元素处理方法、装置、电子设备及存储介质
CN118972657A (zh) 媒体内容的展示方法、装置、电子设备、存储介质和程序产品
WO2024061088A1 (zh) 显示方法、装置、电子设备以及存储介质
CN110427584A (zh) 页面生成方法、装置、电子设备及计算机可读存储介质
CN119135978A (zh) 信息显示方法、装置、电子设备、存储介质和程序产品
WO2025213822A1 (zh) 特效处理方法、装置、电子设备、存储介质及程序产品
WO2024061064A1 (zh) 展示效果处理方法、装置、电子设备及存储介质
CN118656004A (zh) 信息展示方法、装置、设备、存储介质及产品
CN117891548A (zh) 信息展示方法、装置、电子设备和存储介质
EP4645121A1 (en) Information display method and apparatus, device, and medium
KR20240121883A (ko) 템플릿 선택 방법 및 장치, 및 전자 디바이스 및 저장 매체
CN119148903A (zh) 交互方法、装置、电子设备和存储介质
CN111200705B (zh) 图像处理方法和装置
CN119729087B (zh) 一种特效展示方法、装置、设备及存储介质
CN119583862B (zh) 一种信息展示方法、装置、存储介质及电子设备
CN119729061B (zh) 信息处理方法、装置、电子设备及存储介质
CN118034551A (zh) 显示方法、装置和电子设备
WO2024188322A1 (zh) 直播界面的处理方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24934885

Country of ref document: EP

Kind code of ref document: A1