WO2013104142A1 - 一种视频播放器、移动终端及移动终端播放视频的方法 - Google Patents

一种视频播放器、移动终端及移动终端播放视频的方法 Download PDF

Info

Publication number
WO2013104142A1
WO2013104142A1 PCT/CN2012/072332 CN2012072332W WO2013104142A1 WO 2013104142 A1 WO2013104142 A1 WO 2013104142A1 CN 2012072332 W CN2012072332 W CN 2012072332W WO 2013104142 A1 WO2013104142 A1 WO 2013104142A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
video
display area
synthesizing
rgb data
Prior art date
Application number
PCT/CN2012/072332
Other languages
English (en)
French (fr)
Inventor
李鹏
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013104142A1 publication Critical patent/WO2013104142A1/zh

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • G11B27/034Electronic editing of digitised analogue information signals, e.g. audio or video signals on discs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/82Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only
    • H04N9/8205Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/82Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only
    • H04N9/8205Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal
    • H04N9/8227Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal the additional signal being at least another television signal

Definitions

  • Video player mobile terminal and method for playing video by mobile terminal
  • the present invention relates to the field of communications, and in particular, to a video player, a mobile terminal, and a method for playing a video by a mobile terminal.
  • Mobile terminals with video playback and recording functions such as mobile phones and IPAD2 are equipped with cameras and support multimedia functions such as video playback and video recording.
  • a conventional mobile terminal player generally includes: a player master control module, a video parsing module, a video decoding module, a player user interface (UI) module, and a video refresh module.
  • the player control module calls the video parsing module to read the video file related configuration information, and completes the initialization work.
  • the player master control module controls the video parsing module to read the video data, and calls the video decoding module to parse.
  • the data, the RGB data is generated, and then the RGB data is obtained by the video refresh module to refresh the liquid crystal display LCD.
  • Video recording is the reverse of playing video.
  • the camera collects the data encoding and then combines the encoded data into a video file.
  • the conventional mobile terminal video recording device generally includes: a video total control module, a video collection module, a video encoding module, a video file synthesizing module, and a video user interface (UI) module.
  • the video total control module is used to start recording and playing, and the video collection module is used to collect data, and after the collection is completed, it is sent to the video encoding module for encoding, and finally the encoded data is synthesized into a video file by the video file synthesizing module. save.
  • the video playback that the user can experience is just playing the video, and the video recording is only the video.
  • the user cannot integrate the image in the video into the video being played, thereby obtaining a better user experience.
  • the technical problem to be solved by the present invention is to provide a video player, a mobile terminal and a method for playing the video by the mobile terminal, integrating the image in the video into the video being played, or incorporating the video image being played into the video. , enabling users to change the content played by the video in real time, improving the user experience when watching the video.
  • the present invention provides a video player of a mobile terminal, the mobile terminal further comprising a video recording device, the video player comprising a video decoding module and a video refreshing module, wherein the video playing
  • the device also includes a video synthesis module, wherein:
  • the video synthesis module is configured to: receive a first video image and a second video image, synthesize the first video image and the second video image into a target image, and then output the target image to the video a refreshing module, wherein the first video image is a video image collected by the video recording device, and the second video image is a video image output by the video decoding module; or, the first video image is the a video image output by the video decoding module, the second video image being a video image collected by the video recording device.
  • the video synthesis module includes:
  • a background image setting unit configured to: set a background image, the background image comprising a first display area and a second display area;
  • the first image synthesizing unit is configured to: receive the first video image, synthesize the first video image into a first display area of the background image, generate an intermediate image, and output the intermediate image to a second image synthesis Unit
  • a second image synthesizing unit configured to: receive the second video image, synthesize the second video image into a second display area of the intermediate image, generate a target image, and output the target image to a target image output Unit
  • the target image output unit is configured to: output the target image to the video refresh module.
  • the first image synthesizing unit is configured to: receive the first video image, synthesize the first video image into the first display area of the background image, and generate an intermediate image, including: The first image synthesizing unit converts the received first video image into RGB data, synthesizes the RGB data with the background image, and uses the Alpha value in the background image RGB data to make the first image A video image is displayed in the first display area of the background picture to generate an intermediate image.
  • the second image synthesizing unit is configured to: receive the second video image, and synthesize the second video image into the second display area of the intermediate image to generate a target image, including: the second The image synthesizing unit converts the received second video image into RGB data, synthesizes the RGB data with the intermediate image, and displays the second video image by using an Alpha value in the intermediate image RGB data. In the second display area of the intermediate image, a target image is generated.
  • the video player further includes a video recording file synthesizing module, wherein: the target image output unit is further configured to: output the target image to the video recording file synthesizing module or the video recording device;
  • the video recording file synthesizing module is configured to: encode the target image to generate a video file and save the video file.
  • the present invention provides a mobile terminal comprising: the video player as described above.
  • the present invention further provides a method for playing video by a mobile terminal, comprising: synthesizing a video image of a video and a video image of a current video into a target image during playing video and recording, and then The target image is displayed on a liquid crystal display LCD.
  • the method further includes:
  • the background image includes a first display area and a second display area; and synthesizing the video image of the video and the video image of the current video into a target image, comprising: synthesizing the video image of the video Generating an intermediate image to the first display area of the background image, and synthesizing the video image of the current video into a second display area of the intermediate image to generate a target image; or
  • the video image of the video is synthesized into a first display area of the background image, an intermediate image is generated, and a video image of the current video is synthesized into a second display area of the intermediate image to generate Target image, including:
  • the video image of the current video is synthesized into a first display area of the background image, an intermediate image is generated, and the video image of the video is synthesized into a second display area of the intermediate image to generate Target image, including:
  • the method further comprises: encoding the target image to generate a video file and saving.
  • the video player, the mobile terminal and the method for playing the video by the mobile terminal according to the embodiment of the present invention based on the layer synthesis technology, use the alpha value in the RGB image information to integrate the image in the video into the video being played, or will be The played video image is integrated into the video, enabling the user to change the content played by the video in real time, improving the user experience when watching the video.
  • FIG. 1 is a structural diagram of a conventional mobile terminal player
  • FIG. 2 is a structural diagram of a conventional mobile terminal video recording apparatus
  • 3 is a structural diagram of a mobile terminal player in an embodiment
  • FIG. 4 is a flowchart of a method for playing a video by a mobile terminal in an embodiment
  • FIG. 5 is a flow chart of a specific process of watching a video played by a mobile terminal in an application example.
  • this embodiment provides a video player, including: a video decoding module, a video refreshing module, and a video synthesizing module, where:
  • the video synthesizing module is configured to receive a first video image and a second video image, synthesize the first video image and the second video image into a target image, and then output the target image to the video refresh module ;
  • the first video image is a video image collected by the video recording device, and the second video image is a video image output by the video decoding module; or the first video image is output by the video decoding module.
  • the video image, the second video image is an image captured by the video recording device.
  • the video synthesis module further includes:
  • a background image setting unit configured to set a background image, the background image comprising a first display area and a second display area
  • the Alpha value (that is, the RGB color) of the two regions is obviously different, and the selection of the background image can determine the composite effect of the subsequent video image and the current video image, ensuring that the video image and the current video image to be finally presented appear respectively.
  • the self-recorded image can be displayed in the first display area of the background picture, and the World Cup play video. Displayed in the second display area.
  • the so-called alpha value refers to the RGB color of the background image.
  • the image synthesis is actually the Aplha value of the point of the target image to select the image source to synthesize the final target image.
  • the background image is divided into two parts, one part is the first display area, the area is the same color; the other part is the second display area, the area is the same color, and the Alpha value (ie RGB color) of the two areas is obviously different, that is, These two areas have the same color inside themselves but not the same color as the other area.
  • a first image synthesizing unit configured to receive the first video image, synthesize the first video image into a first display area of the background image, generate an intermediate image, and output the intermediate image to a second image synthesizing unit ;
  • the first image synthesizing unit converts the received first video image into RGB data, synthesizes the RGB data and the background image, and uses an Alpha value in the background image RGB data to make The first video image is displayed in the first display area of the background picture to generate an intermediate image.
  • a second image synthesizing unit configured to receive the second video image, synthesize the second video image into a second display area of the intermediate image, generate a target image, and output the target image to a target image output unit ;
  • the second image synthesizing unit converts the received second video image into RGB data, synthesizes the RGB data and the intermediate image, and uses an Alpha value in the intermediate image RGB data to make The second video image is displayed in the second display area of the intermediate image to generate a target image.
  • the first video image is displayed in a first display area of the background image, an intermediate image is generated, and then the second video image is displayed in a second display area of the intermediate image.
  • the generation of the target image is an imaging technique.
  • the first video image is a video image of the video
  • the second video image is a video image of the current video.
  • the color of the Alpha ⁇ set point is different. This area is actually the first display area.
  • the corresponding position of the intermediate image uses the color of the recorded image.
  • the final intermediate image is generated. At this time, the final intermediate image displays the recorded image in the first display area, and the content of the background image is displayed in the second display area. Also, create an array to record all the indices of the points in the second display area.
  • the second display area is used to display the color of the video image of the current video, that is, the video image of the current video is displayed in the second display area, where A recorded image is displayed in the second display area.
  • the recorded image can be synthesized into the current video.
  • the video refreshing module is configured to receive the target image, and refresh the liquid crystal display LCD according to the RGB data of the target image.
  • the video refreshing module further divides the video display area into a main video. The display area and the video display area are used to refresh the LCD for the display of the final composite video and the video image display, so that the user can intuitively see the image after the final composite video in the LCD, and the video to be synthesized. image.
  • the video player further includes: a video recording file synthesizing module, wherein: the target image output unit is further configured to output the target image to the video recording file synthesizing module or the video recording device;
  • the video recording file synthesizing module is configured to encode the target image to generate a video file and save the video file.
  • the embodiment further provides a mobile terminal, including: the above video player.
  • the embodiment further provides a method for a mobile terminal to play a video, including the following steps:
  • S102 synthesize the video image of the video and the video image of the current video into a target image;
  • a background image is set, the background image is divided into two parts, one part is the first display area, the area is the same color; the other part is the second display area, the area is the same color, and the Alpha values of the two areas are obviously different. It means that the two areas have the same color in their own interior but not the same color as the other one.
  • the so-called Alpha value refers to the RGB color of the background image.
  • the image synthesis is actually the Aplha value of the point of the target image to select the image source to synthesize the final target image.
  • the selection of the background image can determine the composite effect of the subsequent video image and the current video image, and ensure that the video image and the current video image to be finally presented appear in the above two display regions, respectively.
  • the method specifically includes: synthesizing the video image of the video into a first display area of the background image, generating an intermediate image, and synthesizing the video image of the current video into a second display of the intermediate image Area, generating a target image;
  • the video image of the video is converted into RGB data, and the RGB data is synthesized with the background image, and the video image of the video is displayed on the background by using an Alpha value in the RGB data of the background image.
  • an intermediate image is generated;
  • a video image of the current video is synthesized into a first display area of the background picture, an intermediate image is generated, and the recorded video image is synthesized into a second display area of the intermediate image to generate a target image.
  • the generation of the target image can be implemented in the manner as described above when describing the video player.
  • the video image of the video can be synthesized. In the previous video, or the video image of the current video is synthesized into the video of the video.
  • the target image is encoded to generate a video file and saved.
  • the video display area in order to facilitate user viewing, can be divided into two parts, one part is the main video display area, and one part is the video synthesis display area.
  • the main video display area is used to display the video image being played
  • the video synthesis display area is used to display the intermediate image generated by the first image synthesizing unit and the target image generated by the second image synthesizing unit, so that the user can intuitively see Whether the selected video image is satisfactory, and whether the background image is selected properly, if the user is not suitable, the user can replace the more suitable background image, obtain a partial image of the video desired by the user, and then combine the partial image of the video into the video being played. On the image.
  • the video display area is divided into two parts, and the user can view only the combined image of the video image and the video image.
  • the first video image is a video image recorded
  • the second video image is a video image of the current video.
  • S203 Select a suitable background image, and adjust the background image to the size of the video composite display area;
  • the alpha value of the background image is collected by the (0, 0) point, that is, the RGB color value of the background image, and the alpha value is saved;
  • S205 Scan an alpha value of each point of the background image, compare the Alpha value of the background image with the (0, 0) point, and synthesize the video image and the background image into an intermediate image, and display the image to the video synthesis display area;
  • the point in the background image that is different from the color of the Alpha ⁇ point is the first display area.
  • the points of all the background pictures are scanned to generate an intermediate image, which displays the recorded image in the first display area, and displays the content of the background picture in the second display area. Also, create an array to index the points of the video image display area.
  • step S206 Adjust the size of the video composite display area to the size of the main video display area, and The inter-image is saved to a video synthesis buffer (buffer); and, the array created in step S205 is also saved with the index of the point of the second display area.
  • S208 reading an index of a point of the second display area saved in the video synthesis temporary buffer;
  • S209 synthesizing the current video decoded RGB data by using an index of the point of the second display area, generating a target image, and according to the target image
  • the RGB data refreshes the LCD display to the main video display area.
  • the video player, the mobile terminal, and the method for playing video of the mobile terminal provided by the foregoing embodiment are based on the alpha layer value in the RGB image information based on the layer synthesis technology.
  • the image in the image is integrated into the video being played, or the video image being played is integrated into the video, so that the user can change the content played by the video in real time, thereby improving the user experience when the user is watching the video.
  • the video player, the mobile terminal and the method for playing the video by the mobile terminal based on the layer synthesis technology, use the alpha value in the RGB image information to integrate the image in the video into the video being played, or will be
  • the played video image is integrated into the video, enabling the user to change the content played by the video in real time, improving the user experience when watching the video.

Abstract

视频播放器、移动终端及移动终端播放视频的方法。该视频播放器包括视频合成模块,其中:该视频合成模块,设置为:接收第一视频图像和第二视频图像,将第一视频图像和第二视频图像合成为一目标图像,然后将所述目标图像输出到视频刷新模块;其中,第一视频图像是录像的视频图像,第二视频图像是当前视频的视频图像;或者,第一视频图像是当前视频的视频图像,第二视频图像是录像的视频图像。移动终端包括该视频播放器。本发明基于图层合成技术利用RGB图像信息里面的Alpha值将录像中的图像融入到正在播放的视频中,或将正在播放的视频图像融入到录像中,使用户可以实时改变视频播放的内容,提升用户在观看视频时的用户体验。

Description

一种视频播放器、 移动终端及移动终端播放视频的方法
技术领域
本发明涉及通信领域, 具体涉及一种视频播放器、 移动终端及移动终端 播放视频的方法。
背景技术
随着技术的发展, 移动终端上的多媒体功能越来越普及, 具备视频播放 和录像功能的移动终端, 如手机、 IPAD2等都配有摄像头并支持视频播放、 录像拍照等多媒体功能。
目前移动终端上视频播放和录像是分开的。通常, 播放视频的过程包括: 视频文件分析、 解码, 最终生成 RGB数据, 然后刷新到 LCD。 如图 1所示, 传统的移动终端播放器一般包括: 播放器总控模块、 视频解析模块 、 视频解 码模块、 播放器用户界面 (User Interface, 简称 UI )模块、 视频刷新模块。 其中, 播放器总控模块调用视频解析模块来读取视频文件相关配置信息, 完 成初始化工作, 初始化完成后, 播放器总控模块控制视频解析模块来读取视 频数据, 并调用视频解码模块来解析数据, 生成 RGB数据, 然后由视频刷新 模块取得 RGB数据来刷新液晶显示器 LCD。
而录像则是与播放视频相反的过程, 摄像头釆集数据编码, 然后将编码 后的数据合成一个视频文件保存。 如图 2所示, 传统的移动终端录像装置一 般包括: 录像总控模块、 视频釆集模块、 视频编码模块、 视频文件合成模块 和录像用户界面 (User Interface, 简称 UI )模块。 其中, 录像总控模块用于 启动录像和播放, 视频釆集模块用于釆集数据, 釆集完成后送给视频编码模 块进行编码, 最终通过视频文件合成模块将编码后的数据合成一个视频文件 保存。
由上可知, 目前, 用户能体验到的视频播放就只是播放视频, 而录像则 只是录像, 但是, 用户不能将录像中的图像融入到正在播放的视频当中, 获 得更好的用户体验, 因此, 急需提出一种改进的移动终端播放视频的方法, 使用户可以更改视频播放内容, 这样会极大的提升用户体验。
发明内容
本发明需要解决的技术问题是提供一种视频播放器、 移动终端及该移动 终端播放视频的方法, 将录像中的图像融入到正在播放的视频中, 或将正在 播放的视频图像融入到录像中, 使用户可以实时改变视频播放的内容, 提升 用户在观看视频时的用户体验。
为了解决上述技术问题, 本发明提供了一种移动终端的视频播放器, 所 述移动终端还包括录像装置, 所述视频播放器包括视频解码模块和视频刷新 模块, 其特征在于, 所述视频播放器还包括一视频合成模块, 其中:
所述视频合成模块设置为: 接收第一视频图像和第二视频图像, 将所述 第一视频图像和所述第二视频图像合成为一目标图像, 然后将所述目标图像 输出到所述视频刷新模块; 其中, 所述第一视频图像是所述录像装置釆集的 视频图像, 所述第二视频图像是所述视频解码模块输出的视频图像; 或者, 所述第一视频图像是所述视频解码模块输出的视频图像, 所述第二视频图像 是所述录像装置釆集的视频图像。
优选地, 所述视频合成模块包括:
背景图片设置单元, 设置为: 设置一背景图片, 该背景图片包括一第一 显示区域和一第二显示区域;
第一图像合成单元, 设置为: 接收所述第一视频图像, 将该第一视频图 像合成到所述背景图片的第一显示区域, 生成中间图像, 并将该中间图像输 出到第二图像合成单元;
第二图像合成单元, 设置为: 接收所述第二视频图像, 并将该第二视频 图像合成到所述中间图像的第二显示区域, 生成目标图像, 并将该目标图像 输出到目标图像输出单元;
目标图像输出单元,设置为: 将所述目标图像输出到所述视频刷新模块。 优选地, 所述第一图像合成单元设置为: 接收所述第一视频图像, 将该 第一视频图像合成到所述背景图片的第一显示区域, 生成中间图像, 包括: 所述第一图像合成单元将接收到的所述第一视频图像转换为 RGB数据, 将所述 RGB数据与所述背景图片合成, 利用所述背景图片 RGB数据里的 Alpha值,使所述第一视频图像显示在所述背景图片的第一显示区域中,生成 中间图像。
优选地, 所述第二图像合成单元设置为: 接收所述第二视频图像, 并将 该第二视频图像合成到所述中间图像的第二显示区域, 生成目标图像, 包括: 所述第二图像合成单元将接收到的所述第二视频图像转换为 RGB数据,将所 述 RGB数据与所述中间图像合成, 利用所述中间图像 RGB数据里的 Alpha 值, 使所述第二视频图像显示在所述中间图像的第二显示区域中, 生成目标 图像。
优选地, 所述视频播放器还包括一视频录像文件合成模块, 其中: 所述目标图像输出单元还设置为: 将所述目标图像输出到所述视频录像 文件合成模块或所述录像装置;
所述视频录像文件合成模块设置为: 将所述目标图像编码生成视频文件 并保存。
为了解决上述技术问题, 本发明提供了一种移动终端, 包括: 如上所述 的视频播放器。
为了解决上述技术问题,本发明还提供了一种移动终端播放视频的方法, 包括: 在播放视频并录像的过程中, 将录像的视频图像和当前视频的视频图 像合成为一目标图像, 然后将所述目标图像显示在液晶显示器 LCD上。
优选地, 所述方法还包括:
设置一背景图片, 该背景图片包括一第一显示区域和一第二显示区域; 所述将录像的视频图像和当前视频的视频图像合成为一目标图像,包括: 将所述录像的视频图像合成到所述背景图片的第一显示区域, 生成中间 图像, 并将所述当前视频的视频图像合成到所述中间图像的第二显示区域, 生成目标图像; 或者,
将所述当前视频的视频图像合成到所述背景图片的第一显示区域, 生成 中间图像, 并将所述录像的视频图像合成到所述中间图像的第二显示区域, 生成目标图像。
优选地, 所述将所述录像的视频图像合成到所述背景图片的第一显示区 域, 生成中间图像, 并将所述当前视频的视频图像合成到所述中间图像的第 二显示区域, 生成目标图像, 包括:
将所述录像的视频图像转换为 RGB数据, 将所述 RGB数据与所述背景 图片合成, 利用所述背景图片 RGB数据里的 Alpha值, 使所述录像的视频图 像显示在所述背景图片的第一显示区域中, 生成中间图像;
将所述当前视频的视频图像转换为 RGB数据, 将所述 RGB数据与所述 中间图像合成, 利用所述中间图像 RGB数据里的 Alpha值, 使所述当前视频 的视频图像显示在所述中间图像的第二显示区域中, 生成目标图像。
优选地, 所述将所述当前视频的视频图像合成到所述背景图片的第一显 示区域, 生成中间图像, 并将所述录像的视频图像合成到所述中间图像的第 二显示区域, 生成目标图像, 包括:
将所述当前视频的视频图像转换为 RGB数据, 将所述 RGB数据与所述 背景图片合成, 利用所述背景图片 RGB数据里的 Alpha值, 使所述当前视频 的视频图像显示在所述背景图片的第一显示区域中, 生成中间图像;
将所述录像的视频图像转换为 RGB数据, 将所述 RGB数据与所述中间 图像合成, 利用所述中间图像 RGB数据里的 Alpha值, 使所述录像的视频图 像显示在所述中间图像的第二显示区域中, 生成目标图像。
优选地, 所述方法还包括: 将所述目标图像编码生成视频文件并保存。 本发明实施例提供的视频播放器、 移动终端及该移动终端播放视频的方 法,基于图层合成技术利用 RGB图像信息里面的 Alpha值将录像中的图像融 入到正在播放的视频中, 或将正在播放的视频图像融入到录像中, 使用户可 以实时改变视频播放的内容, 提升用户在观看视频时的用户体验。 附图概述 图 1 是传统的移动终端播放器结构图; 图 2 是传统的移动终端录像装置结构图; 图 3是实施例中移动终端播放器结构图; 图 4是实施例中移动终端播放视频的方法流程图; 图 5是一个应用示例中视移动终端播放视频的具体过程流程图。
本发明的较佳实施方式 为使本发明的目的、 技术方案和优点更加清楚明白, 下文中将结合附图 对本发明的实施例进行详细说明。 需要说明的是, 在不冲突的情况下, 本申 请中的实施例及实施例中的特征可以相互任意组合。
实施例:
如图 3所示, 本实施例提供了一种视频播放器, 包括: 视频解码模块、 视频刷新模块以及一视频合成模块, 其中:
所述视频合成模块, 用于接收第一视频图像和第二视频图像, 将所述第 一视频图像和第二视频图像合成为一目标图像, 然后将所述目标图像输出到 所述视频刷新模块;
其中, 所述第一视频图像是所述录像装置釆集的视频图像, 第二视频图 像是所述视频解码模块输出的视频图像; 或者, 所述第一视频图像是所述视 频解码模块输出的视频图像, 第二视频图像是所述录像装置釆集的图像。
此外, 所述视频合成模块还包括:
背景图片设置单元, 用于设置一背景图片, 该背景图片包括一第一显示 区域和一第二显示区域;
其中, 这两个区域的 Alpha值(即 RGB颜色)有明显区别, 背景图片的 选择可以决定后面录像图像与当前视频图像的合成效果, 保证所要最终呈现 出来的录像图像和当前视频图像分别出现在上述两个显示区域中, 例如, 用 户想要使自己的形象出现在当前世界杯足球转播视频中, 即可将自己录像后 的图像显示在所述背景图片的第一显示区域中, 将世界杯播放视频显示在第 二显示区域中。
此处对图像合成做一个解释: 所谓 Alpha值是指背景图片的 RGB颜色, 图像合成其实就是目标图像的点选取图像源的点的 Aplha值来合成最终目标 图像。 背景图片分为两部分, 一部分是第一显示区域, 该区域颜色相同; 另 一部分是第二显示区域, 该区域颜色相同, 这两个区域的 Alpha值(即 RGB 颜色)有明显区别就是指, 这两个区域在自己内部颜色一致但是和另外一个 区域的颜色则不一样。
第一图像合成单元, 用于接收所述第一视频图像, 将该第一视频图像合 成到所述背景图片的第一显示区域, 生成中间图像, 并将该中间图像输出到 第二图像合成单元;
其中, 所述第一图像合成单元将接收到的所述第一视频图像转换为 RGB 数据, 将所述 RGB数据与所述背景图片合成, 利用所述背景图片 RGB数据 里的 Alpha值,使所述第一视频图像显示在所述背景图片的第一显示区域中, 生成中间图像。
第二图像合成单元, 用于接收所述第二视频图像, 并将该第二视频图像 合成到所述中间图像的第二显示区域, 生成目标图像, 并将该目标图像输出 到目标图像输出单元;
其中, 所述第二图像合成单元将接收到的所述第二视频图像转换为 RGB 数据, 将所述 RGB数据与所述中间图像合成, 利用所述中间图像 RGB数据 里的 Alpha值,使所述第二视频图像显示在所述中间图像的第二显示区域中, 生成目标图像。
在一个应用示例中, 使所述第一视频图像显示在所述背景图片的第一显 示区域中, 生成中间图像, 然后使所述第二视频图像显示在所述中间图像的 第二显示区域中, 生成目标图像是一种抠像技术, 本实施例以第一视频图像 为录像的视频图像, 第二视频图像为当前视频的视频图像为例, 提供以下一 种优选的实现方式:
1、 设定坐标体系左上角 (0, 0 )点为第二显示区域 Alpha釆集点, 获得 此点 RGB颜色值后 (即 Alpha值 ) , 保存下来;
2、 把录像图像和背景图片合成, 生成中间图像;
扫描背景图片每个点, 如果该点和 Alpha釆集点颜色一致, 此区域实际 为第二显示区域, 则中间图像对应位置釆用背景图片的颜色; 如果该点和
Alpha釆集点颜色不一样,此区域实际为第一显示区域,则中间图像对应位置 釆用录像图像的颜色, 这样最终扫描完背景图片的所有点后, 生成最终的中 间图像。 此时, 最终的中间图像在第一显示区域内显示的是录像的图像, 在 第二显示区域内显示的还是背景图片的内容。 并且, 创建一个数组把第二显 示区域的点的索引全部记录下来。
3、 把当前视频的视频图像和中间图像合成, 生成目标图像;
利用上一步骤中创建的第二显示区域的点的索引, 将第二显示区域釆用 当前视频的视频图像的颜色, 即, 在第二显示区域内显示当前视频的视频图 像, 而此处, 在第二显示区域内显示的是录像图像。
这样通过两次图像合成, 就可以把录像图像合成到当前视频中了。
目标图像输出单元, 用于将所述目标图像输出到所述视频刷新模块。 其中, 所述视频刷新模块, 用于接收所述目标图像, 根据所述目标图像 的 RGB数据来刷新液晶显示器 LCD, 作为一种优选的方式, 所述视频刷新 模块还将视频显示区域分成主视频显示区域和录像显示区域两部分来刷新 LCD, 分别用于最终合成视频的显示和录像图像显示, 这样, 用户就可以很 直观地在 LCD中看到最终合成视频后的图像, 以及待合成的录像图像。
此外, 所述视频播放器还包括: 视频录像文件合成模块, 其中: 所述目标图像输出单元, 还用于将所述目标图像输出到所述视频录像文 件合成模块或所述录像装置;
所述视频录像文件合成模块, 用于将所述目标图像编码生成视频文件并 保存。
另外, 本实施例还提供了一种移动终端, 包括: 上述视频播放器。
如图 4所示, 本实施例还提供了移动终端播放视频的方法, 包括以下步 骤:
S101 : 播放视频并开始录像;
S102: 将录像的视频图像和当前视频的视频图像合成为一目标图像; 其中, 设置一背景图片, 背景图片分为两部分, 一部分是第一显示区域, 该区域颜色相同; 另一部分是第二显示区域, 该区域颜色相同, 这两个区域 的 Alpha值有明显区别, 就是指这两个区域在自己内部颜色一致但是和另外 一个区域的颜色则不一样。 所谓 Alpha值是指背景图片的 RGB颜色, 图像合 成其实就是目标图像的点选取图像源的点的 Aplha值来合成最终目标图像。 背景图片的选择可以决定后面录像图像与当前视频图像的合成效果, 保证所 要最终呈现出来的录像图像和当前视频图像分别出现在上述两个显示区域 中。
在本步骤中, 具体包括: 将所述录像的视频图像合成到所述背景图片的 第一显示区域, 生成中间图像, 并将所述当前视频的视频图像合成到所述中 间图像的第二显示区域, 生成目标图像;
其中, 将所述录像的视频图像转换为 RGB数据, 将所述 RGB数据与所 述背景图片合成, 利用所述背景图片 RGB数据里的 Alpha值, 使所述录像的 视频图像显示在所述背景图片的第一显示区域中, 生成中间图像;
将所述当前视频的视频图像转换为 RGB数据, 将所述 RGB数据与所述 中间图像合成, 利用所述中间图像 RGB数据里的 Alpha值, 使所述当前视频 的视频图像显示在所述中间图像的第二显示区域中, 生成目标图像。
或者,将所述当前视频的视频图像合成到所述背景图片的第一显示区域, 生成中间图像, 并将所述录像的视频图像合成到所述中间图像的第二显示区 域, 生成目标图像。
将所述当前视频的视频图像转换为 RGB数据, 将所述 RGB数据与所述 背景图片合成, 利用所述背景图片 RGB数据里的 Alpha值, 使所述当前视频 的视频图像显示在所述背景图片的第一显示区域中, 生成中间图像;
将所述录像的视频图像转换为 RGB数据, 将所述 RGB数据与所述中间 图像合成, 利用所述中间图像 RGB数据里的 Alpha值, 使所述录像的视频图 像显示在所述中间图像的第二显示区域中, 生成目标图像。
在一个应用示例中, 生成目标图像可以釆用如前面在描述视频播放器时 所述的方式来实现, 通过两次图像合成, 就可以把录像的视频图像合成到当 前视频中, 或者将当前视频的视频图像合成到录像的视频中了。
S103: 将所述目标图像显示在液晶显示器 LCD上。
此外, 本实施中还将所述目标图像编码生成视频文件并保存。
在一个应用示例中, 为了便于用户观看, 可以把视频显示区域分为两个 部分, 一个部分#丈为主视频显示区域, 一个部分#丈为视频合成显示区域。 主 视频显示区域用来显示正在播放的视频图像, 视频合成显示区域用来显示第 一图像合成单元生成的中间图像以及第二图像合成单元生成的目标图像, 这 样, 用户就能很直观地看到选择的录像图像是否满意, 以及背景图片选取的 是否合适, 如果不合适用户可以更换更合适的背景图片, 得到用户想要的录 像的部分图像, 然后把该录像的部分图像合成到正在播放的视频图像上。 当 然, 视频显示区域分为两部分并不是必须的, 用户可以只观看录像图像和视 频图像合成的图像。 同样, 如上一应用示例以第一视频图像为录像的视频图 像, 第二视频图像为当前视频的视频图像为例, 结合附图 5, 下面对本实施 例中的移动终端播放视频的方法进一步详细描述如下, 包括以下步骤:
S201 : 播放视频并开始录像;
S202: 录像输出的视频数据转换成 RGB数据之后, 将显示在 LCD上的 图像调整到视频合成显示区域大小;
S203: 选择合适的背景图片,将背景图片调整到视频合成显示区域大小;
S204: 通过(0, 0 )点釆集背景图片的 Alpha值, 即背景图片的 RGB颜 色值, 并保存该 Alpha值;
S205: 扫描背景图片每个点的 Alpha值, 通过与所述(0, 0 )点釆集背 景图片的 Alpha值进行比较, 合成录像图像和背景图片为中间图像, 并显示 到视频合成显示区域;
此时, 背景图片中和 Alpha釆集点颜色不一样的点, 就是第一显示区域。 最终扫描完所有背景图片的点生成中间图像, 该中间图像在第一显示区域内 显示的是录像的图像, 在第二显示区域内显示的还是背景图片的内容。 并且, 创建一个数组把视频图像显示区域的点的索引。
S206: 调整视频合成显示区域大小到主视频显示区域大小, 并将所述中 间图像保存到一个视频合成暂存 buffer (緩冲区) 中; 并且, 将步骤 S205中 创建的数组把第二显示区域的点的索引也保存下来。
S207: 将正在播放的视频解码为 RGB数据;
S208: 读取视频合成暂存 buffer中保存的第二显示区域的点的索引; S209:利用第二显示区域的点的索引把当前视频解码的 RGB数据合成进 来, 生成目标图像, 并根据目标图像的 RGB数据刷新 LCD显示到主视频显 示区域。
从上述实施例可以看出, 相对于现有技术, 上述实施例中提供的视频播 放器、 移动终端及该移动终端播放视频的方法, 基于图层合成技术利用 RGB 图像信息里面的 Alpha值将录像中的图像融入到正在播放的视频中, 或将正 在播放的视频图像融入到录像中, 使用户可以实时改变视频播放的内容, 提 升用户在观看视频时的用户体验。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
以上所述仅为本发明的优选实施例而已, 并非用于限定本发明的保护范 围。 根据本发明的发明内容, 还可有其他多种实施例, 在不背离本发明精神 改变和变形, 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。
工业实用性
本发明实施例提供的视频播放器、 移动终端及该移动终端播放视频的方 法,基于图层合成技术利用 RGB图像信息里面的 Alpha值将录像中的图像融 入到正在播放的视频中, 或将正在播放的视频图像融入到录像中, 使用户可 以实时改变视频播放的内容, 提升用户在观看视频时的用户体验。

Claims

权 利 要 求 书
1、 一种移动终端的视频播放器, 所述移动终端还包括录像装置, 所述视 频播放器包括视频解码模块和视频刷新模块, 其特征在于, 所述视频播放器 还包括一视频合成模块, 其中: 所述视频合成模块设置为: 接收第一视频图像和第二视频图像, 将所述 第一视频图像和所述第二视频图像合成为一目标图像, 然后将所述目标图像 输出到所述视频刷新模块; 其中, 所述第一视频图像是所述录像装置釆集的视频图像, 所述第二视 频图像是所述视频解码模块输出的视频图像; 或者, 所述第一视频图像是所 述视频解码模块输出的视频图像, 所述第二视频图像是所述录像装置釆集的 视频图像。
2、 如权利要求 1所述的视频播放器, 其中, 所述视频合成模块包括: 背景图片设置单元, 设置为: 设置一背景图片, 该背景图片包括一第一 显示区域和一第二显示区域; 第一图像合成单元, 设置为: 接收所述第一视频图像, 将该第一视频图 像合成到所述背景图片的第一显示区域, 生成中间图像, 并将该中间图像输 出到第二图像合成单元; 第二图像合成单元, 设置为: 接收所述第二视频图像, 并将该第二视频 图像合成到所述中间图像的第二显示区域, 生成目标图像, 并将该目标图像 输出到目标图像输出单元; 目标图像输出单元,设置为: 将所述目标图像输出到所述视频刷新模块。
3、 如权利要求 2所述的视频播放器, 其中, 所述第一图像合成单元设置为: 接收所述第一视频图像, 将该第一视频 图像合成到所述背景图片的第一显示区域, 生成中间图像, 包括: 所述第一图像合成单元将接收到的所述第一视频图像转换为 RGB数据, 将所述 RGB数据与所述背景图片合成, 利用所述背景图片 RGB数据里的 Alpha值,使所述第一视频图像显示在所述背景图片的第一显示区域中,生成 中间图像。
4、 如权利要求 2所述的视频播放器, 其中,
所述第二图像合成单元设置为: 接收所述第二视频图像, 并将该第二视 频图像合成到所述中间图像的第二显示区域, 生成目标图像, 包括: 所述第二图像合成单元将接收到的所述第二视频图像转换为 RGB数据, 将所述 RGB数据与所述中间图像合成, 利用所述中间图像 RGB数据里的 Alpha值,使所述第二视频图像显示在所述中间图像的第二显示区域中,生成 目标图像。
5、 如权利要求 2或 3或 4所述的视频播放器, 其中, 所述视频播放器还包括一视频录像文件合成模块, 其中: 所述目标图像输出单元还设置为: 将所述目标图像输出到所述视频录像 文件合成模块或所述录像装置; 所述视频录像文件合成模块设置为: 将所述目标图像编码生成视频文件 并保存。
6、 一种移动终端, 包括: 如权利要求 1~5中任一权利要求所述的视频播 放器。
7、 一种移动终端播放视频的方法, 包括: 在播放视频并录像的过程中, 将录像的视频图像和当前视频的视频图像 合成为一目标图像, 然后将所述目标图像显示在液晶显示器 LCD上。
8、 如权利要求 7所述的方法, 其中, 所述方法还包括: 设置一背景图片, 该背景图片包括一第一显示区域和一第二显示区域; 所述将录像的视频图像和当前视频的视频图像合成为一目标图像,包括: 将所述录像的视频图像合成到所述背景图片的第一显示区域, 生成中间 图像, 并将所述当前视频的视频图像合成到所述中间图像的第二显示区域, 生成目标图像; 或者, 将所述当前视频的视频图像合成到所述背景图片的第一显示区域, 生成 中间图像, 并将所述录像的视频图像合成到所述中间图像的第二显示区域, 生成目标图像。
9、 如权利要求 8所述的方法, 其中, 所述将所述录像的视频图像合成到所述背景图片的第一显示区域, 生成 中间图像, 并将所述当前视频的视频图像合成到所述中间图像的第二显示区 域, 生成目标图像, 包括: 将所述录像的视频图像转换为 RGB数据, 将所述 RGB数据与所述背景 图片合成, 利用所述背景图片 RGB数据里的 Alpha值, 使所述录像的视频图 像显示在所述背景图片的第一显示区域中, 生成中间图像; 将所述当前视频的视频图像转换为 RGB数据, 将所述 RGB数据与所述 中间图像合成, 利用所述中间图像 RGB数据里的 Alpha值, 使所述当前视频 的视频图像显示在所述中间图像的第二显示区域中, 生成目标图像。
10、 如权利要求 9所述的方法, 其中, 所述将所述当前视频的视频图像合成到所述背景图片的第一显示区域, 生成中间图像, 并将所述录像的视频图像合成到所述中间图像的第二显示区 域, 生成目标图像, 包括: 将所述当前视频的视频图像转换为 RGB数据, 将所述 RGB数据与所述 背景图片合成, 利用所述背景图片 RGB数据里的 Alpha值, 使所述当前视频 的视频图像显示在所述背景图片的第一显示区域中, 生成中间图像; 将所述录像的视频图像转换为 RGB数据, 将所述 RGB数据与所述中间 图像合成, 利用所述中间图像 RGB数据里的 Alpha值, 使所述录像的视频图 像显示在所述中间图像的第二显示区域中, 生成目标图像。
11、 如权利要求 7或 8或 9或 10所述的方法, 其中, 所述方法还包括: 将所述目标图像编码生成视频文件并保存。
PCT/CN2012/072332 2012-01-12 2012-03-14 一种视频播放器、移动终端及移动终端播放视频的方法 WO2013104142A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210009125.1A CN103209312B (zh) 2012-01-12 2012-01-12 一种视频播放器、移动终端及移动终端播放视频的方法
CN201210009125.1 2012-01-12

Publications (1)

Publication Number Publication Date
WO2013104142A1 true WO2013104142A1 (zh) 2013-07-18

Family

ID=48756380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072332 WO2013104142A1 (zh) 2012-01-12 2012-03-14 一种视频播放器、移动终端及移动终端播放视频的方法

Country Status (2)

Country Link
CN (1) CN103209312B (zh)
WO (1) WO2013104142A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10297285B2 (en) * 2017-09-30 2019-05-21 Lenovo (Beijing) Co., Ltd. Video data processing method and electronic apparatus

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424624B (zh) * 2013-08-28 2018-04-10 中兴通讯股份有限公司 一种图像合成的优化方法及装置
CN103747181A (zh) * 2014-01-10 2014-04-23 上海斐讯数据通信技术有限公司 一种合成视频场景与摄像头采集画面的系统
CN103839533B (zh) * 2014-01-23 2016-03-02 华为技术有限公司 一种移动终端图像的显示方法和移动终端
CN104038741A (zh) * 2014-06-17 2014-09-10 南京物联传感技术有限公司 一种视频数据的投影方法
CN112348748A (zh) * 2019-08-09 2021-02-09 北京字节跳动网络技术有限公司 图像特效处理方法、装置、电子设备和计算机可读存储介质
CN110971839B (zh) * 2019-11-18 2022-10-04 咪咕动漫有限公司 视频融合方法、电子设备及存储介质
CN110996150A (zh) * 2019-11-18 2020-04-10 咪咕动漫有限公司 视频融合方法、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098523A (zh) * 2006-06-29 2008-01-02 海尔集团公司 一种手机实现卡拉ok的方法及具有卡拉ok功能的手机
CN101232598A (zh) * 2008-02-28 2008-07-30 北京中星微电子有限公司 一种视频图像的显示方法和设备
CN101496399A (zh) * 2006-07-25 2009-07-29 夏普株式会社 视频显示装置、视频显示方法、视频显示程序、以及存储介质
CN101931797A (zh) * 2009-06-24 2010-12-29 中兴通讯股份有限公司 移动通信终端和视频通话方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098523A (zh) * 2006-06-29 2008-01-02 海尔集团公司 一种手机实现卡拉ok的方法及具有卡拉ok功能的手机
CN101496399A (zh) * 2006-07-25 2009-07-29 夏普株式会社 视频显示装置、视频显示方法、视频显示程序、以及存储介质
CN101232598A (zh) * 2008-02-28 2008-07-30 北京中星微电子有限公司 一种视频图像的显示方法和设备
CN101931797A (zh) * 2009-06-24 2010-12-29 中兴通讯股份有限公司 移动通信终端和视频通话方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10297285B2 (en) * 2017-09-30 2019-05-21 Lenovo (Beijing) Co., Ltd. Video data processing method and electronic apparatus

