CN113132649B - Image generation method and device, electronic equipment and computer readable storage medium - Google Patents

Image generation method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113132649B
CN113132649B CN201911403234.XA CN201911403234A CN113132649B CN 113132649 B CN113132649 B CN 113132649B CN 201911403234 A CN201911403234 A CN 201911403234A CN 113132649 B CN113132649 B CN 113132649B
Authority
CN
China
Prior art keywords
image
image data
data
special effect
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911403234.XA
Other languages
Chinese (zh)
Other versions
CN113132649A (en
Inventor
杨杰
倪光耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911403234.XA priority Critical patent/CN113132649B/en
Publication of CN113132649A publication Critical patent/CN113132649A/en
Application granted granted Critical
Publication of CN113132649B publication Critical patent/CN113132649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The disclosure discloses an image generation method, an image generation device, an electronic device and a computer-readable storage medium. The image generation method comprises the following steps: receiving a first input selection signal for selecting a first image source from among at least two different types of image sources; acquiring first image data output in the first image source in response to the first input selection signal; converting the first image data into second image data of a fixed type, wherein the fixed type is a type of image data for loading special effect data; loading special effect data on the second image data to generate third image data; and generating a first special effect frame image according to the third image data. According to the method, different types of image data are converted into fixed types of image data, special effect data are loaded in the fixed types of image data, and the special effect loading modes are unified, so that the special effects can be loaded in the images of different image sources more conveniently.

Description

Image generation method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image processing, and in particular, to an image generation method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of computer networks and the popularization of smart phones, common users cannot express their emotions by using monotonous pictures and words. The video is deeply loved by users in order to present more abundant and various contents and forms and bring visual feelings, and is gradually popular, and it is gradually a trend that ordinary users make original videos. Various image effects, typically a map, etc., may be added to the video.
When a user creates an image effect, the user often needs to preview the created image effect so as to observe whether the desired result is achieved, but in the prior art, the sources of images are various, and the sources of images are various, so that the formats of the images are various, and thus, when multiple sources exist, the processing of adding the image effect to the images is complex and very inconvenient.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides an image generation method, including:
receiving a first input selection signal for selecting a first image source from at least two different types of image sources for outputting different types of image data;
acquiring first image data output in the first image source in response to the first input selection signal;
converting the first image data into second image data of a fixed type, wherein the fixed type is a type of image data for loading special effect data;
loading special effect data on the second image data to generate third image data;
and generating a first special effect frame image according to the third image data.
In a second aspect, an embodiment of the present disclosure provides an image generating apparatus, including:
an input selection signal receiving module for receiving a first input selection signal, the first input selection signal being used to select a first image source from at least two different types of image sources, the different types of image sources being used to output different types of image data;
the image data acquisition module is used for responding to the first input selection signal and acquiring first image data output in the first image source;
the image data conversion module is used for converting the first image data into second image data of a fixed type, wherein the fixed type is the type of the image data used for loading the special effect data;
the special effect loading module is used for loading special effect data on the second image data to generate third image data;
and the special effect image generation module is used for generating a first special effect frame image according to the third image data.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the image generation methods of the first aspect.
In a fourth aspect, the disclosed embodiments provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the image generation method of any one of the first aspect.
The embodiment of the disclosure discloses an image generation method and device, electronic equipment and a computer-readable storage medium. The image generation method comprises the following steps: receiving a first input selection signal for selecting a first image source from at least two different types of image sources; acquiring first image data output in the first image source in response to the first input selection signal; converting the first image data into second image data of a fixed type, wherein the fixed type is a type of image data for loading special effect data; loading special effect data on the second image data to generate third image data; and generating a first special effect frame image according to the third image data. According to the method, after the image data of different image sources are converted into the image data of the fixed type, the special effect data are loaded on the image data of the fixed type to generate the special effect image, so that the special effect data are loaded on the image data of the same type, the loading modes are uniform, and the special effect is more convenient to load in the images of different image sources.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow chart of an embodiment of an image generation method provided by the present disclosure;
FIG. 2 is a further flow chart of an embodiment of an image generation method provided by the present disclosure;
FIG. 3 is a further flow chart of an embodiment of an image generation method provided by the present disclosure;
FIG. 4 is a further flow chart of an embodiment of an image generation method provided by the present disclosure;
fig. 5 is a schematic structural diagram of an embodiment of an image generation apparatus provided in an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "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". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of an embodiment of an image generation method provided in an embodiment of the present disclosure, where the image generation method provided in this embodiment may be executed by an image generation apparatus, and the image generation apparatus may be implemented as software, or implemented as a combination of software and hardware, and the image generation apparatus may be integrated in some device in an image generation system, such as an image generation server or an image generation terminal device. As shown in fig. 1, the method comprises the steps of:
step S101, receiving a first input selection signal, wherein the first input selection signal is used for selecting a first image source from at least two different types of image sources, and the different types of image sources are used for outputting different types of image data;
optionally, the first input selection signal is received from a human-computer interaction interface, and is used for selecting one first image source from at least two different types of image sources as a source of the current original image. Optionally, the at least two different types of image sources comprise at least two of a photo image source, a video image source, and an image sensor image source. Illustratively, the image sources include a picture image source, a video image source and an image sensor image source, three selection buttons may be respectively provided for the three image sources in the human-computer interaction interface, when one of the selection buttons is pressed by a user, a first input selection signal is generated, and the image source corresponding to the pressed button is selected as a source of an original image. Illustratively, when an image sensor is selected, a default image sensor, such as a front-facing camera in a mobile terminal, is directly selected; or displaying a list of image sensors for user selection. When the picture is selected, a default picture can be directly displayed or an interface is provided for a user to select a picture file in a local or network; when a video is selected, the default video may be displayed directly or an interface may be provided for the user to select a video file in the local or network.
It is to be understood that the first input selection signal may be any type of signal, which is intended to select different image sources as the sources of the original images, and the examples of the input selection signal and the image sources in the above alternative embodiments are only examples, and do not limit the present disclosure, and therefore, the details are not repeated herein.
Step S102, responding to the first input selection signal, acquiring first image data output in the first image source;
optionally, the image source includes an image sensor, a picture, and a video. When the image sensor is selected as an image source, image data is acquired from the designated image sensor, the image data output by the exemplary image sensor may be in formats such as CCIR601, CCIR656, RAW RGB, and the like, and the image data may be returned by different operating systems in different formats. Similarly, when a picture is selected as an image source, image data of the specified picture is directly acquired, and the picture can be a static picture or a dynamic picture; when a video is selected as image data, the image data of the specified video is directly acquired. The different types of image data in the image sources lead to different processing when adding image effects to the image data of different image sources in the prior art, and different processing modes are required to be specially realized for each type of image data, which is very inconvenient.
Step S103, converting the first image data into second image data of a fixed type, wherein the fixed type is the type of the image data used for loading the special effect data;
in this step, the first image data acquired in step S102 is converted into the second image data of a fixed type, so that the image data to be processed in the subsequent processing is the same data, and the processing method is the same for any type of source, and the control method for the image data of all sources can be unified. Optionally, the image data of the fixed type and the special effect data share the same storage location. Optionally, the image data of the fixed type and the special effect data are data of the same type. In an IOS system, image data of a camera, a picture and a video can be converted into CVPixelBufferRef, and because the CVPixelBufferRef and special effect data to be loaded share the same storage location, texture data in the CVPixelBufferRef can be directly replaced or modified by the special effect data, and special effect data can be conveniently loaded. Optionally, the special effect data and the CVPixelBufferRef are data of the same type, so that the corresponding image data in the CVPixelBufferRef can be directly replaced by the special effect data without other conversion, thereby facilitating subsequent special effect loading processing.
Step S104, loading special effect data on the second image data to generate third image data;
illustratively, the special effect data is color data of a pixel, and the loading of the special effect data on the second image data to generate third image data is superimposing or mixing color data represented by the special effect data on the pixel in the second image data to generate third image data; it can be understood that the special effect data may also be position data of pixels or other materials such as maps, which are not described herein again.
Step S105, generating a first special effect frame image according to the third image data.
After the third image data is generated, image rendering may be performed based on the third image data, and a frame image of a special effect is generated to be displayed on the display device. Illustratively, the third image data includes a rendering chain of the first special-effect frame image, each node in the rendering chain represents a rendering mode, the third image data further includes a material required by each node in the rendering chain, and then the first special-effect frame image is rendered according to the rendering chain and the material.
Optionally, after generating the first special effect frame image, the first special effect frame image is pushed to an asynchronous display thread, and the asynchronous display thread displays the first special effect frame image on a display device.
It can be understood that the first special effect frame image may be a special effect preview image when making a special effect of an image, or may be an image special effect generated when using a special effect package, and is not particularly limited herein.
Since the image data input from the image source may be different in resolution from the display apparatus on which the special effect image is finally displayed, the third image data needs to be scaled according to the resolution of the display apparatus to be adapted to the display apparatus. In this case, as shown in fig. 2, the step S105 includes, including:
step S201, receiving a first output control signal;
step S202, zooming the third image data according to the output control signal to obtain fourth image data;
step S203, generating the first special effect frame image according to the fourth image data.
Specifically, the first output control signal may be a default signal, that is, the first output control signal may be triggered after the third image data is obtained without being triggered by a user. For example, the size of the original image corresponding to the third image data is 800 × 600, but the size of the display screen displaying the special effect image is 480 × 320, at this time, the third image data needs to be scaled and converted into the fourth image data with the size of 480 × 320, and then the first special effect frame image is generated according to the fourth image data.
Further, as shown in fig. 3, the image generating method further includes:
step S301, receiving an input control signal;
step S302, determining whether to execute the step S104 according to the input control signal.
Alternatively, the input control signal may include one or more of an input start signal, an input end signal, an input pause signal, and an input continue signal. Inputting the second image data from a start position of the second image data in response to the second control signal being an input start signal; in response to the second control signal being an input end signal, turning off the input of the second image data; in response to the second control signal being an input pause signal, inputting second image data determined by the pause signal; and in response to the second control signal being an input continuation signal, continuing to input the second image data from a position where the second image is paused. When the input control signal is an input start signal and an input continuation signal, performing subsequent loading of special effect data on the second image data to generate third image data, and when the input control signal is an input end signal and an input pause signal, not inputting the second image data to the next step, specifically, when the input control signal is an input end signal, not inputting any second image data to the next step to generate the third image data; when the input control signal is an input pause signal, the current second image data is continuously input to the next step to achieve the pause effect of the second image data. Since the second image data does not contain the special effect data, pausing the second image data does not stop the special effect, and the special effect data is loaded into the current second image data.
Further, as shown in fig. 4, the image generating method further includes:
step S401, receiving a second output control signal;
step S402, determining whether to execute the step S104 according to the second output control signal.
Optionally, the second output control signal may include one or more of an output start signal, an output end signal, an output pause signal, and an output continue signal. Outputting the third image data from a start position of the third image data in response to the second output control signal being an output start signal; turning off the output of the third image data in response to the second output control signal being an output end signal; in response to the second output control signal being an output pause signal, outputting third image data determined by the output pause signal; in response to the second output control signal being an output resume signal, resuming output of the third image data from a position at which the third image was paused. When the second output control signal is an output starting signal and an output continuing signal, executing subsequent generation of a first special-effect frame image according to the third image data; when the second output control signal is an output end signal and an output pause signal, the third image data is not output to the next step, and specifically, when the second output control signal is an output end signal, any third image data is not output to the next step to generate the first special effect frame image; when the output control signal is the output pause signal, the current third image data is continuously input to the next step to achieve the pause effect of the third image data, and the special effect is also paused when the third image data is paused because the third image data contains the special effect data.
Further, after the step S105, the method further includes: receiving a second input selection signal for selecting a second image source from the at least two different types of image sources; acquiring fifth image data output by the second image source in response to the second input selection signal; converting the fifth image data into sixth image data of the fixed type; after the fifth image data is converted into the sixth image data, switching the image data for loading the special effect data from the second image data to the sixth image data, resulting in seventh image data generated by loading the special effect data on the sixth image data; and generating a second special effect frame image according to the seventh image data. The above steps describe the step of generating an image when switching from one image source to another image data source of a different type, in the above steps, the second input selection signal corresponds to another image source different from the current image source, and when receiving the second input selection signal, the steps are similar to the previous steps, and are not described herein again.
Further, the second image data into which the first image data is converted is stored in a first queue, and the sixth image data into which the fifth image data is converted is stored in a second queue; the step S104 includes: determining that the first queue is a queue for acquiring and loading the special effect data, acquiring the second image data from the first queue, and loading the special effect data on the second image data to obtain the third image data; the switching the image data for loading the special effect data from the second image data to the sixth image data after the fifth image data is converted into the sixth image data, resulting in seventh image data generated by loading the special effect data on the sixth image data, including: after the sixth image data is stored in the second queue, the queue for acquiring and loading the special effect data is switched from the first queue to the second queue, the sixth image data is acquired from the second queue, and the special effect data is loaded on the sixth image data to obtain the seventh image data. In the above embodiment, a queue is provided for each image source to store fixed type image data acquired from the image source, and when the image source is switched from the first image source to the second image source, before sixth image data of the second image source is not stored in the second queue, third image data is generated using the second data stored in the first queue to keep outputting the first special effect frame image, and after the sixth image data is stored in the second queue, seventh image data is generated using the sixth data stored in the second queue to generate the second special effect frame image. Therefore, when the image source is switched, the display effect cannot be influenced by the gap on the display caused by the throughput speed of the image source or the conversion speed of the image data.
Further, in the above image generation method, each of the at least two different types of image sources corresponds to a different processing thread; wherein the step S102 includes: acquiring first image data output in the first image source through a first processing thread corresponding to the first image source in response to the first input selection signal; the step S103 includes: converting, by the first processing thread, the first image data into a fixed type of second image data. Different image sources are processed by using different processing threads so as to keep the plurality of threads independent and not interfered with each other, and thus, when the image sources are switched, the same thread is not required to be switched among the plurality of image sources.
The embodiment of the disclosure discloses an image generation method and device, electronic equipment and a computer-readable storage medium. The image generation method comprises the following steps: receiving a first input selection signal for selecting a first image source from among at least two different types of image sources; acquiring first image data output in the first image source in response to the first input selection signal; converting the first image data into second image data of a fixed type, wherein the fixed type is a type of image data for loading special effect data; loading special effect data on the second image data to generate third image data; and generating a first special effect frame image according to the third image data. According to the method, after the image data of different image sources are converted into the image data of the fixed type, the special effect data are loaded on the image data of the fixed type to generate the special effect image, so that the special effect data are loaded on the image data of the same type, the loading modes are uniform, and the special effect is more convenient to load in the images of different image sources.
In the above, although the steps in the above method embodiments are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily performed in the above sequence, and they may also be performed in other sequences such as reverse, parallel, and cross, and other sequences may also be added on the basis of the above steps, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
Fig. 5 is a schematic structural diagram of an embodiment of an image generating apparatus provided in an embodiment of the present disclosure, and as shown in fig. 5, the apparatus 500 includes: an input selection signal receiving module 501, an image data acquiring module 502, an image data converting module 503, a special effect loading module 504 and a special effect image generating module 505. Wherein,
an input selection signal receiving module 501 for receiving a first input selection signal for selecting a first image source from at least two different types of image sources for outputting different types of image data;
an image data acquiring module 502, configured to acquire first image data output in the first image source in response to the first input selection signal;
an image data conversion module 503, configured to convert the first image data into second image data of a fixed type, where the fixed type is a type of image data used for loading special effect data;
a special effect loading module 504, configured to load special effect data on the second image data to generate third image data;
a special effect image generating module 505, configured to generate a first special effect frame image according to the third image data.
Further, the image generating apparatus 500 further includes:
the input control signal receiving module is used for receiving an input control signal; and determining whether to execute the loading of the special effect data on the second image data to generate third image data according to the input control signal.
Further, the special effect image generating module 505 is further configured to:
receiving a first output control signal;
zooming the third image data according to the first output control signal to obtain fourth image data;
and generating the special effect frame image according to the fourth image data.
Further, the image generating apparatus 500 further includes:
the output control signal receiving module is used for receiving a second output control signal; determining whether to perform the generating of the first special effect frame image from the third image data according to the second output control signal.
Further, after the first special-effect frame image is generated according to the third image data, the input selection signal receiving module 501 is further configured to receive a second input selection signal, where the second input selection signal is used to select a second image source from the at least two different types of image sources;
the image data acquiring module 502 is further configured to acquire fifth image data output by the second image source in response to the second input selection signal;
the image data conversion module 503 is further configured to convert the fifth image data into sixth image data of the fixed type;
the special effect data loading module 504 is further configured to, after the fifth image data is converted into the sixth image data, switch the image data for loading the special effect data from the second image data to the sixth image data, so as to obtain seventh image data generated by loading the special effect data on the sixth image data;
the special effect image generating module 505 is further configured to generate a second special effect frame image according to the seventh image data.
Further, in the image generating apparatus 500, the second image data into which the first image data is converted is stored in a first queue, and the sixth image data into which the fifth image data is converted is stored in a second queue;
the special effect data loading module 504 is further configured to determine that the first queue is a queue for acquiring and loading the special effect data, acquire the second image data from the first queue, and load the special effect data on the second image data to obtain the third image data; after the sixth image data is stored in the second queue, the queue for acquiring and loading the special effect data is switched from the first queue to the second queue, the sixth image data is acquired from the second queue, and the special effect data is loaded on the sixth image data to obtain the seventh image data.
Further, in the image generation apparatus 500, each of the at least two different types of image sources corresponds to a different processing thread;
the image data acquiring module 502 is further configured to, in response to the first input selection signal, acquire first image data output from the first image source through a first processing thread corresponding to the first image source;
the image data conversion module 503 is further configured to convert the first image data into a fixed type of second image data through the first processing thread.
Further, the at least two different types of image sources include: at least two of a picture image source, a video image source, and an image sensor image source.
Further, the fixed type image data and the special effect data are the same type of data.
The apparatus shown in fig. 5 can perform the method of the embodiment shown in fig. 1-4, and the detailed description of the embodiment not described in detail can refer to the related description of the embodiment shown in fig. 1-4. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 4, which are not described herein again.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., a terminal device or a server in fig. 1) 600 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a first input selection signal for selecting a first image source from at least two different types of image sources for outputting different types of image data; acquiring first image data output in the first image source in response to the first input selection signal; converting the first image data into second image data of a fixed type, wherein the fixed type is a type of image data for loading special effect data; and loading special effect data on the second image data to generate third image data.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above 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 may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided an image generation method including:
receiving a first input selection signal for selecting a first image source from at least two different types of image sources for outputting different types of image data; acquiring first image data output in the first image source in response to the first input selection signal; converting the first image data into second image data of a fixed type, wherein the fixed type is a type of image data for loading special effect data; loading special effect data on the second image data to generate third image data; and generating a first special effect frame image according to the third image data.
Further, the image generation method further includes: receiving an input control signal; and determining whether to execute the loading of the special effect data on the second image data to generate third image data according to the input control signal.
Further, the generating a first special effect frame image according to the third image includes: receiving a first output control signal; zooming the third image data according to the first output control signal to obtain fourth image data; and generating the special effect frame image according to the fourth image data.
Further, the image generation method further includes: receiving a second output control signal; determining whether to perform the generating of the first special effect frame image from the third image data according to the second output control signal.
Further, after the generating a first special effect frame image according to the third image data, the method further includes: receiving a second input selection signal for selecting a second image source from the at least two different types of image sources; acquiring fifth image data output by the second image source in response to the second input selection signal; converting the fifth image data into sixth image data of the fixed type; after the fifth image data is converted into the sixth image data, switching the image data for loading the special effect data from the second image data to the sixth image data, resulting in seventh image data generated by loading the special effect data on the sixth image data; and generating a second special effect frame image according to the seventh image data.
Further, the second image data into which the first image data is converted is stored in a first queue, and the sixth image data into which the fifth image data is converted is stored in a second queue; the loading of the special effect data on the second image data to generate third image data comprises: determining that the first queue is a queue for acquiring and loading the special effect data, acquiring the second image data from the first queue, and loading the special effect data on the second image data to obtain the third image data; the switching the image data for loading the special effect data from the second image data to the sixth image data after the fifth image data is converted into the sixth image data, resulting in seventh image data generated by loading the special effect data on the sixth image data, including: after the sixth image data is stored in the second queue, the queue for acquiring and loading the special effect data is switched from the first queue to the second queue, the sixth image data is acquired from the second queue, and the special effect data is loaded on the sixth image data to obtain the seventh image data.
Further, each of the at least two different types of image sources corresponds to a different processing thread; wherein said acquiring first image data output in said first image source in response to said first input selection signal comprises: acquiring first image data output in the first image source through a first processing thread corresponding to the first image source in response to the first input selection signal; the converting the first image data into a fixed type of second image data includes: converting, by the first processing thread, the first image data into a fixed type of second image data.
Further, the at least two different types of image sources include: at least two of a picture image source, a video image source, and an image sensor image source.
Further, the fixed type image data and the special effect data are the same type of data.
According to one or more embodiments of the present disclosure, there is provided an image generation apparatus including:
an input selection signal receiving module for receiving a first input selection signal, the first input selection signal being used to select a first image source from at least two different types of image sources, the different types of image sources being used to output different types of image data; an image data acquisition module, configured to acquire first image data output from the first image source in response to the first input selection signal; the image data conversion module is used for converting the first image data into second image data of a fixed type, wherein the fixed type is the type of the image data used for loading the special effect data; the special effect loading module is used for loading special effect data on the second image data to generate third image data; and the special effect image generation module is used for generating a first special effect frame image according to the third image data.
Further, the image generating apparatus further includes: the input control signal receiving module is used for receiving an input control signal; and determining whether to execute the loading of the special effect data on the second image data to generate third image data according to the input control signal.
Further, the special effect image generation module is further configured to: receiving a first output control signal; zooming the third image data according to the first output control signal to obtain fourth image data; and generating the special effect frame image according to the fourth image data.
Further, the image generating apparatus further includes: the output control signal receiving module is used for receiving a second output control signal; and determining whether to execute the generation of the first special effect frame image according to the third image data according to the second output control signal.
Further, after the first special-effect frame image is generated according to the third image data, the input selection signal receiving module is further configured to receive a second input selection signal, where the second input selection signal is used to select a second image source from the at least two different types of image sources; the image data acquisition module is further used for responding to the second input selection signal and acquiring fifth image data output by the second image source; the image data conversion module is further configured to convert the fifth image data into sixth image data of the fixed type; the special effect data loading module is further configured to switch the image data for loading the special effect data from the second image data to the sixth image data after the fifth image data is converted into the sixth image data, so as to obtain seventh image data generated by loading the special effect data on the sixth image data; the special effect image generation module is further configured to generate a second special effect frame image according to the seventh image data.
Further, in the image generating apparatus, the second image data into which the first image data is converted is stored in a first queue, and the sixth image data into which the fifth image data is converted is stored in a second queue; the special effect data loading module is further configured to determine that the first queue is a queue for acquiring and loading the special effect data, acquire the second image data from the first queue, and load the special effect data on the second image data to obtain the third image data; after the sixth image data is stored in the second queue, the queue for acquiring and loading the special effect data is switched from the first queue to the second queue, the sixth image data is acquired from the second queue, and the special effect data is loaded on the sixth image data to obtain the seventh image data.
Further, in the image generation apparatus, each of the at least two different types of image sources corresponds to a different processing thread; the image data acquisition module is further used for responding to the first input selection signal and acquiring first image data output in the first image source through a first processing thread corresponding to the first image source; the image data conversion module is further configured to convert the first image data into second image data of a fixed type through the first processing thread.
Further, the at least two different types of image sources include: at least two of a picture image source, a video image source, and an image sensor image source.
Further, the fixed type image data and the special effect data are the same type of data.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other combinations of features described above or equivalents thereof without departing from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. An image generation method comprising:
respectively setting queues for storing fixed-type image data acquired from corresponding image sources for at least two different types of image sources; wherein the at least two different types of image sources comprise: at least two of a picture image source, a video image source and an image sensor image source;
receiving a first input selection signal for selecting a first image source from at least two different types of image sources for outputting different types of image data;
acquiring first image data output in the first image source in response to the first input selection signal;
converting the first image data into fixed-type second image data, and storing the second image data into a first queue set for the first image source; the fixed type is a type of image data used for loading special effect data;
after the second image data is stored in the first queue, determining that the first queue is a queue for obtaining and loading the special effect data;
acquiring the second image data from the first queue;
loading special effect data on the second image data to generate third image data;
and generating a first special effect frame image according to the third image data.
2. The image generation method of claim 1, further comprising:
receiving an input control signal;
and determining whether to execute the loading of the special effect data on the second image data to generate third image data according to the input control signal.
3. The image generation method of claim 1, wherein the generating a first special effect frame image from the third image comprises:
receiving a first output control signal;
zooming the third image data according to the first output control signal to obtain fourth image data;
and generating the special effect frame image according to the fourth image data.
4. The image generation method as claimed in claim 1, further comprising:
receiving a second output control signal;
determining whether to perform the generating of the first special effect frame image from the third image data according to the second output control signal.
5. The image generation method of claim 1, wherein, after generating the first special effect frame image from the third image data, further comprising:
receiving a second input selection signal for selecting a second image source from the at least two different types of image sources; wherein the second image source is different from the first image source;
acquiring fifth image data output by the second image source in response to the second input selection signal;
converting the fifth image data into sixth image data of the fixed type, and storing the sixth image data in a second queue provided for the second image source;
after the sixth image data is stored in the second queue, determining that the second queue is a queue for obtaining and loading the special effect data;
acquiring the sixth image data from the second queue;
loading seventh image data generated by the special effect data on the sixth image data;
and generating a second special effect frame image according to the seventh image data.
6. The image generation method of claim 1, wherein each of the at least two different types of image sources corresponds to a different processing thread;
wherein said acquiring first image data output in said first image source in response to said first input selection signal comprises: acquiring first image data output in the first image source through a first processing thread corresponding to the first image source in response to the first input selection signal;
the converting the first image data into a fixed type of second image data includes: converting, by the first processing thread, the first image data into a fixed type of second image data.
7. The image generation method according to claim 1, wherein the fixed type of image data and the special effect data are the same type of data.
8. An image generation apparatus comprising:
a module for setting queues for storing fixed-type image data acquired from respective image sources for at least two different types of image sources, respectively; wherein the at least two different types of image sources comprise: at least two of a picture image source, a video image source and an image sensor image source;
an input selection signal receiving module for receiving a first input selection signal for selecting a first image source from among the at least two different types of image sources for outputting different types of image data;
an image data acquisition module, configured to acquire first image data output from the first image source in response to the first input selection signal;
the image data conversion module is used for converting the first image data into second image data of a fixed type and storing the second image data into a first queue set for the first image source; wherein the fixed type is a type of image data for loading special effect data;
the special effect loading module is used for determining that the first queue is a queue for obtaining and loading the special effect data after the second image data is stored in the first queue, obtaining the second image data from the first queue, and loading the special effect data on the second image data to generate third image data;
and the special effect image generation module is used for generating a first special effect frame image according to the third image data.
9. An electronic device, comprising:
a memory for storing computer readable instructions; and
a processor for executing the computer readable instructions such that the processor when executed implements the image generation method of any of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer-readable instructions that, when executed by a computer, cause the computer to perform the image generation method of any one of claims 1-7.
CN201911403234.XA 2019-12-31 2019-12-31 Image generation method and device, electronic equipment and computer readable storage medium Active CN113132649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911403234.XA CN113132649B (en) 2019-12-31 2019-12-31 Image generation method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911403234.XA CN113132649B (en) 2019-12-31 2019-12-31 Image generation method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113132649A CN113132649A (en) 2021-07-16
CN113132649B true CN113132649B (en) 2023-01-03

