CN114827343B - Method and device for screen sharing - Google Patents
Method and device for screen sharing Download PDFInfo
- Publication number
- CN114827343B CN114827343B CN202210374873.3A CN202210374873A CN114827343B CN 114827343 B CN114827343 B CN 114827343B CN 202210374873 A CN202210374873 A CN 202210374873A CN 114827343 B CN114827343 B CN 114827343B
- Authority
- CN
- China
- Prior art keywords
- screen
- camera
- electronic device
- screen sharing
- current electronic
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
- H04M1/72439—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/0202—Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
- H04M1/0206—Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings
- H04M1/0208—Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings characterized by the relative motions of the body parts
- H04M1/0214—Foldable telephones, i.e. with body parts pivoting to an open position around an axis parallel to the plane they define in closed position
- H04M1/0222—Foldable in two directions, i.e. using a two degree of freedom hinge
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Environmental & Geological Engineering (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Studio Devices (AREA)
Abstract
提供了一种用于屏幕共享的方法和装置。所述方法包括:当应用使用相机服务时,相机服务提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项供用户选择;相机服务基于用户选择的功能来获取数据,并将获取的数据提供给所述应用。
A method and apparatus for screen sharing are provided. The method includes: when an application uses a camera service, the camera service provides an image capture function, a screen sharing function, or an image capture and screen sharing function option for a user to select; the camera service acquires data based on the function selected by the user, and provides the acquired data to the application.
Description
技术领域Technical Field
本申请涉及显示领域,更具体地,涉及一种用于屏幕共享的方法和装置。The present application relates to the field of display, and more specifically, to a method and device for screen sharing.
背景技术Background Art
在现有技术中,屏幕共享功能均在应用内部实现,并且应用主要通过录屏的方式获取屏幕内容。In the prior art, the screen sharing function is implemented inside the application, and the application mainly obtains the screen content by recording the screen.
因此,现有技术的屏幕共享功能只能在特定的具有该功能的应用里单独使用,诸如,当使用应用进行视频通话时就无法进行屏幕共享;此外,由于应用通过录屏的方式获取屏幕内容,故还无法获得原始的高质量图像数据。Therefore, the screen sharing function of the prior art can only be used separately in a specific application with this function. For example, screen sharing cannot be performed when using the application for a video call. In addition, since the application obtains the screen content by recording the screen, the original high-quality image data cannot be obtained.
发明内容Summary of the invention
根据本发明的示例性实施例,提供了一种用于屏幕共享的方法,包括:当应用使用相机服务时,相机服务提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项供用户选择;相机服务基于用户选择的功能来获取数据,并将获取的数据提供给所述应用。According to an exemplary embodiment of the present invention, a method for screen sharing is provided, including: when an application uses a camera service, the camera service provides options of an image capture function, a screen sharing function, or an image capture and screen sharing function for a user to select; the camera service acquires data based on the function selected by the user, and provides the acquired data to the application.
当图像捕捉功能被用户选择时,获取的数据可为相机捕捉图像,当屏幕共享功能被用户选择时,获取的数据可为另一应用显示的屏幕帧,当图像捕捉和屏幕共享功能被用户选择时,获取的数据可为相机捕捉图像和所述另一应用显示的屏幕帧。When the image capture function is selected by the user, the acquired data may be the image captured by the camera; when the screen sharing function is selected by the user, the acquired data may be the screen frame displayed by another application; when the image capture and screen sharing functions are selected by the user, the acquired data may be the image captured by the camera and the screen frame displayed by the other application.
相机服务可从显示渲染服务(Surface Flinger)获取屏幕帧。The camera service can obtain screen frames from the display rendering service (Surface Flinger).
当图像捕捉和屏幕共享功能被用户选择时,相机服务基于用户选择的功能来获取数据的步骤可包括:确定当前电子设备是否具有折叠屏;基于当前电子设备是否具有折叠屏来获取分配给相应屏幕的数据。When the image capture and screen sharing functions are selected by the user, the step of the camera service acquiring data based on the function selected by the user may include: determining whether the current electronic device has a folding screen; and acquiring data assigned to the corresponding screen based on whether the current electronic device has a folding screen.
当确定当前电子设备具有折叠屏时,获取分配给相应屏幕的数据的步骤可包括:确定当前电子设备的折叠屏是上下折叠还是左右折叠;基于当前电子设备的折叠屏是上下折叠还是左右折叠来获取分配给相应屏幕的数据。When it is determined that the current electronic device has a folding screen, the step of obtaining data assigned to the corresponding screen may include: determining whether the folding screen of the current electronic device is folded up and down or folded left and right; and obtaining data assigned to the corresponding screen based on whether the folding screen of the current electronic device is folded up and down or folded left and right.
当确定当前电子设备不具有折叠屏时,获取分配给相应屏幕的数据的步骤可包括:获取相机捕捉图像和屏幕帧;减小相机捕捉图像与屏幕帧之间的亮度差;确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式。When it is determined that the current electronic device does not have a foldable screen, the step of obtaining data assigned to the corresponding screen may include: obtaining a camera captured image and a screen frame; reducing the brightness difference between the camera captured image and the screen frame; and determining a layout style of the camera captured image and the screen frame on the screen that reduces the brightness difference.
确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式的步骤可包括:基于预定属性通过决策树模型来确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式。The step of determining a layout pattern of the camera captured images and the screen frames on the screen that reduces the brightness difference may include determining the layout pattern of the camera captured images and the screen frames on the screen that reduces the brightness difference through a decision tree model based on predetermined attributes.
所述预定属性可包括当前电子设备是否具有折叠屏、当前电子设备是否处于折叠状态、相机捕捉图像锐度、屏幕帧锐度、所述应用的类型、和所述另一应用的类型中的至少一个。The predetermined attributes may include whether the current electronic device has a folding screen, whether the current electronic device is in a folding state, camera captured image sharpness, screen frame sharpness, the type of the application, and at least one of the type of the other application.
根据本发明的另一示例性实施例,提供了一种用于屏幕共享的相机服务装置,包括:选项提供模块,被配置用于当应用使用相机服务时,提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项供用户选择;数据获取模块,被配置用于基于用户选择的功能来获取数据,并将获取的数据提供给所述应用。According to another exemplary embodiment of the present invention, a camera service device for screen sharing is provided, including: an option providing module, configured to provide options of an image capturing function, a screen sharing function, or both an image capturing and a screen sharing function for user selection when an application uses the camera service; and a data acquisition module, configured to acquire data based on a function selected by the user, and provide the acquired data to the application.
当图像捕捉功能被用户选择时,获取的数据可为相机捕捉图像,当屏幕共享功能被用户选择时,获取的数据可为另一应用显示的屏幕帧,当图像捕捉和屏幕共享功能被用户选择时,获取的数据可为相机捕捉图像和所述另一应用显示的屏幕帧。When the image capture function is selected by the user, the acquired data may be the image captured by the camera; when the screen sharing function is selected by the user, the acquired data may be the screen frame displayed by another application; when the image capture and screen sharing functions are selected by the user, the acquired data may be the image captured by the camera and the screen frame displayed by the other application.
所述用于屏幕共享的相机服务装置还可包括:屏幕管理模块,被配置用于从显示渲染服务(Surface Flinger)获取屏幕帧。The camera service device for screen sharing may further include: a screen management module configured to obtain a screen frame from a display rendering service (Surface Flinger).
当图像捕捉和屏幕共享功能被用户选择时,数据获取模块还可被配置用于进行以下操作:确定当前电子设备是否具有折叠屏;基于当前电子设备是否具有折叠屏来获取分配给相应屏幕的数据。When the image capture and screen sharing functions are selected by the user, the data acquisition module may also be configured to perform the following operations: determine whether the current electronic device has a folding screen; and acquire data assigned to the corresponding screen based on whether the current electronic device has a folding screen.
当确定当前电子设备具有折叠屏时,数据获取模块还可被配置用于进行以下操作:确定当前电子设备的折叠屏是上下折叠还是左右折叠;基于当前电子设备的折叠屏是上下折叠还是左右折叠来获取分配给相应屏幕的数据。When it is determined that the current electronic device has a folding screen, the data acquisition module can also be configured to perform the following operations: determine whether the folding screen of the current electronic device is folded up and down or left and right; and acquire data assigned to the corresponding screen based on whether the folding screen of the current electronic device is folded up and down or left and right.
当确定当前电子设备不具有折叠屏时,数据获取模块还可被配置用于进行以下操作:获取相机捕捉图像和屏幕帧;减小相机捕捉图像与屏幕帧之间的亮度差;确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式。When it is determined that the current electronic device does not have a folding screen, the data acquisition module can also be configured to perform the following operations: acquire camera captured images and screen frames; reduce the brightness difference between the camera captured images and the screen frames; determine the layout style of the camera captured images and screen frames on the screen that reduce the brightness difference.
数据获取模块还可被配置用于进行以下操作:基于预定属性通过决策树模型来确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式。The data acquisition module may be further configured to perform the following operation: determining a layout pattern of the camera-captured image and the screen frame on the screen that reduces the brightness difference through a decision tree model based on predetermined attributes.
所述预定属性可包括当前电子设备是否具有折叠屏、当前电子设备是否处于折叠状态、相机捕捉图像锐度、屏幕帧锐度、所述应用的类型、和用于输出屏幕帧的另一应用的类型中的至少一个。The predetermined attributes may include whether the current electronic device has a folding screen, whether the current electronic device is in a folding state, camera captured image sharpness, screen frame sharpness, the type of the application, and at least one of a type of another application for outputting a screen frame.
根据本发明的另一示例性实施例,提供了一种电子设备,包括存储器和处理器,存储器上存储有相机服务的计算机可执行指令,当所述指令由处理器执行时,执行前述的方法。According to another exemplary embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein computer executable instructions of a camera service are stored in the memory, and when the instructions are executed by the processor, the aforementioned method is executed.
根据本发明的另一示例性实施例,提供了一种计算机可读介质,其上存储有相机服务的计算机可执行指令,当执行所述指令时,执行前述的方法。According to another exemplary embodiment of the present invention, a computer-readable medium is provided, on which computer-executable instructions of a camera service are stored, and when the instructions are executed, the aforementioned method is performed.
根据本发明的示例性实施例,可扩展相机服务的功能,并且使用相机服务的应用都可以进行屏幕共享,通过作为系统进程的相机服务的扩展功能来获取原始高质量的屏幕帧用于屏幕共享,并可同时显示相机捕捉图像和屏幕帧,从而应用无需自身实现屏幕共享功能;此外,还可为屏幕共享提高更佳的布局,并更好地适配折叠屏。According to an exemplary embodiment of the present invention, the functionality of the camera service can be expanded, and applications using the camera service can perform screen sharing. The extended functionality of the camera service as a system process can be used to obtain original high-quality screen frames for screen sharing, and the camera-captured images and screen frames can be displayed simultaneously, so that the application does not need to implement the screen sharing function itself. In addition, a better layout can be provided for screen sharing and better adaptation to folding screens.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
通过下面结合附图进行的详细描述,本发明的上述和其它目的和特点将会变得更加清楚,其中:The above and other objects and features of the present invention will become more apparent from the following detailed description in conjunction with the accompanying drawings, in which:
图1是示出根据本发明示例性实施例的用于屏幕共享的方法的流程图;FIG1 is a flow chart illustrating a method for screen sharing according to an exemplary embodiment of the present invention;
图2是示出根据本发明示例性实施例的提供选项的示意图;FIG2 is a schematic diagram showing providing options according to an exemplary embodiment of the present invention;
图3是示出根据本发明示例性实施例的图1的步骤S120的流程图;FIG3 is a flow chart showing step S120 of FIG1 according to an exemplary embodiment of the present invention;
图4是示出根据本发明示例性实施例的分配相机捕捉图像和屏幕帧的示意图;4 is a schematic diagram illustrating allocation of camera captured images and screen frames according to an exemplary embodiment of the present invention;
图5是示出根据本发明示例性实施例的亮度融合和图像拼接的示意图;FIG5 is a schematic diagram illustrating brightness fusion and image stitching according to an exemplary embodiment of the present invention;
图6是示出根据本发明示例性实施例的用于屏幕共享的相机服务装置的框图。FIG. 6 is a block diagram illustrating a camera service device for screen sharing according to an exemplary embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
现将详细参照本发明的实施例,所述实施例的示例在附图中示出,其中,相同的标号始终指示相同的部件。以下将通过参照附图来说明所述实施例,以便解释本发明。Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments will be described below in order to explain the present invention by referring to the drawings.
图1是示出根据本发明示例性实施例的用于屏幕共享的方法的流程图。FIG. 1 is a flowchart illustrating a method for screen sharing according to an exemplary embodiment of the present invention.
参照图1,在步骤S110,当应用使用相机服务时,相机服务可提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项供用户选择。应注意,这里的相机服务可为系统相机服务。这里,当图像捕捉功能被用户选择时,获取的数据可为相机捕捉图像,其中,相机捕捉图像可以为前置相机捕捉图像、后置相机捕捉图像或其它相机捕捉图像;当屏幕共享功能被用户选择时,获取的数据可为另一应用显示的用于屏幕共享的屏幕帧;当图像捕捉和屏幕共享功能被用户选择时,获取的数据可为相机捕捉图像和所述另一应用显示的屏幕帧。此外,仅作为示例而非限制,当系统为安卓(Android)时,相机服务可从SurfaceFlinger获取屏幕帧,这里,由于相机服务为系统进程,故其可调用Surface Flinger。此外,仅作为示例而非限制,相机服务可通过弹出图标、弹出窗口等来提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项。此外,当用户从所述应用使用相机服务时,即可提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项,或者当用户从所述应用使用相机服务时,可提供一个浮动图标,当用户点击或触摸该浮动图标时,才提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项。图2是示出根据本发明示例性实施例的提供选项的示图。如图2所示,当用户点击浮动图标时,提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项。1, in step S110, when the application uses the camera service, the camera service may provide an image capture function, a screen sharing function, or an image capture and screen sharing function options for the user to select. It should be noted that the camera service here may be a system camera service. Here, when the image capture function is selected by the user, the acquired data may be a camera captured image, wherein the camera captured image may be a front camera captured image, a rear camera captured image, or another camera captured image; when the screen sharing function is selected by the user, the acquired data may be a screen frame for screen sharing displayed by another application; when the image capture and screen sharing functions are selected by the user, the acquired data may be a camera captured image and a screen frame displayed by the other application. In addition, by way of example only and not limitation, when the system is Android, the camera service may obtain a screen frame from SurfaceFlinger, and here, since the camera service is a system process, it may call Surface Flinger. In addition, by way of example only and not limitation, the camera service may provide an image capture function, a screen sharing function, or an image capture and screen sharing function options through a pop-up icon, a pop-up window, etc. In addition, when the user uses the camera service from the application, the image capture function, the screen sharing function, or the image capture and screen sharing function options can be provided, or when the user uses the camera service from the application, a floating icon can be provided, and when the user clicks or touches the floating icon, the image capture function, the screen sharing function, or the image capture and screen sharing function options are provided. FIG. 2 is a diagram showing the provision of options according to an exemplary embodiment of the present invention. As shown in FIG. 2, when the user clicks the floating icon, the image capture function, the screen sharing function, or the image capture and screen sharing function options are provided.
在步骤S120,相机服务可基于用户选择的功能来获取数据,并将获取的数据提供给所述应用。下面将参照图3对步骤S120进行更详细的描述。In step S120, the camera service may acquire data based on the function selected by the user and provide the acquired data to the application. Step S120 will be described in more detail below with reference to FIG.
图3是示出根据本发明示例性实施例的图1的步骤S120的流程图。FIG. 3 is a flowchart illustrating step S120 of FIG. 1 according to an exemplary embodiment of the present invention.
参照图3,在步骤S310,当图像捕捉功能被用户选择时,相机服务可获取相机捕捉图像。3 , in step S310 , when an image capturing function is selected by a user, the camera service may acquire a camera captured image.
在步骤S320,当屏幕共享功能被用户选择时,相机服务可获取另一应用显示的屏幕帧。In step S320 , when the screen sharing function is selected by the user, the camera service may acquire a screen frame displayed by another application.
在步骤S330,当图像捕捉和屏幕共享功能被用户选择时,相机服务可确定当前电子设备是否具有折叠屏,并基于当前电子设备是否具有折叠屏来获取分配给相应屏幕的数据。In step S330, when the image capture and screen sharing functions are selected by the user, the camera service may determine whether the current electronic device has a foldable screen, and acquire data allocated to the corresponding screen based on whether the current electronic device has a foldable screen.
当确定当前电子设备具有折叠屏时,在步骤S340,相机服务可确定当前电子设备的折叠屏是上下折叠还是左右折叠,并基于当前电子设备的折叠屏是上下折叠还是左右折叠来获取分配给相应屏幕的数据,诸如,获取相机捕捉图像和屏幕帧,并将相机捕捉图像和屏幕帧分别分配给上屏和下屏,或将相机捕捉图像和屏幕帧分别分配给左屏和右屏。更具体地,可根据用户的使用习惯来将相机捕捉图像和屏幕帧分别分配给上屏和下屏或左屏和右屏,诸如,当用户的惯用手为右手时,可将相机捕捉图像分配给左屏并将屏幕帧分配给右屏。这里,应注意上述分配相机捕捉图像和屏幕帧的方式仅为示例而非限制,本领域技术人员可根据实际情况来将相机捕捉图像和屏幕帧分配给折叠屏。图4是示出根据本发明示例性实施例的分配相机捕捉图像和屏幕帧的示图。如图4所示,当用户选择共享作为另一应用的PowerPoint(PPT)应用时,可根据折叠屏来显示相机捕捉图像和屏幕帧(由PPT应用显示)。When it is determined that the current electronic device has a folding screen, in step S340, the camera service may determine whether the folding screen of the current electronic device is folded up and down or folded left and right, and obtain the data assigned to the corresponding screen based on whether the folding screen of the current electronic device is folded up and down or folded left and right, such as obtaining the camera capture image and screen frame, and assigning the camera capture image and screen frame to the upper screen and the lower screen respectively, or assigning the camera capture image and screen frame to the left screen and the right screen respectively. More specifically, the camera capture image and screen frame may be assigned to the upper screen and the lower screen or the left screen and the right screen respectively according to the user's usage habits, such as when the user's dominant hand is the right hand, the camera capture image may be assigned to the left screen and the screen frame may be assigned to the right screen. Here, it should be noted that the above-mentioned method of assigning camera capture images and screen frames is only an example and not a limitation, and those skilled in the art may assign camera capture images and screen frames to the folding screen according to actual conditions. FIG. 4 is a diagram showing the assignment of camera capture images and screen frames according to an exemplary embodiment of the present invention. As shown in FIG. 4, when the user chooses to share a PowerPoint (PPT) application as another application, the camera capture image and screen frame (displayed by the PPT application) may be displayed according to the folding screen.
此外,当确定当前电子设备不具有折叠屏时,在步骤S350,相机服务可获取相机捕捉图像和屏幕帧,减小相机捕捉图像与屏幕帧之间的亮度差(诸如,使两者的明亮度趋于一致)。这里,仅作为示例而非限制,可通过进行亮度融合来减小相机捕捉图像与屏幕帧之间的亮度差。在步骤S360,相机服务可确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式,以用于图像拼接。更具体地,确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式的步骤可包括:基于预定属性通过决策树模型来确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式,其中,仅作为示例而非限制,所述预定属性可包括当前电子设备是否具有折叠屏、当前电子设备是否处于折叠状态、相机捕捉图像锐度、屏幕帧锐度、所述应用的类型、和所述另一应用的类型中的至少一个。这里,仅作为示例而非限制,当前电子设备是否具有折叠屏可包括具有(值可为1,下同)和不具有(0);当前电子设备是否处于折叠状态可包括非折叠设备(null,可取值0)、折叠状态(1)和非折叠状态(0);相机捕捉图像锐度可包括高(0)、中(1)和低(2);屏幕帧锐度可包括高(0)、中(1)和低(2);所述应用的类型可包括商务(0)、娱乐(1)和一般(2);所述另一应用的类型可包括商务(0)、娱乐(1)和一般(2)。此外,决策树模型可通过采用现有应用已完成屏幕共享的数据或者主流网站上的拼接图像的数据来进行训练,诸如,在线教学应用已完成屏幕共享的数据可以为x={是否具有折叠屏,是否处于折叠状态,相机捕捉图像锐度,屏幕帧锐度,应用的类型,另一应用的类型}={0,0,1,0,0,0},对应的布局样式为y=类型2(诸如,整个屏幕上显示屏幕帧,并在右上角覆盖显示相机捕捉图像),从而可获得一条训练数据{x,y}={0,0,1,0,0,0,2},获得多个这样的训练数据以对决策树模型进行训练。训练完成之后,即可使用数据x通过决策树模型来获取布局样式的类型y。图5是示出根据本发明示例性实施例的亮度融合和图像拼接的示意图。如图5所示,用户期望录制一段制作美食的同时有食谱的短视频,可对作为相机捕捉图像的美食视频和作为屏幕帧的食谱文本进行如上所述的亮度融合和图像拼接。In addition, when it is determined that the current electronic device does not have a folding screen, in step S350, the camera service may obtain the camera captured image and the screen frame, and reduce the brightness difference between the camera captured image and the screen frame (such as, making the brightness of the two tend to be consistent). Here, by way of example only and not limitation, the brightness difference between the camera captured image and the screen frame may be reduced by performing brightness fusion. In step S360, the camera service may determine the layout style of the camera captured image and the screen frame on the screen that reduces the brightness difference for image stitching. More specifically, the step of determining the layout style of the camera captured image and the screen frame on the screen that reduces the brightness difference may include: determining the layout style of the camera captured image and the screen frame on the screen that reduces the brightness difference based on a predetermined attribute through a decision tree model, wherein, by way of example only and not limitation, the predetermined attribute may include whether the current electronic device has a folding screen, whether the current electronic device is in a folded state, the camera captured image sharpness, the screen frame sharpness, the type of the application, and at least one of the type of the other application. Here, for example only and not limitation, whether the current electronic device has a foldable screen may include having (the value may be 1, the same below) and not having (0); whether the current electronic device is in a folded state may include a non-foldable device (null, the value may be 0), a folded state (1) and a non-folded state (0); the camera capture image sharpness may include high (0), medium (1) and low (2); the screen frame sharpness may include high (0), medium (1) and low (2); the type of the application may include business (0), entertainment (1) and general (2); the type of the other application may include business (0), entertainment (1) and general (2). In addition, the decision tree model can be trained by using the data of screen sharing completed by existing applications or the data of spliced images on mainstream websites. For example, the data of screen sharing completed by online teaching applications can be x={whether it has a folding screen, whether it is in a folded state, camera captured image sharpness, screen frame sharpness, application type, type of another application}={0, 0, 1, 0, 0, 0}, and the corresponding layout style is y=type 2 (such as, the screen frame is displayed on the entire screen, and the camera captured image is covered in the upper right corner), so that a training data {x, y}={0, 0, 1, 0, 0, 0, 2} can be obtained, and multiple such training data can be obtained to train the decision tree model. After the training is completed, the data x can be used to obtain the type y of the layout style through the decision tree model. Figure 5 is a schematic diagram showing brightness fusion and image splicing according to an exemplary embodiment of the present invention. As shown in Figure 5, the user expects to record a short video of making food with a recipe at the same time, and the food video as the camera captured image and the recipe text as the screen frame can be subjected to brightness fusion and image splicing as described above.
此外,在步骤S310、S320、S340、S360之后,在步骤S370,相机服务可将获取的数据提供给所述应用。更具体地,在步骤S310之后,相机服务可将相机捕捉图像提供给所述应用;在步骤S320之后,相机服务可将屏幕帧提供给所述应用;在步骤S340之后,相机服务可将分配给折叠屏的相机捕捉图像和屏幕帧提供给所述应用;在步骤S360之后,相机服务可将确定了布局样式的相机捕捉图像和屏幕帧提供给所述应用。In addition, after steps S310, S320, S340, and S360, in step S370, the camera service may provide the acquired data to the application. More specifically, after step S310, the camera service may provide the camera captured image to the application; after step S320, the camera service may provide the screen frame to the application; after step S340, the camera service may provide the camera captured image and the screen frame assigned to the folding screen to the application; after step S360, the camera service may provide the camera captured image and the screen frame with the determined layout style to the application.
图6是示出根据本发明示例性实施例的用于屏幕共享的相机服务装置的框图。FIG. 6 is a block diagram illustrating a camera service device for screen sharing according to an exemplary embodiment of the present invention.
参照图6,根据本发明示例性实施例的用于屏幕共享的相机服务装置600可包括选项提供模块610和数据获取模块620。6 , a camera service device 600 for screen sharing according to an exemplary embodiment of the present invention may include an option providing module 610 and a data acquiring module 620 .
选项提供模块610可被配置用于当应用使用相机服务时,提供图像捕捉功能、屏幕共享功能、或图像捕捉和屏幕共享功能的选项供用户选择。The option providing module 610 may be configured to provide options of an image capturing function, a screen sharing function, or both an image capturing function and a screen sharing function for user selection when an application uses a camera service.
数据获取模块620可被配置用于基于用户选择的功能来获取数据,并将获取的数据提供给所述应用。这里,当图像捕捉功能被用户选择时,获取的数据可为相机捕捉图像;当屏幕共享功能被用户选择时,获取的数据可为另一应用显示的用于屏幕共享的屏幕帧;当图像捕捉和屏幕共享功能被用户选择时,获取的数据可为相机捕捉图像和所述另一应用显示的屏幕帧。The data acquisition module 620 may be configured to acquire data based on the function selected by the user and provide the acquired data to the application. Here, when the image capture function is selected by the user, the acquired data may be a camera captured image; when the screen sharing function is selected by the user, the acquired data may be a screen frame for screen sharing displayed by another application; when the image capture and screen sharing functions are selected by the user, the acquired data may be a camera captured image and a screen frame displayed by the other application.
当图像捕捉和屏幕共享功能被用户选择时,数据获取模块620还可被配置用于进行以下操作:确定当前电子设备是否具有折叠屏;基于当前电子设备是否具有折叠屏来获取分配给相应屏幕的数据。When the image capture and screen sharing functions are selected by the user, the data acquisition module 620 may also be configured to perform the following operations: determine whether the current electronic device has a foldable screen; and acquire data assigned to the corresponding screen based on whether the current electronic device has a foldable screen.
当确定当前电子设备具有折叠屏时,数据获取模块620还可被配置用于进行以下操作:确定当前电子设备的折叠屏是上下折叠还是左右折叠;基于当前电子设备的折叠屏是上下折叠还是左右折叠来获取分配给相应屏幕的数据。当确定当前电子设备不具有折叠屏时,数据获取模块620还可被配置用于进行以下操作:获取相机捕捉图像和屏幕帧;减小相机捕捉图像与屏幕帧之间的亮度差;确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式。When it is determined that the current electronic device has a folding screen, the data acquisition module 620 may also be configured to perform the following operations: determine whether the folding screen of the current electronic device is folded up and down or folded left and right; and acquire data assigned to the corresponding screen based on whether the folding screen of the current electronic device is folded up and down or folded left and right. When it is determined that the current electronic device does not have a folding screen, the data acquisition module 620 may also be configured to perform the following operations: acquire camera-captured images and screen frames; reduce the brightness difference between the camera-captured images and the screen frames; and determine the layout style of the camera-captured images and screen frames on the screen with reduced brightness difference.
数据获取模块620还可被配置用于进行以下操作:基于预定属性通过决策树模型来确定减小亮度差的相机捕捉图像和屏幕帧在屏幕上的布局样式,其中,仅作为示例而非限制,所述预定属性包括当前电子设备是否具有折叠屏、当前电子设备是否处于折叠状态、相机捕捉图像锐度、屏幕帧锐度、所述应用的类型、和所述另一应用的类型中的至少一个。The data acquisition module 620 can also be configured to perform the following operations: determine the layout style of the camera captured image and the screen frame on the screen that reduces the brightness difference through a decision tree model based on predetermined attributes, wherein, as an example only and not a limitation, the predetermined attributes include whether the current electronic device has a folding screen, whether the current electronic device is in a folded state, the sharpness of the camera captured image, the sharpness of the screen frame, the type of the application, and at least one of the type of the other application.
此外,用于屏幕共享的相机服务装置600还可包括:屏幕管理模块630,可被配置用于从Surface Flinger获取屏幕帧。In addition, the camera service device 600 for screen sharing may further include: a screen management module 630 , which may be configured to obtain a screen frame from Surface Flinger.
应了解,图6中的根据本发明示例性实施例的用于屏幕共享的相机服务装置600可对应于前面所述的相机服务。It should be understood that the camera service device 600 for screen sharing according to an exemplary embodiment of the present invention in FIG. 6 may correspond to the camera service described above.
另一方面,根据本发明的示例性实施例,还可提供一种电子设备,包括存储器和处理器,存储器上存储有相机服务的计算机可执行指令,当所述指令由处理器执行时,执行前述的方法。根据本发明的示例性实施例,还可提供一种计算机可读介质,其上存储有相机服务的计算机可执行指令,当执行所述指令时,执行前述的方法。On the other hand, according to an exemplary embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, wherein the memory stores computer executable instructions for camera services, and when the instructions are executed by the processor, the aforementioned method is executed. According to an exemplary embodiment of the present invention, there is also provided a computer readable medium, wherein computer executable instructions for camera services are stored, and when the instructions are executed, the aforementioned method is executed.
根据本发明的示例性实施例,可扩展相机服务的功能,并且使用相机服务的应用都可以进行屏幕共享,通过作为系统进程的相机服务的扩展功能来获取原始高质量的屏幕帧用于屏幕共享,并可同时显示相机捕捉图像和屏幕帧,从而应用无需自身实现屏幕共享功能;此外,还可为屏幕共享提高更佳的布局,并更好地适配折叠屏。According to an exemplary embodiment of the present invention, the functionality of the camera service can be expanded, and applications using the camera service can perform screen sharing. The extended functionality of the camera service as a system process can be used to obtain original high-quality screen frames for screen sharing, and the camera-captured images and screen frames can be displayed simultaneously, so that the application does not need to implement the screen sharing function itself. In addition, a better layout can be provided for screen sharing and better adaptation to folding screens.
虽然已经参照特定示例性实施例示出和描述了本发明,但是本领域的技术人员将理解,在不脱离范围由权利要求及其等同物限定的本发明的精神和范围的情况下可作出形式和细节上的各种改变。While the invention has been shown and described with reference to the particular exemplary embodiments, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the invention as defined by the claims and their equivalents.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210374873.3A CN114827343B (en) | 2022-04-11 | 2022-04-11 | Method and device for screen sharing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210374873.3A CN114827343B (en) | 2022-04-11 | 2022-04-11 | Method and device for screen sharing |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114827343A CN114827343A (en) | 2022-07-29 |
| CN114827343B true CN114827343B (en) | 2024-08-23 |
Family
ID=82534049
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210374873.3A Active CN114827343B (en) | 2022-04-11 | 2022-04-11 | Method and device for screen sharing |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114827343B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112114733A (en) * | 2020-09-23 | 2020-12-22 | 青岛海信移动通信技术股份有限公司 | Screen capturing and recording method, mobile terminal and computer storage medium |
| CN112291630A (en) * | 2020-10-28 | 2021-01-29 | 维沃移动通信(杭州)有限公司 | Electronic equipment screen sharing method and device |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100713511B1 (en) * | 2005-10-07 | 2007-04-30 | 삼성전자주식회사 | Method of performing video call service in mobile communication terminal |
| KR101598632B1 (en) * | 2009-10-01 | 2016-02-29 | 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 | Mobile terminal and its tag editing method |
| CN107766023A (en) * | 2017-10-19 | 2018-03-06 | 广东欧珀移动通信有限公司 | Information display method, device, terminal and storage medium |
| CN113141483B (en) * | 2020-01-17 | 2022-09-09 | 华为技术有限公司 | Screen sharing method based on video call and mobile device |
-
2022
- 2022-04-11 CN CN202210374873.3A patent/CN114827343B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112114733A (en) * | 2020-09-23 | 2020-12-22 | 青岛海信移动通信技术股份有限公司 | Screen capturing and recording method, mobile terminal and computer storage medium |
| CN112291630A (en) * | 2020-10-28 | 2021-01-29 | 维沃移动通信(杭州)有限公司 | Electronic equipment screen sharing method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114827343A (en) | 2022-07-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110266971A (en) | A short video production method and system | |
| CN112637675B (en) | Video generation method, device, electronic device and storage medium | |
| WO2019192351A1 (en) | Short video capture method, device and electronic terminal | |
| WO2020024580A1 (en) | Graphic drawing method and apparatus, device, and storage medium | |
| CN110070496B (en) | Method and device for generating image special effect and hardware device | |
| WO2017157155A1 (en) | Method and device for capturing video during playback | |
| CN108939556A (en) | A kind of screenshot method and device based on gaming platform | |
| US20160196008A1 (en) | Implementing desktops on a mobile terminal | |
| CN108717701B (en) | Method, device, electronic equipment and medium for manufacturing special effect of movie ghost | |
| CN113495708A (en) | Output device, output system, format information changing method, recording medium, and controller | |
| WO2020108010A1 (en) | Video processing method and apparatus, electronic device and storage medium | |
| CN113778360A (en) | Screen projection method and electronic equipment | |
| CN111294651A (en) | Still picture anti-afterimage method and device based on play data stream and storage medium | |
| CN117785002A (en) | Method, apparatus, device and storage medium for image generation | |
| CN108495041B (en) | Image processing and displaying method and device for electronic terminal | |
| CN110390919A (en) | Display device and color processing method and device | |
| CN111813466A (en) | Watermark adding method, device, terminal equipment and computer storage medium | |
| WO2018130069A1 (en) | Method and apparatus for generating bearing page for image collection content, computing device, and storage medium | |
| CN114827343B (en) | Method and device for screen sharing | |
| CN111147659A (en) | Display control method and device, electronic equipment and storage medium | |
| WO2023151214A1 (en) | Image generation method and system, electronic device, storage medium, and product | |
| CN106911937A (en) | The collocation method and system of a kind of live middle present banner background colour | |
| CN107817999A (en) | The generation method and terminal of a kind of dynamic wallpaper | |
| CN107204024A (en) | Handle the method and device of sequence of pictures frame | |
| CN109587561A (en) | Method for processing video frequency, device, electronic equipment and 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 |