WO2018040577A1 - 图像采集过程中实现自适应屏幕旋转的方法及系统 - Google Patents
图像采集过程中实现自适应屏幕旋转的方法及系统 Download PDFInfo
- Publication number
- WO2018040577A1 WO2018040577A1 PCT/CN2017/080789 CN2017080789W WO2018040577A1 WO 2018040577 A1 WO2018040577 A1 WO 2018040577A1 CN 2017080789 W CN2017080789 W CN 2017080789W WO 2018040577 A1 WO2018040577 A1 WO 2018040577A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- resolution
- screen
- horizontal
- module
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 24
- 238000007781 pre-processing Methods 0.000 claims abstract description 14
- 238000013144 data compression Methods 0.000 claims abstract description 3
- 238000007906 compression Methods 0.000 claims description 2
- 230000006835 compression Effects 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234363—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440263—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
Definitions
- the invention relates to the field of image acquisition and screen rotation technology, in particular to a method and a system for realizing adaptive screen rotation in an image acquisition process.
- the mobile client often encounters the problem of screen rotation of the smart terminal device when collecting images. Specifically, the rotated device screen and device camera will involve switching between horizontal and vertical screens, so that the resolution of the captured image will also change.
- the common processing method is that the mobile client prohibits the screen rotation during the acquisition and push flow (that is, the screen rotation cannot be realized), but this will cause the problem that the direction of the pushed image is inconsistent with the direction of the image viewed by the viewing end.
- the object of the present invention is to overcome the deficiencies of the above background art, and to provide a method and system for realizing adaptive screen rotation in an image acquisition process, which can realize adaptive screen rotation during image acquisition, and ensure image output of the same resolution. .
- the technical solution adopted by the present invention is to provide an image acquisition.
- a method of implementing adaptive screen rotation in a process comprising the steps of:
- Step S1 acquiring image data of the screen or camera, the image data is related to the current screen orientation, and proceeds to step S2;
- Step S2 pre-processing the acquired image data according to the current screen orientation, so that the processed image resolution is not related to the screen orientation, and proceeds to step S3;
- Step S3 the preprocessed image data is compressed according to the specified encoding format, the image data is encoded, and the process proceeds to step S4;
- Step S4 Push the encoded image data to the server according to a specified format and a specified streaming protocol.
- the invention also provides a system for realizing adaptive screen rotation in an image acquisition process, the system comprising a screen/camera acquisition module, an image preprocessing module, an image coding module and an image stream pushing module.
- the screen/camera acquisition module is configured to: acquire image data of a screen or a camera, where the image data is related to a current screen orientation; and the image preprocessing module is configured to: preprocess the collected image data according to a current screen orientation, so that The processed image resolution is not related to the screen orientation;
- the image encoding module is configured to: compress the preprocessed image data according to a specified encoding format to implement encoding of the image data; and use the image stream pushing module On: Push the encoded image data to the server according to the specified format and the specified streaming protocol.
- the invention can preprocess the collected image data according to the current screen direction, so that the processed image resolution is not related to the screen orientation, so that the client device can be processed by image preprocessing whether it is horizontal or vertical. Achieve the same resolution output to achieve adaptive screen rotation during image acquisition. Compared with the prior art method of prohibiting screen rotation during acquisition and push flow, the present invention can realize adaptive screen rotation of the client without changing the existing push stream and client software, which satisfies the actual situation of the user. The use of the demand, but also ensure the same resolution of the image output, user experience is good.
- FIG. 1 is a flowchart of a method for implementing adaptive screen rotation in an image acquisition process according to an embodiment of the present invention
- step S2 is a specific flowchart of step S2 in the embodiment of the present invention.
- FIG. 3 is a schematic diagram of a process of obtaining a horizontal screen image according to an embodiment of the present invention
- FIG. 4 is a structural block diagram of a system for implementing adaptive screen rotation in an image acquisition process according to an embodiment of the present invention.
- an embodiment of the present invention provides a method for implementing adaptive screen rotation in an image acquisition process, including the following steps:
- Step S1 Screen/Camera Acquisition: Obtain image data (including picture data or video data) of the screen or camera using the image acquisition interface function provided by the client system.
- the image data is related to the current screen orientation, and the process proceeds to step S2.
- Step S2 Image pre-processing: pre-processing the acquired image data according to the current screen orientation, so that the processed image resolution is not related to the screen orientation (ie, the vertical screen resolution is the same as the horizontal screen resolution), and is transferred to Step S3.
- step S2 specifically includes the following operations:
- Step S201 Acquire the resolution of the current image by calling the resolution acquisition interface function of the client system, and proceed to step S202.
- Step S202 determining whether the resolution of the current image is in the horizontal screen state, if yes, without processing, directly ending step S2 and proceeding to step S3; otherwise, proceeding to step S203; specifically, determining whether the resolution of the current image is The basis for the horizontal screen state is: if the map If the resolution is wider than the image resolution, it is judged to be in the landscape state.
- Step S203 performing equal-ratio scaling on the current vertical screen image according to the resolution of the current image, so that the image resolution in the scaled vertical screen state is equal to the image resolution in the horizontal screen state; the zoomed The vertical screen image is superimposed with the horizontal screen image, so that the resolution of the superimposed image is the same as the resolution of the image in the horizontal screen state, that is, the image resolution is not related to the screen orientation.
- the system platform has a hardware interface, it is directly called, and if not, it is implemented by a software algorithm.
- step S203 the operation flow of step S203 is as follows:
- Step S203c superimposing the scaled vertical screen image and the horizontal screen image so that the superimposed image resolution is the same as the image resolution in the horizontal screen state.
- step S203c the horizontal screen image is processed by the following operations (as shown in FIG. 3):
- Step 1 Picture input: input the image with the image resolution of w2 ⁇ h2 after zooming as the original image;
- Step S3 Image coding: compressing the preprocessed image data according to a specified encoding format to implement encoding of the image data, and proceeding to step S4.
- the specified encoding format is the H264 compression format.
- Step S4 Image stream pushing: Push the encoded image data to the server end according to a specified format and a specified streaming media protocol, and end.
- the image data is pushed to the live server according to the RTMP (Real Time Messaging Protocol) protocol in the format of FLV (FLASH VIDEO).
- RTMP Real Time Messaging Protocol
- FLV FLASH VIDEO
- the present invention further provides a system for realizing image scaling by using OpenGL and OpenCL.
- the system includes a screen/camera acquisition module, an image preprocessing module, an image encoding module, and an image stream pushing module.
- the screen/camera acquisition module is configured to: acquire image data of a screen or a camera, and the image data is related to a current screen orientation;
- the image preprocessing module is configured to: preprocess the collected image data according to a current screen orientation, so that The image resolution is not related to the screen orientation;
- the image encoding module is configured to: compress the preprocessed image data according to a specified encoding format to implement image data encoding;
- the image stream pushing module is configured to: encode the image The image data is pushed to the server in the specified format and the specified streaming protocol.
- the image encoding module performs data compression according to the encoding format of H264;
- the image streaming push module pushes the encoded image data to the server end according to the RTMP protocol in the FLV format.
- the image preprocessing module includes a resolution acquisition submodule and a horizontal screen judgment The break submodule and the scaling overlay processing submodule.
- the resolution acquisition sub-module is configured to: obtain a resolution of a current image by calling a resolution acquisition interface function of the client system, and send a determination signal to the horizontal screen determination sub-module;
- the horizontal screen determination sub-module is configured to: receive After the signal is judged, it is judged whether the resolution of the current image is in the horizontal screen state, and if so, no processing is performed; otherwise, the processing signal is sent to the scaling superimposition processing sub-module;
- the scaling superimposition processing sub-module is configured to: after receiving the processing signal According to the resolution of the current image, the current vertical screen image is scaled proportionally, so that the image resolution under the scaled vertical screen state is equal to the image resolution in the horizontal screen state; the scaled vertical screen is to be scaled; The image is superimposed with the horizontal screen image so that the superimposed image resolution is the same as the image resolution
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Processing (AREA)
Abstract
本发明公开了一种图像采集过程中实现自适应屏幕旋转的方法及系统,涉及图像采集与屏幕旋转技术领域。该方法包括:获取屏幕或摄像头的图像数据,该图像数据与当前屏幕方向相关;根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关;将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码;将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端。本发明能实现图像采集过程中的自适应屏幕旋转,既满足了用户的实际使用需求,又保证了相同分辨率的图像输出,用户体验佳。
Description
本发明涉及图像采集与屏幕旋转技术领域,具体来讲是一种图像采集过程中实现自适应屏幕旋转的方法及系统。
如今,利用各种智能终端(如手机、平板电脑等)实现图像采集的情况非常频繁。特别是随着视频直播技术的飞速发展和流行,许多移动客户端(特别是主播端)为了实现视频的直播都需要进行图像(包括图片和视频)的采集。
但目前,移动客户端在进行图像的采集时经常会遇到智能终端设备的屏幕旋转问题。具体来说,旋转后的设备屏幕和设备摄像头会涉及横竖屏的切换,从而使得采集的图像分辨率也会发生变化。目前,常见的处理方式是移动客户端在采集和推流时禁止屏幕旋转(即无法实现屏幕旋转),但这将造成所推送出的图像方向与观看端所观看的图像方向不一致的问题。
因此,如何在图像采集过程中实现自适应屏幕旋转,又能保证相同分辨率的输出是本领域亟待解决的问题。
发明内容
本发明的目的是为了克服上述背景技术的不足,提供一种图像采集过程中实现自适应屏幕旋转的方法及系统,能在图像采集过程中实现自适应屏幕旋转,保证了相同分辨率的图像输出。
为达到以上目的,本发明采取的技术方案是:提供一种图像采集
过程中实现自适应屏幕旋转的方法,该方法包括以下步骤:
步骤S1:获取屏幕或摄像头的图像数据,该图像数据与当前屏幕方向相关,转入步骤S2;
步骤S2:根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关,转入步骤S3;
步骤S3:将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码,转入步骤S4;
步骤S4:将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端。
本发明还提供一种图像采集过程中实现自适应屏幕旋转的系统,该系统包括屏幕/摄像头采集模块、图像预处理模块、图像编码模块和图像流推送模块。所述屏幕/摄像头采集模块用于:获取屏幕或摄像头的图像数据,该图像数据与当前屏幕方向相关;所述图像预处理模块用于:根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关;所述图像编码模块用于:将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码;所述图像流推送模块用于:将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端。
本发明的有益效果在于:
本发明能根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关,从而使得客户端设备无论是横屏还是竖屏,通过图像预处理后,都能实现相同的分辨率输出,进而实现图像采集过程中的自适应屏幕旋转。与现有技术中在采集和推流时禁止屏幕旋转的方式相比,本发明可以在不改变现有推送流和客户端软件的基础上实现客户端的自适应屏幕旋转,既满足了用户的实际
使用需求,又保证了相同分辨率的图像输出,用户体验佳。
图1为本发明实施例中图像采集过程中实现自适应屏幕旋转的方法的流程图;
图2为本发明实施例中步骤S2的具体流程图;
图3为本发明实施例中得到横屏图像的处理过程示意图;
图4为本发明实施例中图像采集过程中实现自适应屏幕旋转的系统的结构框图。
下面结合附图及具体实施例对本发明作进一步的详细描述。
参见图1所示,本发明实施例提供一种图像采集过程中实现自适应屏幕旋转的方法,包括以下步骤:
步骤S1、屏幕/摄像头采集:使用客户端系统提供的图像采集接口函数获取屏幕或摄像头的图像数据(包括图片数据或视频数据),该图像数据是与当前屏幕方向相关的,转入步骤S2。
步骤S2、图像预处理:根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关(即,使得竖屏分辨率与横屏分辨率相同),转入步骤S3。
实际操作时,参见图2所示,步骤S2具体包括以下操作:
步骤S201:通过调用客户端系统的分辨率获取接口函数获取当前图像的分辨率,转入步骤S202。
步骤S202:判断当前图像的分辨率是否为横屏状态下,若是,不做处理,直接结束步骤S2转入步骤S3;否则,转入步骤S203;具体来说,判断当前图像的分辨率是否为横屏状态下的依据为:若图
像分辨率的宽大于图像分辨率的高,则判定为横屏状态下。
步骤S203:根据当前图像的分辨率对当前竖屏图像进行等比缩放,使缩放后的竖屏状态下的图像分辨率的高与横屏状态下的图像分辨率的高相等;将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同,即实现图像分辨率与屏幕方向不相关。可以理解的是,进行图像等比缩放时,如果系统平台有硬件接口则直接调用,如果没有则通过软件算法实现。
具体来说,步骤S203的操作流程如下:
步骤S203a:根据当前竖屏状态下的图像分辨率w1·h1,w1为竖屏分辨率的宽,h1为竖屏分辨率的高,计算出横屏状态下的图像分辨率w0·h0,w0为横屏分辨率的宽,h0为横屏分辨率的高,w0=h1,h0=w1;
步骤S203b:对当前竖屏图像进行等比缩放,缩放后的图像分辨率为w2·h2,其中h2=h0,为保证图像不发生形变w2=(w1/h1)·h2;
步骤S203c:将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
其中,步骤S203c中,所述横屏图像是经以下操作处理得来(如图3所示):
步骤一、图片输入:将缩放后图像分辨率为w2·h2的图像作为原图输入;
步骤二、模糊化处理:保持高度不变,对原图的宽度做一次缩放,使缩放后的图片宽w3=w0–w2;并对缩放后的图片进行模糊处理;
步骤三、图片水平分拆:将模糊化处理后的图片保持高度不变,宽度平均分成两个等宽的图片,拆分后的图片宽度w4=w3/2;
步骤四、图片拼接:在拆分后的两个等宽图片的中间加上图像分
辨率为w2·h2的图像,得到横屏图像。可以理解的是,由于w4+w2+w4=w0,h2=h0,因此,拼接后的图片的分辨率和横屏分辨率相同,即拼接后得到横屏图像。
步骤S3、图像编码:将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码,转入步骤S4。本实施例中,指定的编码格式为H264压缩格式。
步骤S4、图像流推送:将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端,结束。可以理解的是,本实施例中,图像数据是以FLV(FLASH VIDEO)格式,按照RTMP(Real Time Messaging Protocol,实时消息传输协议)协议推送至直播服务器端的,实际操作中,可根据具体应用的场景需要自行指定格式、选择流媒体协议和服务器端。
参见图4所示,本发明还提供了一种利用OpenGL与OpenCL协作实现图像缩放的系统,该系统包括屏幕/摄像头采集模块、图像预处理模块、图像编码模块和图像流推送模块。
其中,屏幕/摄像头采集模块用于:获取屏幕或摄像头的图像数据,该图像数据与当前屏幕方向相关;图像预处理模块用于:根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关;图像编码模块用于:将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码;图像流推送模块用于:将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端。本实施例中,图像编码模块是按照H264的编码格式进行数据压缩;图像流推送模块是以FLV格式,按照RTMP协议将编码后的图像数据推送至服务器端。
进一步地,所述图像预处理模块包括分辨率获取子模块、横屏判
断子模块和缩放叠加处理子模块。所述分辨率获取子模块用于:通过调用客户端系统的分辨率获取接口函数获取当前图像的分辨率,向横屏判断子模块发送判断信号;所述横屏判断子模块用于:收到判断信号后,判断当前图像的分辨率是否为横屏状态下,若是,不做处理;否则,向缩放叠加处理子模块发送处理信号;所述缩放叠加处理子模块用于:收到处理信号后,根据当前图像的分辨率对当前竖屏图像进行等比缩放,使缩放后的竖屏状态下的图像分辨率的高与横屏状态下的图像分辨率的高相等;将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
更进一步地,所述缩放叠加处理子模块进行缩放、叠加处理的具体流程为:收到处理信号后,根据当前竖屏状态下的图像分辨率w1·h1,w1为竖屏分辨率的宽,h1为竖屏分辨率的高,计算出横屏状态下的图像分辨率w0·h0,w0为横屏分辨率的宽,h0为横屏分辨率的高,w0=h1,h0=w1;对当前竖屏图像进行等比缩放,缩放后的图像分辨率为w2·h2,其中h2=h0,w2=(w1/h1)·h2;将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
所述横屏图像是经以下操作处理得来:将缩放后图像分辨率为w2·h2的图像作为原图输入;保持高度不变,对原图的宽度做一次缩放,使缩放后的图片宽w3=w0–w2;并对缩放后的图片进行模糊处理;将模糊化处理后的图片保持高度不变,宽度平均拆分成两个等宽的图片,拆分后的图片宽度w4=w3/2;在拆分后的两个等宽图片的中间加上图像分辨率为w2·h2的图像,得到横屏图像。
需要说明的是:上述实施例提供的系统在进行操作时,仅以上述各功能模块的划分进行举例说明,实际应用中,可根据需要将上述功
能分配由不同的功能模块完成,即将系统的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。
Claims (10)
- 一种图像采集过程中实现自适应屏幕旋转的方法,其特征在于,该方法包括以下步骤:步骤S1:获取屏幕或摄像头的图像数据,该图像数据与当前屏幕方向相关,转入步骤S2;步骤S2:根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关,转入步骤S3;步骤S3:将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码,转入步骤S4;步骤S4:将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端。
- 如权利要求1所述的图像采集过程中实现自适应屏幕旋转的方法,其特征在于,步骤S2的具体流程包括:步骤S201:通过调用客户端系统的分辨率获取接口函数获取当前图像的分辨率,转入步骤S202;步骤S202:判断当前图像的分辨率是否为横屏状态下,若是,不做处理,直接结束步骤S2;否则,转入步骤S203;步骤S203:根据当前图像的分辨率对当前竖屏图像进行等比缩放,使缩放后的竖屏状态下的图像分辨率的高与横屏状态下的图像分辨率的高相等;将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
- 如权利要求2所述的图像采集过程中实现自适应屏幕旋转的方法,其特征在于,步骤S203的具体流程包括:步骤S203a:根据当前竖屏状态下的图像分辨率w1·h1,w1为竖屏分辨率的宽,h1为竖屏分辨率的高,计算出横屏状态下的图像 分辨率w0·h0,w0为横屏分辨率的宽,h0为横屏分辨率的高,w0=h1,h0=w1;步骤S203b:对当前竖屏图像进行等比缩放,缩放后的图像分辨率为w2·h2,其中h2=h0,w2=(w1/h1)·h2;步骤S203c:将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
- 如权利要求3所述的图像采集过程中实现自适应屏幕旋转的方法,其特征在于:步骤S203c中所述横屏图像是经以下操作处理得来:步骤一、图片输入:将缩放后图像分辨率为w2·h2的图像作为原图输入;步骤二、模糊化处理:保持高度不变,对原图的宽度做一次缩放,使缩放后的图片宽w3=w0–w2;并对缩放后的图片进行模糊处理;步骤三、图片水平分拆:将模糊化处理后的图片保持高度不变,宽度平均拆分成两个等宽的图片,拆分后的图片宽度w4=w3/2;步骤四、图片拼接:在拆分后的两个等宽图片的中间加上图像分辨率为w2·h2的图像,得到横屏图像。
- 如权利要求1至4中任一项所述的图像采集过程中实现自适应屏幕旋转的方法,其特征在于:步骤S3中,所述指定的编码格式为H264压缩格式;步骤S4中,所述指定的格式为FLV格式,所述指定的流媒体协议为RTMP协议。
- 一种图像采集过程中实现自适应屏幕旋转的系统,其特征在于:该系统包括屏幕/摄像头采集模块、图像预处理模块、图像编码模块和图像流推送模块;所述屏幕/摄像头采集模块用于:获取屏幕或摄像头的图像数据, 该图像数据与当前屏幕方向相关;所述图像预处理模块用于:根据当前屏幕方向对采集的图像数据进行预处理,使处理后的图像分辨率与屏幕方向不相关;所述图像编码模块用于:将经预处理后的图像数据按照指定的编码格式进行数据压缩,实现图像数据的编码;所述图像流推送模块用于:将编码后的图像数据按照指定的格式和指定的流媒体协议推送至服务器端。
- 如权利要求6所述的图像采集过程中实现自适应屏幕旋转的系统,其特征在于:所述图像预处理模块包括分辨率获取子模块、横屏判断子模块和缩放叠加处理子模块;所述分辨率获取子模块用于:通过调用客户端系统的分辨率获取接口函数获取当前图像的分辨率,向横屏判断子模块发送判断信号;所述横屏判断子模块用于:收到判断信号后,判断当前图像的分辨率是否为横屏状态下,若是,不做处理;否则,向缩放叠加处理子模块发送处理信号;所述缩放叠加处理子模块用于:收到处理信号后,根据当前图像的分辨率对当前竖屏图像进行等比缩放,使缩放后的竖屏状态下的图像分辨率的高与横屏状态下的图像分辨率的高相等;将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
- 如权利要求7所述的图像采集过程中实现自适应屏幕旋转的系统,其特征在于:所述缩放叠加处理子模块进行缩放、叠加处理的具体流程为:收到处理信号后,根据当前竖屏状态下的图像分辨率w1·h1,w1为竖屏分辨率的宽,h1为竖屏分辨率的高,计算出横屏状态下的图像分辨率w0·h0,w0为横屏分辨率的宽,h0为横屏分 辨率的高,w0=h1,h0=w1;对当前竖屏图像进行等比缩放,缩放后的图像分辨率为w2·h2,其中h2=h0,w2=(w1/h1)·h2;将缩放后的竖屏图像与横屏图像进行叠加,使叠加后的图像分辨率与横屏状态下的图像分辨率相同。
- 如权利要求8所述的图像采集过程中实现自适应屏幕旋转的系统,其特征在于,所述横屏图像是经以下操作处理得来:将缩放后图像分辨率为w2·h2的图像作为原图输入;保持高度不变,对原图的宽度做一次缩放,使缩放后的图片宽w3=w0–w2;并对缩放后的图片进行模糊处理;将模糊化处理后的图片保持高度不变,宽度平均拆分成两个等宽的图片,拆分后的图片宽度w4=w3/2;在拆分后的两个等宽图片的中间加上图像分辨率为w2·h2的图像,得到横屏图像。
- 如权利要求6至9中任一项所述的图像采集过程中实现自适应屏幕旋转的系统,其特征在于:所述图像编码模块是按照H264的编码格式进行数据压缩;所述图像流推送模块是以FLV格式,按照RTMP协议将编码后的图像数据推送至服务器端。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610750424.9 | 2016-08-29 | ||
CN201610750424.9A CN106303571B (zh) | 2016-08-29 | 2016-08-29 | 图像采集过程中实现自适应屏幕旋转的方法及系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018040577A1 true WO2018040577A1 (zh) | 2018-03-08 |
Family
ID=57676688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/080789 WO2018040577A1 (zh) | 2016-08-29 | 2017-04-17 | 图像采集过程中实现自适应屏幕旋转的方法及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106303571B (zh) |
WO (1) | WO2018040577A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111694530A (zh) * | 2020-06-09 | 2020-09-22 | 北京百度网讯科技有限公司 | 一种屏幕适配的方法、装置、电子设备及存储介质 |
CN112533075A (zh) * | 2020-11-24 | 2021-03-19 | 湖南傲英创视信息科技有限公司 | 视频处理方法、装置及系统 |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106303571B (zh) * | 2016-08-29 | 2019-03-15 | 武汉斗鱼网络科技有限公司 | 图像采集过程中实现自适应屏幕旋转的方法及系统 |
CN108696691A (zh) * | 2017-04-05 | 2018-10-23 | 中兴通讯股份有限公司 | 视频拍摄方法及装置 |
CN107613342A (zh) * | 2017-10-09 | 2018-01-19 | 深圳市沃特沃德股份有限公司 | 视频自适应调整方法和装置 |
CN108345438A (zh) * | 2018-02-06 | 2018-07-31 | 深圳市恒晨电器有限公司 | 手机平台应用于车载平台的物理横屏显示方法 |
CN110913161B (zh) * | 2018-09-17 | 2023-06-23 | 成都鼎桥通信技术有限公司 | 一种竖屏录制横幅视频的方法和装置 |
CN114286136B (zh) * | 2021-12-28 | 2024-05-31 | 咪咕文化科技有限公司 | 视频播放编码方法、装置、设备及计算机可读存储介质 |
CN114938469B (zh) * | 2022-05-16 | 2024-08-06 | 深圳康佳电子科技有限公司 | 摄像头的图像处理方法、装置及摄像头和显示系统 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9071724B2 (en) * | 2012-02-24 | 2015-06-30 | Samsung Electronics Co., Ltd. | Method and apparatus for providing a video call service |
CN104881172A (zh) * | 2015-05-22 | 2015-09-02 | 广东好帮手电子科技股份有限公司 | 一种车载主机与智能手机互动的屏幕校准方法及系统 |
CN105049959A (zh) * | 2015-07-08 | 2015-11-11 | 腾讯科技(深圳)有限公司 | 多媒体文件播放方法及装置 |
CN105681885A (zh) * | 2016-02-26 | 2016-06-15 | 杭州开迅科技有限公司 | 移动终端录屏直播装置及方法 |
CN105872666A (zh) * | 2016-05-06 | 2016-08-17 | 腾讯科技(深圳)有限公司 | 模式切换方法及装置 |
CN106303571A (zh) * | 2016-08-29 | 2017-01-04 | 武汉斗鱼网络科技有限公司 | 图像采集过程中实现自适应屏幕旋转的方法及系统 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102421021A (zh) * | 2011-11-22 | 2012-04-18 | 中兴通讯股份有限公司 | 控制流媒体视频横竖屏播放的方法及其系统、终端 |
CN103763505A (zh) * | 2013-12-31 | 2014-04-30 | 华为技术有限公司 | 一种在视频通话中适应屏幕方向切换的方法和装置 |
CN105554549A (zh) * | 2015-12-03 | 2016-05-04 | 青岛海信移动通信技术股份有限公司 | 一种VoLTE网络视频显示方法及装置 |
-
2016
- 2016-08-29 CN CN201610750424.9A patent/CN106303571B/zh not_active Expired - Fee Related
-
2017
- 2017-04-17 WO PCT/CN2017/080789 patent/WO2018040577A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9071724B2 (en) * | 2012-02-24 | 2015-06-30 | Samsung Electronics Co., Ltd. | Method and apparatus for providing a video call service |
CN104881172A (zh) * | 2015-05-22 | 2015-09-02 | 广东好帮手电子科技股份有限公司 | 一种车载主机与智能手机互动的屏幕校准方法及系统 |
CN105049959A (zh) * | 2015-07-08 | 2015-11-11 | 腾讯科技(深圳)有限公司 | 多媒体文件播放方法及装置 |
CN105681885A (zh) * | 2016-02-26 | 2016-06-15 | 杭州开迅科技有限公司 | 移动终端录屏直播装置及方法 |
CN105872666A (zh) * | 2016-05-06 | 2016-08-17 | 腾讯科技(深圳)有限公司 | 模式切换方法及装置 |
CN106303571A (zh) * | 2016-08-29 | 2017-01-04 | 武汉斗鱼网络科技有限公司 | 图像采集过程中实现自适应屏幕旋转的方法及系统 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111694530A (zh) * | 2020-06-09 | 2020-09-22 | 北京百度网讯科技有限公司 | 一种屏幕适配的方法、装置、电子设备及存储介质 |
CN111694530B (zh) * | 2020-06-09 | 2023-05-23 | 阿波罗智联(北京)科技有限公司 | 一种屏幕适配的方法、装置、电子设备及存储介质 |
CN112533075A (zh) * | 2020-11-24 | 2021-03-19 | 湖南傲英创视信息科技有限公司 | 视频处理方法、装置及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN106303571B (zh) | 2019-03-15 |
CN106303571A (zh) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018040577A1 (zh) | 图像采集过程中实现自适应屏幕旋转的方法及系统 | |
CN111295884B (zh) | 图像处理装置及图像处理方法 | |
EP2017783B1 (en) | Method for constructing a composite image | |
US8305448B2 (en) | Selective privacy protection for imaged matter | |
US10003768B2 (en) | Apparatus and methods for frame interpolation based on spatial considerations | |
US10244168B1 (en) | Video system for real-time panoramic video delivery | |
CN115150618A (zh) | 解码装置及系统 | |
EP3804349B1 (en) | Adaptive panoramic video streaming using composite pictures | |
US9007531B2 (en) | Methods and apparatus for expanding a field of view in a video communication session | |
US20200213631A1 (en) | Transmission system for multi-channel image, control method therefor, and multi-channel image playback method and apparatus | |
US20130147910A1 (en) | Mobile device and image capturing method | |
Jeong et al. | VVC subpicture-based frame packing for MPEG immersive video | |
CN110602440A (zh) | 一种音视频数据流的传输方法、装置及终端 | |
US9478011B2 (en) | Method and system for processing of images | |
Gao et al. | Mobile media communication, processing, and analysis: A review of recent advances | |
CN113938457B (zh) | 一种云手机应用远程摄像头的方法、系统和设备 | |
CN117014562B (zh) | 多路视频流混合编解码方法、设备及存储介质 | |
US9860542B2 (en) | Transcoder device and client-server architecture comprising the transcoder device | |
WO2020181540A1 (zh) | 一种视频处理方法、装置、编码设备及解码设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17844885 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: 17844885 Country of ref document: EP Kind code of ref document: A1 |