Family

ID=76768402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911403234.XA Active CN113132649B (en) 2019-12-31 2019-12-31 Image generation method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113132649B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1291410A (en) * 1998-02-16 2001-04-11 卡纳尔股份有限公司 Processing of graphical digital picture data in a decoder
CN102903265A (en) * 2012-09-19 2013-01-30 河南智游网络技术有限公司 Method for automatically recording classroom teaching
CN104243886A (en) * 2014-09-28 2014-12-24 中国电子科技集团公司第二十七研究所 High-speed image analyzing and video generating technology based on plug-in technology
CN110012336A (en) * 2019-03-12 2019-07-12 广州虎牙信息科技有限公司 Picture configuration method, terminal and the device at interface is broadcast live

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090178062A1 (en) * 2007-06-08 2009-07-09 Apple Inc. Framework and Methods for Providing Communication Services to Client Applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1291410A (en) * 1998-02-16 2001-04-11 卡纳尔股份有限公司 Processing of graphical digital picture data in a decoder
CN102903265A (en) * 2012-09-19 2013-01-30 河南智游网络技术有限公司 Method for automatically recording classroom teaching
CN104243886A (en) * 2014-09-28 2014-12-24 中国电子科技集团公司第二十七研究所 High-speed image analyzing and video generating technology based on plug-in technology
CN110012336A (en) * 2019-03-12 2019-07-12 广州虎牙信息科技有限公司 Picture configuration method, terminal and the device at interface is broadcast live

Also Published As

Publication number Publication date
CN113132649A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN111580718A (en) Page switching method and device of application program, electronic equipment and storage medium
CN110784754A (en) Video display method and device and electronic equipment
CN113076048B (en) Video display method and device, electronic equipment and storage medium
CN110070496A (en) Generation method, device and the hardware device of image special effect
CN113934349B (en) Interaction method, interaction device, electronic equipment and storage medium
CN110852946A (en) Picture display method and device and electronic equipment
CN110806846A (en) Screen sharing method, screen sharing device, mobile terminal and storage medium
US12041379B2 (en) Image special effect processing method, apparatus, and electronic device, and computer-readable storage medium
CN113521728A (en) Cloud application implementation method and device, electronic equipment and storage medium
CN114860139A (en) Video playing method, video playing device, electronic equipment, storage medium and program product
CN112770159A (en) Multi-screen interaction system, method, device, equipment and storage medium
JP7471510B2 (en) Method, device, equipment and storage medium for picture to video conversion - Patents.com
CN113535105B (en) Media file processing method, device, equipment, readable storage medium and product
WO2024140275A1 (en) Interaction method and apparatus, electronic device and storage medium
CN113010300B (en) Image effect refreshing method and device, electronic equipment and computer readable storage medium
CN113961280B (en) View display method and device, electronic equipment and computer readable storage medium
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN113132649B (en) Image generation method and device, electronic equipment and computer readable storage medium
CN116204103A (en) Information generation method, information display device, information generation apparatus, information display apparatus, and storage medium
CN114187169B (en) Method, device, equipment and storage medium for generating video special effect package
CN114125485B (en) Image processing method, device, equipment and medium
CN116088738A (en) Interaction method, device, electronic equipment and storage medium
CN115272060A (en) Transition special effect diagram generation method, device, equipment and storage medium
CN115237530A (en) Information display method and device, electronic equipment and storage medium
CN110769129B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant