CN113055597B - Camera calling implementation method and device and electronic equipment - Google Patents

Camera calling implementation method and device and electronic equipment Download PDF

Info

Publication number
CN113055597B
CN113055597B CN202110318831.3A CN202110318831A CN113055597B CN 113055597 B CN113055597 B CN 113055597B CN 202110318831 A CN202110318831 A CN 202110318831A CN 113055597 B CN113055597 B CN 113055597B
Authority
CN
China
Prior art keywords
camera
application
hardware
virtual
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110318831.3A
Other languages
Chinese (zh)
Other versions
CN113055597A (en
Inventor
张晓丹
陈晓龙
邱云龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202110318831.3A priority Critical patent/CN113055597B/en
Publication of CN113055597A publication Critical patent/CN113055597A/en
Application granted granted Critical
Publication of CN113055597B publication Critical patent/CN113055597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/617Upgrading or updating of programs or applications for camera control

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a camera calling implementation method, a camera calling implementation device and electronic equipment, under the condition that a camera calling request is initiated in the running of a first application of the electronic equipment, even if the electronic equipment is not provided with a hardware camera matched with the camera calling request, after a processor obtains the camera calling request of the first application, a virtual camera matched with the camera calling request can be still determined, so that the determined virtual camera can be called to run in the process of responding to the camera calling request to meet the camera calling requirement of the first application, the normal running of the first application is ensured, and the use requirement of a user on the first application is met.

Description

Camera calling implementation method and device and electronic equipment
Technical Field
The application mainly relates to the field of camera application, in particular to a camera calling implementation method and device and electronic equipment.
Background
At present, in electronic devices such as mobile phones and tablet computers, in order to meet application requirements, a plurality of cameras, such as a front camera and a rear camera, a dual rear camera, a quad camera, and the like, are generally configured to meet the call requirements of each application installed in the electronic devices.
In practical applications, some application programs installed on electronic devices, such as social application programs used by most users in the market, are usually designed for electronic device models having front-facing and rear-facing cameras, so that for application programs on electronic devices without the two types of cameras, the required cameras cannot be successfully called, and normal use of corresponding application functions of the application programs is affected.
Disclosure of Invention
In view of this, the present application provides the following technical solutions:
in one aspect, the present application provides a camera call implementation method, where the method includes:
acquiring a camera calling request of a first application;
determining a virtual camera matched with the camera calling request, wherein the virtual camera is a software defined camera constructed at least based on the hardware camera information of the electronic equipment;
and responding the camera calling request, and calling the virtual camera to operate.
In some embodiments, the method further comprises:
detecting whether the electronic equipment has a target camera requested to be called;
if the electronic equipment does not have the target camera requested to be called, determining first class information of the target camera and hardware camera configuration information of the electronic equipment;
And constructing a virtual camera matched with the camera calling request according to the first category information and the camera configuration information.
In some embodiments, the method further comprises:
determining second category information of a camera of the electronic equipment according to hardware camera configuration information of the electronic equipment;
detecting whether the second category information meets an application calling condition, wherein the application calling condition is determined based on a camera calling requirement of each application installed in the electronic equipment;
if not, outputting a virtual camera construction page;
responding to the determined construction operation of the virtual camera construction page, and constructing a virtual camera meeting the application calling condition according to the hardware camera configuration information;
the determining of the virtual camera matched with the camera calling request comprises:
determining a first application calling condition corresponding to the camera calling request;
and selecting the virtual camera meeting the first application calling condition from the constructed virtual cameras meeting different application calling conditions.
In some embodiments, the method further comprises:
Acquiring hardware camera configuration information of the electronic equipment;
carrying out camera software definition by using the hardware camera configuration information to obtain corresponding system software configuration information;
executing the system software configuration information, and constructing a virtual camera based on a hardware camera;
the determining of the virtual camera matched with the camera calling request comprises:
and selecting a virtual camera matched with the camera calling request from the constructed virtual cameras.
In some embodiments, the defining the camera software by using the hardware camera configuration information to obtain the corresponding system software configuration information includes:
determining software logic information corresponding to the virtual camera to be constructed by a drive layer, a system layer and an application layer of the electronic equipment according to the configuration information of the hardware camera;
the executing the system software configuration information and constructing a virtual camera based on a hardware camera comprise:
and controlling the driving layer, the system layer and the application layer to execute the determined corresponding software logic information based on the hardware configuration information of the hardware camera of the electronic equipment in a hardware layer, and simulating to obtain the virtual camera.
In some embodiments, in the case where the electronic device has a target camera requested to be invoked, the method further comprises:
if the target camera is a hardware camera, responding to the camera calling request, starting the hardware camera, and sending first image information acquired by the hardware camera to the first application;
if the target camera is a virtual camera, calling the virtual camera in the running process, wherein the virtual camera can utilize a hardware camera which is arranged in the electronic equipment to collect second image information which is required by the first application, and the second image information comprises an image which is collected after the hardware camera is mirrored or rotated relative to a preset state.
In some embodiments, in a case that the electronic device does not have the target camera requested to be invoked, or the target camera is a virtual camera, the method further includes:
outputting prompt information about whether the camera requested to be called by the first application is switched to a hardware camera;
responding to a confirmation switching instruction input based on the prompt information, and determining a hardware camera selected by the first application;
And under the condition of responding to the camera calling request, starting the determined hardware camera, and sending first image information acquired by the hardware camera to the first application.
In another aspect, the present application further provides a device for implementing camera call, where the device includes:
a camera call request obtaining module for obtaining a camera call request of a first application,
the virtual camera determining module is used for determining a virtual camera matched with the camera calling request, and the virtual camera is a software defined camera which is constructed at least based on the hardware camera information of the electronic equipment;
and the camera calling module is used for responding to the camera calling request and calling the virtual camera to operate.
In another aspect, the present application further provides an electronic device, including:
a display module; a hardware camera;
the memory is used for storing a program for realizing the camera calling realization method;
and the processor is used for loading and executing the program stored in the memory so as to realize the steps of the camera call realization method.
In some embodiments, an image capturing direction of the hardware camera is consistent with a content display direction of the display module.
Therefore, the method, the device and the electronic equipment for realizing camera calling are provided, under the condition that a camera calling request is initiated by the running of a first application of the electronic equipment, even if the electronic equipment is not provided with a hardware camera matched with the camera calling request, a processor can still determine a virtual camera matched with the camera calling request after the processor obtains the camera calling request of the first application, so that the determined virtual camera can be called to run in the process of responding to the camera calling request to meet the camera calling requirement of the first application, the normal running of the first application is ensured, and the use requirement of a user on the first application is met.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of an alternative example of a method for implementing a camera call proposed in the present application;
Fig. 2 is a schematic flowchart of yet another optional example of a camera call implementation method provided in the present application;
fig. 3 is a schematic flowchart of yet another alternative example of a camera call implementation method proposed in the present application;
fig. 4 is a schematic flowchart of another alternative example of a camera call implementation method proposed in the present application;
fig. 5 is a schematic flowchart of yet another alternative example of a camera call implementation method proposed in the present application;
fig. 6 is a schematic structural diagram of an alternative example of a camera call implementation apparatus proposed in the present application;
fig. 7 is a schematic structural diagram of yet another alternative example of a camera call implementation apparatus proposed in the present application;
fig. 8 is a schematic structural diagram of yet another alternative example of a camera call implementation apparatus proposed in the present application;
fig. 9 is a schematic structural diagram of yet another alternative example of a camera call implementation apparatus proposed in the present application;
fig. 10 is a schematic diagram of a hardware structure of an alternative example of an electronic device suitable for implementing the method and apparatus for camera call proposed in the present application.
Detailed Description
Aiming at the technical problems described in the background technology part, under the condition that the existing hardware camera of the electronic equipment cannot meet the camera calling requirement of the application program, and the application program cannot normally run or cannot use the corresponding application function (such as the scanning function of social software, the video chat function and the like), the application proposes to construct a virtual camera in the electronic equipment, namely, a software defined camera constructed at least based on the hardware camera information of the electronic equipment, so as to call the virtual camera, meet the camera calling requirement of the application program, ensure the normal running of the application program and normally use the corresponding application function.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be understood that "system", "apparatus", "unit" and/or "module" as used herein is a method for distinguishing different components, elements, parts or assemblies at different levels. However, other words may be substituted by other expressions if they accomplish the same purpose.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements. An element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two. The terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Additionally, flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, the various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or several steps of operations may be removed from the processes.
Referring to fig. 1, a schematic flow chart of an optional example of the camera call implementation method provided in the present application is shown, where the method may be applied to an electronic device with a hardware camera, such as an electronic device like a smart phone, a tablet computer, a netbook, and the like. As shown in fig. 1, the method for implementing camera call provided in this embodiment may include:
step S11, acquiring a camera calling request of a first application;
in practical applications, in combination with the description of the above corresponding parts, when a user uses some application programs of the electronic device, the constraint conditions of the developers of the application programs on the operation or the implementation of some application functions are limited, and usually some hardware configured in the electronic device needs to be relied on to support the normal startup operation of the application program or the normal startup of the application functions, so as to meet the practical requirements.
In the embodiment of the application, the application programs which normally run or normally start some application function to work depending on the camera assembly configured by the electronic device are mainly used for explaining how to call the camera of the electronic device in the process of using the application programs by a user, so that the requirements of the application programs are met, and the normal work of the application programs is ensured. Therefore, the first application may be any application of such applications, and the application does not limit the specific application category and the function of the first application.
Therefore, when a user needs to use a first application in the electronic device, in the process of starting the first application, or after the first application is started, a certain application function of the first application, such as a scanning function and a video chat function of social software, is triggered, according to a constraint condition preset by a first application developer, a camera of the electronic device needs to be triggered to start, and after the camera is successfully called, normal operation of the first application can be ensured, so that the use requirement of the user on the first application is met.
Therefore, in the first application triggering process as described above, a camera call request for the first application may be generated, that is, a request for calling a camera of the electronic device may be generated to meet an operation requirement of the first application, specifically, a use requirement of an application function of the first application, and a processor (e.g., a CPU, etc.) of the electronic device may monitor the camera call request, so as to execute the following operation steps to meet the camera call requirement of the first application.
The camera call request may carry an application identifier of the first application, so that the processor of the electronic device may determine the application category of the first application according to the application identifier, and may further determine the camera type that needs to be called by the first application, such as a front camera and a rear camera of the electronic device, according to a preset rule. The content included in the camera call request and the subsequent steps executed by the processor according to the content included in the camera call request are not limited in the present application, and as the case may be, detailed descriptions thereof are not provided herein.
Step S12, determining a virtual camera matched with the camera calling request;
the virtual camera is a software defined camera constructed at least based on the hardware camera information of the electronic equipment, so that if the virtual camera needs to be used for image acquisition, the image acquisition needs to be completed by means of the hardware camera, the detailed implementation process is not detailed in the application, and the construction method of the virtual camera is not limited in the application.
It should be noted that, in the embodiment of the present application, mainly for a hardware camera currently configured for an electronic device, in a scenario where a camera call request of a first application cannot be directly met, if the first application runs or a certain application function is executed according to a setting of an application developer, and a rear camera needs to be called for running, but the current electronic device is only configured with a scenario such as a front hardware camera, a camera call implementation method provided in the present application may be executed to call a virtual camera created in the electronic device, so as to meet a camera call request of the first application, and ensure that the first application works normally.
Based on the above analysis, after the processor of the electronic device monitors the camera call request of the first application, it may determine the virtual camera in the electronic device, which matches the camera call request, and still take the above listed scenarios as examples, it may use the front hardware camera configured in the electronic device to construct the rear virtual camera, so that it may determine the front virtual camera required by the first application by analyzing the content of the camera call request of the first application.
It can be understood that, for an electronic device with other configuration structures, such as an electronic device configured with only a rear camera, a certain application function of the first application needs to perform face recognition on a user to verify whether the user identity is qualified, and when the application function is started, a front camera of the electronic device generally needs to be called to perform face acquisition and recognition on the user using the electronic device. However, since the electronic device is configured with only a rear hardware camera, it is necessary to determine a front virtual camera built by the electronic device.
It should be noted that, for the hardware camera configuration of the electronic device and the camera call request content, the method is not limited to the above-listed scene implementation process, and as the case may be, the method is not listed here.
And step S13, responding the camera call request, and calling the virtual camera to operate.
And after the description in the above, in the case that the virtual camera which can meet the camera calling requirement of the first application in the electronic device is determined, responding to the camera calling request, and completing the calling of the determined virtual camera so as to meet the use requirement of the user on the first application.
If it is determined that the electronic device does not have the hardware camera and the virtual camera that match the camera call request of the first application according to the above manner, the virtual camera that matches the camera call request may be constructed based on at least the hardware camera that the electronic device currently has, and a specific construction process of an embodiment of the present application is not described in detail herein. And then, calling the constructed virtual camera to ensure the normal operation of the first application.
In some embodiments, after the camera call request of the first application is obtained, in the process of responding to the camera call request, according to the above manner, the virtual camera matched with the camera call request is determined, and the virtual camera is called to operate, so that the successful response to the camera call request is realized; if the virtual camera matched with the virtual camera is not determined or the virtual camera is not successfully called after the virtual camera is determined, indicating that the response to the camera calling request fails, outputting corresponding prompt information to remind a user to manually trigger the first application and to re-request for calling the camera; or triggering and constructing a virtual camera, and the like, and the specific implementation manner can be determined according to the application scene requirements, which is not limited in the present application.
In practical application, under the condition that the electronic equipment has a hardware camera matched with the camera calling request, the camera calling request is responded, the hardware camera is directly called to work, and the camera calling requirement of the first application is met; however, under the condition that the electronic device does not have a hardware camera matched with the camera call request, the virtual camera matched with the camera call request can be determined according to the above mode, and the virtual camera is called to run, so that the normal work of the first application is ensured.
In summary, in the embodiment of the present application, after the processor of the electronic device obtains the camera call request of the first application, even if the electronic device is not configured with a hardware camera matching the camera call request, the virtual camera matching the camera call request may still be determined, and in a process of responding to the camera call request, the determined virtual camera may be called to run, so as to meet the camera call request of the first application, ensure that the first application runs normally, and meet the use requirement of the user for the first application.
Referring to fig. 2, a schematic flow diagram of another optional example of the camera call implementation method provided in the present application is shown, where an embodiment of the present application may be an optional detailed implementation method of the camera call implementation method described in the foregoing embodiment, and as shown in fig. 2, the method may include:
Step S21, acquiring a camera calling request of a first application;
step S22, detecting whether the electronic device has a target camera requested to be called by the first application, if yes, executing step S25; if not, go to step S23;
in conjunction with the description of the corresponding parts above, the target camera requested to be called by the first application, detected in step S22, is a camera matched with the obtained camera call request, which may be a hardware camera or a virtual camera configured in the electronic device, and the application does not limit the camera category of the target camera in step S22.
In some embodiments, after the detection, it is determined that the electronic device has both a hardware camera and a virtual camera matching the camera call request, and the hardware camera may be preferentially selected as a target camera, and the virtual camera is determined as the target camera again under the condition that the hardware camera is not configured; of course, the priority of use of the hardware camera and the virtual camera may also be adjusted according to the actual scene, and is not limited to the priority ordering manner described in this embodiment.
Step S23, determining the first category information of the target camera requested to be called and the hardware camera configuration information of the electronic equipment;
In succession to the above description, it is detected that the current configuration of the electronic device cannot meet the camera call requirement of the first application, that is, the electronic device does not have any target camera of any type requested to be called by the first application, and under the condition that the hardware configuration of the electronic device is not changed, the application proposes to construct a virtual camera of a corresponding type to meet the camera call requirement of the first application.
Therefore, the obtained camera call request can be analyzed, the category of the camera called by the first application request can be obtained, and the category is recorded as the first category information, for example, the camera called by the first application request is a front-facing camera, a rear-facing camera, or other categories of cameras of the electronic device, and the like.
In combination with the above description of the virtual camera, the virtual camera is a software-defined camera that is constructed at least based on hardware camera information of the electronic device, that is, the virtual camera needs to be constructed based on a hardware camera that is currently configured in the electronic device, and therefore, the application needs to detect hardware camera configuration information that the electronic device itself has, which may include an installation location of the hardware camera, a camera type, software configuration that supports the hardware camera, such as a driver layer and layers above the driver layer, and data software logic configured in an application layer, and so on, so as to learn configuration information content that is needed to support normal operation of the hardware camera that the electronic device has in the electronic device, and the application does not limit specific content of the hardware camera configuration information.
It can be understood that, for different types of electronic devices and different types of hardware cameras configured for the same type of electronic device, the contents of the hardware camera configuration information may be different, and therefore, before configuring a virtual camera, the hardware camera configuration information of the electronic device may be actually detected, and the specific detection method is not limited in the present application.
In some embodiments, a code mechanism that is supported by the operating system of the electronic device and is used to implement hardware device detection, for example, a tool that dynamically collects debugging and performance information, may be used to detect hardware camera configuration information of the electronic device, and the specific implementation process is not described in detail in this application, and is not limited to this detection method.
Step S24, according to the first category information and the camera configuration information, constructing a virtual camera matched with the camera calling request, and taking the virtual camera as a target camera;
and step S25, responding to the camera calling request, and calling the target camera to operate.
In this embodiment, according to the foregoing Probe mechanism of the electronic device, by referring to configuration information of an existing hardware camera of the electronic device, that is, software logic configured in each layer, such as a driver layer and an application layer, of the electronic device, and combining functions of a virtual camera to be constructed, which are different from the hardware camera, to configure another set of software logic required by the virtual camera to work in different system layers, such as the driver layer and the application layer, and obtain a virtual camera by means of simulation of the hardware camera, but the method is not limited to this virtual camera construction method.
Compared with a hardware camera of the electronic device, such as a front-facing hardware camera, the virtual camera constructed in the embodiment of the present application may also be configured with software logic configurations that implement functions such as rotation and mirroring, and the present application does not limit software logic contents that support implementation of these functions.
As can be seen, in the case that the electronic device has only one hardware camera, in the foregoing manner, for example, by using a probe mechanism, at least two sets of software logic configured after initialization are implemented on each layer, such as a driver layer and an application layer, to obtain different configurations of the cameras, such as configuration information for the hardware camera and configuration information for one or more virtual cameras. That is to say, by detecting the hardware camera and giving different examples through software, the purpose of simulating one or more cameras can be achieved, namely, one or more virtual cameras are constructed.
Later, when responding to a camera call request of a first application, the electronic device can determine a virtual camera constructed this time as a target camera, and call the virtual camera to operate, that is, based on the hardware camera, a set of software logic data corresponding to the virtual camera constructed is operated, so that the camera call requirement of the first application is met, and the normal operation of the first application is ensured.
In summary, in the embodiment of the present application, in a case that a first application requests to invoke a camera of an electronic device, a processor of the electronic device obtains a camera invocation request of the first application, and if it is determined that the electronic device has a target camera that requests to invoke, the processor will directly invoke the target camera to operate, and if it is determined that the electronic device does not have the target camera that requests to invoke, the processor of the electronic device will invoke the target camera to operate according to first category information of the target camera that requests to invoke and hardware camera configuration information that the electronic device has, and establishing a virtual camera matched with the camera calling request on line, taking the virtual camera as a target camera, calling and running the target camera by the first application, ensuring the normal work of the first application, and solving the technical problem that the first application cannot continue to run or certain application function cannot be realized because the electronic equipment does not have the first application to call the camera.
Referring to fig. 3, a schematic flow diagram of another optional example of the camera call implementation method provided by the present application is shown, and in combination with the camera call implementation method described in the foregoing embodiment, in order to meet call requirements of different applications on different types of cameras, in a case that an electronic device is not configured with hardware cameras of various types, a virtual camera of a corresponding type generally needs to be constructed, so as to ensure that an application program that needs to call a camera category to which the virtual camera belongs can normally run, and meet a user requirement for use of the application program. It can be understood that the virtual camera building process can be completed in advance under the condition that the call requirement on the virtual camera to be built does not appear, for example, triggering a corresponding function button before or after leaving a factory to implement, but is not limited to the triggering building mode; the method and the device can also be used for constructing the corresponding virtual camera and the like according to the calling requirement after the calling requirement for a certain type of virtual camera appears, and the construction execution stage of the virtual camera is not limited and can be determined according to the situation.
Therefore, the embodiment of the present application may describe how to construct the implementation method of the virtual camera, and mainly execute the construction method of the embodiment to construct one or more virtual cameras under the condition that no camera call request is received. As shown in fig. 3, the method may include:
step S31, determining second category information of the camera of the electronic equipment according to the hardware camera configuration information of the electronic equipment;
step S32, detecting whether the second category information meets the application calling condition, if yes, ending the process; if not, go to step S33;
in combination with the description of the corresponding part of the virtual camera, the virtual camera is usually constructed according to software configuration information of a hardware camera of the electronic device, and the constructed virtual camera is usually a camera of another category different from the category to which the hardware camera belongs, so as to solve the technical problem that the electronic device does not have the hardware camera of the other category.
Therefore, the present application may obtain all hardware camera configuration information of the electronic device, so as to determine, according to the hardware camera configuration information, second category information of a camera currently owned by the electronic device, that is, determine which categories of cameras the electronic device currently has, where the second category information mainly refers to a hardware camera here, and certainly may include a virtual camera that has been constructed, which is not limited by the present application.
In some embodiments, a user can visually see the types of hardware cameras of electronic equipment used by the user, and can determine whether the electronic equipment needs to construct a virtual camera according to actual application requirements, and if the virtual camera needs to be constructed, a setting interface of the electronic equipment can be entered, a construction function key of the virtual camera is switched from a disabled state to a enabled state, so that the virtual camera construction method provided by the embodiment of the application is executed, and the required virtual camera is constructed.
Certainly, for triggering the virtual camera configuration function, the method is not limited to the operation manner of the configuration function key described above, and the electronic device may also actively prompt the user whether to configure a corresponding virtual camera when detecting that the second category information of the camera currently owned by the electronic device does not satisfy the application invocation condition according to the manner described in this embodiment.
The application calling condition may be determined based on a camera calling requirement of each application installed in the electronic device. In combination with the above description of the content related to the application calling the camera, some applications or some application functions thereof are started and run, and it is usually required to call a specific one or more types of cameras to run before the applications or some application functions thereof can be guaranteed to be normally used, so for different applications, the types of the cameras required to be called may be different, so that the content of the application calling conditions corresponding to different applications is different, which is usually determined according to the configuration of developers of the applications.
It can be seen that after the application calling conditions corresponding to the applications of the electronic device, which need to call the camera, are obtained, the types of the cameras, which need to be called by the corresponding applications, are determined according to the contents of the application calling conditions, the types of the cameras can be compared with the second type information of the existing cameras of the electronic device, so as to determine whether the existing cameras of the electronic device can meet the camera calling requirements of the applications, and if so, a virtual camera does not need to be constructed, and the process is directly ended.
It can be understood that, after the new application is installed in the electronic device, the application calling condition that the electronic device has may be different from the application calling condition of the existing application, at this time, it may be determined whether the second type information of the electronic device satisfies the application calling condition of the new application according to the foregoing manner, or the application calling condition of the new application is compared with the application calling condition of the existing application, and if the type of the camera called by the new application is different from the type of the camera that the existing application needs to call, a virtual camera that satisfies the new application camera calling requirement is then constructed.
Step S33, outputting a virtual camera construction page;
step S34, responding to the determined construction operation of the virtual camera construction page, and constructing the virtual camera meeting the application calling condition according to the hardware camera configuration information;
in this case, the virtual camera construction page can be directly output based on the detection result, that is, the user is reminded to construct the virtual camera so as to meet the prompt page of the application requirement, and the user can select whether to construct the virtual camera currently according to the actual situation.
If the user wants to currently construct a virtual camera, the user can select a function button corresponding to the virtual camera to be confirmed and constructed in a virtual camera construction page, so that a processor of the electronic device executes a construction program of the virtual camera, that is, a virtual camera meeting an application calling condition is constructed according to the configuration information of the hardware camera, and the specific construction process can refer to the description of the corresponding part of the above embodiment, which is not described herein again in this embodiment.
In some embodiments, because the virtual camera building process occupies some resources of the electronic device and affects the operation conditions of other applications of the electronic device, after receiving the prompt information for building the virtual camera, the user can set a time point for executing the virtual camera building program in the virtual camera building page, and thus, when the system time reaches the set time point, the execution of the virtual camera is triggered, so that the operation reliability of other applications of the electronic device is ensured, and the operation experience of the user on other applications is improved. Certainly, according to actual conditions, a user can also choose not to construct a virtual camera and contact the subsequent process.
Step S35, acquiring a camera calling request of a first application;
step S36, determining a first application calling condition corresponding to the camera calling request;
step S37, selecting a virtual camera meeting the first application calling condition from the constructed virtual cameras meeting different application calling conditions;
and step S38, responding to the camera calling request, and calling the virtual camera to operate.
In the embodiment of the present application, after one or more virtual cameras are pre-constructed in the manner from the foregoing step S31 to the step S34, if a user views a system configuration page of the electronic device, the number and the type of the cameras currently owned by the electronic device may be displayed, and the user may select one or more cameras to be in an enabled state according to needs, and at the same time, may control one or more cameras to be in a disabled state, so as to prohibit an application from invoking cameras in the disabled state. The switching control mode of the use state of the camera is not limited.
For the forbidden camera, when a user uses a certain application of the electronic equipment, the application needs to call the camera, prompt information about whether to start the camera can be output, the user starts the camera according to the requirement, the camera calling requirement of the application is met, and detailed implementation process application is not detailed.
As described in the foregoing steps, after the electronic device has multiple types of cameras, if a camera call request of a first application is obtained, which camera needs to be called by the first application may be determined according to the camera call request, and specifically, a first application call condition of the first application may be determined by using the content of the camera call request.
The camera corresponding to the first application calling condition determined in the present application may be a hardware camera or a virtual camera of the electronic device, and specifically may be determined according to the content of the first application calling condition, in this embodiment, the electronic device does not have a hardware camera that is required by the first application, and only a scene of a virtual camera that is constructed in advance and meets the camera calling requirement of the first application may be called for description, so the camera selected and called in step S37 and step S38 is a virtual camera.
It can be understood that if the camera meeting the first application calling condition is a hardware camera, when a camera calling request is responded, the hardware camera is directly called to run, the implementation process is similar, and detailed description is not given in the application.
In summary, in the embodiments of the present application, for the application calling conditions of the existing applications of the electronic device, in the case that the hardware camera of the electronic device cannot satisfy each application calling condition, a virtual camera capable of satisfying the corresponding application calling condition may be pre-constructed, so that in any application process of the subsequent use of the electronic device, if the hardware camera of the electronic device cannot satisfy the camera calling requirement of the application, the embodiment of the present application does not need to spend a certain time length, a virtual camera satisfying the camera calling requirement of the application is constructed on line, the camera calling requirement of the application can be directly called from the constructed virtual camera, the virtual camera satisfying the application calling condition of the application runs, the timeliness of the application reflection is improved, the waiting time of the user in using the application to call the camera is reduced, the user experience is improved.
Referring to fig. 4, a schematic flowchart of still another optional example of the camera call implementation method provided in the present application is different from the pre-construction method of the virtual camera described in the foregoing embodiment and the virtual camera call operation method based on the construction, but is not limited to the virtual camera call method described in this embodiment. As shown in fig. 4, the method for implementing a camera call provided in this embodiment may include, but is not limited to, the following steps:
Step S41, acquiring the configuration information of the hardware camera of the electronic equipment;
step S42, camera software definition is carried out by using the configuration information of the hardware camera to obtain the corresponding configuration information of the system software;
step S43, executing system software configuration information, and constructing a virtual camera based on a hardware camera;
in combination with the above description of the virtual camera construction process, since the virtual camera is a software defined camera constructed at least based on the hardware camera information of the electronic device, after the configuration information of the hardware camera currently configured by the electronic device is detected to obtain the hardware camera configuration information, it is determined that a difference function, such as camera rotation, mirror image and other functions, which should be provided by another type of camera different from the hardware camera type is realized, the software logic data content of the hardware camera at each layer can be referred to, based on the hardware layer of the hardware camera, the software logic data, namely the system software configuration information, which is required for realizing the function of the other type of camera is supported by configuration of the driving layer, the application layer and the like, and then the virtual camera based on the hardware camera is constructed.
As can be seen, in some embodiments, the steps S42 and S43 may specifically include: according to the configuration information of the hardware camera, determining software logic information corresponding to the virtual camera to be constructed by a driver layer, a system layer and an application layer of the electronic device, so as to control the driver layer, the system layer and the application layer to execute the determined corresponding software logic information based on the hardware configuration information of the hardware camera in the hardware layer of the electronic device, and simulate to obtain the virtual camera, but not limited to the implementation method.
Step S44, acquiring a camera calling request of a first application;
step S45, selecting a virtual camera matched with the camera calling request from the constructed virtual cameras;
and step S46, responding to the camera call request, and calling the virtual camera to run.
It should be noted that the embodiment of the present application is implemented in a scenario that the electronic device does not have a hardware camera requested to be called by the first application, so that after the camera call request of the first application is obtained, a virtual camera matched with the camera call request can be called from a constructed virtual camera to run. Of course, according to the above manner, the target camera, such as a hardware camera or a virtual camera, which is matched with the camera call request of the first application, may be directly detected, and the target camera is called to operate, so as to ensure normal operation of the first application.
It can be seen that, for example, in a scenario where a front camera and a rear camera (both referred to herein as hardware cameras) cannot be configured at the same time and only one hardware camera is configured, the electronic device cannot use a third-party application that needs to call another type of hardware camera that is not installed, that is, the hardware camera of the electronic device is not adapted to some applications. In order to solve the problem, the method and the device provide for constructing the other type of virtual camera to meet the camera calling requirement of the application which is not matched with the existing hardware camera, ensure the normal operation of various applications installed on the electronic equipment and meet the use requirements of users on different applications.
Referring to fig. 5, a schematic flow diagram of another optional example of the camera call implementation method provided in the present application is shown, and this embodiment may be applied to the camera call implementation method described in each of the above embodiments, and a scene of a virtual camera is constructed in an electronic device.
As shown in fig. 5, the method for implementing camera call provided in this embodiment may include:
step S51, acquiring a camera calling request of a first application;
step S52, determining the camera matched with the camera calling request as a virtual camera;
in the embodiment of the application, after the processor of the electronic device obtains the camera call request of the first application, whether the electronic device has a target camera called by the first application request can be detected, and if the electronic device has the target camera called by the first application request and the target camera is a hardware camera, the electronic device can respond to the camera call request, start the hardware camera, send the first image information collected by the hardware camera to the first application, and meet the requirement of the first application.
If a target camera called by the first application request is provided, but the target camera is a virtual camera, the virtual camera may be directly called to operate according to the above manner, and if image acquisition is required at this time, the image acquisition is implemented by using a hardware camera on which the virtual camera is constructed, that is, the virtual camera can acquire second image information required by the first application by using a hardware camera provided by the electronic device, where the second image information may include an image acquired after the hardware camera is mirrored or rotated with respect to a preset state, and specifically, the function of the virtual camera may be determined according to software logic data content configured by the virtual camera, and further, content that may be included in the second image information may be determined.
When the virtual camera utilizes a hardware camera of the electronic device to acquire images, if a lens of the hardware camera cannot rotate, the acquired image content is the content in an image acquisition range corresponding to the lens of the hardware camera, and if an object image in the opposite direction needs to be acquired, a user needs to adjust the shooting direction of the electronic device and orient the lens of the hardware camera to the object, so that the required object image can be acquired.
Exemplarily, if the electronic device only has a front-mounted hardware camera, a virtual rear-mounted camera is constructed, and when a two-dimensional code on an object needs to be scanned in a use process of a first application, but a camera called by the first application configured in advance is the virtual rear-mounted camera, in this case, in order to meet an image acquisition requirement of the first application, the front-mounted hardware camera needs to be further triggered to start running, so that the electronic device is turned over (relative to a default use state) to enable a lens of the front-mounted hardware camera of the electronic device to face the two-dimensional code, and an image scanning process is completed.
Therefore, in order to meet the image acquisition requirement of the first application, when it is determined that the target camera called by the first application is a virtual camera, the user may be prompted to change the camera called by the first application to an existing hardware camera of the electronic device, for example, change a pre-configured virtual rear camera called by the first application to a rear hardware camera.
In addition, if the electronic device does not have a target camera called by the first application request, that is, the electronic device does not have a camera matching with the camera call request of the first application according to the pre-configured call relationship between each application and each camera, the virtual camera may be constructed in the manner described above to meet the call requirement of the first application. Of course, the user may also be prompted to select an existing hardware camera of the electronic device to meet the camera call requirement of the first application.
In some embodiments, after determining the camera ID requested to be called according to the camera call request, the camera ID may be transmitted to an HAL (Hardware Abstraction Layer, i.e. a user space, through an SDK (Software Development Kit), and in general, a manufacturer may implement a core code in the HAL Layer without opening a source code to the outside, so as to determine, at the HAL Layer, a user intention (such as which direction image needs to be collected) that the camera ID refers to, that is, whether a Hardware camera that a user wishes to start using the first application, or whether the camera ID is a Hardware camera or a virtual camera that does not exist.
Then, according to the analysis, if the hardware camera is started, the hardware camera can be directly started, and the acquired image information is sent to the first application; otherwise, a required virtual camera can be constructed, and corresponding prompt information is output to inform a user that the electronic equipment does not have the hardware camera required by the first application.
Step S53, outputting a prompt message whether the camera requested to be called by the first application is switched to a hardware camera;
step S54, responding to the confirmation switching instruction input based on the prompt information, and determining the hardware camera selected by the first application;
After the analysis, when the user uses the first application, the hardware camera which is intended to be started does not exist, or the determined camera which meets the camera call request of the first application is the virtual camera, the application can still further output prompt information for guiding the user to start the existing hardware camera, the prompt information can be displayed on the application interface of the first application, and the specific display mode and the content are not limited.
Therefore, a user can select whether to switch the camera requested to be called by the first application to the hardware camera currently provided by the electronic equipment according to actual requirements, after the user selects and confirms the switching, the hardware camera is updated to the target camera matched with the camera calling request of the first application, the first application is reused subsequently, the hardware camera switched at this time can be directly called, and the normal operation of the first application is ensured.
In some embodiments, after receiving the prompt message of step S53, the user may select not to switch, and after receiving a confirmation instruction of not switching, the processor of the electronic device may construct a virtual camera according to the above manner, so as to ensure normal operation of the first application, and detailed implementation processes of the present application are not described in detail.
And step S55, responding to the camera calling request, starting the determined hardware camera, and sending the first image information acquired by the hardware camera to the first application.
In summary, in the embodiment of the application, after the electronic device obtains the camera call request of the first application, it is determined that a camera that is preconfigured and called for the first application does not exist, or the camera that is preconfigured and called is a virtual camera, in order to meet an image acquisition requirement of the first application, a user may be prompted to switch to a hardware camera that the electronic device has for calling, so that image information acquired by the hardware camera is sent to the first application, and normal operation of the first application is ensured.
Referring to fig. 6, a schematic structural diagram of an alternative example of a camera call implementation apparatus provided in the present application, where the apparatus may be applied to the electronic device described above, and as shown in fig. 6, the apparatus may include:
a camera call request obtaining module 61, configured to obtain a camera call request of a first application,
A virtual camera determination module 62, configured to determine a virtual camera that matches the camera call request, where the virtual camera is a software-defined camera that is constructed based on at least the hardware camera information of the electronic device;
and the camera calling module 63 is configured to respond to the camera calling request and call the virtual camera to operate.
In some embodiments, as shown in fig. 7, the camera call implementation device may further include:
a first detection module 64, configured to detect whether the electronic device has a target camera requested to be called;
a first information determining module 65, configured to determine, if the detection result of the first detecting module 64 is negative, first category information of the target camera and hardware camera configuration information of the electronic device;
and a first constructing module 66, configured to construct a virtual camera matched with the camera call request according to the first category information and the camera configuration information.
Optionally, if the detection result of the first detection module 64 is yes, the camera call implementation device may further include:
the first image acquisition module is used for responding to the camera calling request under the condition that the target camera is a hardware camera, starting the hardware camera and sending first image information acquired by the hardware camera to the first application;
The first calling module is used for calling the virtual camera in the running process under the condition that the target camera is the virtual camera, the virtual camera can utilize a hardware camera which is arranged in the electronic equipment to collect second image information which is required by the first application, and the second image information comprises an image which is collected after the hardware camera is mirrored or rotated relative to a preset state.
Optionally, when the detection result of the first detection module 64 is that the electronic device does not have a target camera requested to be called, or the target camera is a virtual camera, the camera call implementation apparatus may further include:
the switching prompt module is used for outputting prompt information about whether the camera requested to be called by the first application is switched to a hardware camera;
the switching module is used for responding to a switching confirmation instruction input based on the prompt information and determining the hardware camera selected by the first application;
and the second image acquisition module is used for starting the determined hardware camera under the condition of responding to the camera calling request and sending the first image information acquired by the hardware camera to the first application.
In still other embodiments, as shown in fig. 8, the camera call implementation apparatus may further include:
a second information determining module 67, configured to determine second category information of a camera of the electronic device according to hardware camera configuration information of the electronic device;
a second detection module 68, configured to detect whether the second category information meets an application calling condition, where the application calling condition is determined based on a camera calling requirement of each application installed in the electronic device;
a first output module 69, configured to output the virtual camera construction page if the detection result of the second detection module 68 is negative;
a second constructing module 610, configured to, in response to a determined constructing operation on the virtual camera constructing page, construct, according to the hardware camera configuration information, a virtual camera that satisfies the application invoking condition;
accordingly, the virtual camera determination module 62 may include:
a first determining unit 621, configured to determine a first application calling condition corresponding to the camera calling request;
a virtual camera selecting unit 622, configured to select a virtual camera that satisfies the first application invocation condition from the constructed virtual cameras that satisfy different application invocation conditions.
In still other embodiments, as shown in fig. 9, the camera call implementation apparatus may further include:
a configuration information obtaining module 611, configured to obtain hardware camera configuration information of the electronic device;
a configuration information obtaining module 612, configured to define camera software by using the hardware camera configuration information to obtain corresponding system software configuration information;
a third constructing module 613, configured to execute the system software configuration information and construct a virtual camera based on a hardware camera;
accordingly, the virtual camera determination module 62 may be specifically configured to select a virtual camera matching the camera call request from the constructed virtual cameras.
Optionally, the configuration information obtaining module 612 may include:
a software logic information determining unit, configured to determine, according to the hardware camera configuration information, software logic information corresponding to a virtual camera to be constructed, in each of a driver layer, a system layer, and an application layer of the electronic device;
accordingly, the third building module 613 may include:
and the camera simulation unit is used for controlling the driving layer, the system layer and the application layer to execute the determined corresponding software logic information based on the hardware configuration information of the hardware camera in the hardware layer of the electronic equipment, and simulating to obtain the virtual camera.
It should be noted that, various modules, units, and the like in the embodiments of the foregoing apparatuses may be stored in the memory as program modules, and the processor executes the program modules stored in the memory to implement corresponding functions, and for the functions implemented by the program modules and their combinations and the achieved technical effects, reference may be made to the description of corresponding parts in the embodiments of the foregoing methods, which is not described in detail in this embodiment.
The present application further provides a computer-readable storage medium, on which a computer program can be stored, where the computer program can be called and loaded by a processor to implement the steps of the camera call implementation method described in the foregoing embodiments.
Referring to fig. 10, a schematic diagram of a hardware structure of an alternative example of an electronic device suitable for a camera to invoke the implementation method and apparatus proposed in the present application is shown, where the electronic device may include, but is not limited to: display module assembly 101, hardware camera 102, memory 103 and processor 105, wherein:
the display module 101 can include components such as a touch sensing unit, a display screen and the like for sensing a touch event on the touch display panel, and the specific composition structure of the display module 101 is not described in detail in the application, so that the display module without touch can be understood to not include the touch sensing unit.
In the embodiment of the application, the display module 101 can be used for displaying the operation interface and the content of each application in the electronic device, displaying the image acquired by the hardware camera 102, and the like, and the display can be determined according to actual conditions, which is not described in detail herein.
The hardware camera 102 is a physical camera installed on the electronic device, and for the electronic device suitable for implementing the method and apparatus for calling a camera provided in the present application, the electronic device usually has one type of hardware camera 102, such as a front-end hardware camera, that is, an image acquisition direction of the hardware camera 102 is the same as a content display direction of the display module, and under the condition that a lens of the hardware camera cannot rotate, only an environmental image that is the same as the content display direction of the display module can be acquired. The hardware camera 102 that the electronic device has is not limited to this front-facing type of camera.
In combination with the above description of the embodiment, if the camera called by the first application request is a virtual camera, the camera may be switched to the hardware camera to complete image acquisition. Under the condition that the hardware camera has the rotary lens, the image acquisition direction of the rotary lens can be adjusted according to actual requirements, so that the display module displays acquired preview images, and meanwhile, the rotary camera is used for completing image acquisition.
It can be understood that, for the hardware camera with the rotary lens, the application can also directly determine the camera meeting the application calling conditions of each application as the hardware camera, so that the hardware camera can be directly started after receiving a camera calling request of any application, and the image acquisition direction of the rotary lens of the hardware camera can be adjusted according to the camera calling request, so that the application requirement can be met.
The memory 103 may be configured to store a program for implementing the camera call implementation method described in the foregoing method embodiments; the processor 104 may be configured to load and execute a program stored in the memory 103 to implement the steps of the camera call implementation method described in the foregoing method embodiment, and a specific implementation process of the method is not described in detail in this application.
Therefore, in order to realize the camera call of any application, the electronic device usually further includes various communication interfaces to satisfy the transmission of corresponding data. The communication interface may include interfaces such as a USB interface and a serial/parallel interface, and is used to implement data interaction between internal components of the electronic device, and may be determined according to a product type of the electronic device, which is not described in detail herein.
In general, the communication interface may further include, for example, a GSM module, a WIFI module, a 5G/6G (fifth generation mobile communication network/sixth generation mobile communication network) module, a GPRS module, and the like, and the interface capable of implementing data interaction by using a wireless communication network is used to implement data interaction between the electronic device and other devices. The application does not limit the type and number of the communication interfaces, and the type and number can be determined according to the situation.
In the present embodiment, the memory 103 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device. The processor 104 may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device.
It should be understood that the structure of the electronic device shown in fig. 10 does not constitute a limitation of the electronic device in the embodiment of the present application, and in practical applications, the electronic device may include more or less components than those shown in fig. 10, or may combine some components, such as at least one input device, e.g., a keyboard, a mouse, a microphone, etc.; at least one output device such as a speaker, vibration mechanism, light, etc.; various sensors, power management modules, etc., which are not listed herein.
Finally, it should be noted that, in the present specification, each embodiment is described in a progressive or parallel manner, and the emphasis of each embodiment is to be described different from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device and the electronic equipment disclosed in the embodiment, the description is relatively simple because the device and the electronic equipment correspond to the method disclosed in the embodiment, and the relevant points can be referred to the description of the method part.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A camera call implementation method comprises the following steps:
acquiring a camera calling request of a first application;
determining a virtual camera matched with the camera calling request, wherein the virtual camera is a software defined camera constructed at least based on the hardware camera information of the electronic equipment;
Responding to the camera calling request, and calling the virtual camera to operate;
detecting whether the electronic equipment has a target camera requested to be called, wherein under the condition that the electronic equipment does not have the target camera requested to be called or the target camera is a virtual camera, the method further comprises the following steps:
outputting prompt information about whether the camera requested to be called by the first application is switched to a hardware camera;
responding to a confirmation switching instruction input based on the prompt message, and determining a hardware camera selected for the first application;
and under the condition of responding to the camera calling request, starting the determined hardware camera, and sending first image information acquired by the hardware camera to the first application.
2. The method of claim 1, further comprising:
detecting whether the electronic equipment has a target camera requested to be called;
if the electronic equipment does not have the target camera requested to be called, determining first class information of the target camera and hardware camera configuration information of the electronic equipment;
and constructing a virtual camera matched with the camera calling request according to the first category information and the camera configuration information.
3. The method of claim 1, further comprising:
determining second category information of a camera of the electronic equipment according to hardware camera configuration information of the electronic equipment;
detecting whether the second category information meets application calling conditions, wherein the application calling conditions are determined based on camera calling requirements of all applications installed on the electronic equipment;
if not, outputting a virtual camera to construct a page;
responding to the determined construction operation of the virtual camera construction page, and constructing a virtual camera meeting the application calling condition according to the hardware camera configuration information;
the determining of the virtual camera matched with the camera calling request comprises:
determining a first application calling condition corresponding to the camera calling request;
and selecting the virtual camera meeting the first application calling condition from the constructed virtual cameras meeting different application calling conditions.
4. The method of claim 1, further comprising:
acquiring hardware camera configuration information of the electronic equipment;
carrying out camera software definition by using the hardware camera configuration information to obtain corresponding system software configuration information;
Executing the system software configuration information, and constructing a virtual camera based on a hardware camera;
the determining of the virtual camera matched with the camera calling request comprises:
and selecting a virtual camera matched with the camera calling request from the constructed virtual cameras.
5. The method of claim 4, wherein the using the hardware camera configuration information to perform camera software definition to obtain corresponding system software configuration information comprises:
determining software logic information corresponding to a virtual camera to be constructed by a drive layer, a system layer and an application layer of the electronic equipment respectively according to the configuration information of the hardware camera;
the executing the system software configuration information and constructing a virtual camera based on a hardware camera comprise the following steps:
and controlling the driving layer, the system layer and the application layer to execute the determined corresponding software logic information based on the hardware configuration information of the hardware camera of the electronic equipment in a hardware layer, and simulating to obtain the virtual camera.
6. The method of claim 2, in the case that the electronic device has a target camera requested to be invoked, the method further comprising:
If the target camera is a hardware camera, responding to the camera calling request, starting the hardware camera, and sending first image information acquired by the hardware camera to the first application;
if the target camera is a virtual camera, calling the virtual camera in the running process, wherein the virtual camera can utilize a hardware camera which is arranged in the electronic equipment to collect second image information which is required by the first application, and the second image information comprises an image which is collected after the hardware camera is mirrored or rotated relative to a preset state.
7. A camera call implementation apparatus, the apparatus comprising:
a camera call request obtaining module for obtaining a camera call request of a first application,
the virtual camera determining module is used for determining a virtual camera matched with the camera calling request, and the virtual camera is a software defined camera which is constructed at least based on the hardware camera information of the electronic equipment;
the camera calling module is used for responding to the camera calling request and calling the virtual camera to run;
the system also comprises a first detection module used for detecting whether the electronic equipment has a target camera requested to be called;
When the electronic device does not have the target camera requested to be called, or the target camera is a virtual camera, the method further includes:
the switching prompt module is used for outputting prompt information whether the camera requested to be called by the first application is switched to a hardware camera;
the switching module is used for responding to a switching confirmation instruction input based on the prompt information and determining the hardware camera selected by the first application;
and the second image acquisition module is used for starting the determined hardware camera under the condition of responding to the camera calling request and sending the first image information acquired by the hardware camera to the first application.
8. An electronic device, the electronic device comprising:
a display module; a hardware camera;
a memory for storing a program for implementing the camera call implementation method according to any one of claims 1 to 6;
a processor for loading and executing the program stored in the memory to realize the steps of the camera call realization method according to any one of claims 1 to 7.
9. The electronic device of claim 8, wherein an image capture direction of the hardware camera is consistent with a content display direction of the display module.
CN202110318831.3A 2021-03-25 2021-03-25 Camera calling implementation method and device and electronic equipment Active CN113055597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110318831.3A CN113055597B (en) 2021-03-25 2021-03-25 Camera calling implementation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110318831.3A CN113055597B (en) 2021-03-25 2021-03-25 Camera calling implementation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113055597A CN113055597A (en) 2021-06-29
CN113055597B true CN113055597B (en) 2022-06-28

Family

ID=76515510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110318831.3A Active CN113055597B (en) 2021-03-25 2021-03-25 Camera calling implementation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113055597B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010113585A (en) * 2001-11-08 2001-12-28 임성기 Image information management system and method for the digital camera and digital camcoder using corresponding Virtual Machine application program implemented in the portable wireless terminal with Virtual Machine housed therein
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN104079862A (en) * 2013-03-30 2014-10-01 深圳市潮流网络技术有限公司 Video electronic whiteboard service implementation method and device
CN104199723A (en) * 2014-09-09 2014-12-10 福建升腾资讯有限公司 Camera mapping method based on virtual equipment
CN105808353A (en) * 2016-03-08 2016-07-27 珠海全志科技股份有限公司 Camera resource sharing method and device
CN107659768A (en) * 2017-08-08 2018-02-02 珠海全志科技股份有限公司 A kind of system and method based on the more Application share cameras of Android
CN108845861A (en) * 2018-05-17 2018-11-20 北京奇虎科技有限公司 The implementation method and device of Softcam

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200832274A (en) * 2007-01-17 2008-08-01 Asustek Comp Inc Video processing method and system for a virtual camera
CN103559150B (en) * 2013-11-08 2016-11-16 深圳市道通科技股份有限公司 The implementation method of main frame external camera and device and mobile terminal
JP6429829B2 (en) * 2016-05-25 2018-11-28 キヤノン株式会社 Image processing system, image processing apparatus, control method, and program
CN107024982A (en) * 2016-12-09 2017-08-08 阿里巴巴集团控股有限公司 A kind of method for safety monitoring of virtual reality device, device and virtual reality device
CN112153272B (en) * 2019-06-28 2022-02-25 华为技术有限公司 Image shooting method and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010113585A (en) * 2001-11-08 2001-12-28 임성기 Image information management system and method for the digital camera and digital camcoder using corresponding Virtual Machine application program implemented in the portable wireless terminal with Virtual Machine housed therein
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN104079862A (en) * 2013-03-30 2014-10-01 深圳市潮流网络技术有限公司 Video electronic whiteboard service implementation method and device
CN104199723A (en) * 2014-09-09 2014-12-10 福建升腾资讯有限公司 Camera mapping method based on virtual equipment
CN105808353A (en) * 2016-03-08 2016-07-27 珠海全志科技股份有限公司 Camera resource sharing method and device
CN107659768A (en) * 2017-08-08 2018-02-02 珠海全志科技股份有限公司 A kind of system and method based on the more Application share cameras of Android
CN108845861A (en) * 2018-05-17 2018-11-20 北京奇虎科技有限公司 The implementation method and device of Softcam

Also Published As

Publication number Publication date
CN113055597A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN110209488B (en) Task execution method, device, equipment, system and storage medium
CN112394869B (en) Vehicle-mounted terminal based applet control method, device, equipment and storage medium
CN110225048B (en) Data transmission method and device, first terminal and storage medium
EP3780575B1 (en) Photographing method and terminal device
CN112148499B (en) Data reporting method, device, computer equipment and medium
CN114168369B (en) Log display methods, devices, equipment and storage media
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN111338933A (en) Buried point verification method, device, equipment and storage medium
CN114443301B (en) Methods and apparatus for implementing headless browser clusters
CN109684112B (en) Program file running method, device, terminal and storage medium
CN116383079A (en) Application program debugging method, device, device, storage medium and product
CN113055597B (en) Camera calling implementation method and device and electronic equipment
CN118784704A (en) Vehicle-mounted cabin driving system and network configuration method thereof
CN118132210A (en) Device resource simulation method, device, electronic device and readable storage medium
CN115774822B (en) Data updating method, device, terminal and storage medium
CN113220330B (en) Electronic equipment management method and device
CN111258683A (en) Detection method, detection device, computer equipment and storage medium
CN113935427B (en) Training task execution method and device, electronic equipment and storage medium
CN115437717B (en) Cross-operating system calling method, device and electronic device
CN118444994A (en) File loading method, device and equipment
CN109726129B (en) Code segment running method, device, terminal and storage medium
CN114510254A (en) Resource updating method and device, electronic equipment and storage medium
CN114979138A (en) Instruction processing method, device and equipment based on distributed service and storage medium
CN117880334A (en) Device management method, master control device and readable storage medium
CN117520003A (en) Function window operation method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant