A calling method, an image processing system and an electronic device

CN122909451APending Publication Date: 2026-10-13LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611153044.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0002]当前电子设备的相机框架中,调用者(如应用程序)一旦拿到相机权限,便可以不受限制的调用相机,并且,不同的调用者所获取的相机信息均相同,无法做到有针对性的灵活适配

Benefits of technology

[0003]本申请实施例的目的在于提供一种调用方法、图像处理系统及电子设备。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122909451A_ABST
    Figure CN122909451A_ABST
Patent Text Reader

Abstract

The application discloses a calling method, an image processing system and an electronic device. The calling method comprises the following steps: in response to a camera resource calling association request of a target object, determining a target camera resource capability set in an original camera resource capability set of the electronic device based on camera resource capability control condition information; and returning the target camera resource capability set to the target object. The target camera resource capability set represents camera resources and their acquisition capabilities that can be perceived and / or used by the target object, and the target camera resource capability set is a subset of the original camera resource capability set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of device access technology, and in particular to an access method, an image processing system, and an electronic device. Background Technology

[0002] In the current camera framework of electronic devices, once a caller (such as an application) obtains camera permissions, it can call the camera without restriction. Furthermore, different callers obtain the same camera information, making it impossible to achieve targeted and flexible adaptation. Summary of the Invention

[0003] The purpose of this application is to provide a calling method, an image processing system, and an electronic device.

[0004] Firstly, embodiments of this application provide a calling method, including: In response to the camera resource call association request of the target object, the target camera resource capability set is determined from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; Return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

[0005] In one possible implementation, the camera resource capability set includes at least a set of visible cameras and / or a set of acquisition capability parameters.

[0006] In one possible implementation, the camera resource capability management condition information is selected from one of the following combinations: The target object's attribute information, device operating status information, display environment information, and strategy setting information.

[0007] In one possible implementation, the camera resource capability management condition information includes the target object's attribute information and strategy setting information; The process of determining the target camera resource capability set from the native camera resource capability set of electronic devices based on camera resource capability management condition information includes: Based on the attribute information and the strategy setting information, determine the target camera resource capability set that matches the target object; The strategy setting information includes the mapping relationship between attribute information and camera resource capability set.

[0008] In one possible implementation, the camera resource capability management condition information includes equipment operating status information; The process of determining the target camera resource capability set from the native camera resource capability set of electronic devices based on camera resource capability management condition information includes: If the device operating status information indicates that the device is in a first device operating state, the first camera resource capability set is determined from the native camera resource capability set of the electronic device. If the device operating status information indicates that it is in a second device operating state, the second camera resource capability set is determined from the native camera resource capability set of the electronic device. The first device operates in a better state than the second device, and the first camera resource capability set is higher than the second camera resource capability set.

[0009] In one possible implementation, the device operating status information is selected from one of the following combinations: Battery status, power consumption mode, temperature status, thermal limit level, device performance status.

[0010] In one possible implementation, the camera resource capability management condition information includes display environment information; The process of determining the target camera resource capability set from the native camera resource capability set of electronic devices based on camera resource capability management condition information includes: If the display environment information indicates that the electronic device is configured with a display screen and the screen of the display screen is immutable, a third camera resource capability set is determined based on the display parameters of the display screen in the native camera resource capability set of the electronic device; If the display environment information indicates that the electronic device is configured with a display screen and the screen of the display screen is variable, the display parameters of the current display screen are obtained in real time to determine the fourth camera resource capability set in the native camera resource capability set of the electronic device; If the display environment information indicates that the electronic device is configured with multiple displays, at least one target display is determined from the multiple displays, and a fifth camera resource capability set is determined from the native camera resource capability set of the electronic device based on the display parameters of at least one target display.

[0011] In one possible implementation, the step of responding to a camera resource invocation association request from a target object and determining a target camera resource capability set for the target object based on camera resource capability control condition information from the native camera resource capability set of the electronic device includes: In response to the camera resource call association request of the target object, request the set of native camera resource capabilities of the electronic device from the hardware abstraction layer through the target interface; Based on camera resource capability management and control information, the target camera resource capability set is determined from the set of native camera resource capabilities of the electronic device fed back by the hardware abstraction layer.

[0012] Secondly, embodiments of this application also provide an image processing system, including: The resource management module, located in the framework layer, responds to the camera resource call association request of the target object and determines the target camera resource capability set from the native camera resource capability set of the electronic device based on the camera resource capability control condition information. The resource feedback module, located in the framework layer, returns the target camera resource capability set to the target object. The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

[0013] Thirdly, embodiments of this application also provide an electronic device, including: One or more processors; Memory stores computer programs that can run on the processor. Camera components, including one or more cameras; Wherein, when the computer program instructions are executed by the one or more processors, the electronic device: In response to the camera resource call association request of the target object, the target camera resource capability set is determined from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; Return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 A flowchart of a calling method provided in this application is shown; Figure 2 This application provides a schematic diagram of the architecture related to camera access in an electronic device. Figure 3 A schematic diagram of the structure of an image processing system provided in this application is shown; Figure 4A schematic diagram of the structure of an electronic device provided in this application is shown. Detailed Implementation

[0016] Various embodiments and features of this application are described herein with reference to the accompanying drawings.

[0017] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0018] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0019] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0020] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application, which have the features described in the claims and are therefore all within the scope of protection defined herein.

[0021] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0022] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0023] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0024] To facilitate understanding of this application, a method for invoking the method provided in this application will be described in detail below. The executing entity of the method can be an electronic device such as a mobile phone, tablet computer, or laptop. Specifically, the execution of the steps included in the method invocation can be controlled by the processor of the electronic device; this application does not limit this.

