WO2021018178A1 - 文字特效处理方法及装置 - Google Patents
文字特效处理方法及装置 Download PDFInfo
- Publication number
- WO2021018178A1 WO2021018178A1 PCT/CN2020/105439 CN2020105439W WO2021018178A1 WO 2021018178 A1 WO2021018178 A1 WO 2021018178A1 CN 2020105439 W CN2020105439 W CN 2020105439W WO 2021018178 A1 WO2021018178 A1 WO 2021018178A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- text
- special effect
- multimedia
- terminal screen
- resource
- Prior art date
Links
- 230000000694 effects Effects 0.000 title claims abstract description 252
- 238000012545 processing Methods 0.000 title claims abstract description 69
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000006073 displacement reaction Methods 0.000 claims description 82
- 238000003672 processing method Methods 0.000 claims description 25
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 10
- 239000011159 matrix material Substances 0.000 claims description 10
- 230000009466 transformation Effects 0.000 claims description 10
- 230000006870 function Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000004590 computer program Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 238000013461 design Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/106—Display of layout of documents; Previewing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/109—Font handling; Temporal or kinetic typography
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/02—Affine transformations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234336—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by media transcoding, e.g. video is transformed into a slideshow of still pictures or audio is converted into text
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
- H04N21/4316—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8126—Monomedia components thereof involving additional data, e.g. news, sports, stocks, weather forecasts
- H04N21/8133—Monomedia components thereof involving additional data, e.g. news, sports, stocks, weather forecasts specifically related to the content, e.g. biography of the actors in a movie, detailed information about an article seen in a video program
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8146—Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Definitions
- the present disclosure relates to the field of image processing technology, and in particular to a method, device and computer-readable storage medium for processing text effects.
- a fixed version of an application program corresponds to a fixed text special effect, that is, once the application version is determined, the type of text special effect is determined. For example, there are fixed types of text effects in the current version, and other new text effects cannot be added. Only after the version is updated, the new text effects can be added to the application with the version update, which is very inflexible.
- the technical problem solved by the present disclosure is to provide a text special effect processing method, so as to at least partially solve the technical problem of inflexible text special effects in the prior art.
- a text special effect processing device a text special effect processing hardware device, a computer-readable storage medium and a text special effect processing terminal are also provided.
- a special text effect processing method including:
- a special text effect processing method including:
- a text special effect processing device including:
- the request sending module is configured to send a request for obtaining text special effect resources to the server; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia;
- the resource receiving module is configured to receive the text special effect resource sent by the server
- the special effect display module is configured to perform special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen and gradually disappear from the terminal screen.
- a text special effect processing device including:
- the request receiving module is configured to receive a request for obtaining text special effect resources sent by the client; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia;
- the resource sending module is configured to send the text special effect resource to the client, so that the client performs special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia display On the terminal screen, and gradually disappear from 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 so that the processor implements any of the above-mentioned text special effects processing methods when executed.
- a computer-readable storage medium for storing non-transitory computer-readable instructions.
- the computer executes any of the above-mentioned text special effects processing methods .
- a text special effect processing terminal includes any text special effect processing device described above.
- the embodiments of the present disclosure obtain text special effect resources from a server, and perform special effect processing on the text according to the text special effect resources, so that the text follows the playback progress of the multimedia and is displayed on the terminal screen, and gradually changes from the terminal screen.
- the text effect resources can be obtained without updating the client, making the text effect more flexible to use.
- FIG. 1 is a schematic flowchart of a text special effect processing method according to an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart of a method for processing text effects according to an embodiment of the present disclosure
- FIG. 3 is a schematic structural diagram of a text special effects processing device according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of a text special effects processing device according to an embodiment of the present disclosure.
- Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
- the text special effect processing method mainly includes the following steps S11 to S13.
- Step S11 Send a request for obtaining text special effect resources to the server; wherein, the text special effect resources are used to realize the display special effects of texts associated with multimedia.
- the execution subject of this embodiment is a client installed on the terminal, for example, it may be a short video application or music playing software.
- the terminal may be a mobile terminal (for example, a smart phone, a tablet computer, etc.) or a fixed terminal (for example, a desktop computer).
- the multimedia can be a video, and the corresponding text is a line; it can also be music, and the corresponding text is a lyrics.
- the display special effect can be to enlarge or reduce the text, gradually disappear from the terminal screen, and gradually display on the terminal screen.
- multimedia options and/or text effect resource options can be provided on the client application interface, for example, a multimedia list is provided, where the multimedia list contains multiple multimedia names, such as video names or music names; and/or text effect resource lists , Where the text special effect resource list contains special effect information, such as zoom in or zoom out.
- a multimedia list is provided, where the multimedia list contains multiple multimedia names, such as video names or music names; and/or text effect resource lists , Where the text special effect resource list contains special effect information, such as zoom in or zoom out.
- Step S12 Receive the text special effect resource sent by the server.
- the server may be a third-party server, and the third-party server is mainly used to store text special effect resources. It may also be an application server corresponding to the client. The application server is used to store multimedia and text associated with the multimedia in addition to storing text special effect resources.
- Step S13 Perform special effect processing on the text according to the text special effect resource, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually disappears from the terminal screen.
- the text special effect resource is obtained from the server, and the text is processed according to the text special effect resource, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually disappears from the terminal screen. Disappear, without updating the client, you can get text effects resources, making text effects more flexible.
- step S13 specifically includes:
- Step S131 Acquire the time stamp corresponding to the playback progress of the multimedia and the text corresponding to the time stamp.
- the time stamp is the time length of the current playing time relative to the initial playing time.
- the corresponding relationship between the time stamp and the text can be preset, and the corresponding time stamp is further determined according to the playback progress of the multimedia, and the corresponding text can be obtained according to the time stamp.
- Step S132 Determine the display transparency of the text corresponding to the time stamp according to the time stamp.
- the display transparency can be a value between 0-1.
- the display transparency changes from 0 to 1 the text is gradually displayed, and when the display transparency changes from 1 to 0, the text gradually disappears.
- the specific value is determined in real time based on the timestamp.
- Step S133 Perform special effect processing on the text corresponding to the timestamp according to the display transparency, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually disappears from the terminal screen.
- the text corresponding to each timestamp in the multimedia playback process is processed with special effects according to the display transparency, so that the text can be displayed on the terminal screen following the multimedia playback progress, and gradually disappear from the terminal screen. disappear.
- the method further includes:
- Step S14 Generate a displacement map according to the resolution of the terminal; wherein the displacement map includes the initial displacement of each pixel;
- a displacement map with a size of 720*1280 is generated.
- step S133 specifically includes:
- Step S1331 Determine the playback percentage according to the timestamp; where the playback percentage is the ratio of the current playback progress of the text to the total progress.
- Step S1332 Determine a target displacement according to the playback percentage and the initial displacement.
- the target displacement may be the product of the playback percentage and the initial displacement.
- Step S1333 Perform special effect processing on the text corresponding to the timestamp according to the display transparency and the target displacement, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen, and gradually disappear from the terminal screen. disappear.
- the display transparency is multiplied by the pixel value of each pixel in the image composed of the text, as the pixel value of the pixel corresponding to the target displacement, and the display transparency changes in real time as the playback progresses, that is, from 1
- the gradual change is 0, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually disappears from the terminal screen.
- step S14 specifically includes:
- Step S141 Generate a template picture according to the resolution of the terminal; wherein, the template picture includes n feature points; where n is a positive integer;
- Step S142 Triangulate the template picture according to the feature points to obtain m triangles; where m is a positive integer;
- Step S143 Generate a displacement map according to the displacement of each pixel in the m triangles.
- step S143 specifically includes:
- Step S1431 Traverse each triangle, and use the triangle currently traversed as the current triangle;
- Step S1432 Move the three vertices of the current triangle to obtain three target vertices
- the three vertices of the current triangle can be respectively directed in a certain direction and slightly disturbed within a preset range to obtain three target vertices.
- Step S1433 Obtain the affine transformation matrix of the current triangle according to the three vertices and the three target vertices;
- Step S1434 Calculate the displacement of each pixel in the current triangle according to the affine transformation matrix
- the displacement includes displacement in the x-axis direction and displacement in the y-axis direction.
- Step S1435 Generate a displacement map according to the displacement of each pixel point in the m triangles.
- step S133 specifically includes:
- Step S1334 Typesetting the text corresponding to the timestamp according to the typesetting parameters in the text special effect resource, and generate a bitmap.
- the text effect resources include typesetting parameters.
- typesetting parameters include font, font size, font style, color, shadow and underline, etc.
- the bitmap is composed of pixels that make up the text, and the pixel is the smallest information unit of the bitmap and is stored in the image grid. Each pixel has a specific position and color value. Record the information of each pixel in the text in the order from left to right and top to bottom, such as the position of the pixel on the terminal screen, the color of the pixel, etc.
- Step S1335 Determine the pixel value of each pixel in the bitmap according to the display transparency.
- the display transparency is multiplied by the initial pixel value of each pixel in the image composed of the text to obtain the pixel value of each pixel in the bitmap.
- Step S1336 Display the text on the screen of the terminal, and move each pixel along the target displacement, and gradually disappear from the display following the progress of the multimedia playback.
- the target displacement of each pixel is acquired and rendered in OpenGL (Open Graphics Library), so as to accelerate performance.
- OpenGL Open Graphics Library
- the method further includes:
- Step S15 Run a local script program according to the script file in the text special effect resource
- Step S16 Perform special effect processing on the text through the script program, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually disappears from the terminal screen.
- a script program can be written in advance, the script program is configured in the client, and the corresponding script text is included in the text special effect resource.
- the special effect processing of the text is realized by running the script program, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen, and gradually changes from the The terminal screen disappears.
- the text special effect processing method mainly includes the following steps S21 to S22.
- Step S21 Receive a request for acquiring text special effect resources sent by the client; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia.
- Step S22 Send the text special effect resource to the client, so that the client performs special effect processing on the text according to the text special effect resource, so that the text is displayed on the terminal screen following the playback progress of the multimedia And gradually disappear from the terminal screen.
- the text special effect resource is sent to the client, so that the client performs special effect processing on the text according to the text special effect resource, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually changes from The terminal screen disappears, and the text special effect resource can be obtained without updating the client terminal, making the use of the text special effect more flexible.
- the device embodiments of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure.
- an embodiment of the present disclosure provides a text effects processing device.
- the device can execute the steps in the text effect processing method embodiment described in the first embodiment.
- the device mainly includes: a request sending module 31, a resource receiving module 32, and a special effect display module 33; among them,
- the request sending module 31 is configured to send a request for obtaining text special effect resources to the server; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia;
- the resource receiving module 32 is configured to receive the text special effect resource sent by the server;
- the special effect display module 33 is configured to perform special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen and gradually disappear from the terminal screen.
- the special effect display module 33 includes: a text acquisition unit 331, a transparency determination unit 332, and a special effect display unit 333; wherein,
- the text obtaining unit 331 is configured to obtain the time stamp corresponding to the playback progress of the multimedia and the text corresponding to the time stamp;
- the transparency determining unit 332 is configured to determine the display transparency of the text corresponding to the time stamp according to the time stamp;
- the special effect display unit 333 is configured to perform special effect processing on the text corresponding to the timestamp according to the display transparency, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen and gradually disappear from the terminal screen.
- the special effect display module 33 further includes: a displacement map generating unit 334; wherein,
- the displacement map generating unit 334 is configured to generate a displacement map according to the resolution of the terminal; wherein, the displacement map includes the initial displacement of each pixel;
- the special effect display unit 333 is specifically configured to: determine the playback percentage according to the timestamp; wherein, the playback percentage is the ratio of the current playback progress of the text to the total progress; according to the playback percentage and the The initial displacement determines the target displacement; according to the display transparency and the target displacement, the text corresponding to the timestamp is processed with special effects, so that the text follows the playback progress of the multimedia and is displayed on the terminal screen, and gradually changes from the The terminal screen disappears.
- the special effect display unit 333 is specifically configured to: typeset the text corresponding to the timestamp according to the typesetting parameters in the text special effect resource, and generate a bitmap; determine the bitmap according to the display transparency The pixel value of each pixel in the terminal; display the text on the screen of the terminal, and move each pixel along the target displacement, and follow the progress of the multimedia playback from the display to disappear gradually.
- the displacement map generating unit 334 is specifically configured to: generate a template picture according to the resolution of the terminal; wherein the template picture contains n feature points; where n is a positive integer; according to the feature points Triangulate the template picture to obtain m triangles; where m is a positive integer; and generate a displacement map according to the displacement of each pixel in the m triangles.
- the displacement map generation unit 334 is specifically configured to: traverse each triangle and use the triangle currently traversed as the current triangle; move three vertices of the current triangle to obtain three target vertices; The vertices and the three target vertices obtain the affine transformation matrix of the current triangle; calculate the displacement of each pixel in the current triangle according to the affine transformation matrix; according to each of the m triangles The displacement of each pixel generates a displacement map.
- the device further includes: a script running module 34; wherein,
- the script running module 34 is used to run a local script program according to the script file in the text special effect resource; perform special effect processing on the text through the script program, so that the text follows the playback progress of the multimedia and is displayed on the terminal screen And gradually disappear from the terminal screen.
- an embodiment of the present disclosure provides a text effects processing device.
- the device can execute the steps in the text effect processing method embodiment described in the second embodiment.
- the device mainly includes: a request receiving module 41 and a resource sending module 42; among them,
- the request receiving module 41 is configured to receive a request for obtaining text special effect resources sent by the client; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia;
- the resource sending module 42 is configured to send the text special effect resource to the client, so that the client performs special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia display On the terminal screen, and gradually disappear from the terminal screen.
- FIG. 5 shows a schematic structural diagram of an electronic device 500 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. 5 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 500 may include a processing device (such as a central processing unit, a graphics processor, etc.) 501, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 502 or from a storage device 506
- the program in the memory (RAM) 503 executes various appropriate actions and processing.
- the RAM 503 also stores various programs and data required for the operation of the electronic device 500.
- the processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
- An input/output (I/O) interface 505 is also connected to the bus 504.
- the following devices can be connected to the I/O interface 505: including input devices 506 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 507 such as a device; a storage device 506 such as a magnetic tape and a hard disk; and a communication device 509.
- the communication device 509 may allow the electronic device 500 to perform wireless or wired communication with other devices to exchange data.
- FIG. 5 shows an electronic device 500 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 509, or installed from the storage device 506, or installed from the ROM 502.
- the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are 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 combination of the two.
- the computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 combination 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 combination 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 combination 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.
- the electronic device sends a request to the server to obtain text special effect resources; wherein, the text special effect resources are used To realize the display special effects of text associated with multimedia; receive the text special effect resource sent by the server; perform special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia display On the terminal screen, and gradually disappear from 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 a combination thereof.
- 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 combination 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 implemented by a combination of 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any suitable combination 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 combination of the above.
- RAM random access memory
- ROM read-only memory
- EPROM or flash memory erasable programmable read-only memory
- CD-ROM portable compact disk read only memory
- magnetic storage device or any suitable combination of the above.
- a text special effect processing method including:
- the performing special effect processing on the text according to the text special effect resource so that the text is displayed on the terminal screen following the playback progress of the multimedia and gradually disappears from the terminal screen including:
- the method further includes:
- the playback percentage is the ratio of the current playback progress of the text to the total progress
- the text corresponding to the timestamp is processed with special effects according to the display transparency and the target displacement, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually changes from the terminal to the screen.
- the screen disappears including:
- the generating a displacement map according to the resolution of the terminal includes:
- n is a positive integer
- a displacement map is generated according to the displacement of each pixel point in the m triangles.
- the generating a displacement map according to the displacement of each pixel point in the m triangles includes:
- a displacement map is generated according to the displacement of each pixel point in the m triangles.
- the method further includes:
- a text special effect processing method including:
- a text special effect processing device including:
- the request sending module is configured to send a request for obtaining text special effect resources to the server; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia;
- the resource receiving module is configured to receive the text special effect resource sent by the server
- the special effect display module is configured to perform special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen and gradually disappear from the terminal screen.
- the special effect display module includes:
- a text obtaining unit configured to obtain a time stamp corresponding to the playback progress of the multimedia and text corresponding to the time stamp
- a transparency determining unit configured to determine the display transparency of the text corresponding to the time stamp according to the time stamp
- the special effect display unit is configured to perform special effect processing on the text corresponding to the timestamp according to the display transparency, so that the text follows the playback progress of the multimedia to be displayed on the terminal screen and gradually disappear from the terminal screen.
- the special effect display module further includes:
- a displacement map generating unit configured to generate a displacement map according to the resolution of the terminal; wherein the displacement map includes the initial displacement of each pixel;
- the special effect display unit is specifically configured to: determine the playback percentage according to the timestamp; wherein, the playback percentage is the ratio of the current playback progress of the text to the total progress; according to the playback percentage and the initial The displacement determines the target displacement; according to the display transparency and the target displacement, the text corresponding to the timestamp is processed with special effects, so that the text is displayed on the terminal screen following the playback progress of the multimedia, and gradually changes from the terminal The screen disappears.
- the special effect display unit is specifically configured to: typeset the text corresponding to the time stamp according to the typesetting parameters in the text special effect resource, and generate a bitmap; and determine the bitmap according to the display transparency The pixel value of each pixel; the text is displayed on the screen of the terminal, and each pixel is displaced along the target, and gradually disappears from the display following the progress of the multimedia playback.
- the displacement map generating unit is specifically configured to: generate a template picture according to the resolution of the terminal; wherein the template picture contains n feature points; where n is a positive integer; according to the feature point pair
- the template image is triangulated to obtain m triangles; where m is a positive integer; and a displacement map is generated according to the displacement of each pixel in the m triangles.
- the displacement map generating unit is specifically configured to: traverse each triangle, and use the triangle currently traversed as the current triangle; move three vertices of the current triangle to obtain three target vertices; according to the three vertices And the three target vertices to obtain the affine transformation matrix of the current triangle; calculate the displacement of each pixel in the current triangle according to the affine transformation matrix; according to each of the m triangles
- the displacement of pixels generates a displacement map.
- the device further includes:
- the script running module is used to run a local script program according to the script file in the text special effect resource; perform special effect processing on the text through the script program, so that the text follows the playback progress of the multimedia and is displayed on the terminal screen And gradually disappear from the terminal screen.
- a text special effect processing device including:
- the request receiving module is configured to receive a request for obtaining text special effect resources sent by the client; wherein, the text special effect resources are used to realize the display special effects of text associated with multimedia;
- the resource sending module is configured to send the text special effect resource to the client, so that the client performs special effect processing on the text according to the text special effect resource, so that the text follows the playback progress of the multimedia display On the terminal screen, and gradually disappear from 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 text 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 text special effect processing method.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Marketing (AREA)
- Computer Graphics (AREA)
- Business, Economics & Management (AREA)
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
Claims (12)
- 一种文字特效处理方法,其特征在于,包括:向服务器发送获取文字特效资源的请求;其中,所述文字特效资源用于实现与多媒体相关联的文字的显示特效;接收所述服务器发送的所述文字特效资源;根据所述文字特效资源对所述文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 根据权利要求1所述的方法,其特征在于,所述根据所述文字特效资源对所述文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失,包括:获取所述多媒体的播放进度对应的时间戳和所述时间戳对应的文字;根据所述时间戳确定所述时间戳对应的文字的显示透明度;根据所述显示透明度对所述时间戳对应的文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:根据所述终端的分辨率生成位移图;其中,所述位移图中包含每个像素点的初始位移;相应的,根据所述显示透明度对所述时间戳对应的文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上, 并逐渐从所述终端屏幕上消失,包括:根据所述时间戳确定播放百分比;其中,所述播放百分比为所述文字的当前播放进度占总进度的比例;根据所述播放百分比和所述初始位移确定目标位移;根据所述显示透明度和所述目标位移对所述时间戳对应的文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 根据权利要求3所述的方法,其特征在于,所述根据所述显示透明度和所述目标位移对所述时间戳对应的文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失,包括:根据所述文字特效资源中的排版参数对所述时间戳对应的文字进行排版,并生成位图;根据所述显示透明度确定所述位图中的每个像素点的像素值;在所述终端的屏幕上显示所述文字,并将所述每个像素点沿所述目标位移移动,并跟随所述多媒体的播放进度由显示逐渐消失。
- 根据权利要求3所述的方法,其特征在于,所述根据所述终端的分辨率生成位移图,包括:根据所述终端的分辨率生成模板图片;其中,所述模板图片中包含n个特征点;其中,n为正整数;根据所述征点对所述模板图片进行三角剖分,得到m个三角形;其中,m为正整数;根据所述m个三角形内的每个像素点的位移生成位移图。
- 根据权利要求5所述的方法,其特征在于,所述根据所述m个三角形内的每个像素点的位移生成位移图,包括:遍历每个三角形,将当前遍历到的三角形作为当前三角形;移动所述当前三角形的三个顶点,得到三个目标顶点;根据所述三个顶点和所述三个目标顶点得到所述当前三角形的仿射变换矩阵;根据所述仿射变换矩阵计算得到所述当前三角形内的每个像素点的位移;根据所述m个三角形内的每个像素点的位移生成位移图。
- 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:根据所述文字特效资源中的脚本文件运行本地的脚本程序;通过所述脚本程序对所述文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 一种文字特效处理方法,其特征在于,包括:接收客户端发送的获取文字特效资源的请求;其中,所述文字特效资源用于实现与多媒体相关联的文字的显示特效;向所述客户端发送所述文字特效资源,以使所述客户端根据所述文字特效资源对所述文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 一种文字特效处理装置,其特征在于,包括:请求发送模块,用于向服务器发送获取文字特效资源的请求;其中,所述文字特效资源用于实现与多媒体相关联的文字的显示特效;资源接收模块,用于接收所述服务器发送的所述文字特效资源;特效显示模块,用于根据所述文字特效资源对所述文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 一种文字特效处理装置,其特征在于,包括:请求接收模块,用于接收客户端发送的获取文字特效资源的请求;其中,所述文字特效资源用于实现与多媒体相关联的文字的显示特效;资源发送模块,用于向所述客户端发送所述文字特效资源,以使所述客户端根据所述文字特效资源对所述文字进行特效处理,使得所述文字跟随所述多媒体的播放进度显示在终端屏幕上,并逐渐从所述终端屏幕上消失。
- 一种电子设备,包括:存储器,用于存储非暂时性计算机可读指令;以及处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现根据权利要求1-7任一项所述的文字特效处理方法及权利要求8所述的文字特效处理方法。
- 一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行权利要求1-7任一项所述的文字特效处理方法及权利要求8所 述的文字特效处理方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/631,889 US12020347B2 (en) | 2019-08-01 | 2020-07-29 | Method and apparatus for text effect processing |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910708527.2 | 2019-08-01 | ||
CN201910708527.2A CN112395826B (zh) | 2019-08-01 | 2019-08-01 | 文字特效处理方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021018178A1 true WO2021018178A1 (zh) | 2021-02-04 |
Family
ID=74230198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/105439 WO2021018178A1 (zh) | 2019-08-01 | 2020-07-29 | 文字特效处理方法及装置 |
Country Status (3)
Country | Link |
---|---|
US (1) | US12020347B2 (zh) |
CN (1) | CN112395826B (zh) |
WO (1) | WO2021018178A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050191035A1 (en) * | 2004-02-28 | 2005-09-01 | Samsung Electronics Co., Ltd. | Storage medium recording text-based subtitle stream, reproducing apparatus and reproducing method for reproducing text-based subtitle stream recorded on the storage medium |
CN101854377A (zh) * | 2010-01-25 | 2010-10-06 | 杭州东信北邮信息技术有限公司 | 一种支持无线终端的信息平台系统及其实现方法 |
CN103179093A (zh) * | 2011-12-22 | 2013-06-26 | 腾讯科技(深圳)有限公司 | 视频字幕的匹配系统和方法 |
CN107943964A (zh) * | 2017-11-27 | 2018-04-20 | 腾讯音乐娱乐科技(深圳)有限公司 | 歌词显示方法、装置及计算机可读存储介质 |
CN107944397A (zh) * | 2017-11-27 | 2018-04-20 | 腾讯音乐娱乐科技(深圳)有限公司 | 视频录制方法、装置及计算机可读存储介质 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1711009A4 (en) * | 2004-01-30 | 2010-10-27 | Panasonic Corp | RECORDING MEDIUM, REPRODUCING APPARATUS, PROGRAM, AND REPRODUCTION METHOD |
CN102984467B (zh) * | 2012-10-30 | 2016-04-13 | 广东威创视讯科技股份有限公司 | 字幕实时更新的方法和系统 |
CN109889741A (zh) * | 2019-02-28 | 2019-06-14 | 努比亚技术有限公司 | 字幕显示方法、存储介质和移动终端 |
-
2019
- 2019-08-01 CN CN201910708527.2A patent/CN112395826B/zh active Active
-
2020
- 2020-07-29 WO PCT/CN2020/105439 patent/WO2021018178A1/zh active Application Filing
- 2020-07-29 US US17/631,889 patent/US12020347B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050191035A1 (en) * | 2004-02-28 | 2005-09-01 | Samsung Electronics Co., Ltd. | Storage medium recording text-based subtitle stream, reproducing apparatus and reproducing method for reproducing text-based subtitle stream recorded on the storage medium |
CN101854377A (zh) * | 2010-01-25 | 2010-10-06 | 杭州东信北邮信息技术有限公司 | 一种支持无线终端的信息平台系统及其实现方法 |
CN103179093A (zh) * | 2011-12-22 | 2013-06-26 | 腾讯科技(深圳)有限公司 | 视频字幕的匹配系统和方法 |
CN107943964A (zh) * | 2017-11-27 | 2018-04-20 | 腾讯音乐娱乐科技(深圳)有限公司 | 歌词显示方法、装置及计算机可读存储介质 |
CN107944397A (zh) * | 2017-11-27 | 2018-04-20 | 腾讯音乐娱乐科技(深圳)有限公司 | 视频录制方法、装置及计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN112395826A (zh) | 2021-02-23 |
US12020347B2 (en) | 2024-06-25 |
CN112395826B (zh) | 2024-05-28 |
US20220292731A1 (en) | 2022-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230107220A1 (en) | Video processing method and apparatus, electronic device, and computer readable storage medium | |
WO2021135626A1 (zh) | 菜单项选择方法、装置、可读介质及电子设备 | |
WO2021114979A1 (zh) | 视频页面显示方法、装置、电子设备和计算机可读介质 | |
CN111459364B (zh) | 图标更新方法、装置和电子设备 | |
WO2021190129A1 (zh) | 页面处理方法、装置、电子设备及计算机可读存储介质 | |
JP2023515607A (ja) | 画像特殊効果の処理方法及び装置 | |
CN111259636B (zh) | 文档渲染方法、装置和电子设备 | |
US20240177374A1 (en) | Video processing method, apparatus and device | |
WO2021227953A1 (zh) | 图像特效配置方法、图像识别方法、装置及电子设备 | |
CN113205601B (zh) | 漫游路径生成方法、装置、存储介质及电子设备 | |
WO2024061064A1 (zh) | 展示效果处理方法、装置、电子设备及存储介质 | |
WO2023098576A1 (zh) | 图像处理方法、装置、设备及介质 | |
WO2023103682A1 (zh) | 图像处理方法、装置、设备及介质 | |
WO2021018178A1 (zh) | 文字特效处理方法及装置 | |
WO2023273621A1 (zh) | 脚本生成方法、装置、设备及介质 | |
WO2022242441A1 (zh) | 电子表格导入方法、装置、设备及介质 | |
CN111338827B (zh) | 表格数据的粘贴方法、装置以及电子设备 | |
CN110619615A (zh) | 用于处理图像方法和装置 | |
WO2021233379A1 (zh) | 配置视频特效方法、装置、设备及存储介质 | |
CN116266206A (zh) | 页面显示方法、装置和电子设备 | |
WO2021018176A1 (zh) | 文字特效处理方法及装置 | |
WO2021018177A1 (zh) | 文字特效处理方法及装置 | |
WO2021004171A1 (zh) | 水波纹图像实现方法及装置 | |
CN112346630B (zh) | 状态确定方法、装置、设备和计算机可读介质 | |
CN116974684B (zh) | 地图页面布局方法、装置、电子设备与计算机可读介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20847333 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: 20847333 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20847333 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 06.09.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20847333 Country of ref document: EP Kind code of ref document: A1 |