Image processing method and apparatus, and electronic device
The image processing method dynamically adjusts screen acquisition parameters based on display content and computing resources to enhance flexibility and accuracy in screen sharing, addressing the limitations of fixed presets.
Patent Information
- Application Number
- US19/131029
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Priority Date
- 2023-04-23
- Filing Date
- 2024-04-08
- Publication Date
- 2026-11-26
AI Technical Summary
Existing image processing methods in electronic devices lack flexibility and accuracy in screen sharing due to the use of fixed preset screen acquisition parameters, resulting in suboptimal display effects.
An image processing method that dynamically determines a target screen acquisition parameter based on multiple preset parameters, considering the type of display content and idle computing resources, to enhance flexibility and accuracy in screen sharing.
Improves the flexibility and accuracy of screen sharing by adapting to various scenarios, ensuring optimal display quality through dynamic parameter adjustment.
Smart Images

Figure US20260377126A1-D00000_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATION(S)
[0001] The present application is based on and claims priority to Chinese Patent Application No. 202310441472.X, filed on Apr. 23, 2023, the disclosure of which is incorporated herein by reference in its entirety.TECHNICAL FIELD
[0002] Embodiments of the present disclosure relate to the technical field of image processing, and in particular, to an image processing method and apparatus, and an electronic device.BACKGROUND
[0003] In an online meeting scenario, screen sharing is often involved, that is, an electronic device can share content currently displayed on a screen of the electronic device or a specific file with other electronic devices.
[0004] At present, the electronic device can acquire data associated with an image displayed on the screen based on a preset screen acquisition parameter to obtain a sharable image, and send the sharable image to other electronic devices. For example, the electronic device can determine the number of pixels of the sharable image based on a preset resolution, and determine the frequency of the sharable image displayed per second based on a preset frame rate.SUMMARY
[0005] The present disclosure provides an image processing method and apparatus, and an electronic device.
[0006] In a first aspect, the present disclosure provides an image processing method, the method includes:
[0007] determining a first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device;
[0008] obtaining a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device;
[0009] determining a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of the idle computing resources; and
[0010] processing the display content based on the target screen acquisition parameter to obtain a target image.
[0011] In a second aspect, the present disclosure provides an image processing apparatus, the image processing apparatus includes a first determination module, an obtainment module, a second determination module, and a processing module, where:
[0012] the first determination module is configured to determine a first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device;
[0013] the obtainment module is configured to obtain a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device;
[0014] the second determination module is configured to determine a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of the idle computing resources; and
[0015] the processing module is configured to process the display content based on the target screen acquisition parameter to obtain a target image.
[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0017] the memory stores computer-executable instructions; and
[0018] the processor executes the computer-executable instructions stored in the memory to enable the at least one processor to execute the image processing method according to the above first aspect and various possible implementations of the first aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the image processing method according to the above first aspect and various possible implementations of the first aspect is implemented.BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to illustrate the technical solutions in the embodiments of the present disclosure or in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure, and for those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative effort.
[0021] FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0022] FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure;
[0023] FIG. 3 is a schematic diagram of determining a first screen acquisition parameter provided by an embodiment of the present disclosure;
[0024] FIG. 4 is a schematic diagram of a process of determining a second screen acquisition parameter provided by an embodiment of the present disclosure;
[0025] FIG. 5 is a schematic diagram of a process of determining a target image provided by an embodiment of the present disclosure;
[0026] FIG. 6 is a schematic diagram of a method for determining a target screen acquisition parameter provided by an embodiment of the present disclosure;
[0027] FIG. 7 is a schematic diagram of a process of determining a target screen acquisition parameter provided by an embodiment of the present disclosure;
[0028] FIG. 8 is a schematic diagram of a process of an image processing method provided by an embodiment of the present disclosure;
[0029] FIG. 9 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present disclosure; and
[0030] FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.DETAILED DESCRIPTION OF EMBODIMENTS
[0031] Exemplary embodiments will be described in detail here, and examples thereof are shown in the drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure. On the contrary, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0032] For ease of understanding, concepts involved in the embodiments of the present disclosure will be described below.
[0033] Electronic device: It is a device with a wireless transceiving function. The electronic device can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. The electronic device may be a mobile phone, a Pad, a computer with a wireless transceiving function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, a vehicle-mounted electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical, a wireless electronic device in smart grid, a wireless electronic device in transportation safety, a wireless electronic device in smart city, a wireless electronic device in smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure may also be referred to as a terminal, a user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile terminal, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE proxy or a UE apparatus, etc. The electronic device may also be fixed or mobile.
[0034] The application scenario of the embodiments of the present disclosure will be described below with reference to FIG. 1.
[0035] FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Referring to FIG. 1, an electronic device 1 and an electronic device 2 are included. The electronic device 1 is in communication connection with the electronic device 2, the electronic device 1 may be a device that shares a screen, and content displayed on the screen of the electronic device 1 is an image A. When the electronic device 1 performs screen sharing with the electronic device 2, the electronic device 1 can process the image A based on a screen acquisition parameter to obtain an image a corresponding to the image A, and send the image a to the electronic device 2, where objects included in the image A are the same as objects included in the image a. After receiving the image a, the electronic device 2 can display the image a on the screen, thereby achieving the effect of the electronic device 1 sharing the screen with the electronic device 2.
[0036] It should be noted that FIG. 1 is only an exemplary illustration of the application scenario of the embodiments of the present disclosure, and is not a limitation on the application scenario of the embodiments of the present disclosure.
[0037] In the related art, the electronic device can process the display content on the screen based on a preset screen acquisition parameter to obtain a sharable image. For example, if the preset screen acquisition parameter includes a resolution of 1024×768 and a frame rate of 30 frames, the electronic device can acquire image data based on the resolution of 1024×768 to obtain a sharable image, and determine the display frequency of the sharable image based on the frame rate of 30 frames. However, in the above method, the preset screen acquisition parameter is fixed, and the resolution and frame rate of the sharable image are the same in any scenario, which results in low flexibility of the electronic device to obtain the image and poor display effect of the sharable image.
[0038] In order to solve the technical problems in the related art, an embodiment of the present disclosure provides an image processing method, in which a first screen acquisition parameter is determined from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device, a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device are obtained, a target screen acquisition parameter of the electronic device is determined based on the first screen acquisition parameter, the type of the display content, and the amount of the idle computing resources, the display content is processed based on the target screen acquisition parameter to obtain a target image, and the target image is sent to an electronic device to which a screen is to be shared or an electronic device to which a screen is to be projected, which is connected to the electronic device. In the above method, since the target screen acquisition parameter is determined based on the first screen acquisition parameter, the display content of the electronic device, and the amount of the idle computing resources, the target screen acquisition parameter can meet the requirements of a plurality of scenarios and improve the accuracy of the target screen acquisition parameter, and since the type of the display content and the amount of the idle computing resources are dynamically changed, the flexibility of the target screen acquisition parameter can be improved, thereby improving the flexibility of obtaining the target image and improving the effect of screen sharing.
[0039] The technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present disclosure will be described below with reference to the drawings.
[0040] FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present disclosure. Referring to FIG. 2, the method may include the steps described below.
[0041] In S201, a first screen acquisition parameter is determined from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device.
[0042] An execution entity of the embodiment of the present disclosure may be an electronic device, or an image processing apparatus provided in the electronic device. The image processing apparatus may be implemented based on software, and the image processing apparatus may also be implemented based on a combination of software and hardware, which is not limited in the embodiment of the present disclosure.
[0043] The screen acquisition parameter may include, but is not limited to, a resolution and a frame rate. The resolution may indicate the number of pixels in the image, and the frame rate may indicate the display frequency of the image on the screen of the electronic device within a unit duration. For example, the resolution of the screen acquisition parameter may be 800×600, 1024×768, etc., and the frame rate of the screen acquisition parameter may be 30 frames, 60 frames, etc., which is not limited in the embodiment of the present disclosure.
[0044] For example, if the resolution of the screen acquisition parameter is 800×600, the number of pixels in the image acquired by the electronic device based on the resolution is 800×600; if the resolution of the screen acquisition parameter is 1024×768, the number of pixels in the image acquired by the electronic device based on the resolution is 1024×768. For example, if the frame rate of the screen acquisition parameter is 30 frames, the image acquired by the electronic device can be displayed 30 times per second on the screen of the electronic device.
[0045] Optionally, the first screen acquisition parameter may be a static screen acquisition parameter, and the first screen acquisition parameter may include a first resolution and a first frame rate. For example, the electronic device may determine the first screen acquisition parameter based on various types of information (such as a scene type, a scene mode, a network type, a screen parameter of the electronic device, etc.). Since the change frequency of the various types of information for determining the first screen acquisition parameter is relatively low, the first screen acquisition parameter may be a static parameter.
[0046] Optionally, the preset screen acquisition parameter may be a screen acquisition parameter associated with information such as a scene type, a scene mode, a network type, and a screen parameter of the electronic device, and the screen acquisition parameter may be a preset parameter, which is not limited in the embodiment of the present disclosure.
[0047] Specifically, the electronic device may determine the first screen acquisition parameter based on the following feasible implementation: obtaining a processing scene of the electronic device, obtaining a processing mode corresponding to the processing scene, obtaining a network type corresponding to the processing scene, and determining the first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type.
[0048] The processing scene includes a screen projection scene and / or a sharing scene. For example, the processing scene of the electronic device may be a screen projection scene or a sharing scene. In the screen projection scene, the electronic device may project the content displayed on the screen to a projection area (such as a wall, a projection screen, etc.). In the sharing scene, the electronic device may share the content displayed on the screen to a screen of another electronic device.
[0049] The processing mode may include a definition mode and / or a smoothness mode. For example, in a practical application process, if the processing mode of the electronic device is the definition mode, the resolution of the first screen acquisition parameter is relatively high, and if the processing mode of the electronic device is the smoothness mode, the frame rate of the first screen acquisition parameter is relatively high. For example, in the screen projection scene, if the processing mode is the definition mode, it indicates that the resolution of the projected image is relatively high, and if the processing mode is the smoothness mode, it indicates that the frame rate of the projected image is relatively high.
[0050] The network type may include a public network type or a P2P content delivery network (PCDN) type, which is not limited in the embodiment of the present disclosure.
[0051] Optionally, there are the following two feasible implementations for the electronic device to determine the first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type:
[0052] One feasible implementation:
[0053] The electronic device may determine the first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type.
[0054] The process of determining the first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of the electronic device in this implementation will be described below with reference to FIG. 3.
[0055] FIG. 3 is a schematic diagram of determining the first screen acquisition parameter provided by an embodiment of the present disclosure. Referring to FIG. 3, a processing scene is included. The processing scene may include a screen sharing scene and a screen projection scene. In the screen sharing scene, a network type of the screen sharing is a public network type, if the processing mode in this scene is the definition mode, the first screen acquisition parameter may include a resolution A and a frame rate a, and if the processing mode in this scene is the smoothness mode, the first screen acquisition parameter includes a resolution B and a frame rate b.
[0056] Referring to FIG. 3, in the screen projection scene, a network type of the screen projection may include a public network type and a P2P network type. In the screen projection scene of the public network type, if the processing mode is the definition mode, the first screen acquisition parameter may include a resolution C and a frame rate c, and if the processing mode is the smoothness mode, the first screen acquisition parameter may include a resolution D and a frame rate d.
[0057] Referring to FIG. 3, in the screen projection scene of the P2P network type, if the processing mode is the definition mode, the first screen acquisition parameter may include a resolution E and a frame rate e, and if the processing mode is the smoothness mode, the first screen acquisition parameter may include a resolution F and a frame rate f. In this way, the first screen acquisition parameter is determined based on the processing scene, the processing mode, and the network type of the electronic device, and therefore, the accuracy of the first screen acquisition parameter is relatively high.
[0058] It should be noted that parameters such as the resolution A, the frame rate a, the resolution B, the frame rate b, the resolution C, and the frame rate c in the embodiment shown in FIG. 3 may be a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of the electronic device, and the preset screen acquisition parameters are associated with the processing scene, the processing mode, and the network type. Therefore, the electronic device may determine the first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters (for example, it may be one resolution or one frame rate, or may be a group of resolutions and frame rates) based on the processing scene, the processing mode, and the network type.
[0059] It should be noted that the different resolutions and frame rates in the embodiment shown in FIG. 3 may be preset parameters, and the electronic device may preset the related resolution and frame rate for each processing scene, processing mode, and network type based on parameters such as a model of the electronic device, a model of a central processing unit (CPU), a model of a graphics processing unit (GPU), a type of a system, and a version of the system. The electronic device may also determine the resolution and frame rate related to each processing scene, processing mode, and network type based on any other feasible implementation, which is not limited in the embodiment of the present disclosure.
[0060] In this way, the electronic device can determine the first screen acquisition parameter in light of different processing scenes, processing modes, and network types, thereby improving the accuracy of the first screen acquisition parameter.
[0061] Another feasible implementation:
[0062] Optionally, the electronic device may obtain a screen parameter of the electronic device and a screen parameter of another electronic device corresponding to the processing scene received from a server, determine a to-be-processed screen acquisition parameter based on the processing scene, the processing mode, and the network type, and determine the first screen acquisition parameter based on the screen parameter of the electronic device, the screen parameter of the other electronic device corresponding to the processing scene, and the to-be-processed screen acquisition parameter.
[0063] The screen parameter of the electronic device may include a resolution of the screen of the electronic device. For example, if the resolution of the screen of the electronic device is 1024×768, the screen parameter of the electronic device may include a resolution of 1024×768. The electronic device may obtain the screen parameter in system information, or may obtain the screen parameter based on any other feasible implementation, which is not limited in the embodiment of the present disclosure.
[0064] Optionally, the screen parameter of the other electronic device corresponding to the processing scene received from the server may include a resolution and / or a frame rate of the screen. For example, in the screen sharing scene, the electronic device sharing the screen may share the content displayed on the screen with another electronic device, the other electronic device may send the screen resolution and frame rate of the other electronic device to the server, and the electronic device sharing the screen may receive the screen resolution and frame rate of the other electronic device from the server (that is, the screen parameter fed back by the downlink).
[0065] It should be noted that in this implementation, for the method for obtaining the to-be-processed screen acquisition parameter by the electronic device, reference may be made to the embodiment shown in FIG. 3, which is not limited in the embodiment of the present disclosure.
[0066] Optionally, after determining the to-be-processed screen acquisition parameter, the electronic device may determine the first screen acquisition parameter based on the screen parameter of the electronic device, the screen parameter of the other electronic device corresponding to the processing scene, and the to-be-processed screen acquisition parameter. For example, if the to-be-processed screen acquisition parameter includes a resolution A and a frame rate a, the screen parameter of the electronic device is a resolution B, and the screen parameter received from the server is a resolution C and a frame rate c, the electronic device may determine a minimum resolution among the resolution A, the resolution B, and the resolution C, and obtain a frame rate corresponding to the minimum resolution, thereby obtaining the first screen acquisition parameter. For example, if the resolution in the screen parameter received from the server is the minimum, the first screen acquisition parameter determined by the electronic device may include the resolution and the frame rate in the screen parameter received from the server.
[0067] It should be noted that if there is no frame rate corresponding to the minimum resolution, the electronic device may determine the frame rate corresponding to the minimum resolution based on a mapping relationship between the resolution and the frame rate, thereby obtaining the first screen acquisition parameter.
[0068] In this feasible implementation, the electronic device may further obtain the first screen acquisition parameter with a higher matching degree with a plurality of screens based on the screen parameter of the electronic device and the screen parameter of the other electronic device, thereby improving the accuracy of the first screen acquisition parameter.
[0069] In S202, a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device are obtained.
[0070] The display content may be dynamic display content and static display content. For example, the type of the display content may include a static type and a dynamic type, if the display content is an image, a document, etc., the display content is static display content, and the type of the display content may be the static type, and if the display content is a video, the display content is dynamic display content, and the type of the display content may be the dynamic type.
[0071] It should be noted that the type of the display content is related to the display content on the screen of the electronic device, and is less related to the operation of the user on the screen of the electronic device. For example, the display content on the screen of the electronic device is an image, and the type of the display content may be a static type. When the user slides down the screen, although the image on the screen moves, the type of the display content may also be the static type.
[0072] Optionally, the electronic device may obtain the display content on the screen to obtain the type of the display content. For example, the electronic device may obtain the display content through a content detection module (used to detect the content displayed on the screen) and determine the type of the display content. The electronic device may also determine the type of the display content according to any other feasible implementation, which is not limited in the embodiment of the present disclosure.
[0073] The amount of idle computing resources of the electronic device may include, but is not limited to, idle CPU resources and idle GPU resources of the electronic device. For example, the electronic device may determine the amount of idle computing resources of the electronic device based on device information such as CPU usage and GPU usage, and the electronic device may also determine the amount of idle computing resources of the electronic device based on any feasible implementation, which is not limited in the embodiment of the present disclosure.
[0074] It should be noted that the electronic device may obtain the type of the display content when the display content changes. For example, when an image or a video starts to be displayed on the screen of the electronic device, the electronic device may obtain the type of the display content. For example, the content displayed on the screen of the electronic device is an image, and if the displayed content changes to a video, the electronic device may obtain the type of the display content. The electronic device may also obtain the type of the display content under any other feasible conditions, which is not limited in the embodiment of the present disclosure.
[0075] It should be noted that the electronic device may obtain the amount of idle computing resources of the electronic device when the performance of the device changes. For example, when the performance of the electronic device is degraded (for example, another program is launched, etc.), the electronic device may obtain the amount of idle computing resources. For example, after the performance of the electronic device is degraded, if the performance of the electronic device is recovered, the electronic device may obtain the amount of idle computing resources. The electronic device may also obtain the amount of idle computing resources under any other feasible conditions, which is not limited in the embodiment of the present disclosure.
[0076] In S203, a target screen acquisition parameter of the electronic device is determined based on the first screen acquisition parameter, the type of the display content, and the amount of the idle computing resources.
[0077] Specifically, the electronic device may determine the target screen acquisition parameter of the electronic device based on the following feasible implementation: determining a second screen acquisition parameter corresponding to the type of the display content, and determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of the idle computing resources.
[0078] The second screen acquisition parameter may include a second resolution and a second frame rate. For example, different types of display content in the electronic device correspond to different second resolutions and second frame rates obtained by the electronic device. For example, if the type of the display content is a static type, it indicates that when the electronic device is sharing the screen, the definition requirement of the shared content is relatively high and the smoothness requirement is relatively low. Therefore, the second resolution of the second screen acquisition parameter is relatively high, and the second frame rate is relatively low. If the type of the display content is a dynamic type, it indicates that when the electronic device is sharing the screen, the definition requirement of the shared content is relatively low and the smoothness requirement is relatively high. Therefore, the second resolution of the second screen acquisition parameter is relatively low, and the second frame rate is relatively high.
[0079] For example, if the display content is a static image, the second resolution determined by the electronic device is relatively high, and the second frame rate is relatively low. If the display content is a dynamic video, the second resolution determined by the electronic device is relatively low, and the second frame rate is relatively high.
[0080] Optionally, the electronic device may preset the second screen acquisition parameter corresponding to each type of display content, and then determine the second screen acquisition parameter according to the type of the display content. The electronic device may also determine the second screen acquisition parameter based on any other feasible implementation, which is not limited in the embodiment of the present disclosure.
[0081] The process of determining the second screen acquisition parameter will be described below with reference to FIG. 4.
[0082] FIG. 4 is a schematic diagram of a process of determining the second screen acquisition parameter provided by an embodiment of the present disclosure. Referring to FIG. 4, an electronic device is included. The display content on the screen of the electronic device is an image, and the electronic device can determine that the type of the display content is a static type. Therefore, the electronic device can determine the second screen acquisition parameter of the static type, and the second screen acquisition parameter of the static type may include a resolution A and a frame rate a.
[0083] Referring to FIG. 4, if the display content on the screen of the electronic device changes from an image to a video, the electronic device can determine that the type of the display content is a dynamic type. Therefore, the electronic device can determine the second screen acquisition parameter of the dynamic type, and the second screen acquisition parameter of the dynamic type may include a resolution B and a frame rate b. In this way, the electronic device can obtain the second screen acquisition parameter matching with the display content based on the type of the display content, thereby improving the accuracy of the second screen acquisition parameter and improving the display effect of the electronic device.
[0084] Optionally, the electronic device may determine the target screen acquisition parameter based on the first resolution and first frame rate of the first screen acquisition parameter, the second resolution and second frame rate of the second screen acquisition parameter, and the amount of idle computing resources. For example, the electronic device may determine the resolution and the frame rate related to the current processing scene, processing mode, network type, screen parameter, and display content based on the first resolution, the second resolution, the first frame rate, and the second frame rate, and adjust the resolution and the frame rate based on the amount of idle computing resources, thereby obtaining the target screen acquisition parameter and improving the accuracy and flexibility of the target screen acquisition parameter.
[0085] In S204, the display content is processed based on the target screen acquisition parameter to obtain a target image.
[0086] The electronic device can process the display content based on the resolution and the frame rate in the target screen acquisition parameter to obtain the target image. For example, the electronic device can perform pixel acquisition processing on data associated with the display content (image or video) based on the resolution of the target screen acquisition parameter, and the electronic device can determine an acquisition frequency of the data associated with the display content based on the frame rate of the target screen acquisition parameter, thereby obtaining the target image. For example, if the resolution of the target screen acquisition parameter is 800×600 and the frame rate is 120 frames, the electronic device can acquire 120 target images per second as an image sequence, and the resolution of each target image is 800×600.
[0087] The process of determining the target image will be described below with reference to FIG. 5.
[0088] FIG. 5 is a schematic diagram of a process of determining the target image provided by an embodiment of the present disclosure. Referring to FIG. 5, an electronic device is included. The screen of the electronic device includes an image A, and the resolution of the image A is 1024×768, which may also be the screen resolution of the electronic device. If the resolution of the target screen parameter is 800×600 and the frame rate is 30 frames, the electronic device can acquire image data of the image A based on the resolution of 800×600 to obtain an image a, the resolution of the image a is 800×600, and the frame rate of the image a may be 30 frames.
[0089] The embodiment of the present disclosure provides an image processing method, in which an electronic device can obtain a processing scene, a processing mode, a network type, a screen parameter of the electronic device, and a screen parameter of another electronic device corresponding to the processing scene, and determine a first screen acquisition parameter from a plurality of preset screen parameters or a plurality of groups of preset screen parameters of the electronic device based on the above information, obtain a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device, determine a second screen acquisition parameter corresponding to the type of the display content, and determine a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of the idle computing resources, and the electronic device can process the display content based on the target screen acquisition parameter to obtain a target image. In this way, since the target screen acquisition parameter is determined based on the first screen acquisition parameter, the type of the display content, and the amount of the idle computing resources, and the first screen acquisition parameter can match a plurality of scenes, the target screen acquisition parameter can meet the requirements of the plurality of scenes and the accuracy of the target screen acquisition parameter is improved, and since the type of the display content and the amount of the idle computing resources are dynamically changed, the flexibility of the target screen parameter is relatively high, thereby improving the flexibility of obtaining the target image and improving the display effect of screen sharing.
[0090] On the basis of the embodiment shown in FIG. 2, a method for determining the target screen acquisition parameter of the electronic device in the above image processing method will be described below with reference to FIG. 6.
[0091] FIG. 6 is a schematic diagram of a method for determining the target screen acquisition parameter provided by an embodiment of the present disclosure. Referring to FIG. 6, the method procedure includes the steps described below.
[0092] In S601, a second screen acquisition parameter corresponding to the type of the display content is determined.
[0093] It should be noted that for the execution process of S601, reference may be made to the execution process of S203, which will not be repeated in the embodiment of the present disclosure.
[0094] In S602, the target screen acquisition parameter of the electronic device is determined based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of the idle computing resources.
[0095] Optionally, the electronic device may determine the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter and the second screen acquisition parameter. For example, the electronic device may determine a minimum resolution and a minimum frame rate in the first screen acquisition parameter and the second screen acquisition parameter as the target screen acquisition parameter of the electronic device.
[0096] Optionally, there are the following two cases for the electronic device to determine the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources.
[0097] Case 1: a first resolution of the first screen acquisition parameter is greater than or equal to a second resolution of the second screen acquisition parameter.
[0098] If the first resolution of the first screen acquisition parameter is greater than or equal to the second resolution of the second screen acquisition parameter, the electronic device may determine the target screen acquisition parameter of the electronic device based on the second resolution, a second frame rate of the second screen acquisition parameter, a first frame rate of the first screen acquisition parameter, and the amount of idle computing resources.
[0099] Specifically, the electronic device may determine the target screen acquisition parameter based on the following feasible implementation: determining a frame rate corresponding to the second resolution based on the second resolution and a mapping relationship between a resolution and a frame rate, and determining the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources.
[0100] The mapping relationship between the resolution and the frame rate may include at least one resolution and a frame rate corresponding to each resolution. For example, the mapping relationship between the resolution and the frame rate may be as shown in Table 1:TABLE 1ResolutionFrame rateResolution 1Frame rate 1Resolution 2Frame rate 2Resolution 3Frame rate 3. . .. . .
[0101] It should be noted that Table 1 is only an illustration of the mapping relationship between the resolution and the frame rate in the form of an example, and is not a limitation on the mapping relationship between the resolution and the frame rate.
[0102] For example, if the second resolution of the second screen acquisition parameter is the resolution 1, the frame rate corresponding to the second resolution may be the frame rate 1; if the second resolution of the second screen acquisition parameter is the resolution 2, the frame rate corresponding to the second resolution may be the frame rate 2; and if the second resolution of the second screen acquisition parameter is the resolution 3, the frame rate corresponding to the second resolution may be the frame rate 3.
[0103] It should be noted that as shown in Table 1, if the second resolution is between the resolution 1 and the resolution 2, the frame rate corresponding to the second resolution is the frame rate 1, and if the second resolution is between the resolution 2 and the resolution 3, the frame rate corresponding to the second resolution is the frame rate 2.
[0104] The electronic device determining the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources may specifically be: determining a minimum frame rate among the frame rate corresponding to the second resolution, the first frame rate, and the second frame rate, and determining the target screen acquisition parameter based on the second resolution, the minimum frame rate, and the amount of idle computing resources.
[0105] For example, the frame rate corresponding to the second resolution of the second screen acquisition parameter is the frame rate 1, the first frame rate of the first screen acquisition parameter is the frame rate 2, and the frame rate of the second screen acquisition parameter is the frame rate 3. If the frame rate 1 is less than the frame rate 2, and the frame rate 2 is less than the frame rate 3, the electronic device may determine the frame rate 1 as the minimum frame rate. If the frame rate 3 is less than the frame rate 2, and the frame rate 2 is less than the frame rate 1, the electronic device may determine the frame rate 3 as the minimum frame rate. In this way, the electronic device can determine the target screen acquisition parameter based on the minimum resolution and the minimum frame rate, thereby improving the adaptability of the target screen acquisition parameter.
[0106] Optionally, the electronic device may determine the target screen acquisition parameter based on the following feasible implementation: determining an adjustment coefficient associated with the second resolution and the minimum frame rate based on the amount of idle computing resources, and determining the target screen acquisition parameter based on the adjustment coefficient, the second resolution, and the minimum frame rate.
[0107] The adjustment coefficient is used to adjust the second resolution and the minimum frame rate. For example, the adjustment coefficient may be a number greater than 0, and the electronic device may adjust the second resolution and the minimum frame rate based on the adjustment coefficient to obtain the target screen acquisition parameter. For example, if the second resolution is the resolution A and the minimum frame rate is the frame rate a, the resolution A is multiplied by the adjustment coefficient to obtain a target resolution, and the frame rate a is multiplied by the adjustment coefficient to obtain a target frame rate, and then the target resolution and the target frame rate are determined as the target screen acquisition parameter.
[0108] Optionally, the electronic device may obtain a correspondence between the amount of idle computing resources and the adjustment coefficient, and then determine the adjustment coefficient by the amount of idle computing resources obtained by the electronic device and the correspondence. For example, the correspondence between the amount of idle computing resources and the adjustment coefficient may be as shown in Table 2:TABLE 2Amount of idleAdjustmentcomputing resourcescoefficientResource 1Coefficient 1Resource 2Coefficient 2Resource 3Coefficient 3. . .. . .
[0109] It should be noted that Table 2 is only an illustration of the correspondence between the amount of idle computing resources and the adjustment coefficient in the form of an example, and is not a limitation on the correspondence between the amount of idle computing resources and the adjustment coefficient.
[0110] For example, if the amount of idle computing resources obtained by the electronic device is the resource 1, the electronic device may determine that the adjustment coefficient corresponding to the amount of idle computing resources is the coefficient 1; if the amount of idle computing resources obtained by the electronic device is the resource 2, the electronic device may determine that the adjustment coefficient corresponding to the amount of idle computing resources is the coefficient 2; and if the amount of idle computing resources obtained by the electronic device is the resource 3, the electronic device may determine that the adjustment coefficient corresponding to the amount of idle computing resources is the coefficient 3.
[0111] It should be noted that the amount of idle computing resources shown in Table 2 may be a specific value or a numerical interval, which is not limited in the embodiment of the present disclosure. For example, the resource 1 shown in Table 2 may be a CPU usage of 15% and a GPU usage of 15%, and the resource 1 may also be a CPU usage of 10%-15% and a GPU usage of 10%-15%.
[0112] It should be noted that when the electronic device adjusts the second resolution and the minimum frame rate based on the adjustment coefficient determined by the amount of idle computing resources, if the electronic device first reduces the second resolution and the minimum frame rate, and then increases the second resolution and the minimum frame rate, the increased resolution and frame rate are less than or equal to the second resolution and the minimum frame rate before the reduction. For example, the second resolution is 800×600, and the minimum frame rate is 60 frames. If the idle resources of the CPU and the GPU are reduced, and the adjustment coefficient corresponding to the amount of idle computing resources is 0.5, the electronic device may reduce the second resolution and the minimum frame rate based on the adjustment coefficient, and the electronic device determines that the resolution of the target screen sampling parameter is 400×300, and the frame rate is 30 frames. If the idle resources of the CPU and the GPU are recovered, the electronic device may divide the resolution and frame rate in the target screen acquisition parameter by 0.5, thereby obtaining a target screen acquisition parameter with a resolution of 800×600 and a frame rate of 60 frames, and the target screen acquisition parameter may be less than or equal to the second resolution and the minimum frame rate.
[0113] The process of determining the target screen acquisition parameter in this case will be described below with reference to FIG. 7.
[0114] FIG. 7 is a schematic diagram of a process of determining the target screen acquisition parameter provided by an embodiment of the present disclosure. Referring to FIG. 7, a first screen acquisition parameter determined by the electronic device and a second screen acquisition parameter determined by the electronic device based on the type of the display content are included. The first screen acquisition parameter may include a resolution A and a frame rate a, and the second screen acquisition parameter may include a resolution B and a frame rate B. When the resolution B is less than the resolution A, the electronic device may obtain the frame rate corresponding to the resolution B based on the resolution B and a mapping relationship between the resolution and the frame rate. The mapping relationship between the resolution and the frame rate includes a plurality of resolutions and a frame rate corresponding to each resolution. When the resolution B is equal to the resolution 2, since the frame rate corresponding to the resolution 2 is the frame rate 2, the electronic device determines that the frame rate corresponding to the resolution B is also the frame rate 2.
[0115] Referring to FIG. 7, the electronic device can obtain the frame rate a, the frame rate b, and the frame rate 2, and determine that a minimum frame rate among the frame rate a, the frame rate b, and the frame rate 2 is the frame rate 2. The electronic device can obtain the resolution B and the frame rate 2, and multiply the resolution B and the frame rate 2 by the adjustment coefficient determined by the amount of idle computing resources, thereby obtaining the target screen acquisition parameter. The target screen acquisition parameter includes a target resolution and a target frame rate, the target resolution is a product of the resolution B and the adjustment coefficient, and the target frame rate is a product of the frame rate 2 and the adjustment coefficient. In this way, the electronic device can obtain the target screen acquisition parameter in light of the display content and the device resources, thereby improving the flexibility and accuracy of the target screen acquisition parameter.
[0116] Case 2: the first resolution of the first screen acquisition parameter is less than the second resolution of the second screen acquisition parameter.
[0117] If the first resolution is less than the second resolution, the target screen acquisition parameter is determined based on the first resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources.
[0118] Specifically, when the first resolution is less than the second resolution, the electronic device may determine a frame rate corresponding to the first resolution based on the first resolution and the mapping relationship between the resolution and the frame rate, and then determine the target screen acquisition parameter based on the first resolution, the frame rate corresponding to the first resolution, the first frame rate, the second frame rate, and the amount of idle computing resources.
[0119] For example, the electronic device may determine a minimum frame rate among the frame rate corresponding to the first resolution, the first frame rate, and the second frame rate, determine an adjustment coefficient based on the amount of idle computing resources, and determine the target screen acquisition parameter based on the minimum frame rate among the frame rate corresponding to the first resolution, the first frame rate, and the second frame rate, the first resolution, and the adjustment coefficient.
[0120] It should be noted that the method for determining the target screen acquisition parameter in case 2 is similar to the method for determining the target screen acquisition parameter in case 1. In case 1, the target screen acquisition parameter is determined based on the second resolution, and in case 2, the target screen acquisition parameter is determined based on the first resolution. Therefore, the method for determining the target screen acquisition parameter in case 2 will not be repeated in the embodiment of the present disclosure.
[0121] The embodiment of the present disclosure provides a method for determining a target screen acquisition parameter, in which an electronic device can determine a second screen acquisition parameter corresponding to a type of display content, and if a first resolution of the first screen acquisition parameter is greater than or equal to a second resolution of the second screen acquisition parameter, the electronic device can determine a target screen acquisition parameter of the electronic device based on the second resolution, a second frame rate of the second screen acquisition parameter, a first frame rate of the first screen acquisition parameter, and an amount of idle computing resources, and if the first resolution is less than the second resolution, the target screen acquisition parameter of the electronic device is determined based on the first resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources. In this way, the electronic device can determine the target screen acquisition parameter based on information such as a statically configured screen acquisition parameter, the display content, performance of the electronic device, and downlink feedback, thereby improving the accuracy and flexibility of the target screen acquisition parameter and improving the flexibility of determining the target image.
[0122] On the basis of any of the above embodiments, the process of the above image processing method will be described below with reference to FIG. 8.
[0123] FIG. 8 is a schematic diagram of a process of an image processing method provided by an embodiment of the present disclosure. Referring to FIG. 8, an electronic device 1 and an electronic device 2 are included. The display content on the screen of the electronic device 1 includes an image. If the electronic device 1 enables screen sharing with the electronic device 2, the electronic device can determine a first screen acquisition parameter among static screen acquisition parameters. The static screen acquisition parameters may include resolutions and frame rates corresponding to a plurality of processing scenes, a plurality of network types, and a plurality of processing modes.
[0124] Referring to FIG. 8, since the processing scene of the electronic device is screen sharing and the processing mode is the definition mode (the display content is an image, and the mode may also be arbitrarily selected), the electronic device can determine that the to-be-processed screen parameter includes a resolution A and a frame rate a. The electronic device determines that the resolution fed back by the downlink is a resolution G and the screen resolution of the electronic device is a resolution H. Since the resolution A is less than the resolution G and the resolution H, the electronic device determines that the first screen acquisition parameter may include the resolution A and the frame rate a.
[0125] Referring to FIG. 8, since the type of the display content of the electronic device is a static type, the electronic device can obtain the screen acquisition parameter corresponding to the static type (that is, the second screen acquisition parameter in the embodiment of the present disclosure), where the screen acquisition parameter of the static type may include a resolution I and a frame rate i. Since the resolution I is less than the resolution A, the electronic device can determine a minimum frame rate among the frame rate a, the frame rate i, and the frame rate corresponding to the resolution I (the frame rate obtained based on the resolution I and the mapping relationship between the resolution and the frame rate).
[0126] Referring to FIG. 8, since the frame rate i is the minimum, the electronic device can obtain the adjustment coefficient corresponding to the amount of idle computing resources, and process the resolution I and the resolution i based on the adjustment coefficient corresponding to the amount of idle computing resources to obtain the target screen acquisition parameter, where the target screen acquisition parameter may include a target resolution and a target frame rate. The electronic device can acquire the sharable image based on the target resolution and the target frame rate, and send the sharable image to the electronic device 2. The electronic device 2 can display the sharable image on the screen. In this way, since the target screen acquisition parameter is determined based on information such as the statically configured screen acquisition parameter, the display content, the performance of the electronic device, and the screen parameter fed back by the downlink, the accuracy and flexibility of the target screen acquisition parameter are relatively high, the flexibility of obtaining the target image is improved, and the display effect of the electronic device is improved.
[0127] FIG. 9 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present disclosure. Referring to FIG. 9, the image processing apparatus 900 includes a first determination module 901, an obtainment module 902, a second determination module 903, and a processing module 904, where:
[0128] the first determination module 901 is configured to determine a first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device;
[0129] the obtainment module 902 is configured to obtain a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device;
[0130] the second determination module 903 is configured to determine a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of the idle computing resources; and
[0131] the processing module 904 is configured to process the display content based on the target screen acquisition parameter to obtain a target image.
[0132] According to one or more embodiments of the present disclosure, the second determination module 903 is specifically configured to:
[0133] determine a second screen acquisition parameter corresponding to the type of the display content; and
[0134] determine the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of the idle computing resources.
[0135] According to one or more embodiments of the present disclosure, the second determination module 903 is specifically configured to:
[0136] if a first resolution of the first screen acquisition parameter is greater than or equal to a second resolution of the second screen acquisition parameter, determine the target screen acquisition parameter of the electronic device based on the second resolution, a second frame rate of the second screen acquisition parameter, a first frame rate of the first screen acquisition parameter, and the amount of idle computing resources; and
[0137] if the first resolution is less than the second resolution, determine the target screen acquisition parameter of the electronic device based on the first resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources.
[0138] According to one or more embodiments of the present disclosure, the second determination module 903 is specifically configured to:
[0139] determine a frame rate corresponding to the second resolution based on the second resolution and a mapping relationship between a resolution and a frame rate; and
[0140] determine the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources.
[0141] According to one or more embodiments of the present disclosure, the second determination module 903 is specifically configured to:
[0142] determine a minimum frame rate among the frame rate corresponding to the second resolution, the first frame rate, and the second frame rate; and
[0143] determine the target screen acquisition parameter based on the second resolution, the minimum frame rate, and the amount of idle computing resources.
[0144] According to one or more embodiments of the present disclosure, the second determination module 903 is specifically configured to:
[0145] determine an adjustment coefficient associated with the second resolution and the minimum frame rate based on the amount of idle computing resources; and
[0146] determine the target screen acquisition parameter based on the adjustment coefficient, the second resolution, and the minimum frame rate.
[0147] According to one or more embodiments of the present disclosure, the first determination module 901 is specifically configured to:
[0148] obtain a processing scene of the electronic device, where the processing scene includes a screen projection scene and / or a sharing scene;
[0149] obtain a processing mode corresponding to the processing scene, where the processing mode includes a definition mode and / or a smoothness mode;
[0150] obtain a network type corresponding to the processing scene; and
[0151] determine the first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type.
[0152] According to one or more embodiments of the present disclosure, the first determination module 901 is specifically configured to:
[0153] obtain a screen parameter of the electronic device, and a screen parameter of another electronic device corresponding to the processing scene received from a server;
[0154] determine a to-be-processed screen acquisition parameter based on the processing scene, the processing mode, and the network type; and
[0155] determine the first screen acquisition parameter based on the screen parameter of the electronic device, the screen parameter of the other electronic device corresponding to the processing scene, and the to-be-processed screen acquisition parameter.
[0156] The image processing apparatus provided in the embodiment of the present disclosure can be used to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects thereof are similar, which will not be repeated in this embodiment.
[0157] FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. Referring to FIG. 10, it shows a schematic structural diagram of an electronic device 1000 suitable for implementing the embodiments of the present disclosure, and the electronic device 1000 may be any device with on-terminal computing capabilities. The electronic device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a Personal Digital Assistant (PDA), a Portable Android Device (PAD), a Portable Media Player (PMP), a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal), etc., and a fixed terminal such as a digital TV, a desktop computer, etc. The electronic device shown in FIG. 10 is only an example, and should not impose any limitation to the function and scope of use of the embodiments of the present disclosure.
[0158] As shown in FIG. 10, the electronic device 1000 may include a processing apparatus (such as a central processing unit, a graphics processing unit, etc.) 1001, which can execute various appropriate actions and processing according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage apparatus 1008 into a Random Access Memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing apparatus 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004.
[0159] Generally, the following apparatuses may be connected to the I / O interface 1005: an input apparatus 1006, including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output apparatus 1007, including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; a storage apparatus 1008, including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 may allow the electronic device 1000 to perform wireless or wired communication with other devices to exchange data. Although FIG. 10 shows the electronic device 1000 having various apparatuses, it should be understood that it is not required to implement or have all the apparatuses shown. Alternatively, more or fewer apparatuses may be implemented or provided.
[0160] Particularly, according to the embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication apparatus 1009, or installed from the storage apparatus 1008, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the method of the embodiments of the present disclosure are executed.
[0161] It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer magnetic disk, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or flash memory), an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and computer-readable program codes are carried in the data signal. The propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit a program used by or in combination with an instruction execution system, apparatus, or device. The program codes contained on the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, an electric wire, an optical cable, a Radio Frequency (RF), etc., or any suitable combination thereof.
[0162] The above computer-readable medium may be included in the above electronic device; or may exist alone without being assembled into the electronic device.
[0163] The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device is enabled to execute the method as shown in the above embodiments.
[0164] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, and when a processor executes the computer-executable instructions, the image processing method according to the above first aspect and various possible implementations of the first aspect is implemented.
[0165] An embodiment of the present disclosure provides a computer program product including a computer program, and when the computer program is executed by a processor, the image processing method according to the above first aspect and various possible implementations of the first aspect is implemented.
[0166] The computer program codes used to execute the operations of the present disclosure may be written in one or more programming languages or a combination thereof, where the above programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and further include conventional procedural programming languages such as the “C” programming language or similar programming languages. The program codes may be executed entirely on a user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or a server. In the scenario involving the remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
[0167] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of codes, including one or more executable instructions for implementing specified logic functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur out of the order noted in the drawings. For example, two blocks shown in succession may, in fact, can be executed substantially concurrently, or the two blocks may sometimes be executed in a reverse order, depending upon the functionality involved. It should also be noted that, each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may also be implemented by a combination of dedicated hardware and computer instructions.
[0168] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the unit does not constitute a limitation on the unit itself under certain circumstances. For example, the first obtainment unit may also be described as “a unit for obtaining at least two internet protocol addresses”.
[0169] The functions described herein above may be performed, at least partially, by one or more hardware logic components. For example, without limitation, available exemplary types of hardware logic components include: a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application-Specific Standard Product (ASSP), a System On a Chip (SOC), a Complex Programmable Logical Device (CPLD), etc.
[0170] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may include or store a program for use by or in combination with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of the machine-readable storage medium may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or flash memory), an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0171] It should be noted that the modifications of “one” and “a plurality of” mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, they should be understood as “one or more”.
[0172] The names of messages or information exchanged between a plurality of apparatuses in the implementations of the present disclosure are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0173] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed of the type, scope of use, usage scenario, etc. of the personal information involved in the present disclosure in an appropriate manner according to relevant laws and regulations, and the user's authorization should be obtained.
[0174] For example, in response to receiving the user's active request, prompt information is sent to the user to explicitly prompt the user that the operation requested to be executed will require the obtainment and use of the user's personal information. Therefore, the user can independently select whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media that execute the operations of the technical solutions of the present disclosure according to the prompt information. As an optional but not limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, and the prompt information may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to select “agree” or “disagree” to provide personal information to the electronic device. It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative, and does not constitute a limitation to the implementations of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementations of the present disclosure.
[0175] It can be understood that the data involved in the technical solution (including but not limited to the data itself, the obtainment or use of the data) should follow the requirements of corresponding laws, regulations and relevant provisions. The data may include information, parameters, messages, etc., such as stream switching indication information.
[0176] The above description is only preferred embodiments of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features thereof without departing from the above disclosed concept. For example, the technical solution is formed by replacing the above features with the technical features with similar functions disclosed in the present disclosure (but not limited to).
[0177] In addition, although operations are described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although the above discussion includes several specific implementation details, these should not be interpreted as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. On the contrary, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0178] Although the subject matter has been described in language specific to structural features and / or method logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are only example forms for implementing the claims.
Claims
1. An image processing method, comprising:determining a first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device;obtaining a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device;determining a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of idle computing resources; andprocessing the display content based on the target screen acquisition parameter to obtain a target image.
2. The method according to claim 1, wherein determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of idle computing resources comprises:determining a second screen acquisition parameter corresponding to the type of the display content; anddetermining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources.
3. The method according to claim 2, wherein the screen acquisition parameter comprises a resolution and a frame rate; and determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources comprises:if a first resolution of the first screen acquisition parameter is greater than or equal to a second resolution of the second screen acquisition parameter, determining the target screen acquisition parameter of the electronic device based on the second resolution, a second frame rate of the second screen acquisition parameter, a first frame rate of the first screen acquisition parameter, and the amount of idle computing resources; andif the first resolution is less than the second resolution, determining the target screen acquisition parameter of the electronic device based on the first resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources.
4. The method according to claim 3, wherein determining the target screen acquisition parameter of the electronic device based on the second resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources comprises:determining a frame rate corresponding to the second resolution based on the second resolution and a mapping relationship between a resolution and a frame rate; anddetermining the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources.
5. The method according to claim 4, wherein determining the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources comprises:determining a minimum frame rate among the frame rate corresponding to the second resolution, the first frame rate, and the second frame rate; anddetermining the target screen acquisition parameter based on the second resolution, the minimum frame rate, and the amount of idle computing resources.
6. The method according to claim 5, wherein determining the target screen acquisition parameter based on the second resolution, the minimum frame rate, and the amount of idle computing resources comprises:determining an adjustment coefficient associated with the second resolution and the minimum frame rate based on the amount of idle computing resources; anddetermining the target screen acquisition parameter based on the adjustment coefficient, the second resolution, and the minimum frame rate.
7. The method according to claim 1, wherein determining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device comprises:obtaining a processing scene of the electronic device, wherein the processing scene comprises a screen projection scene and / or a sharing scene;obtaining a processing mode corresponding to the processing scene, wherein the processing mode comprises a definition mode and / or a smoothness mode;obtaining a network type corresponding to the processing scene; anddetermining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type.
8. The method according to claim 7, wherein determining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type comprises:obtaining a screen parameter of the electronic device, and a screen parameter of another electronic device corresponding to the processing scene received from a server;determining a to-be-processed screen acquisition parameter based on the processing scene, the processing mode, and the network type; andelectronic device, the screen parameter of the other electronic device corresponding to the processing scene, and the to-be-processed screen acquisition parameter.
9. (canceled)10. An electronic device, comprising a processor and a memory,wherein the memory stores computer-executable instructions, andthe processor executes the computer-executable instructions stored in the memory to enable the processor to execute an image processing method comprising:determining a first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device;obtaining a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device;determining a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of idle computing resources; andprocessing the display content based on the target screen acquisition parameter to obtain a target image.
11. A non-transitory computer-readable storage medium storing computer-executable instructions, wherein when a processor executes the computer-executable instructions, an image processing method is implemented, wherein the image processing method comprises:determining a first screen acquisition parameter from a plurality of preset screen acquisition parameters or a plurality of groups of preset screen acquisition parameters of an electronic device;obtaining a type of display content on a screen of the electronic device and an amount of idle computing resources of the electronic device;determining a target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of idle computing resources; andprocessing the display content based on the target screen acquisition parameter to obtain a target image.12-13. (canceled)14. The electronic device according to claim 10, wherein determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of idle computing resources comprises:determining a second screen acquisition parameter corresponding to the type of the display content; anddetermining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources.
15. The electronic device according to claim 14, wherein the screen acquisition parameter comprises a resolution and a frame rate; and determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources comprises:if a first resolution of the first screen acquisition parameter is greater than or equal to a second resolution of the second screen acquisition parameter, determining the target screen acquisition parameter of the electronic device based on the second resolution, a second frame rate of the second screen acquisition parameter, a first frame rate of the first screen acquisition parameter, and the amount of idle computing resources; andif the first resolution is less than the second resolution, determining the target screen acquisition parameter of the electronic device based on the first resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources.
16. The electronic device according to claim 15, wherein determining the target screen acquisition parameter of the electronic device based on the second resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources comprises:determining a frame rate corresponding to the second resolution based on the second resolution and a mapping relationship between a resolution and a frame rate; anddetermining the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources.
17. The electronic device according to claim 10, wherein determining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device comprises:obtaining a processing scene of the electronic device, wherein the processing scene comprises a screen projection scene and / or a sharing scene;obtaining a processing mode corresponding to the processing scene, wherein the processing mode comprises a definition mode and / or a smoothness mode;obtaining a network type corresponding to the processing scene; anddetermining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type.
18. The electronic device according to claim 17, wherein determining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type comprises:obtaining a screen parameter of the electronic device, and a screen parameter of another electronic device corresponding to the processing scene received from a server;determining a to-be-processed screen acquisition parameter based on the processing scene, the processing mode, and the network type; andelectronic device, the screen parameter of the other electronic device corresponding to the processing scene, and the to-be-processed screen acquisition parameter.
19. The non-transitory computer-readable storage medium according to claim 11, wherein determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the type of the display content, and the amount of idle computing resources comprises:determining a second screen acquisition parameter corresponding to the type of the display content; anddetermining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources.
20. The non-transitory computer-readable storage medium according to claim 19, wherein the screen acquisition parameter comprises a resolution and a frame rate; and determining the target screen acquisition parameter of the electronic device based on the first screen acquisition parameter, the second screen acquisition parameter, and the amount of idle computing resources comprises:if a first resolution of the first screen acquisition parameter is greater than or equal to a second resolution of the second screen acquisition parameter, determining the target screen acquisition parameter of the electronic device based on the second resolution, a second frame rate of the second screen acquisition parameter, a first frame rate of the first screen acquisition parameter, and the amount of idle computing resources; andif the first resolution is less than the second resolution, determining the target screen acquisition parameter of the electronic device based on the first resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources.
21. The non-transitory computer-readable storage medium according to claim 20, wherein determining the target screen acquisition parameter of the electronic device based on the second resolution, the second frame rate of the second screen acquisition parameter, the first frame rate of the first screen acquisition parameter, and the amount of idle computing resources comprises:determining a frame rate corresponding to the second resolution based on the second resolution and a mapping relationship between a resolution and a frame rate; anddetermining the target screen acquisition parameter based on the second resolution, the frame rate corresponding to the second resolution, the first frame rate, the second frame rate, and the amount of idle computing resources.
22. The non-transitory computer-readable storage medium according to claim 11, wherein determining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device comprises:obtaining a processing scene of the electronic device, wherein the processing scene comprises a screen projection scene and / or a sharing scene;obtaining a processing mode corresponding to the processing scene, wherein the processing mode comprises a definition mode and / or a smoothness mode;obtaining a network type corresponding to the processing scene; anddetermining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type.
23. The non-transitory computer-readable storage medium according to claim 22, wherein determining the first screen acquisition parameter from the plurality of preset screen acquisition parameters or the plurality of groups of preset screen acquisition parameters of the electronic device based on the processing scene, the processing mode, and the network type comprises:obtaining a screen parameter of the electronic device, and a screen parameter of another electronic device corresponding to the processing scene received from a server;determining a to-be-processed screen acquisition parameter based on the processing scene, the processing mode, and the network type; andelectronic device, the screen parameter of the other electronic device corresponding to the processing scene, and the to-be-processed screen acquisition parameter.