[0025] As an example, Figure 1 A flowchart of the invocation method provided in an embodiment of this application is shown, wherein the steps specifically include S101 and S102.

[0026] S101, in response to the camera resource call association request of the target object, determine the target camera resource capability set from the native camera resource capability set of the electronic device based on the camera resource capability control condition information.

[0027] Here, the target object can be an application on an electronic device, such as WeChat, Meitu Xiu Xiu, or Alipay. When the target object has an image acquisition need, it calls the camera of the electronic device to perform the image acquisition task. For example, in the scenario of adding a WeChat friend, the target object (WeChat APP) calls the camera to scan the friend's QR code; in the payment scenario, the target object (Alipay APP) calls the camera to scan the merchant's payment code, etc.

[0028] When a target object has an image acquisition requirement, it generates a camera resource invocation request to invoke the camera of the electronic device. This request can be a camera resource enumeration request (e.g., a Camera ID list query request) to obtain information about all cameras associated with the electronic device and their corresponding IDs; it can also be a camera capability query request (e.g., a Camera Characteristics query request) to obtain attribute information about each camera associated with the electronic device, such as supported image resolution, preview size, supported focus mode, image stabilization mode, optical zoom range, minimum / maximum focus distance, flash support, HDR, RAW shooting, sensor size, and lens focal length; or it can be a camera resource access request (e.g., a camera open request or a shooting session creation request) to invoke the camera.

[0029] Correspondingly, after obtaining the camera resource call association request generated by the target object, in response to the camera resource call association request of the target object, the target camera resource capability set is determined from the native camera resource capability set of the electronic device based on the camera resource capability control condition information.

[0030] It should be noted that the native camera resource capability set may include all camera sets associated with the electronic device and / or the acquisition capability parameter set of each camera. The target camera resource capability set is the camera resource description information reported to the target object based on the camera resource capability control condition information. Correspondingly, the target camera resource capability set represents the camera resources (i.e., visible cameras that can be perceived, selected, or called) and their acquisition capabilities that the target object can perceive and / or use. The target camera resource capability set is a subset of the native camera resource capability set.

[0031] Among them, the set of visible camera objects is used to limit the number of cameras, camera types and camera identifiers that the target object can perceive, and the set of acquisition capability parameters is used to limit the acquisition capability parameters that the target object can use on the corresponding cameras, such as output size, frame rate, acquisition format, shooting parameters, recording parameters and / or image processing capabilities.

[0032] S102, returns the target camera resource capability set to the target object.

[0033] After determining the target camera resource capability set, the target camera resource capability set is returned to the target object so that the target object can call the camera to complete the image acquisition task based on the target camera resource capability set.

[0034] In this embodiment, based on camera resource capability control information, the target camera resource capability set for a specific target object is determined. That is, different target objects correspond to different target camera resource capability sets. Compared to returning the native camera resource capability set of the electronic device for each object, this embodiment customizes the camera resource capability set for different target objects, dynamically tailoring visible camera capabilities as needed. Therefore, the target object does not need to be aware of all the native camera resource capabilities of the electronic device, nor does it need to traverse and test incompatible cameras or acquisition capabilities. This reduces the processing overhead in the capability query and selection process, and improves the accuracy and stability of camera resource retrieval.

[0035] Optionally, the camera resource capability set may include a set of visible cameras and / or a set of acquisition capability parameters. As one example, when initially responding to a camera resource invocation association request from a target object, the set of visible cameras of the target object can be determined first based on camera resource capability control information. Then, after the target object or user determines the target camera, the acquisition capability parameters of the target camera are determined. As another example, when initially responding to a camera resource invocation association request from a target object, the set of visible cameras and the set of acquisition capability parameters are directly determined based on camera resource capability control information. Both of these examples can enable the target object to invoke cameras, and this application embodiment does not limit this approach.

[0036] By setting a set of visible cameras in the camera resource capability set, the range of cameras that the target object can perceive, select, or call can be limited, avoiding the target object from obtaining the identifiers of cameras that are not compatible with or allowed to be called, thereby reducing the failure of calls caused by the target object initiating calls based on invalid camera identifiers.

[0037] By setting a set of acquisition capability parameters in the camera resource capability set, the output size, frame rate, acquisition format, shooting parameters, recording parameters and / or image processing capabilities that the target object can use on the corresponding camera can be limited. This avoids the target object from selecting acquisition parameters that exceed its adaptability or the range allowed by the current control conditions, thereby reducing the occurrence of shooting session creation failures, preview abnormalities or image acquisition abnormalities.

[0038] Therefore, compared to simply returning information on whether the camera is accessible to the target object, this application embodiment can simultaneously manage camera resource capabilities from two dimensions: the camera's visible range and the range of acquisition capability parameters, thereby improving the matching accuracy and success rate of the target object's access to camera resources.

[0039] Optionally, the camera resource capability control condition information is selected from one of the following combinations: target object attribute information, device operating status information, display environment information, and policy setting information. For example, the camera resource capability control condition information may include target object attribute information and device operating status information; it may also include device operating status information, display environment information, and policy setting information; or it may include target object attribute information, device operating status information, display environment information, and policy setting information, etc. This application embodiment does not limit this; in practical applications, it can be determined according to the actual situation.

[0040] It should be noted that camera resource capability control condition information may include one or more of the following: target object attribute information, device operating status information, display environment information, and policy setting information. Different types of camera resource capability control condition information can be used individually to determine the target camera resource capability set, or they can be combined to determine the target camera resource capability set.

[0041] In one implementation, when the camera resource capability management information includes multiple pieces of information, the native camera resource capability set of the electronic device can be filtered sequentially according to a preset order. For example, a first intermediate capability set is first determined based on the attribute information and policy setting information of the target object, then a second intermediate capability set is determined based on the display environment information in the first intermediate capability set, and finally the final target camera resource capability set is determined based on the device operating status information in the second intermediate capability set.

[0042] In another implementation, multiple candidate capability sets can be determined based on different types of camera resource capability control conditions. The intersection, union, or fusion of these candidate capability sets according to a preset priority can then be used to determine the target camera resource capability set. The intersection method can be used to ensure that the camera resource capabilities returned to the target object simultaneously meet the target object's adaptation requirements, device operating status requirements, and display environment requirements. The priority fusion method can be used to determine the final capability set based on a preset priority when there are conflicts between different control conditions.

[0043] By using at least one of the target object's attribute information, device operating status information, display environment information, and policy setting information as camera resource capability control conditions, the native camera resource capability set of electronic devices can be filtered from multiple dimensions such as the calling subject, the device's current capabilities, the display output environment, and preset control policies.

[0044] Among them, the target object's attribute information and policy settings can reflect the different target objects' usage requirements and permissions for camera resources; the device operating status information can reflect whether the electronic device is currently suitable for opening high-specification camera capabilities; and the display environment information can reflect the adaptation requirements between the acquisition capabilities and the preview display environment. Therefore, the target camera resource capability set can not only adapt to the target object itself, but also to the real-time operating status and display environment of the electronic device, thereby achieving more refined, dynamic, and scenario-based management of camera resource capabilities.

[0045] Next, we will use different examples to illustrate the mechanism for determining the target camera resource capability set from the native camera resource capability set of the electronic device when the camera resource capability control condition information includes different information.

[0046] First Example Camera resource capability control information includes target object attribute information and policy settings. The target object attribute information includes the target object's application identifier, application package name, process identifier, user identifier, application type, and permission level. Since different applications have different image acquisition requirements (such as resolution, focus requirements, and sharpness), corresponding policy settings are also set. These policy settings include the mapping relationship between attribute information and camera resource capability sets, such as whitelists and / or blacklists. The whitelist includes each application and the cameras it can access, along with the acquisition capability parameters of those cameras. The blacklist includes each application and the cameras it cannot access.

[0047] In one implementation, the policy setting information may include one or more of a whitelist policy, a blacklist policy, a default policy, and priority information. The whitelist policy is used to indicate the cameras and acquisition capability parameters that the target object is allowed to perceive and / or use; the blacklist policy is used to indicate the cameras and acquisition capability parameters that the target object is prohibited from perceiving and / or using; and the default policy is used to determine the default set of camera resource capabilities corresponding to the target object when the target object does not match either the whitelist policy or the blacklist policy.

[0048] For example, if the target object matches the whitelist policy but not the blacklist policy, the set of camera resource capabilities corresponding to the whitelist policy can be determined as the target camera resource capability set. If the target object matches the blacklist policy, the camera and / or acquisition capability parameters indicated by the blacklist policy can be deleted from the electronic device's native camera resource capability set. If the target object matches both the whitelist and blacklist policies, it can be processed according to the priority information in the policy settings. For example, the blacklist policy has a higher priority than the whitelist policy to prevent the target object from perceiving or invoking prohibited camera resource capabilities.

[0049] In one implementation, if the target object does not match any whitelist or blacklist policy, the system default capability set can be determined as the target camera resource capability set. The system default capability set may include the main camera and basic acquisition capability parameters, such as preset resolution, preset frame rate, and preset acquisition format, to ensure that the target object can complete basic image acquisition tasks.

[0050] In one implementation, the policy settings information can be preset by the electronic device at the factory, or dynamically updated by system services, device management services, or user settings. After the policy settings information is updated, the resource management module can re-determine the target camera resource capability set based on the updated policy settings information the next time it responds to a camera resource call association request for the target object.

[0051] Furthermore, when the camera resource capability control condition information includes the target object's attribute information and policy setting information, based on the camera resource capability control condition information, when determining the target camera resource capability set from the electronic device's native camera resource capability set, the target camera resource capability set matching the target object is determined based on the attribute information and policy setting information.

[0052] For example, the cameras associated with an electronic device include Camera 1, Camera 2, Camera 3, Camera 4, and Camera 5. If the target object's attribute information indicates that the target object is WeChat, then based on the mapping relationship between the attribute information and the camera resource capability set, the cameras that WeChat can access are searched. If the found cameras are Camera 1, Camera 3, Camera 4, and Camera 5, then the set of visible cameras included in the target camera resource capability set for WeChat is determined to include Camera 1, Camera 3, Camera 4, and Camera 5. The acquisition capability parameters of Camera 1, Camera 3, Camera 4, and Camera 5 are further determined, thereby determining the target camera resource capability set matching WeChat. Similarly, if the target object's attribute information indicates that the target object is Alipay, then based on the mapping relationship between the attribute information and the camera resource capability set, the cameras that Alipay can access are searched. If the found cameras are Camera 1 and Camera 5, then the set of visible cameras included in the target camera resource capability set for Alipay is determined to include Camera 1 and Camera 5. The acquisition capability parameters of Camera 1 and Camera 5 are further determined, thereby determining the target camera resource capability set matching WeChat.

[0053] It's important to note that while different applications can access the same camera, the camera's capture capabilities provided to each application may differ. In other words, different applications may use different capture capability parameters when accessing the same camera. For example, both WeChat and Alipay can access Camera 1. When WeChat accesses Camera 1, the capture capability parameters it can use include: a preview resolution of 1080P, a focus mode of CONTINUOUS_PICTURE (continuous autofocus with photo optimization), a digital zoom strategy that allows for the maximum zoom magnification supported by the hardware (i.e., supports free scaling), a focus range preference of 0.2m to infinity, balanced focus with no bias, and the focus hardware limit being the inherent parameters of Camera 1. When Alipay accesses Camera 1, the capture capability parameters it can use include: a preview resolution of 720P, a focus mode of CONTINUOUS_VIDEO (continuous fast autofocus), a digital zoom strategy with a conservative zoom limit (≤2~3x, i.e., limiting excessive magnification), a focus range preference of 20cm~80cm, and the focus hardware limit being the inherent parameters of Camera 1 (consistent with WeChat).