Also Published As

Publication number Publication date
CN103209312A (zh) 2013-07-17
CN103209312B (zh) 2018-03-23

Similar Documents

Publication Publication Date Title
WO2013104142A1 (zh) 一种视频播放器、移动终端及移动终端播放视频的方法
CN110109636B (zh) 投屏方法、电子设备以及系统
TW535413B (en) Device and method for processing digital video data
JP6309749B2 (ja) 画像データ再生装置および画像データ生成装置
US7952535B2 (en) Electronic visual jockey file
JP5685732B2 (ja) 映像抽出装置、プログラム及び記録媒体
JP5333229B2 (ja) 再生装置及び再生方法、並びにコンピュータ・プログラム
JP2016103830A (ja) 2d映像メディア標準に基づいて3d立体映像ファイルを生成及び再生するシステム及び方法
JP5067308B2 (ja) 表示制御装置、表示制御方法及び表示制御プログラム
JP2008072244A (ja) 映像表示システム、映像表示装置、その制御方法及びプログラム
US11234042B2 (en) Display device, control method therefor and recording medium
KR101285382B1 (ko) 동영상 편집 기능을 구비한 동영상 촬영 장치 및 방법
JP5025768B2 (ja) 電子機器及び画像処理方法
JP5238849B2 (ja) 電子機器、電子機器の制御方法及び電子機器の制御プログラム
US8736668B2 (en) Electronic apparatus and image processing method
CN102591107B (zh) 信息处理设备和信息处理方法
JP2016058830A (ja) 撮像装置、その制御方法、及びプログラム
JP2005323008A (ja) 携帯情報端末
TW201227632A (en) Interactive multimedia teaching device and its video analysis system
JP5362082B2 (ja) 電子機器、画像処理方法、及び画像処理プログラム
JP2015029211A (ja) 撮像装置
JP4212531B2 (ja) 録画方法、動画記録装置及び録画システム
JP2013118564A (ja) 撮像装置、画像表示装置及び画像表示プログラム
JP2006180069A (ja) 撮像装置、画像パラメータ設定方法及びプログラム
JP2015109606A (ja) 撮像装置、撮像制御方法およびプログラム

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

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

Country of ref document: EP

Kind code of ref document: A1