WO2021027632A1 - Image special effect processing method, apparatus, electronic device, and computer-readable storage medium - Google Patents

Image special effect processing method, apparatus, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
WO2021027632A1
WO2021027632A1 PCT/CN2020/106820 CN2020106820W WO2021027632A1 WO 2021027632 A1 WO2021027632 A1 WO 2021027632A1 CN 2020106820 W CN2020106820 W CN 2020106820W WO 2021027632 A1 WO2021027632 A1 WO 2021027632A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
layer
special effect
unit
historical
Prior art date
Application number
PCT/CN2020/106820
Other languages
French (fr)
Chinese (zh)
Inventor
倪光耀
王沈韬
杨辉
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2021027632A1 publication Critical patent/WO2021027632A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Definitions

  • the present disclosure relates to the technical field of image special effect processing, and in particular to an image special effect processing method, device, electronic equipment, and computer-readable storage medium.
  • the post-production method of the captured image is usually adopted to obtain images with special effects.
  • this method is not real-time and cannot perform special effect processing on the input image in real time; or R&D personnel write programs for each special effect, but this is very inflexible. If multiple special effects are needed, multiple implementations are required. This will result in larger program size, more complicated implementation, and time-consuming and labor-intensive.
  • the technical problem solved by the present disclosure is to provide an image special effect processing method, so as to at least partially solve the technical problem of the complicated and inflexible realization of image special effects in the prior art.
  • an image special effect processing device an image special effect processing hardware device, a computer-readable storage medium, and an image special effect processing terminal are also provided.
  • An image special effect processing method including:
  • the combined image output is displayed on the terminal screen.
  • An image special effect processing device including:
  • Video acquisition module for acquiring video images
  • the current image determining module is configured to determine the current image according to the current playback progress of the video image
  • the historical image acquisition module is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
  • a combination processing module configured to perform a combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
  • the image display module is used to output the combined image for display on the terminal screen.
  • An electronic device including:
  • Memory for storing non-transitory computer readable instructions
  • the processor is configured to run the computer-readable instructions to enable the processor to implement any of the image special effects processing methods described above when executed.
  • a computer-readable storage medium for storing non-transitory computer-readable instructions.
  • the computer is caused to execute the image special effect processing method described in any one of the above .
  • An image special effect processing terminal includes any image special effect processing device described above.
  • At least one historical image containing preset actions is acquired from the data storage layer by the image acquisition unit of the rendering layer, and at least one historical image and the current image are processed by the animation logic processing unit of the script layer and the special effect unit of the rendering layer. Perform combination processing, and display the combined image output on the terminal screen, so that special effects can be achieved only by modifying the rendering layer, which is relatively simple and flexible to implement.
  • FIG. 1 is a schematic flowchart of an image special effect processing method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of an image special effect processing device according to an embodiment of the present disclosure
  • Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the image special effect processing method mainly includes the following steps S11 to S15.
  • Step S11 Obtain a video image.
  • the video image may be a real-time input video stream, for example, a live video in a short video application, or a video image pre-stored in the terminal.
  • the terminal may be a mobile terminal, such as a smart phone, a tablet computer, or a fixed terminal, such as a desktop computer.
  • Step S12 Determine the current image according to the current playback progress of the video image.
  • the current image is the image played at the current moment.
  • the current moment can be customized by the user.
  • the video image is displayed on the terminal screen for playback.
  • the current image can be acquired by triggering the corresponding button, such as taking a photo or capturing the terminal screen.
  • Step S13 Obtain at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer.
  • the data storage layer is used to store historical images.
  • the data storage layer can be composed of a cache, and the historical images are stored in the cache so that they can be accessed quickly.
  • the historical image may be one or more.
  • Step S14 Combine the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer.
  • the script layer includes script programs and script files required for running the script programs. Control the rendering layer by setting the logic in the script.
  • the animation logic processing unit is used to determine the zoom degree, size, rotation angle and position of at least one historical image and the current image.
  • the special effect unit is used to draw at least one drawing history image and the current image on one image and perform combined rendering.
  • Step S16 The combined image is output and displayed on the terminal screen.
  • the image acquisition unit of the rendering layer acquires at least one historical image containing a preset action from the data storage layer, and the animation logic processing unit of the script layer and the special effect unit of the rendering layer perform at least one historical image and the current image.
  • Combination processing the combined image output is displayed on the terminal screen, so that special effects can be realized only by modifying the rendering layer, which is relatively simple and flexible to implement.
  • the method further includes:
  • each frame of image is detected
  • a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer.
  • the preset action may be a preset gesture (for example, a scissors hand, an ok gesture, etc.), or an action such as blinking, or pouting.
  • a preset gesture for example, a scissors hand, an ok gesture, etc.
  • an action such as blinking, or pouting.
  • step S14 specifically includes:
  • Step S141 Use the current image as a background image
  • Step S142 Determine the display attributes of each historical image and the position in the background image through the animation logic processing unit of the script layer;
  • the display attributes are the zoom degree, size, rotation angle and position of the historical image.
  • Step S143 Drawing a corresponding historical image at the position according to the display attribute by the special effect unit of the rendering layer to obtain an image.
  • the current image as a background image
  • set multiple blank areas above or below or on the left or right of the background image and place multiple historical images correspondingly.
  • the method further includes:
  • the counter of the script layer is triggered to start counting, and when the timer reaches a preset time, the operation of the animation logic processing unit is triggered.
  • a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer, And trigger the counter of the script layer to start counting, and when the timer reaches a preset time, the animation logic processing unit is triggered to determine the display attributes of each historical image and the position in the background image.
  • the method further includes:
  • the script layer includes script programs and script files required for running the script programs.
  • Control the rendering layer by setting the logic in the script. For example, by sending an image acquisition instruction to the image acquisition unit of the rendering layer, the image acquisition unit acquires the historical image of the video image from the data storage layer according to the image acquisition instruction.
  • the method further includes:
  • the script layer sends a control instruction to the special effect fetching unit of the rendering layer to trigger the operation of the special effect unit.
  • control of the rendering layer is achieved by setting the logic in the script. For example, by controlling the special effect unit of the rendering layer to complete a special effect. That is, a control instruction is sent to the special effect fetching unit of the rendering layer, and the special effect unit superimposes the historical image with the current image according to the control instruction.
  • the method further includes:
  • control of the rendering layer is achieved by setting the logic in the script.
  • the script layer sends an image capture instruction to the image capture unit of the rendering layer, and the image capture unit captures the image according to the capture instruction, and caches the captured image in the storage layer.
  • the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
  • the image identifier is the number or name of the captured image, and the image identifier can be randomly generated each time an image is captured.
  • the image coordinates are the start and end coordinates of the captured image, including x and y coordinates.
  • it can be the coordinates of the upper left corner and the lower right corner of the terminal screen.
  • the image coordinates may specifically be normalized coordinates.
  • the actual coordinate needs to be calculated according to the resolution of the terminal screen.
  • the product of the normalized coordinate and the resolution of the terminal screen is taken as the actual coordinate.
  • the image width is the width of the captured image.
  • the image height is the height of the captured image.
  • the device embodiments of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure.
  • the device can execute the steps in the image special effect processing method embodiment described in the first embodiment.
  • the device mainly includes: a video acquisition module 21, a current image determination module 22, a historical image acquisition module 23, a combination processing module 24, and an image display module 25; among them,
  • the video acquisition module 21 is used to acquire video images
  • the current image determining module 22 is configured to determine the current image according to the current playback progress of the video image
  • the historical image acquisition module 23 is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
  • the combination processing module 24 is configured to perform combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
  • the image display module 25 is used to output the combined image for display on the terminal screen.
  • the device further includes: an image storage module 26, wherein:
  • the image storage module 26 is used to detect each frame of image during the playback of the video image; if an image containing the predetermined action is detected, the image capture unit of the rendering layer captures the image containing The partial image of the predetermined action area is stored in the data storage layer as the historical image.
  • the combination processing module 24 is specifically configured to: use the current image as a background image; determine the display attributes of each historical image and its position in the background image through the animation logic processing unit of the script layer; The special effect unit of the rendering layer draws the corresponding historical image at the position according to the display attribute to obtain an image.
  • the device further includes: a counter trigger module 27; wherein,
  • the counter triggering module 27 is configured to trigger the counter of the script layer to start timing after the historical image is stored in the data storage layer by the image capture unit of the rendering layer, when the timer reaches a preset time , The operation of the animation logic processing unit is triggered.
  • the device further includes: an acquisition instruction sending module 28; wherein,
  • the acquisition instruction sending module 28 is configured to send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
  • the device further includes: a control instruction sending module 29; wherein,
  • the control instruction sending module 29 is configured to send a control instruction to the special effect fetching unit of the rendering layer through the script layer to trigger the operation of the special effect unit.
  • the device further includes: a grabbing instruction sending module 210; wherein,
  • the capture instruction sending module 210 is configured to send an image capture instruction to the image capture unit of the rendering layer through the script layer to trigger the operation of the image capture unit.
  • the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
  • the terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 3 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 300 may include a processing device (such as a central processing unit, a graphics processor, etc.) 301, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 302 or from a storage device 306.
  • the program in the memory (RAM) 303 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 300 are also stored.
  • the processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304.
  • An input/output (I/O) interface 305 is also connected to the bus 304.
  • the following devices can be connected to the I/O interface 305: including input devices 306 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, vibration An output device 307 such as a device; a storage device 306 such as a magnetic tape and a hard disk; and a communication device 309.
  • the communication device 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 3 shows an electronic device 300 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
  • 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 contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 309, or installed from the storage device 306, or installed from the ROM 302.
  • the processing device 301 When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any superposition of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a superposition of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable overlay of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable superposition of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable superposition of the above.
  • the client and server can communicate with any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communication e.g., communication network
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future research and development network of.
  • LAN local area networks
  • WAN wide area networks
  • the Internet e.g., the Internet
  • end-to-end networks e.g., ad hoc end-to-end networks
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a video image; determines the current image according to the current playback progress of the video image; The image acquisition unit of the rendering layer acquires at least one historical image containing preset actions from the data storage layer; the animation logic processing unit of the script layer and the special effect unit of the rendering layer compare the at least one historical image and the The current image is combined and processed; the combined image is output and displayed on the terminal screen.
  • the computer program code used to perform the operations of the present disclosure can be written in one or more programming languages or their superpositions.
  • the above-mentioned programming languages include but are not limited to object-oriented programming languages such as Java, Smalltalk, C++, and Including conventional procedural programming languages-such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user’s computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the superposition of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by superimposing dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented in a software manner, or may be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logical device (CPLD) and so on.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Product
  • SOC System on Chip
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium, which may contain or store a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • the machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable superposition of the foregoing.
  • machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable superposition of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM compact disk read only memory
  • magnetic storage device magnetic storage device, or any suitable superposition of the foregoing.
  • an image special effect processing method including:
  • the combined image output is displayed on the terminal screen.
  • the method further includes:
  • each frame of image is detected
  • a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer.
  • combination processing of the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer includes:
  • the special effect unit of the rendering layer draws a corresponding historical image at the position according to the display attribute to obtain an image.
  • the method further includes:
  • the counter of the script layer is triggered to start counting, and when the timer reaches a preset time, the operation of the animation logic processing unit is triggered.
  • the method further includes:
  • the method further includes:
  • the script layer sends a control instruction to the special effect fetching unit of the rendering layer to trigger the operation of the special effect unit.
  • the method further includes:
  • the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, resolution of the terminal screen, and number of split screens.
  • an image special effect processing apparatus including:
  • Video acquisition module for acquiring video images
  • the current image determining module is configured to determine the current image according to the current playback progress of the video image
  • the historical image acquisition module is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
  • a combination processing module configured to perform a combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
  • the image display module is used to output the combined image for display on the terminal screen.
  • the device further includes:
  • the image storage module is used to detect each frame of the image during the playback of the video image; if the image containing the predetermined action is detected, the image capture unit of the rendering layer captures the image containing all The partial image of the predetermined action area is stored in the data storage layer as the historical image.
  • the combination processing module is specifically configured to: use the current image as a background image; determine the display attributes of each historical image and its position in the background image through the animation logic processing unit of the script layer; The special effect unit of the rendering layer draws the corresponding historical image at the position according to the display attribute to obtain an image.
  • the device further includes:
  • the counter trigger module is used to trigger the counter of the script layer to start counting after the historical image is stored in the data storage layer by the image capture unit of the rendering layer, when the timer reaches a preset time , The operation of the animation logic processing unit is triggered.
  • the device further includes:
  • the acquisition instruction sending module is configured to send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
  • the device further includes:
  • the control instruction sending module is used to send a control instruction to the special effect fetching unit of the rendering layer through the script layer to trigger the operation of the special effect unit.
  • the device further includes:
  • the grabbing instruction sending module is configured to send an image grabbing instruction to the image grabbing unit of the rendering layer through the script layer to trigger the operation of the image grabbing unit.
  • the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
  • an electronic device including:
  • Memory for storing non-transitory computer readable instructions
  • the processor is configured to run the computer-readable instructions to enable the processor to implement the above-mentioned image special effect processing method when executed.
  • a computer-readable storage medium for storing non-transitory computer-readable instructions.
  • the non-transitory computer-readable instructions are executed by a computer, the The computer executes the above-mentioned image special effect processing method.
  • the combined image output is displayed on the terminal screen, so that special effects can be realized only by modifying the rendering layer, which is relatively simple and flexible to implement.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed are an image special effect processing method, apparatus, electronic device, and computer-readable storage medium. The method comprises: obtaining a video image; determining a current image according to the current playback progress of the video image; by means of an image acquisition unit of a rendering layer, obtaining from the data storage layer at least one historical image containing a preset action; combining the at least one historical image and the current image by means of an animation logic processing unit of a script layer and a special effect unit of the rendering layer; outputting a combined image and displaying same on a terminal screen. In the embodiments of the present disclosure, at least one historical image containing a preset action is obtained from the data storage layer by means of an image acquisition unit; the at least one historical image and the current image are combined by means of an animation logic processing unit and a special effect unit of the rendering layer, and a combined image is outputted and displayed on a terminal screen; thus one need only to modify the rendering layer to achieve a special effect, and it is relatively simple and flexible to implement.

Description

图像特效处理方法、装置、电子设备和计算机可读存储介质Image special effect processing method, device, electronic equipment and computer readable storage medium
相关申请的交叉引用Cross references to related applications
本申请要求于2019年08月09日提交的,申请号为201910734922.8、发明名称为“图像特效处理方法、装置、电子设备和计算机可读存储介质”的中国专利申请的优先权,该申请的全文通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on August 9, 2019, with the application number 201910734922.8 and the invention title "Image effects processing methods, devices, electronic equipment and computer-readable storage media", the full text of the application Incorporated in this application by reference.
技术领域Technical field
本公开涉及图像特效处理技术领域,特别是涉及一种图像特效处理方法、装置、电子设备和计算机可读存储介质。The present disclosure relates to the technical field of image special effect processing, and in particular to an image special effect processing method, device, electronic equipment, and computer-readable storage medium.
背景技术Background technique
随着智能终端技术的发展,智能终端的功能也越来越多样化,例如,用户可以使用终端中摄像头拍摄图像(例如,照片或视频),已经成为人们娱乐消遣的新模式。但是,单纯的拍摄图像已经不能用户的需求了。随之如何对拍摄的图像进行特效处理,以得到更好玩有趣的图像,成为人们关注的焦点。With the development of smart terminal technology, the functions of smart terminals are becoming more and more diversified. For example, users can use the camera in the terminal to take images (for example, photos or videos), which has become a new mode of entertainment for people. However, simply shooting images can no longer meet the needs of users. Then how to perform special effects processing on the captured images to get more fun and interesting images has become the focus of attention.
在现有技术中,通常采用对拍摄的图像后期制作的方式,得到特殊效果的图像。但是这样方式不具有实时性,无法实时的对输入图像进行特殊效果处理;或者研发人员针对每种特效专门编写程序实现,但是这样非常不灵活,如果需要多种特效的话,就需要多种实现,这样会导致程序的体积较大,实现起来比较复杂,且费时费力。In the prior art, the post-production method of the captured image is usually adopted to obtain images with special effects. However, this method is not real-time and cannot perform special effect processing on the input image in real time; or R&D personnel write programs for each special effect, but this is very inflexible. If multiple special effects are needed, multiple implementations are required. This will result in larger program size, more complicated implementation, and time-consuming and labor-intensive.
发明内容Summary of the invention
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方 案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。The summary of the invention is provided in order to introduce the concepts in a brief form, and these concepts will be described in detail in the following specific embodiments. The content of the invention is not intended to identify the key features or essential features of the technical solution to be protected, nor is it intended to be used to limit the scope of the technical solution to be protected.
本公开解决的技术问题是提供一种图像特效处理方法,以至少部分地解决现有技术中图像特效实现比较复杂且不灵活的技术问题。此外,还提供一种图像特效处理装置、图像特效处理硬件装置、计算机可读存储介质和图像特效处理终端。The technical problem solved by the present disclosure is to provide an image special effect processing method, so as to at least partially solve the technical problem of the complicated and inflexible realization of image special effects in the prior art. In addition, an image special effect processing device, an image special effect processing hardware device, a computer-readable storage medium, and an image special effect processing terminal are also provided.
为了实现上述目的,根据本公开的一个方面,提供以下技术方案:In order to achieve the above objective, according to one aspect of the present disclosure, the following technical solutions are provided:
一种图像特效处理方法,包括:An image special effect processing method, including:
获取视频图像;Obtain video images;
根据所述视频图像的当前播放进度确定当前图像;Determining the current image according to the current playback progress of the video image;
通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;Obtain at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;Performing combined processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
将组合后的图像输出在终端屏幕上显示。The combined image output is displayed on the terminal screen.
为了实现上述目的,根据本公开的一个方面,提供以下技术方案:In order to achieve the above objective, according to one aspect of the present disclosure, the following technical solutions are provided:
一种图像特效处理装置,包括:An image special effect processing device, including:
视频获取模块,用于获取视频图像;Video acquisition module for acquiring video images;
当前图像确定模块,用于根据所述视频图像的当前播放进度确定当前图像;The current image determining module is configured to determine the current image according to the current playback progress of the video image;
历史图像获取模块,用于通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;The historical image acquisition module is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
组合处理模块,用于通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;A combination processing module, configured to perform a combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
图像显示模块,用于将组合后的图像输出在终端屏幕上显示。The image display module is used to output the combined image for display on the terminal screen.
为了实现上述目的,根据本公开的一个方面,提供以下技术方案:In order to achieve the above objective, according to one aspect of the present disclosure, the following technical solutions are provided:
一种电子设备,包括:An electronic device including:
存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer readable instructions; and
处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现上述任一项所述的图像特效处理方法。The processor is configured to run the computer-readable instructions to enable the processor to implement any of the image special effects processing methods described above when executed.
为了实现上述目的,根据本公开的一个方面,提供以下技术方案:In order to achieve the above objective, according to one aspect of the present disclosure, the following technical solutions are provided:
一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行上述任一项所述的图像特效处理方法。A computer-readable storage medium for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute the image special effect processing method described in any one of the above .
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:In order to achieve the above objective, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种图像特效处理终端,包括上述任一图像特效处理装置。An image special effect processing terminal includes any image special effect processing device described above.
本公开实施例通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像,通过脚本层的动画逻辑处理单元和渲染层的特效单元对至少一张历史图像和当前图像进行组合处理,将组合后的图像输出在终端屏幕上显示,这样只需要通过修改渲染层即可实现特效,实现起来比较简单灵活。In the embodiments of the present disclosure, at least one historical image containing preset actions is acquired from the data storage layer by the image acquisition unit of the rendering layer, and at least one historical image and the current image are processed by the animation logic processing unit of the script layer and the special effect unit of the rendering layer. Perform combination processing, and display the combined image output on the terminal screen, so that special effects can be achieved only by modifying the rendering layer, which is relatively simple and flexible to implement.
上述说明仅是本公开技术方案的概述,为了能更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为让本公开的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。The above description is only an overview of the technical solutions of the present disclosure. In order to understand the technical means of the present disclosure more clearly, they can be implemented in accordance with the content of the specification, and to make the above and other objectives, features and advantages of the present disclosure more obvious and understandable. In the following, the preferred embodiments are specially cited and accompanied with the drawings, and the detailed description is as follows.
附图说明Description of the drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent in conjunction with the drawings and with reference to the following specific embodiments. Throughout the drawings, the same or similar reference signs indicate the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
图1为根据本公开一个实施例的图像特效处理方法的流程示意图;FIG. 1 is a schematic flowchart of an image special effect processing method according to an embodiment of the present disclosure;
图2为根据本公开一个实施例的图像特效处理装置的流程示意图;2 is a schematic flowchart of an image special effect processing device according to an embodiment of the present disclosure;
图3为根据本公开一个实施例的电子设备的结构示意图。Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Hereinafter, embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided for Have a more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are only used for exemplary purposes and are not used to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the steps recorded in the method embodiments of the present disclosure may be executed in a different order, and/or executed in parallel. Furthermore, method implementations may include additional steps and/or omit to perform the illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。The term "including" and its variations as used herein are open-ended includes, that is, "including but not limited to". The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." Related definitions of other terms will be given in the following description.
实施例一Example one
为了解决现有技术中图像特效实现比较复杂且不灵活的技术问题,本公开实施例提供一种图像特效处理方法。如图1所示,该图像特效处理方法主要包括如下步骤S11至步骤S15。In order to solve the technical problem of complicated and inflexible implementation of image special effects in the prior art, embodiments of the present disclosure provide an image special effect processing method. As shown in FIG. 1, the image special effect processing method mainly includes the following steps S11 to S15.
步骤S11:获取视频图像。Step S11: Obtain a video image.
具体的,视频图像可以为实时输入的视频流,例如,短视频应用中的直播视频,也可以为预先存储在终端中的视频图像。其中,终端可以为移动终端,例如智能手机、平板电脑,也可以为固定终端,例如台式电脑。Specifically, the video image may be a real-time input video stream, for example, a live video in a short video application, or a video image pre-stored in the terminal. Among them, the terminal may be a mobile terminal, such as a smart phone, a tablet computer, or a fixed terminal, such as a desktop computer.
步骤S12:根据所述视频图像的当前播放进度确定当前图像。Step S12: Determine the current image according to the current playback progress of the video image.
其中,当前图像为当前时刻播放到的图像。Among them, the current image is the image played at the current moment.
其中,当前时刻可以由用户自定义设置。Among them, the current moment can be customized by the user.
具体的,将视频图像显示在终端屏幕上进行播放,当用户有需求或者观看到感兴趣的图像时,可以通过触发相应的按钮获取当前图像,例如拍照或截取终端屏幕。Specifically, the video image is displayed on the terminal screen for playback. When the user has a demand or sees an image of interest, the current image can be acquired by triggering the corresponding button, such as taking a photo or capturing the terminal screen.
步骤S13:通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像。Step S13: Obtain at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer.
其中,数据存储层用于存储历史图像,例如,数据存储层可由缓存组成,历史图像存储在缓存中,这样可以快速的存取。Among them, the data storage layer is used to store historical images. For example, the data storage layer can be composed of a cache, and the historical images are stored in the cache so that they can be accessed quickly.
其中,所述历史图像可以为一张或多张。Wherein, the historical image may be one or more.
步骤S14:通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理。Step S14: Combine the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer.
其中,脚本层包含脚本程序,及所述脚本程序运行所需要的脚本文件。通过设置脚本中的逻辑实现对渲染层的控制。Wherein, the script layer includes script programs and script files required for running the script programs. Control the rendering layer by setting the logic in the script.
其中,动画逻辑处理单元用于确定至少一张历史图像和所述当前图像的缩放程度、尺寸、旋转角度和位置。Wherein, the animation logic processing unit is used to determine the zoom degree, size, rotation angle and position of at least one historical image and the current image.
其中,特效单元用于将至少一张绘制历史图像和当前图像绘制在一张图像上,并进行组合渲染。Among them, the special effect unit is used to draw at least one drawing history image and the current image on one image and perform combined rendering.
步骤S16:将组合后的图像输出在终端屏幕上显示。Step S16: The combined image is output and displayed on the terminal screen.
本实施例通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像,通过脚本层的动画逻辑处理单元和渲染层的特效单元对至少一张历史图像和当前图像进行组合处理,将组合后的图像输出在终端屏幕上显示,这样只需要通过修改渲染层即可实现特效,实现起来比较简单灵活。In this embodiment, the image acquisition unit of the rendering layer acquires at least one historical image containing a preset action from the data storage layer, and the animation logic processing unit of the script layer and the special effect unit of the rendering layer perform at least one historical image and the current image. Combination processing, the combined image output is displayed on the terminal screen, so that special effects can be realized only by modifying the rendering layer, which is relatively simple and flexible to implement.
在一个可选的实施例中,所述方法还包括:In an optional embodiment, the method further includes:
在所述视频图像播放过程中,对每一帧图像进行检测;In the process of playing the video image, each frame of image is detected;
若检测到含有所述预定动作的图像中,则通过所述渲染层的图像抓取单元抓取含有所述预定动作区域的部分图像作为所述历史图像存储在所述数据存储层。If the image containing the predetermined action is detected, a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer.
其中,预设动作可以为预设手势(例如,剪刀手、ok手势等)、或眨眼、或嘟嘴等动作。Wherein, the preset action may be a preset gesture (for example, a scissors hand, an ok gesture, etc.), or an action such as blinking, or pouting.
在一个可选的实施例中,步骤S14具体包括:In an optional embodiment, step S14 specifically includes:
步骤S141:将所述当前图像作为背景图像;Step S141: Use the current image as a background image;
步骤S142:通过脚本层的动画逻辑处理单元确定每张历史图像的显示属性及在所述背景图像中的位置;Step S142: Determine the display attributes of each historical image and the position in the background image through the animation logic processing unit of the script layer;
其中,显示属性为历史图像的缩放程度、尺寸、旋转角度和位置等。Among them, the display attributes are the zoom degree, size, rotation angle and position of the historical image.
步骤S143:通过所述述渲染层的特效单元根据所述显示属性在所述位置处绘制对应的历史图像,得到一幅图像。Step S143: Drawing a corresponding historical image at the position according to the display attribute by the special effect unit of the rendering layer to obtain an image.
例如,将当前图像作为背景图像,在背景图像的上方或下方或左侧或右侧设置多个空白区域,对应放置多张历史图像,For example, use the current image as a background image, set multiple blank areas above or below or on the left or right of the background image, and place multiple historical images correspondingly.
在一个可选的实施例中,所述通过所述渲染层的图像抓取单元将所述历史图像存储在所述数据存储层之后,所述方法还包括:In an optional embodiment, after the historical image is stored in the data storage layer by the image capture unit of the rendering layer, the method further includes:
触发所述脚本层的计数器开始计时,当所述计时器到达预设时间,则触发所述动画逻辑处理单元的操作。The counter of the script layer is triggered to start counting, and when the timer reaches a preset time, the operation of the animation logic processing unit is triggered.
具体的,若检测到含有所述预定动作的图像中,则通过所述渲染层的图像抓取单元抓取含有所述预定动作区域的部分图像作为所述历史图像存储在所述数据存储层,并触发所述脚本层的计数器开始计时,当所述计时器到达预设时间,则触发所述动画逻辑处理单元确定每张历史图像的显示属性及在所述背景图像 中的位置。Specifically, if an image containing the predetermined action is detected, a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer, And trigger the counter of the script layer to start counting, and when the timer reaches a preset time, the animation logic processing unit is triggered to determine the display attributes of each historical image and the position in the background image.
在一个可选的实施例中,所述方法还包括:In an optional embodiment, the method further includes:
通过脚本层向所述渲染层的图像获取单元发送图像获取指令,以触发所述图像获取单元的操作。Send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
其中,脚本层包含脚本程序,及所述脚本程序运行所需要的脚本文件。通过设置脚本中的逻辑实现对渲染层的控制。例如,通过向渲染层的图像获取单元发送图像获取指令,图像获取单元根据图像获取指令从数据存储层中获取所述视频图像的历史图像。Wherein, the script layer includes script programs and script files required for running the script programs. Control the rendering layer by setting the logic in the script. For example, by sending an image acquisition instruction to the image acquisition unit of the rendering layer, the image acquisition unit acquires the historical image of the video image from the data storage layer according to the image acquisition instruction.
在一个可选的实施例中,所述方法还包括:In an optional embodiment, the method further includes:
通过脚本层向所述渲染层的特效取单元发送控制指令,以触发所述特效单元的操作。The script layer sends a control instruction to the special effect fetching unit of the rendering layer to trigger the operation of the special effect unit.
具体的,通过设置脚本中的逻辑实现对渲染层的控制。例如,通过控制渲染层的特效单元完成一个特效。即向所述渲染层的特效取单元发送控制指令,所述特效单元根据控制指令将所述历史图像与所述当前图像叠加。Specifically, the control of the rendering layer is achieved by setting the logic in the script. For example, by controlling the special effect unit of the rendering layer to complete a special effect. That is, a control instruction is sent to the special effect fetching unit of the rendering layer, and the special effect unit superimposes the historical image with the current image according to the control instruction.
在一个可选的实施例中,所述方法还包括:In an optional embodiment, the method further includes:
通过脚本层向所述渲染层的图像抓取单元发送图像抓取指令,以触发所述图像抓取单元的操作。Send an image capture instruction to the image capture unit of the rendering layer through the script layer to trigger the operation of the image capture unit.
具体的,通过设置脚本中的逻辑实现对渲染层的控制。例如,通过脚本层向所述渲染层的图像抓取单元发送图像抓取指令,图像抓取单元根据抓取指令抓取图像,并将抓取的图像缓存在存储层中。Specifically, the control of the rendering layer is achieved by setting the logic in the script. For example, the script layer sends an image capture instruction to the image capture unit of the rendering layer, and the image capture unit captures the image according to the capture instruction, and caches the captured image in the storage layer.
进一步的,所述图像抓取指令中包含以下至少一项参数:图像标识、图像坐标、图像宽度、图像高度、所述终端屏幕的分辨率。Further, the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
其中,图像标识为抓取图像的编号或名称,在每次抓取图像时可以随机生成图像标识。The image identifier is the number or name of the captured image, and the image identifier can be randomly generated each time an image is captured.
其中,图像坐标为抓取图像的开始坐标和终点坐标,包括x坐标和y坐标。例如,可以为终端屏幕左上角坐标及右下角坐标。图像坐标具体可以为归一化坐标。当为归一化坐标时,需要根据所述终端屏幕的分辨率计算得到实际坐标,例如,将归一化坐标与所述终端屏幕的分辨率的乘积作为实际坐标。Among them, the image coordinates are the start and end coordinates of the captured image, including x and y coordinates. For example, it can be the coordinates of the upper left corner and the lower right corner of the terminal screen. The image coordinates may specifically be normalized coordinates. When it is a normalized coordinate, the actual coordinate needs to be calculated according to the resolution of the terminal screen. For example, the product of the normalized coordinate and the resolution of the terminal screen is taken as the actual coordinate.
其中,图像宽度为抓取图像的宽度。Among them, the image width is the width of the captured image.
其中,图像高度为抓取图像的高度。Among them, the image height is the height of the captured image.
本领域技术人员应能理解,在上述各个实施例的基础上,还可以进行明显变型(例如,对所列举的模式进行叠加)或等同替换。Those skilled in the art should understand that, on the basis of the above-mentioned various embodiments, obvious modifications (for example, superimposing the listed modes) or equivalent substitutions can also be made.
在上文中,虽然按照上述的顺序描述了图像特效处理方法实施例中的各个步骤,本领域技术人员应清楚,本公开实施例中的步骤并不必然按照上述顺序执行,其也可以倒序、并行、交叉等其他顺序执行,而且,在上述步骤的基础上,本领域技术人员也可以再加入其他步骤,这些明显变型或等同替换的方式也应包含在本公开的保护范围之内,在此不再赘述。In the above, although the steps in the embodiment of the image special effect processing method are described in the above order, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily executed in the above order, and they can also be reversed and parallel. , Crossover, etc., and on the basis of the above steps, those skilled in the art can also add other steps. These obvious modifications or equivalent substitutions should also be included in the scope of protection of the present disclosure. Repeat it again.
下面为本公开装置实施例,本公开装置实施例可用于执行本公开方法实施例实现的步骤,为了便于说明,仅示出了与本公开实施例相关的部分,具体技术细节未揭示的,请参照本公开方法实施例。The following are device embodiments of the present disclosure. The device embodiments of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure. For ease of description, only the parts related to the embodiments of the present disclosure are shown. For specific technical details that are not disclosed, please Refer to the method embodiment of the present disclosure.
实施例二Example two
为了解决现有技术中图像特效实现比较复杂且不灵活的技术问题,本公开实施例提供一种图像特效处理装置。该装置可以执行上述实施例一所述的图像特效处理方法实施例中的步骤。如图2所示,该装置主要包括:视频获取模块21、当前图像确定模块22、历史图像获取模块23、组合处理模块24和图像显示模块25;其中,In order to solve the technical problem of complicated and inflexible implementation of image special effects in the prior art, embodiments of the present disclosure provide an image special effect processing device. The device can execute the steps in the image special effect processing method embodiment described in the first embodiment. As shown in Figure 2, the device mainly includes: a video acquisition module 21, a current image determination module 22, a historical image acquisition module 23, a combination processing module 24, and an image display module 25; among them,
视频获取模块21用于获取视频图像;The video acquisition module 21 is used to acquire video images;
当前图像确定模块22用于根据所述视频图像的当前播放进度确定当前图像;The current image determining module 22 is configured to determine the current image according to the current playback progress of the video image;
历史图像获取模块23用于通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;The historical image acquisition module 23 is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
组合处理模块24用于通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;The combination processing module 24 is configured to perform combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
图像显示模块25用于将组合后的图像输出在终端屏幕上显示。The image display module 25 is used to output the combined image for display on the terminal screen.
进一步的,所述装置还包括:图像存储模块26,其中,Further, the device further includes: an image storage module 26, wherein:
图像存储模块26,用于在所述视频图像播放过程中,对每一帧图像进行检测;若检测到含有所述预定动作的图像中,则通过所述渲染层的图像抓取单元抓取含有所述预定动作区域的部分图像作为所述历史图像存储在所述数据存储层。The image storage module 26 is used to detect each frame of image during the playback of the video image; if an image containing the predetermined action is detected, the image capture unit of the rendering layer captures the image containing The partial image of the predetermined action area is stored in the data storage layer as the historical image.
进一步的,所述组合处理模块24具体用于:将所述当前图像作为背景图像;通过脚本层的动画逻辑处理单元确定每张历史图像的显示属性及在所述背景图像中的位置;通过所述述渲染层的特效单元根据所述显示属性在所述位置处绘制对应的历史图像,得到一幅图像。Further, the combination processing module 24 is specifically configured to: use the current image as a background image; determine the display attributes of each historical image and its position in the background image through the animation logic processing unit of the script layer; The special effect unit of the rendering layer draws the corresponding historical image at the position according to the display attribute to obtain an image.
进一步的,所述装置还包括:计数器触发模块27;其中,Further, the device further includes: a counter trigger module 27; wherein,
计数器触发模块27用于在通过所述渲染层的图像抓取单元将所述历史图像存储在所述数据存储层之后,触发所述脚本层的计数器开始计时,当所述计时器到达预设时间,则触发所述动画逻辑处理单元的操作。The counter triggering module 27 is configured to trigger the counter of the script layer to start timing after the historical image is stored in the data storage layer by the image capture unit of the rendering layer, when the timer reaches a preset time , The operation of the animation logic processing unit is triggered.
进一步的,所述装置还包括:获取指令发送模块28;其中,Further, the device further includes: an acquisition instruction sending module 28; wherein,
获取指令发送模块28用于通过脚本层向所述渲染层的图像获取单元发送图像获取指令,以触发所述图像获取单元的操作。The acquisition instruction sending module 28 is configured to send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
进一步的,所述装置还包括:控制指令发送模块29;其中,Further, the device further includes: a control instruction sending module 29; wherein,
控制指令发送模块29用于通过脚本层向所述渲染层的特效取单元发送控制指令,以触发所述特效单元的操作。The control instruction sending module 29 is configured to send a control instruction to the special effect fetching unit of the rendering layer through the script layer to trigger the operation of the special effect unit.
进一步的,所述装置还包括:抓取指令发送模块210;其中,Further, the device further includes: a grabbing instruction sending module 210; wherein,
抓取指令发送模块210用于通过脚本层向所述渲染层的图像抓取单元发送图像抓取指令,以触发所述图像抓取单元的操作。The capture instruction sending module 210 is configured to send an image capture instruction to the image capture unit of the rendering layer through the script layer to trigger the operation of the image capture unit.
进一步的,所述图像抓取指令中包含以下至少一项参数:图像标识、图像坐标、图像宽度、图像高度、所述终端屏幕的分辨率。Further, the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
有关图像特效处理装置实施例的工作原理、实现的技术效果等详细说明可以参考前述图像特效处理方法实施例中的相关说明,在此不再赘述。For detailed descriptions of the working principle and realized technical effects of the embodiment of the image special effect processing device, please refer to the relevant description in the foregoing embodiment of the image special effect processing method, which will not be repeated here.
实施例三Example three
下面参考图3,其示出了适于用来实现本公开实施例的电子设备300的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图3示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。3, which shows a schematic structural diagram of an electronic device 300 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG. 3 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图3所示,电子设备300可以包括处理装置(例如中央处理器、图形处理器等)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储装置306加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM 303中,还存储有电子设备300操作所需的各种程序和数据。处理装置301、ROM 302以及RAM 303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG. 3, the electronic device 300 may include a processing device (such as a central processing unit, a graphics processor, etc.) 301, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 302 or from a storage device 306. The program in the memory (RAM) 303 executes various appropriate actions and processing. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to the bus 304.
通常,以下装置可以连接至I/O接口305:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置306;包括例如液晶显 示器(LCD)、扬声器、振动器等的输出装置307;包括例如磁带、硬盘等的存储装置306;以及通信装置309。通信装置309可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图3示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 305: including input devices 306 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, vibration An output device 307 such as a device; a storage device 306 such as a magnetic tape and a hard disk; and a communication device 309. The communication device 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. Although FIG. 3 shows an electronic device 300 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置309从网络上被下载和安装,或者从存储装置306被安装,或者从ROM 302被安装。在该计算机程序被处理装置301执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, 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 contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 309, or installed from the storage device 306, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意叠加。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的叠加。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的叠加。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的叠加。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者 器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的叠加。It should be noted that the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any superposition of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a superposition of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable overlay of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable superposition of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable superposition of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and server can communicate with any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium. Communication (e.g., communication network) interconnects. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future research and development network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取视频图像;根据所述视频图像的当前播放进度确定当前图像;通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;将组合后的图像输出在终端屏幕上显示。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a video image; determines the current image according to the current playback progress of the video image; The image acquisition unit of the rendering layer acquires at least one historical image containing preset actions from the data storage layer; the animation logic processing unit of the script layer and the special effect unit of the rendering layer compare the at least one historical image and the The current image is combined and processed; the combined image is output and displayed on the terminal screen.
可以以一种或多种程序设计语言或其叠加来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of the present disclosure can be written in one or more programming languages or their superpositions. The above-mentioned programming languages include but are not limited to object-oriented programming languages such as Java, Smalltalk, C++, and Including conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user’s computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的叠加,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的叠加来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the superposition of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by superimposing dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in the present disclosure may be implemented in a software manner, or may be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described hereinabove may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适叠加。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适叠加。In the context of the present disclosure, a machine-readable medium may be a tangible medium, which may contain or store a program for use by or in combination with the instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable superposition of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable superposition of the foregoing.
根据本公开的一个或多个实施例,提供了一种图像特效处理方法,包括:According to one or more embodiments of the present disclosure, there is provided an image special effect processing method, including:
获取视频图像;Obtain video images;
根据所述视频图像的当前播放进度确定当前图像;Determining the current image according to the current playback progress of the video image;
通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;Obtain at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;Performing combined processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
将组合后的图像输出在终端屏幕上显示。The combined image output is displayed on the terminal screen.
进一步的,所述方法还包括:Further, the method further includes:
在所述视频图像播放过程中,对每一帧图像进行检测;In the process of playing the video image, each frame of image is detected;
若检测到含有所述预定动作的图像中,则通过所述渲染层的图像抓取单元抓取含有所述预定动作区域的部分图像作为所述历史图像存储在所述数据存储层。If the image containing the predetermined action is detected, a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer.
进一步的,所述通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理,包括:Further, the combination processing of the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer includes:
将所述当前图像作为背景图像;Use the current image as a background image;
通过脚本层的动画逻辑处理单元确定每张历史图像的显示属性及在所述背景图像中的位置;Determine the display attributes of each historical image and its position in the background image through the animation logic processing unit of the script layer;
通过所述述渲染层的特效单元根据所述显示属性在所述位置处绘制对应的历史图像,得到一幅图像。The special effect unit of the rendering layer draws a corresponding historical image at the position according to the display attribute to obtain an image.
进一步的,所述通过所述渲染层的图像抓取单元将所述历史图像存储在所述数据存储层之后,所述方法还包括:Further, after storing the historical image in the data storage layer by the image capture unit of the rendering layer, the method further includes:
触发所述脚本层的计数器开始计时,当所述计时器到达预设时间,则触发所述动画逻辑处理单元的操作。The counter of the script layer is triggered to start counting, and when the timer reaches a preset time, the operation of the animation logic processing unit is triggered.
进一步的,所述方法还包括:Further, the method further includes:
通过脚本层向所述渲染层的图像获取单元发送图像获取指令,以触发所述图像获取单元的操作。Send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
进一步的,所述方法还包括:Further, the method further includes:
通过脚本层向所述渲染层的特效取单元发送控制指令,以触发所述特效单元的操作。The script layer sends a control instruction to the special effect fetching unit of the rendering layer to trigger the operation of the special effect unit.
进一步的,所述方法还包括:Further, the method further includes:
通过脚本层向所述渲染层的图像抓取单元发送图像抓取指令,以触发所述图像抓取单元的操作。Send an image capture instruction to the image capture unit of the rendering layer through the script layer to trigger the operation of the image capture unit.
进一步的,所述图像抓取指令中包含以下至少一项参数:图像标识、图像坐标、图像宽度、图像高度、所述终端屏幕的分辨率、分屏数量。Further, the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, resolution of the terminal screen, and number of split screens.
根据本公开的一个或多个实施例,提供了一种图像特效处理装置,包括:According to one or more embodiments of the present disclosure, there is provided an image special effect processing apparatus, including:
视频获取模块,用于获取视频图像;Video acquisition module for acquiring video images;
当前图像确定模块,用于根据所述视频图像的当前播放进度确定当前图像;The current image determining module is configured to determine the current image according to the current playback progress of the video image;
历史图像获取模块,用于通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;The historical image acquisition module is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
组合处理模块,用于通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;A combination processing module, configured to perform a combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
图像显示模块,用于将组合后的图像输出在终端屏幕上显示。The image display module is used to output the combined image for display on the terminal screen.
进一步的,所述装置还包括:Further, the device further includes:
图像存储模块,用于在所述视频图像播放过程中,对每一帧图像进行检测;若检测到含有所述预定动作的图像中,则通过所述渲染层的图像抓取单元抓取含有所述预定动作区域的部分图像作为所述历史图像存储在所述数据存储层。The image storage module is used to detect each frame of the image during the playback of the video image; if the image containing the predetermined action is detected, the image capture unit of the rendering layer captures the image containing all The partial image of the predetermined action area is stored in the data storage layer as the historical image.
进一步的,所述组合处理模块具体用于:将所述当前图像作为背景图像;通过脚本层的动画逻辑处理单元确定每张历史图像的显示属性及在所述背景图像中的位置;通过所述述渲染层的特效单元根据所述显示属性在所述位置处绘制对应的历史图像,得到一幅图像。Further, the combination processing module is specifically configured to: use the current image as a background image; determine the display attributes of each historical image and its position in the background image through the animation logic processing unit of the script layer; The special effect unit of the rendering layer draws the corresponding historical image at the position according to the display attribute to obtain an image.
进一步的,所述装置还包括:Further, the device further includes:
计数器触发模块,用于在通过所述渲染层的图像抓取单元将所述历史图像存储在所述数据存储层之后,触发所述脚本层的计数器开始计时,当所述计时器到达预设时间,则触发所述动画逻辑处理单元的操作。The counter trigger module is used to trigger the counter of the script layer to start counting after the historical image is stored in the data storage layer by the image capture unit of the rendering layer, when the timer reaches a preset time , The operation of the animation logic processing unit is triggered.
进一步的,所述装置还包括:Further, the device further includes:
获取指令发送模块,用于通过脚本层向所述渲染层的图像获取单元发送图像获取指令,以触发所述图像获取单元的操作。The acquisition instruction sending module is configured to send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
进一步的,所述装置还包括:Further, the device further includes:
控制指令发送模块,用于通过脚本层向所述渲染层的特效取单元发送控制指令,以触发所述特效单元的操作。The control instruction sending module is used to send a control instruction to the special effect fetching unit of the rendering layer through the script layer to trigger the operation of the special effect unit.
进一步的,所述装置还包括:Further, the device further includes:
抓取指令发送模块,用于通过脚本层向所述渲染层的图像抓取单元发送图像抓取指令,以触发所述图像抓取单元的操作。The grabbing instruction sending module is configured to send an image grabbing instruction to the image grabbing unit of the rendering layer through the script layer to trigger the operation of the image grabbing unit.
进一步的,所述图像抓取指令中包含以下至少一项参数:图像标识、图像坐标、图像宽度、图像高度、所述终端屏幕的分辨率。Further, the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
根据本公开的一个或多个实施例,提供了一种电子设备,包括:According to one or more embodiments of the present disclosure, there is provided an electronic device including:
存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer readable instructions; and
处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现上述的图像特效处理方法。The processor is configured to run the computer-readable instructions to enable the processor to implement the above-mentioned image special effect processing method when executed.
根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,用于存 储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行上述的图像特效处理方法。According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the The computer executes the above-mentioned image special effect processing method.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定叠加而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意叠加而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the disclosure involved in this disclosure is not limited to the technical solutions formed by the specific superposition of the above technical features, and should also cover the above technical features or technical solutions without departing from the above disclosed concept. Other technical solutions formed by arbitrary superposition of its equivalent features. For example, the above-mentioned features and the technical features disclosed in the present disclosure (but not limited to) with similar functions are mutually replaced to form a technical solution.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以叠加地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子叠加的方式实现在多个实施例中。In addition, although the operations are depicted in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented superimposedly in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-overlapping manner.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or logical actions of the method, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely exemplary forms of implementing the claims.
组合处理,将组合后的图像输出在终端屏幕上显示,这样只需要通过修改渲染层即可实现特效,实现起来比较简单灵活。Combination processing, the combined image output is displayed on the terminal screen, so that special effects can be realized only by modifying the rendering layer, which is relatively simple and flexible to implement.

Claims (11)

  1. 一种图像特效处理方法,其特征在于,包括:An image special effect processing method, characterized in that it comprises:
    获取视频图像;Obtain video images;
    根据所述视频图像的当前播放进度确定当前图像;Determining the current image according to the current playback progress of the video image;
    通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;Obtain at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
    通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;Performing combined processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
    将组合后的图像输出在终端屏幕上显示。The combined image output is displayed on the terminal screen.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    在所述视频图像播放过程中,对每一帧图像进行检测;In the process of playing the video image, each frame of image is detected;
    若检测到含有所述预定动作的图像中,则通过所述渲染层的图像抓取单元抓取含有所述预定动作区域的部分图像作为所述历史图像存储在所述数据存储层。If the image containing the predetermined action is detected, a partial image containing the predetermined action area is captured by the image capture unit of the rendering layer as the historical image and stored in the data storage layer.
  3. 根据权利要求1所述的方法,其特征在于,所述通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理,包括:The method according to claim 1, wherein the combination processing of the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer includes :
    将所述当前图像作为背景图像;Use the current image as a background image;
    通过脚本层的动画逻辑处理单元确定每张历史图像的显示属性及在所述背景图像中的位置;Determine the display attributes of each historical image and its position in the background image through the animation logic processing unit of the script layer;
    通过所述述渲染层的特效单元根据所述显示属性在所述位置处绘制对应的历史图像,得到一幅图像。The special effect unit of the rendering layer draws a corresponding historical image at the position according to the display attribute to obtain an image.
  4. 根据权利要求2所述的方法,其特征在于,所述通过所述渲染层的图像 抓取单元将所述历史图像存储在所述数据存储层之后,所述方法还包括:The method according to claim 2, wherein after storing the historical image in the data storage layer by the image capture unit of the rendering layer, the method further comprises:
    触发所述脚本层的计数器开始计时,当所述计时器到达预设时间,则触发所述动画逻辑处理单元的操作。The counter of the script layer is triggered to start counting, and when the timer reaches a preset time, the operation of the animation logic processing unit is triggered.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    通过所述脚本层向所述渲染层的图像获取单元发送图像获取指令,以触发所述图像获取单元的操作。Send an image acquisition instruction to the image acquisition unit of the rendering layer through the script layer to trigger the operation of the image acquisition unit.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    通过所述脚本层向所述渲染层的特效取单元发送控制指令,以触发所述特效单元的操作。Send a control instruction to the special effect fetching unit of the rendering layer through the script layer to trigger the operation of the special effect unit.
  7. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:
    通过所述脚本层向所述渲染层的图像抓取单元发送图像抓取指令,以触发所述图像抓取单元的操作。The script layer sends an image capture instruction to the image capture unit of the rendering layer to trigger the operation of the image capture unit.
  8. 根据权利要求7所述的方法,其特征在于,所述图像抓取指令中包含以下至少一项参数:图像标识、图像坐标、图像宽度、图像高度、所述终端屏幕的分辨率。The method according to claim 7, wherein the image capture instruction includes at least one of the following parameters: image identification, image coordinates, image width, image height, and resolution of the terminal screen.
  9. 一种图像特效处理装置,其特征在于,包括:An image special effect processing device, characterized in that it comprises:
    视频获取模块,用于获取视频图像;Video acquisition module for acquiring video images;
    当前图像确定模块,用于根据所述视频图像的当前播放进度确定当前图像;The current image determining module is configured to determine the current image according to the current playback progress of the video image;
    历史图像获取模块,用于通过渲染层的图像获取单元从数据存储层获取包含预设动作的至少一张历史图像;The historical image acquisition module is configured to acquire at least one historical image containing a preset action from the data storage layer through the image acquisition unit of the rendering layer;
    组合处理模块,用于通过脚本层的动画逻辑处理单元和所述述渲染层的特效单元对所述至少一张历史图像和所述当前图像进行组合处理;A combination processing module, configured to perform a combination processing on the at least one historical image and the current image through the animation logic processing unit of the script layer and the special effect unit of the rendering layer;
    图像显示模块,用于将组合后的图像输出在终端屏幕上显示。The image display module is used to output the combined image for display on the terminal screen.
  10. 一种电子设备,包括:An electronic device including:
    存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer readable instructions; and
    处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现根据权利要求1-8任一项所述的图像特效处理方法。The processor is configured to run the computer-readable instructions so that the processor implements the image special effect processing method according to any one of claims 1-8 when executed.
  11. 一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行权利要求1-8任一项所述的图像特效处理方法。A computer-readable storage medium for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer can execute any one of claims 1-8. Image special effects processing method.
PCT/CN2020/106820 2019-08-09 2020-08-04 Image special effect processing method, apparatus, electronic device, and computer-readable storage medium WO2021027632A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910734922.8 2019-08-09
CN201910734922.8A CN112347301B (en) 2019-08-09 2019-08-09 Image special effect processing method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021027632A1 true WO2021027632A1 (en) 2021-02-18

Family

ID=74367824

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106820 WO2021027632A1 (en) 2019-08-09 2020-08-04 Image special effect processing method, apparatus, electronic device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN112347301B (en)
WO (1) WO2021027632A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113476837B (en) * 2021-07-01 2024-06-04 网易(杭州)网络有限公司 Image quality display method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100053342A1 (en) * 2008-09-04 2010-03-04 Samsung Electronics Co. Ltd. Image edit method and apparatus for mobile terminal
CN102917033A (en) * 2012-09-29 2013-02-06 乐视网信息技术(北京)股份有限公司 Picture intercepting and sharing method of video player
CN105608715A (en) * 2015-12-17 2016-05-25 广州华多网络科技有限公司 Online group shot method and system
CN108009473A (en) * 2017-10-31 2018-05-08 深圳大学 Based on goal behavior attribute video structural processing method, system and storage device
CN108156520A (en) * 2017-12-29 2018-06-12 珠海市君天电子科技有限公司 Video broadcasting method, device, electronic equipment and storage medium
CN109040837A (en) * 2018-07-27 2018-12-18 北京市商汤科技开发有限公司 Method for processing video frequency and device, electronic equipment and storage medium
CN110070551A (en) * 2019-04-29 2019-07-30 北京字节跳动网络技术有限公司 Rendering method, device and the electronic equipment of video image

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8610724B2 (en) * 2011-07-29 2013-12-17 Qualcomm Innovation Center, Inc. Systems and methods for webpage adaptive rendering
CN103716548A (en) * 2013-12-06 2014-04-09 乐视致新电子科技(天津)有限公司 Video picture special effect processing method and device
CN104766361B (en) * 2015-04-29 2018-04-27 腾讯科技(深圳)有限公司 A kind of implementation method of ghost effect, and device
CN106303662B (en) * 2016-08-29 2019-09-20 网易(杭州)网络有限公司 Image processing method and device in net cast
CN106385591B (en) * 2016-10-17 2020-05-15 腾讯科技(上海)有限公司 Video processing method and video processing device
CN107015648B (en) * 2017-03-28 2020-12-18 北京小米移动软件有限公司 Picture processing method and device
CN108198159A (en) * 2017-12-28 2018-06-22 努比亚技术有限公司 A kind of image processing method, mobile terminal and computer readable storage medium
CN110070585A (en) * 2019-01-31 2019-07-30 北京字节跳动网络技术有限公司 Image generating method, device and computer readable storage medium
CN110047122A (en) * 2019-04-04 2019-07-23 北京字节跳动网络技术有限公司 Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN110049371A (en) * 2019-05-14 2019-07-23 北京比特星光科技有限公司 Video Composition, broadcasting and amending method, image synthesizing system and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100053342A1 (en) * 2008-09-04 2010-03-04 Samsung Electronics Co. Ltd. Image edit method and apparatus for mobile terminal
CN102917033A (en) * 2012-09-29 2013-02-06 乐视网信息技术(北京)股份有限公司 Picture intercepting and sharing method of video player
CN105608715A (en) * 2015-12-17 2016-05-25 广州华多网络科技有限公司 Online group shot method and system
CN108009473A (en) * 2017-10-31 2018-05-08 深圳大学 Based on goal behavior attribute video structural processing method, system and storage device
CN108156520A (en) * 2017-12-29 2018-06-12 珠海市君天电子科技有限公司 Video broadcasting method, device, electronic equipment and storage medium
CN109040837A (en) * 2018-07-27 2018-12-18 北京市商汤科技开发有限公司 Method for processing video frequency and device, electronic equipment and storage medium
CN110070551A (en) * 2019-04-29 2019-07-30 北京字节跳动网络技术有限公司 Rendering method, device and the electronic equipment of video image

Also Published As

Publication number Publication date
CN112347301B (en) 2024-07-23
CN112347301A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
WO2021027596A1 (en) Image special effect processing method and apparatus, and electronic device and computer readable storage medium
WO2021027631A1 (en) Image special effect processing method and apparatus, electronic device, and computer-readable storage medium
WO2021027547A1 (en) Image special effect processing method, apparatus, and electronic device, and computer-readable storage medium
WO2023051185A1 (en) Image processing method and apparatus, and electronic device and storage medium
WO2021170013A1 (en) Image effect processing method and apparatus
WO2021031847A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
WO2018000619A1 (en) Data display method, device, electronic device and virtual reality device
WO2021129385A1 (en) Image processing method and apparatus
WO2020253453A1 (en) Image switching method and apparatus, and electronic device and storage medium
WO2021135864A1 (en) Image processing method and apparatus
WO2022007565A1 (en) Image processing method and apparatus for augmented reality, electronic device and storage medium
WO2023169305A1 (en) Special effect video generating method and apparatus, electronic device, and storage medium
JP2023536365A (en) Video processing method and apparatus
CN111352560B (en) Screen splitting method and device, electronic equipment and computer readable storage medium
WO2021227953A1 (en) Image special effect configuration method, image recognition method, apparatuses, and electronic device
WO2021027632A1 (en) Image special effect processing method, apparatus, electronic device, and computer-readable storage medium
WO2021027597A1 (en) Image special effect processing method and apparatus, electronic device and computer-readable storage medium
US11880919B2 (en) Sticker processing method and apparatus
WO2023098576A1 (en) Image processing method and apparatus, device, and medium
CN114187169B (en) Method, device, equipment and storage medium for generating video special effect package
WO2021190322A1 (en) Special effect processing method and apparatus
WO2021073204A1 (en) Object display method and apparatus, electronic device, and computer readable storage medium
CN113515329B (en) Special effect attribute setting method and device
US20240163392A1 (en) Image special effect processing method and apparatus, and electronic device and computer readable storage medium
WO2021004171A1 (en) Method and apparatus for achieving water ripple image

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: 20852491

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20852491

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.08.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20852491

Country of ref document: EP

Kind code of ref document: A1