[0054] Based on the target object's attribute information and policy settings, a target camera resource capability set is determined from the native camera resource capability set of the electronic device. This allows for targeted provision of the target camera resource capability set to the specific demand side of the target object. In other words, it provides the target object with a set of cameras and / or acquisition capability parameters that the target object can perceive and / or use. Furthermore, for the same camera, different acquisition capability parameters can be determined based on different applications. On the one hand, this allows for targeted and flexible adaptation to both applications and cameras. On the other hand, by determining the target camera resource capability set that matches the target object based on its attribute information and policy settings, it avoids exposing cameras or acquisition capability parameters that are incompatible with the target object. For example, for a target object that only needs barcode scanning functionality, only cameras that meet the scanning requirements and lower-specification preview resolution and focusing capabilities can be returned; for a target object that needs to take photos or capture videos, higher-specification cameras and acquisition capability parameters can be returned.

[0055] This reduces the traversal, filtering, and trial-and-error process after the target object obtains invalid or incompatible camera resource capabilities, lowers the probability of call failure caused by the target object calling mismatched capabilities, and reduces the complexity of application-side compatibility adaptation for camera capabilities of different electronic devices.

[0056] Second example Camera resource capability management information includes equipment operating status information.

[0057] When the camera resource capability management information includes equipment operating status information, when determining the target camera resource capability set in the native camera resource capability set of electronic devices based on the camera resource capability management information, if the equipment operating status information indicates that it is in the first equipment operating state, the first camera resource capability set is determined in the native camera resource capability set of electronic devices; if the equipment operating status information indicates that it is in the second equipment operating state, the second camera resource capability set is determined in the native camera resource capability set of electronic devices.

[0058] In this context, the first device's operating state is superior to the second device's operating state, and the first camera's resource capability set is higher than the second camera's resource capability set. That is, the electronic device in the first device's operating state has sufficient processing resources to call upon a larger number of other devices to execute corresponding tasks, i.e., to start and run new processes. Conversely, the electronic device in the second device's operating state has relatively fewer processing resources, limiting its ability to call upon other devices or start and run new processes.

[0059] For example, when an electronic device meets preset conditions, it is determined that the electronic device is in a second device operating state. The preset conditions include any of the following: current battery level is less than a battery threshold, current power consumption is low, current temperature is higher than a temperature threshold, thermal limitation level indicates that the current temperature exceeds the maximum allowable temperature threshold of the electronic device, and device performance status indicates that the electronic device is operating under limited conditions or its performance score is less than a preset score (at which point the electronic device has a high load and / or a large number of processes and / or processes that consume a lot of CPU).

[0060] For example, the first camera resource capability set determined under the first device operating state includes the target object's ability to access the front camera, rear camera, 1080p resolution, 60fps frame rate, and enable HDR, RAW, and optical image stabilization. Once the electronic device meets preset conditions, such as when the current battery level is less than a battery threshold or the front temperature of the electronic device is higher than a temperature threshold, the target camera resource capability set is redefined. Since the current battery level of the electronic device is less than the battery threshold or the front temperature of the electronic device is higher than the temperature threshold, that is, the electronic device is in the second device operating state, the determined second camera resource capability set includes the target object's ability to access the rear camera, 720p resolution, 30fps frame rate, and disable HDR, RAW, and optical image stabilization.

[0061] Based on the device operating status information of electronic devices, a target camera resource capability set is determined from the native camera resource capability set of the electronic device. This allows for dynamic provision of the target camera resource capability set to the target object based on the current state of the electronic device. Specifically, when the calling capability and new process processing capability of the electronic device are limited, a smaller second camera resource capability set is provided to the target object. This could involve reducing the number of visible cameras, lowering camera resolution, or disabling some functions, allowing the target object to choose lower-specification shooting. Compared to using either the native camera resource capability set or the larger first camera resource capability set, this embodiment dynamically switches between the first and second camera resource capability sets based on the device operating status. This reduces the likelihood of the electronic device failing to successfully call the camera and the occurrence of hard interruptions during electronic device operation, ensuring successful calling and meeting the target object's calling requirements. It also prevents overload of the electronic device, ensuring normal operation and reducing the pressure on power, temperature, processor performance, and storage bandwidth during camera calling, thus improving the stability of the electronic device in completing basic image acquisition tasks under limited conditions.

[0062] In one embodiment, the device operating status information is selected from one of the following combinations: battery status, power consumption mode, temperature status, thermal limitation level, and device performance status. For example, battery status can represent the current battery level of the electronic device, whether the current battery level is less than a battery threshold, and the battery level (high battery, medium battery, low battery); power consumption mode can represent whether the current power consumption of the electronic device is high or low; temperature status can represent the current temperature of the electronic device and whether the current temperature is higher than a temperature threshold; thermal limitation level represents the highest temperature threshold allowed by the electronic device; and device performance status represents whether the electronic device is operating at full speed or under limited conditions. This device performance status can be determined based on the electronic device's load, bandwidth, number of processes, process type, etc. (e.g., calculating a performance score according to weights).

[0063] In one implementation, different types of equipment operating status information can correspond to different capability adjustment strategies.

[0064] For example, when the power status indicates that the electronic device is in a low power state, the maximum preview resolution, maximum photo resolution, and / or maximum video resolution of the target camera's resource capabilities can be reduced, or power-consuming capabilities such as flash, RAW shooting, and high dynamic range image processing can be turned off.

[0065] For example, when the power mode indicates that the electronic device is in a low-power mode, the maximum frame rate that the target object can use can be limited, such as reducing the maximum frame rate from 60fps to 30fps or lower. It is also possible to limit the simultaneous operation of multiple cameras to reduce the operating power consumption of camera components.

[0066] For example, if the temperature status indicates that the current temperature of the electronic device is higher than the temperature threshold, high heat load capabilities such as optical image stabilization, high frame rate recording, HDR, RAW, or multi-frame fusion can be turned off, or only one main camera can be retained for the target object to use.

[0067] For example, when the thermal limitation level indicates that the electronic device is under a high thermal limitation level, the camera resource capability set can be reduced step by step according to the thermal limitation level. The higher the thermal limitation level, the lower the number of visible cameras, maximum resolution, maximum frame rate, and image processing capability of the target camera resource capability set.

[0068] For example, when the device performance status indicates that the electronic device is in a restricted operating state or the performance score is less than a preset value, the number of cameras visible to the target object can be reduced, or the target object can be restricted from using high-performance image processing capabilities, in order to reduce the usage of processor, image signal processor or storage bandwidth.

[0069] Third Example Camera resource capability management information includes display environment information. This information corresponds to the number of displays and resolution of the preview stream. For example, a foldable phone has multiple displays with different resolutions; a laptop connected to an external monitor has multiple displays with different resolutions; and a tablet without other connected displays has only one display.

[0070] When the camera resource capability management information includes display environment information, based on the camera resource capability management information, when determining the target camera resource capability set in the native camera resource capability set of the electronic device, if the display environment information indicates that the electronic device is equipped with a display screen and the screen of the display screen is immutable (such as the tablet computer in the example above), a third camera resource capability set is determined in the native camera resource capability set of the electronic device based on the display parameters of the display screen; if the display environment information indicates that the electronic device is equipped with a display screen and the screen of the display screen is mutable (such as the foldable screen phone in the example above), the display parameters of the current display screen (whether the display screen of the electronic device is in a folded state or an unfolded state) are obtained in real time to determine a fourth camera resource capability set in the native camera resource capability set of the electronic device; if the display environment information indicates that the electronic device is equipped with multiple display screens, at least one target display screen is determined from the multiple display screens, and a fifth camera resource capability set is determined in the native camera resource capability set of the electronic device based on the display parameters of at least one target display screen.

[0071] Here, when determining at least one target display screen from multiple displays, it can be based on the target object's attribute information and strategy settings. For example, the strategy settings include each object and its associated display screen. The display screen associated with the object can display the content transmitted by the object. Of course, the display screen associated with the object can also be used as the object's attribute information and can also be stored in the electronic device's memory space. Optionally, different objects can be associated with different display screens. For example, in a foldable phone, WeChat is associated with both the display screen when the phone is folded and the display screen when it is unfolded, while Alipay is associated with the display screen when the phone is unfolded.

[0072] Among them, the third camera resource capability set, the fourth camera resource capability set, and the fifth camera resource capability set are different and have an intersection. The intersection is the minimum camera resource capability set that can satisfy the camera resource call association request. This minimum camera resource capability set can include a camera and its most basic acquisition capability parameters.

[0073] For example, if an electronic device has a single, fixed display screen, and the screen resolution is 2K, then the determined third camera resource capability set includes the target object's ability to access the front and rear cameras with a resolution of 1080p. If the electronic device has a single, fixed, and fixed display screen, and the display parameters of the current screen are obtained in real time (e.g., a foldable phone in its unfolded state has a 2.7K screen resolution), then the determined fourth camera resource capability set includes the target object's ability to access the rear camera with a resolution of 1080p. If the foldable phone in its folded state has a 1080K screen resolution, then the determined fourth camera resource capability set includes the target object's ability to access the front camera with a resolution of 1080p. If the electronic device has multiple displays, and at least one target display screen is determined from these displays (e.g., if the target display screen is an extension screen of the electronic device, and the display parameters of this extension screen include a 4K screen resolution), then the determined fifth camera resource capability set includes the target object's ability to access the rear camera with a resolution of 2160p.

[0074] Although the third, fourth, and fifth camera resource capability sets are different, there is an intersection among them. This intersection can satisfy the minimum set of camera resource capability required for a camera resource call association request, thereby ensuring a successful response to the camera resource call association request.

[0075] The embodiments of this application dynamically determine the target camera resource capability set according to the hardware configuration of different electronic devices, that is, it can adapt to a variety of types and forms of electronic devices, with strong versatility and wide applicability.

[0076] Of course, the camera resource capability management condition information can include all or part of the target object's attribute information, device operating status information, display environment information, and policy setting information. When determining the target camera resource capability set of the target object, the above determination method can be followed.

[0077] As an example, if the camera resource capability management information simultaneously includes the target object's attribute information, device operating status information, display environment information, and policy settings information, then when determining the target camera resource capability set, to ensure the security of the target object, cameras, and their access, it is possible to prioritize determining the target camera resource capability set A matching the target object from the electronic device's native camera resource capability set based on the target object's attribute information and policy settings. This ensures that all cameras included in the target camera resource capability set A are reasonably accessible to the target object. Subsequently, since the electronic device's display screen is fixed, it is possible to determine the target camera resource capability set B from the target camera resource capability set A matching the target object based on the display environment information. This ensures that all cameras included in the target camera resource capability set B are reasonably accessible to the target object, while also ensuring the security of the acquired images. The content can be fully displayed on the screen. Target camera resource capability set B is the same as target camera resource capability set A, or target camera resource capability set B is a subset of target camera resource capability set A. Finally, based on the device operating status information, target camera resource capability set C is determined from target camera resource capability set B. This ensures that each camera included in target camera resource capability set C is reasonably accessible to the target object and that the acquired image content can be fully displayed on the screen. It also ensures that the target object successfully invokes camera resources and that the electronic device operates normally. Target camera resource capability set C is the same as target camera resource capability set B, or target camera resource capability set C is a subset of target camera resource capability set B.

[0078] In another example, if the camera resource capability control condition information includes the target object's attribute information, device operating status information, display environment information, and policy setting information, the target camera resource capability set a can be determined from the electronic device's native camera resource capability set based on the target object's attribute information and policy setting information, the target camera resource capability set b can be determined from the electronic device's native camera resource capability set based on the device operating status information, and the target camera resource capability set c can be determined from the electronic device's native camera resource capability set based on the display environment information. The determination of the target camera resource capability set a, target camera resource capability set b, and target camera resource capability set c can be performed simultaneously. Then, the intersection of the target camera resource capability set a, target camera resource capability set b, and target camera resource capability set c is determined, and the intersection is determined as the final target camera resource capability set returned to the target object.

[0079] For example, Figure 2 This diagram illustrates an architecture related to camera access in an electronic device. Figure 2It is known that it includes a camera application layer (Client), a camera architecture layer (Camera Framework), and a hardware abstraction layer (Camera DeviceHal). The hardware abstraction layer is connected to each camera, and stores the camera resource capability set of each camera.

[0080] Based on this, in response to a camera resource invocation association request from a target object, and based on camera resource capability control condition information, when a target camera resource capability set for the target object is determined from the set of native camera resource capabilities of the electronic device, the system requests the set of native camera resource capabilities of the electronic device from the hardware abstraction layer through the target interface in response to the target object's camera resource invocation association request. Specifically, the camera resource invocation association request is generated by the camera application layer and transmitted to the camera architecture layer, which then determines the target interface to request the set of native camera resource capabilities of the electronic device from the hardware abstraction layer.

[0081] In one implementation, the hardware abstraction layer is used to feed back the set of native camera resource capabilities of the electronic device to the framework layer. This set may include all cameras associated with the electronic device and the native acquisition capability parameters of each camera. The framework layer is used to acquire camera resource capability control condition information and, based on this information, filter out a target set of camera resource capabilities from the set of native camera resource capabilities fed back by the hardware abstraction layer.

[0082] Specifically, the target object's attribute information can be obtained by the framework layer based on camera resource call association requests, application package names, process identifiers, or user identifiers; device operating status information can be obtained by the framework layer from power management services, thermal management services, or performance management services; display environment information can be obtained by the framework layer from display management services; and policy setting information can be obtained by the framework layer from policy configuration modules, system configuration files, or device management services.

[0083] After determining the target camera resource capability set, the framework layer can return the target camera resource capability set to the target object through the resource feedback module. The hardware abstraction layer may not directly return the target camera resource capability set to the target object, but instead provide the framework layer with a set of native camera resource capabilities of the electronic device for filtering.

[0084] Different system information corresponds to different interfaces. For example, different system information includes different Software Development Kits (SDKs), resulting in different corresponding interfaces. As an example, the following shows call function examples for four different SDKs: The first type: Java SDK Belongs to class: android.hardware.camera2.CameraManager public CameraCharacteristics getCameraCharacteristics(StringcameraId) The second option: Kotlin SDK Belongs to class: android.hardware.camera2.CameraManager fun getCameraCharacteristics(cameraId: String): CameraCharacteristics The third type: C++ NDK Belongs to header file:<camera / NdkCameraManager.h> ACameraMetadata*ACameraManager_getCameraCharacteristics(ACameraManager* manager, const char* cameraId, int* outStatus) The fourth type: Dart / Flutter Core class: CameraDescription (encapsulates basic camera information) + extension methods to retrieve characteristics Future <Map<String,dynamic> >getCameraCharacteristics(CameraDescriptioncamera) async The interfaces of the four types are all different. Java / Kotlin prefers the application programming interface (API); NDK is for pure native audio and video projects; Flutter cannot directly access the camera framework and needs to be bridged to native via MethodChannel.

[0085] As another example, different objects may correspond to different interfaces. Therefore, based on the attribute information and system information of the target object, the target interface corresponding to the target object is determined from multiple candidate interfaces. Then, the target interface is used to request the set of native camera resource capabilities of the electronic device from the hardware abstraction layer. Based on the camera resource capability control condition information, the target camera resource capability set is determined from the set of native camera resource capabilities of the electronic device fed back by the hardware abstraction layer.

[0086] Continue to refer to Figure 2After determining the target camera resource capability set, the framework layer returns the target camera resource capability set to the camera application layer, that is, to the target object, through the target interface, so that the target object can call the camera based on the target camera resource capability set.

[0087] By requesting the set of native camera resource capabilities from the hardware abstraction layer through the target interface, the framework layer can obtain native camera resource capability information from a unified source across different software development kits, application development frameworks, or calling paths. This allows the framework layer to perform capability filtering based on unified native capabilities, reducing the complexity of adapting different target objects or development frameworks to the differences in hardware abstraction layer capabilities.

[0088] Furthermore, by having the framework layer determine the target camera resource capability set from the native camera resource capability set of the electronic device fed back by the hardware abstraction layer based on the camera resource capability control condition information, it can be ensured that even if different target objects initiate camera resource call association requests through different target interfaces, they can still obtain the corresponding target camera resource capability set according to a unified control logic, thereby improving the consistency and manageability of the camera resource capability return path.

[0089] On the other hand, this application also provides an image processing system. Since the principle of solving the problem in the image processing system of this application is similar to the above-mentioned calling method of this application, the implementation of the image processing system can refer to the implementation of the above-mentioned calling method, and the repeated parts will not be described again.

[0090] Figure 3 This application provides a schematic diagram of the structure of an image processing system, which consists of... Figure 3 It can be seen that the image processing system includes: Resource management module 301, located in the framework layer, responds to the camera resource call association request of the target object and determines the target camera resource capability set from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; Resource feedback module 302, located in the framework layer, returns the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

[0091] As another example, the image processing system also includes: Request module 303, located in the application layer, initiates camera resource call-related requests by requesting the camera service; Resource management module 301 includes resource acquisition module 3011 and resource filtering module 3012; The resource acquisition module 3011 responds to the camera resource call association request of the target object by requesting the set of native camera resource capabilities of the electronic device from the hardware abstraction layer through the target interface; The resource filtering module 3012 determines the target camera resource capability set based on the camera resource capability control condition information fed back by the hardware abstraction layer in the native camera resource capability set of the electronic device.

[0092] In one embodiment, the image processing system includes a request module, a resource acquisition module, a condition acquisition module, a resource filtering module, and a resource feedback module.

[0093] The request module is located in the application layer and is used to generate a camera resource call association request when the target object has an image acquisition requirement, and send the camera resource call association request to the framework layer.

[0094] The resource acquisition module is located in the framework layer. It is used to respond to camera resource call association requests, request the set of native camera resource capabilities of electronic devices from the hardware abstraction layer through the target interface, and receive the set of native camera resource capabilities of electronic devices fed back by the hardware abstraction layer.

[0095] The condition acquisition module, located in the framework layer, is used to acquire camera resource capability management condition information. This information may include at least one of the following: target object attribute information, device operating status information, display environment information, and policy setting information.

[0096] The resource filtering module is located in the framework layer and is used to determine the target camera resource capability set from the set of native camera resource capabilities of electronic devices obtained by the resource acquisition module, based on the camera resource capability control condition information obtained by the condition acquisition module.

[0097] The resource feedback module is located in the framework layer and is used to return the target camera resource capability set determined by the resource filtering module to the request module or target object, so that the target object can select cameras, query capabilities, or create shooting sessions based on the target camera resource capability set.

[0098] As another example, the camera resource capability set includes at least a set of visible cameras and / or a set of acquisition capability parameters.

[0099] As another example, the camera resource capability control condition information is selected from one of the following combinations: The target object's attribute information, device operating status information, display environment information, and strategy setting information.

[0100] In another example, the camera resource capability management condition information includes the target object's attribute information and strategy setting information; The resource filtering module 3012: Based on the attribute information and the strategy setting information, determine the target camera resource capability set that matches the target object; The strategy setting information includes the mapping relationship between attribute information and camera resource capability set.

[0101] As another example, the camera resource capability management condition information includes equipment operating status information; The resource filtering module 3012: If the device operating status information indicates that the device is in a first device operating state, the first camera resource capability set is determined from the native camera resource capability set of the electronic device. If the device operating status information indicates that it is in a second device operating state, the second camera resource capability set is determined from the native camera resource capability set of the electronic device. The first device operates in a better state than the second device, and the first camera resource capability set is higher than the second camera resource capability set.

[0102] As another example, the device operating status information is selected from one of the following combinations: Battery status, power consumption mode, temperature status, thermal limit level, device performance status.

[0103] As another example, the camera resource capability management condition information includes display environment information; The resource filtering module 3012: If the display environment information indicates that the electronic device is configured with a display screen and the screen of the display screen is immutable, a third camera resource capability set is determined based on the display parameters of the display screen in the native camera resource capability set of the electronic device; If the display environment information indicates that the electronic device is configured with a display screen and the screen of the display screen is variable, the display parameters of the current display screen are obtained in real time to determine the fourth camera resource capability set in the native camera resource capability set of the electronic device; If the display environment information indicates that the electronic device is configured with multiple displays, at least one target display is determined from the multiple displays, and a fifth camera resource capability set is determined from the native camera resource capability set of the electronic device based on the display parameters of at least one target display.

[0104] On the other hand, embodiments of this application also provide an electronic device, the structural schematic diagram of which can be as follows: Figure 4 As shown, the electronic device includes; One or more processors; Memory stores computer programs that can run on the processor. Camera components, including one or more cameras; Wherein, when the computer program instructions are executed by the one or more processors, the electronic device: In response to the camera resource call association request of the target object, the target camera resource capability set is determined from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; Return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

[0105] In one implementation, the memory of the electronic device may store one or more of the following: computer programs, policy setting information, mapping relationships between target object attributes and camera resource capability sets, default camera resource capability sets, and historical camera resource call records.

[0106] One or more processors can run the resource management module, resource acquisition module, condition acquisition module, resource filtering module, and resource feedback module in the camera framework layer. Specifically, the resource acquisition module communicates with the hardware abstraction layer through a target interface to obtain the set of native camera resource capabilities corresponding to the camera component; the condition acquisition module obtains the target object's attribute information, device operating status information, display environment information, and policy setting information; the resource filtering module filters the set of native camera resource capabilities of the electronic device based on camera resource capability control conditions; and the resource feedback module returns the filtered target camera resource capability set to the target object.

[0107] A camera component may include one or more cameras. The hardware abstraction layer can communicate with the camera component to obtain the native acquisition capability parameters of each camera and feed back the set of native camera resource capabilities of the electronic device to the framework layer. Thus, the electronic device can dynamically determine the target camera resource capability set based on the target object, device operating status, display environment, and policy configuration without directly exposing all native camera resource capabilities to the target object.

[0108] In another aspect, embodiments of this application also provide a computer program product, which is a computer-readable medium storing a computer program. When executed by a processor, the computer program implements the method provided in any embodiment of the present invention, including the following steps S11 and S12: S11, in response to the camera resource call association request of the target object, determine the target camera resource capability set from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; S12, return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

[0109] In another aspect, embodiments of this application also provide a storage medium carrying one or more computer programs, which, when executed by a processor, implement the method provided in any embodiment of the present invention, including the following steps S21 and S22: S21, in response to the camera resource call association request of the target object, determine the target camera resource capability set from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; S22, return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

[0110] Optionally, in this embodiment, the aforementioned computer program product and storage medium may include, but are not limited to, various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk. Optionally, in this embodiment, the processor executes the method steps described in the above embodiments according to the program code stored in the computer program product. Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, which will not be repeated here. Obviously, those skilled in the art should understand that the various modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed on a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be executed in a different order than those described here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific hardware and software combination.

[0111] Furthermore, although exemplary embodiments have been described herein, their scope includes any and all embodiments based on this application that have equivalent elements, modifications, omissions, combinations (e.g., schemes involving intersections of various embodiments), adaptations, or alterations. Elements in the claims will be interpreted broadly based on the language used in the claims and are not limited to the examples described in this specification or during the implementation of this application, which will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered illustrative only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0112] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. Other embodiments may be used by those skilled in the art upon reading the above description. Furthermore, in the above detailed description, various features may be grouped together to simplify the application. This should not be construed as an intention that a disclosed feature not claimed is necessary for any claim. Rather, the subject matter of this application may be less than all the features of a particular disclosed embodiment. Thus, the following claims are incorporated herein by reference as examples or embodiments, wherein each claim is an independent, separate embodiment, and these embodiments are contemplated as being possible in various combinations or arrangements. The scope of this application should be determined by reference to the appended claims and the full scope of their equivalents.

[0113] The foregoing has described in detail several embodiments of this application, but this application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications based on the concept of this application, and all such variations and modifications should fall within the scope of protection claimed in this application.

Claims

1. A method of invoking, comprising: In response to the camera resource call association request of the target object, the target camera resource capability set is determined from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; Return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

2. The invocation method according to claim 1, The camera resource capability set includes at least a set of visible cameras and / or a set of acquisition capability parameters.

3. The invocation method according to claim 1, wherein the camera resource capability control condition information is selected from one of the following combinations: The target object's attribute information, device operating status information, display environment information, and strategy setting information.

4. The invocation method according to claim 3, wherein the camera resource capability management condition information includes the attribute information of the target object and the strategy setting information; The process of determining the target camera resource capability set from the native camera resource capability set of electronic devices based on camera resource capability management condition information includes: Based on the attribute information and the strategy setting information, determine the target camera resource capability set that matches the target object; The strategy setting information includes the mapping relationship between attribute information and camera resource capability set.

5. The invocation method according to claim 3, wherein the camera resource capability management condition information includes device operating status information; The process of determining the target camera resource capability set from the native camera resource capability set of electronic devices based on camera resource capability management condition information includes: If the device operating status information indicates that the device is in a first device operating state, the first camera resource capability set is determined from the native camera resource capability set of the electronic device. If the device operating status information indicates that it is in a second device operating state, the second camera resource capability set is determined from the native camera resource capability set of the electronic device. The first device operates in a better state than the second device, and the first camera resource capability set is higher than the second camera resource capability set.

6. The invocation method according to claim 5, wherein the device operating status information is selected from one of the following combinations: Battery status, power consumption mode, temperature status, thermal limit level, device performance status.

7. The invocation method according to claim 3, wherein the camera resource capability management condition information includes display environment information; The process of determining the target camera resource capability set from the native camera resource capability set of electronic devices based on camera resource capability management condition information includes: If the display environment information indicates that the electronic device is configured with a display screen and the screen of the display screen is immutable, a third camera resource capability set is determined based on the display parameters of the display screen in the native camera resource capability set of the electronic device; If the display environment information indicates that the electronic device is configured with a display screen and the screen of the display screen is variable, the display parameters of the current display screen are obtained in real time to determine the fourth camera resource capability set in the native camera resource capability set of the electronic device; If the display environment information indicates that the electronic device is configured with multiple displays, at least one target display is determined from the multiple displays, and a fifth camera resource capability set is determined from the native camera resource capability set of the electronic device based on the display parameters of at least one target display.

8. The invocation method according to claim 1, wherein responding to a camera resource invocation association request of a target object, determining a target camera resource capability set for the target object based on camera resource capability control condition information within the native camera resource capability set of the electronic device, includes: In response to the camera resource call association request of the target object, request the set of native camera resource capabilities of the electronic device from the hardware abstraction layer through the target interface; Based on camera resource capability management and control information, the target camera resource capability set is determined from the set of native camera resource capabilities of the electronic device fed back by the hardware abstraction layer.

9. An image processing system, comprising: The resource management module, located in the framework layer, responds to the camera resource call association request of the target object and determines the target camera resource capability set from the native camera resource capability set of the electronic device based on the camera resource capability control condition information. The resource feedback module, located in the framework layer, returns the target camera resource capability set to the target object. The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.

10. An electronic device, comprising: One or more processors; Memory stores computer programs that can run on the processor. Camera components, including one or more cameras; Wherein, when the computer program instructions are executed by the one or more processors, the electronic device: In response to the camera resource call association request of the target object, the target camera resource capability set is determined from the native camera resource capability set of the electronic device based on the camera resource capability control condition information; Return the target camera resource capability set to the target object; The target camera resource capability set represents the camera resources and acquisition capabilities that the target object can perceive and / or use, and the target camera resource capability set is a subset of the native camera resource capability set.