CN106899795B - Camera hardware parameter calling and setting method and device and camera application system - Google Patents

Camera hardware parameter calling and setting method and device and camera application system Download PDF

Info

Publication number
CN106899795B
CN106899795B CN201510955246.9A CN201510955246A CN106899795B CN 106899795 B CN106899795 B CN 106899795B CN 201510955246 A CN201510955246 A CN 201510955246A CN 106899795 B CN106899795 B CN 106899795B
Authority
CN
China
Prior art keywords
hardware parameter
camera
hardware
instance
component
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
CN201510955246.9A
Other languages
Chinese (zh)
Other versions
CN106899795A (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.)
Banma Zhixing Network Hongkong Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510955246.9A priority Critical patent/CN106899795B/en
Publication of CN106899795A publication Critical patent/CN106899795A/en
Application granted granted Critical
Publication of CN106899795B publication Critical patent/CN106899795B/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

Landscapes

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

Abstract

The embodiment of the application provides a camera hardware parameter calling and setting method, a device and a camera application system, wherein the method comprises the following steps: receiving a hardware parameter setting instruction of a first component, wherein the hardware parameter setting instruction comprises a first hardware parameter; updating the first hardware parameter to a pre-stored hardware parameter instance, wherein the hardware parameter instance is unique; and sending the hardware parameter instance to a Framework interface to set the camera hardware as a first hardware parameter. By adopting the scheme in the embodiment of the application, the parameters called by each component can be kept consistent.

Description

Camera hardware parameter calling and setting method and device and camera application system
Technical Field
The application relates to a terminal application technology, in particular to a camera hardware parameter calling and setting method, a device and a camera application system.
Background
At present, various terminal applications (e.g., applications such as QQ, universal camera, super camera, etc.) capable of invoking a camera of a mobile device (e.g., a mobile phone, a tablet computer, etc.) to perform shooting in different modes (e.g., shooting, video, panorama, etc.) exist, and these applications capable of invoking the camera of the mobile device to perform different shooting are collectively referred to as camera applications in this application. Camera applications have a number of hardware parameters, such as the usual flash on state, scene mode (cloudy day, night, candlelight), exposure value size, white balance parameters, etc.
The components are different functional modules in a camera application, and may also be referred to as business logic units, such as a photographing component, a video component, a delayed photographing component, and the like. To prompt a user for current camera hardware parameters, components in the camera application often need to invoke the camera's hardware parameters; and simultaneously, the hardware parameters set by the user are set to the hardware of the camera application.
In the prior art, the calling and setting of the hardware parameters of the camera are usually realized through a Framework interface of an operating system. When the component sets the hardware parameters of the camera, the common processing flow is as follows: the component A sends a hardware parameter calling instruction to a Framework interface; reading hardware parameters by the Framework interface, packaging the hardware parameters into a corresponding hardware parameter instance A' called at this time, and feeding back to the component A; and the component A sets the hardware parameters, carries the set hardware parameters in a hardware parameter setting instruction after the setting is finished, and sends the hardware parameters to the Framework interface, and the Framework interface updates the hardware parameter instance A 'according to the hardware parameters in the hardware parameter setting instruction and sets the camera hardware according to the hardware parameter instance A'.
The inventor believes that the hardware parameters called by a plurality of components are inconsistent by adopting the camera hardware parameter setting method in the prior art.
Disclosure of Invention
The embodiment of the application provides a camera hardware parameter calling and setting method, a camera hardware parameter calling and setting device and a camera application system, and is used for solving the problem that hardware parameters called by a plurality of components are inconsistent in the prior art.
According to a first aspect of the embodiments of the present application, there is provided a camera hardware parameter setting method, including: receiving a hardware parameter setting instruction of a first component, wherein the hardware parameter setting instruction comprises a first hardware parameter; updating the first hardware parameter to a pre-stored hardware parameter instance, wherein the hardware parameter instance is unique; and sending the hardware parameter instance to a Framework interface to set the camera hardware as a first hardware parameter.
According to a second aspect of the embodiments of the present application, there is provided a camera hardware parameter calling method, including: receiving a hardware parameter calling instruction of a second component; acquiring a pre-stored hardware parameter instance, wherein the hardware parameter instance is unique; the hardware parameter instance is sent to the second component.
According to a third aspect of the embodiments of the present application, there is provided a camera hardware parameter setting apparatus, including: the first receiving module is used for receiving a hardware parameter setting instruction of the first component, wherein the hardware parameter setting instruction comprises a first hardware parameter; the saving module is used for updating the first hardware parameter to a pre-saved hardware parameter instance, wherein the hardware parameter instance is unique; and the first sending module is used for sending the hardware parameter instance to the Framework interface so as to set the camera hardware as the first hardware parameter.
According to a fourth aspect of the embodiments of the present application, there is provided a camera hardware parameter invoking device, including: the third receiving module is used for receiving a hardware parameter calling instruction of the second component; the third acquisition module is used for acquiring a pre-stored hardware parameter instance, and the hardware parameter instance is unique; and a third sending module, configured to send the hardware parameter instance to the second component.
According to a fifth aspect of embodiments of the present application, there is provided a camera application system including: the component is used for sending a hardware parameter setting instruction or a hardware parameter calling instruction to the camera hardware parameter setting or calling device, wherein the hardware parameter setting instruction comprises a first hardware parameter; the camera hardware parameter setting or calling device is used for storing a unique hardware parameter instance, updating the first hardware parameter to the hardware parameter instance when the hardware parameter setting instruction is received, and sending the hardware parameter instance to a Framework interface; when the hardware parameter calling instruction is received, the hardware parameter instance is sent to the corresponding component; the Framework interface is used for receiving a hardware parameter instance sent by the camera hardware parameter setting or calling device and setting the camera hardware as the first hardware parameter; the camera hardware is used for adjusting parameters according to the first hardware parameters.
By adopting the camera hardware parameter setting method of the embodiment of the application, when a hardware parameter setting instruction that a component comprises a first hardware parameter is received, the first hardware parameter is updated to a pre-stored unique hardware parameter instance, and then the hardware parameter instance is sent to a Framework interface so as to set the camera hardware as the first hardware parameter; because the hardware parameter instance is unique, the hardware parameters called by a plurality of components can be ensured to be consistent.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart of a camera hardware parameter setting method according to an embodiment of the present application;
fig. 2 is a flowchart of a camera hardware parameter calling method according to a second embodiment of the present application;
fig. 3 is a flowchart of a camera hardware parameter setting method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a camera hardware parameter setting apparatus according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a camera hardware parameter invoking device according to a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a camera application system according to a sixth embodiment of the present application.
Detailed Description
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and are not exhaustive of all embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In the process of implementing the present application, the applicant finds that, in the prior art, when each component calls a hardware parameter of a camera, a Framework interface generates a hardware parameter instance corresponding to the call, and then when a plurality of components call the hardware parameter of the camera simultaneously, a plurality of hardware parameter instances corresponding to the calls of the plurality of components are generated respectively; the multiple hardware parameter instances are independent of each other.
Thus, the following scenario may occur: before the Framework interface sets the camera hardware according to the hardware parameter instance set by the component A, the component B calls the hardware parameters, and after the Framework interface reads the hardware parameters of the camera, a hardware parameter instance B' is generated aiming at the component B; and then the component B performs parameter setting according to the hardware parameter instance B'. At this time, the hardware parameter of the camera has been updated to the hardware parameter included in the hardware parameter instance a ', and is inconsistent with the hardware parameter in the hardware parameter instance B' called by the component B.
In order to solve the above problems, an embodiment of the present application provides a method and an apparatus for calling and setting hardware parameters of a camera, and a camera application system, where the apparatus according to the embodiment of the present application is newly added between a component and a Framework interface, and when a hardware parameter setting instruction that the component includes a first hardware parameter is received, the first hardware parameter is updated to a unique hardware parameter instance stored in advance, and then the hardware parameter instance is sent to the Framework interface, so as to set the camera hardware as the first hardware parameter; because the hardware parameter instance is unique, the hardware parameters called by a plurality of components can be ensured to be consistent.
The scheme in the embodiment of the application can be applied to camera applications of various Operating systems, such as a cloud OS (Operating System), an apple IOS Operating System, an android Operating System, and the like; in particular, the method can be applied to an operating system self-contained Camera application and a third-party Camera application, such as Camera360, a universal Camera, a super Camera and the like.
Example one
Fig. 1 is a flowchart of a camera hardware parameter setting method according to an embodiment of the present application.
The camera hardware parameter setting method shown in the first embodiment of the present application may be applied between a camera component and a Framework interface, that is, a device applying the camera hardware parameter setting method in the first embodiment of the present application is added between the camera component and the Framework interface, a unique hardware parameter instance is stored in the device, and a hardware parameter in the hardware parameter instance is updated along with the setting of the component or the updating of the camera hardware parameter.
As shown in fig. 1, a camera hardware parameter setting method according to an embodiment of the present application includes the following steps:
s101, receiving a hardware parameter setting instruction of a first component, wherein the hardware parameter setting instruction comprises a first hardware parameter;
s102, updating the first hardware parameter to a pre-stored hardware parameter instance, wherein the hardware parameter instance is unique;
s103, sending the hardware parameter instance to a Framework interface so as to set the camera hardware as a first hardware parameter.
In particular implementations, the first component may include a functional module in a camera application, such as a photo component, a video component, a time-lapse camera component, and the like. The hardware parameters may include state parameters of the multiple camera hardware, such as flash on state, scene mode (cloudy day, night, candle), exposure value size, white balance parameters, etc.; the hardware parameter setting instruction may include changing the flash lamp from an on state to an off state, or changing the flash lamp from an on state to an automatic state; instructions to change scene mode from cloudy to night, etc.
In a specific implementation, the hardware parameter setting instruction may be implemented by using a setParameter () function in Java language.
In particular implementations, the hardware parameter instance may be saved as a String type, camera.
In specific implementation, the hardware parameter in the hardware parameter instance may be updated in an incremental updating manner, that is, only the state change parameter is updated, or in a complete updating manner, that is, all the parameters in the setting instruction sent by the component are used to replace all the original parameters.
In specific implementation, sending the hardware parameter instance to the Framework interface to set the camera hardware as the first hardware parameter may specifically include: and sending the hardware parameter instance to a Framework interface to trigger the Framework interface to extract a first hardware parameter from the hardware parameter instance, and then setting the camera hardware according to the first hardware parameter.
Because the application is implemented between the components and the Framework interface, the Framework interface does not interact with each component directly, but interacts with each component by applying the modules in the embodiment of the application. Therefore, after the Framework interface is triggered to extract the first hardware parameter from the hardware parameter instance, the Framework interface can be triggered to update the hardware parameter instance locally stored in the Framework interface according to the extracted first hardware parameter; and then the Framework interface sets the camera hardware according to the locally stored hardware parameter instance. During specific implementation, the internal logic of the Framework interface may also be modified, so that the Framework interface does not locally store the hardware parameter instance any more, that is, after the Framework interface extracts the first hardware parameter from the received hardware parameter instance, the camera hardware is set according to the first hardware parameter.
In the process of implementing the present application, the inventors found that, in a camera application, due to mutual exclusivity between parameters, when one parameter is set, changes of other parameters may be caused, for example, when a scene mode changes, flash in hardware may be turned off, white balance changes, and the like may be caused; therefore, the following may occur: component a sets only parameter 1, but for the camera hardware, a change in parameter 1 will trigger both parameters 2 and 3 to change; by adopting the scheme in the prior art, the Framework interface updates the stored hardware parameter instance A' according to the hardware parameter set by the component A, namely, only the hardware parameter of the parameter 1 is set, but when the Framework interface sets the hardware parameter to the camera, the hardware parameters 1, 2 and 3 of the camera are changed; therefore, the situation that the hardware parameter instance stored in the Framework interface is inconsistent with the actual hardware parameter occurs, and the situation that the hardware parameter obtained by the component is inconsistent with the actual hardware parameter of the camera occurs when other components call the hardware parameter instance stored in the Framework interface.
In order to solve the above problem, in the related art, after a user sets a parameter mutually exclusive with other parameters, the hardware parameters in the multiple hardware parameter instances in the Framework interface and the parameters of the camera hardware are manually synchronized, that is, the two are manually kept consistent. However, in the prior art, no standard can be found out which parameters have mutual exclusivity, and in addition, the difference of platform implementation is almost impossible to traverse all the mutual exclusivity; omission is very likely to occur if the consistency is maintained in the manner of the related art.
In order to solve the above problem, the embodiments of the present application provide the following solutions:
in a specific implementation, after the setting the camera hardware to the first hardware parameter, the method may further include: acquiring a second camera hardware parameter of the camera; the first hardware parameter in the hardware parameter instance is replaced with the second camera hardware parameter. Specifically, a Framework interface may be triggered to read a second hardware parameter of the camera; and receiving a second hardware parameter from the Framework interface.
Similar to the foregoing, after the camera hardware is set as the first hardware parameter, the Framework interface may be triggered to update the hardware parameter instance locally stored in the Framework interface according to the read second hardware parameter; and then the Framework interface sends the second hardware parameter in the locally stored hardware parameter instance to the device applying the embodiment of the application. Specifically, the internal logic of the Framework interface may also be modified, so that the Framework interface does not locally store the hardware parameter instance any more, that is, after the Framework interface reads the second hardware parameter of the camera, the second hardware parameter is directly sent to the apparatus to which the embodiment of the present application is applied.
During specific implementation, after the hardware parameter instance is sent to the Framework interface, a hardware parameter calling instruction of the second component can be further received; acquiring the hardware parameter instance; the hardware parameter instance is sent to the second component.
In practice, the second component may be the same component as the first component, or may be a different component from the first component. In particular, the second component may include functional modules in a camera application, such as a photo component, a video component, a time-lapse camera component, and the like.
In specific implementation, the hardware parameter calling instruction may be a hardware parameter calling instruction sent when the camera switches from the mode a to the module B, or may be a hardware parameter calling instruction sent by a component to call a camera hardware parameter in order to complete a function of the component, which is not limited in the present application. Specifically, the hardware parameter call instruction may include an instruction to call hardware parameters such as a camera application flash on state, a scene mode (cloudy day, night, candle), an exposure value size, and a white balance parameter.
In particular implementation, the hardware parameter call instruction may be implemented by a getParameter () function in Java language.
In particular implementations, the hardware parameter instance may be saved as a String type, camera.
By adopting the camera hardware parameter setting method in the embodiment of the application, a device applying the embodiment of the application is newly added between the component and the Framework interface, when a hardware parameter setting instruction that the component comprises a first hardware parameter is received, the first hardware parameter is updated to a unique hardware parameter instance stored in advance, and then the hardware parameter instance is sent to the Framework interface so as to set the camera hardware as the first hardware parameter; and then when a hardware parameter calling instruction of the component is received, the unique hardware parameter instance is sent to the component, so that the consistency of hardware parameters called by a plurality of components can be ensured. Meanwhile, by adopting the setting method of the hardware parameters in the embodiment of the application, the hardware parameters called by the components can be kept consistent with the current hardware parameters of the camera hardware.
Example two
Fig. 2 is a flowchart of a camera hardware parameter calling method according to a second embodiment of the present application.
The camera hardware parameter calling method shown in the second embodiment of the present application may be applied between a camera component and a Framework interface, that is, a device applying the camera hardware parameter calling method of the second embodiment of the present application is added between the camera component and the Framework interface.
As shown in fig. 2, the method for calling hardware parameters of a camera according to the second embodiment of the present application includes the following steps:
s201, receiving a hardware parameter calling instruction of a second component;
s202, acquiring a pre-stored hardware parameter instance, wherein the hardware parameter instance is unique;
s203, the hardware parameter instance is sent to the second component.
In particular implementations, the second component may include functional modules in a camera application, such as a photo component, a video component, a time-lapse camera component, and the like.
In specific implementation, the hardware parameter calling instruction may be a hardware parameter calling instruction sent when the camera switches from the mode a to the module B, or may be a hardware parameter calling instruction sent by a component to call a camera hardware parameter in order to complete a function of the component, which is not limited in the present application. Specifically, the hardware parameter call instruction may include an instruction to call hardware parameters such as a camera application flash on state, a scene mode (cloudy day, night, candle), an exposure value size, and a white balance parameter.
In particular implementation, the hardware parameter call instruction may be implemented by a getParameter () function in Java language.
In particular implementations, the hardware parameter instance may be saved as a String type, camera.
In the process of implementing the present application, the inventors found that, in a camera application, due to mutual exclusivity between parameters, when one parameter is set, changes of other parameters may be caused, for example, when a scene mode changes, flash in hardware may be turned off, white balance changes, and the like may be caused; therefore, the following may occur: component a sets only parameter 1, but for the camera hardware, a change in parameter 1 will trigger both parameters 2 and 3 to change; by adopting the scheme in the prior art, the Framework interface updates the stored hardware parameter instance A' according to the hardware parameter set by the component A, namely, only the hardware parameter of the parameter 1 is set, but when the Framework interface sets the hardware parameter to the camera, the hardware parameters 1, 2 and 3 of the camera are changed; therefore, the situation that the hardware parameter instance stored in the Framework interface is inconsistent with the actual hardware parameter occurs, and the situation that the hardware parameter obtained by the component is inconsistent with the actual hardware parameter of the camera occurs when other components call the hardware parameter instance stored in the Framework interface.
In order to solve the above problem, in the related art, after a user sets a parameter mutually exclusive with other parameters, the hardware parameters in the multiple hardware parameter instances in the Framework interface and the parameters of the camera hardware are manually synchronized, that is, the two are manually kept consistent. However, in the prior art, no standard can be found out which parameters have mutual exclusivity, and in addition, the difference of platform implementation is almost impossible to traverse all the mutual exclusivity; omission is very likely to occur if the consistency is maintained in the manner of the related art.
In order to solve the above problem, the embodiments of the present application provide the following solutions:
after receiving the hardware parameter call instruction of the second component, and before acquiring the pre-saved hardware parameter instance, the method may further include: acquiring a third camera hardware parameter of the camera; and updating the hardware parameters of the third camera to the hardware parameter instance. Specifically, a Framework interface may be triggered to read a third hardware parameter of the camera; and receiving a third hardware parameter from the Framework interface.
In specific implementation, after the Framework interface is triggered to read the third hardware parameter of the camera, the Framework interface can be triggered to update a hardware parameter instance locally stored in the Framework interface according to the read third hardware parameter; and then the Framework interface sends the third hardware parameter in the locally stored hardware parameter instance to the device applying the embodiment of the application. Specifically, the internal logic of the Framework interface may also be modified, so that the Framework interface does not locally store the hardware parameter instance any more, that is, after the Framework interface reads the third hardware parameter of the camera, the third hardware parameter is directly sent to the apparatus to which the embodiment of the present application is applied.
By adopting the camera hardware parameter calling method in the embodiment of the application, a device applying the embodiment of the application is newly added between the component and the Framework interface, when a hardware parameter calling instruction of the component is received, a pre-stored unique hardware parameter example is obtained, and then the hardware parameter example is returned to the component; because the hardware parameter instance is unique, the hardware parameters called by a plurality of components can be ensured to be consistent. Meanwhile, the hardware parameter called by the component is consistent with the hardware parameter of the camera hardware by adopting the calling method of the hardware parameter in the embodiment of the application.
EXAMPLE III
Fig. 3 is a flowchart of a camera hardware parameter setting method according to a third embodiment of the present application.
Before setting the hardware parameters of the camera, it is usually necessary to call the current hardware parameters of the camera and then perform corresponding setting. Therefore, in specific implementation, the camera hardware parameter setting method in the first embodiment and the camera hardware parameter calling method in the second embodiment may be implemented in combination.
The following describes a method for setting camera hardware parameters in the embodiment of the present application with reference to a specific scenario. In this scenario, the user switches from mode a to mode B, and after switching to mode B, the user sets the camera hardware parameters.
As shown in fig. 3, a camera hardware parameter setting method according to the third embodiment of the present application includes the following steps:
s301, receiving a hardware parameter calling instruction of a third component;
in specific implementation, when a user switches a camera application from a mode A to a mode B, the current hardware parameters of the camera need to be called; the hardware parameter call instruction may be a getParameter () instruction.
S302, triggering a Framework interface to read the current hardware parameters of the camera;
in particular, when a getParameter () instruction is received, the Framework interface may be triggered to read the current hardware parameters of the camera, so that the hardware parameters subsequently returned to the component are consistent with the current hardware parameters of the camera.
S303, receiving the current hardware parameters of the camera sent by the Framework interface;
in specific implementation, before the Framework interface sends the current hardware parameter of the camera, the Framework interface may further update the current hardware parameter of the camera to a corresponding hardware parameter instance locally held by the Framework interface.
Specifically, the current hardware parameter may include a plurality of hardware parameters, where the flash parameter indicates that a flash of the current camera is in an on state.
S304, updating the current hardware parameter to a unique hardware parameter instance stored in advance;
s305, acquiring the unique hardware parameter instance and returning the unique hardware parameter instance to the third component;
so far, the switching operation to the mode B has been completed; the current camera hardware parameters are displayed to the user. Next, the user will set the camera hardware parameters according to the current environmental or personal preferences. For example, if the user considers that the flash does not need to be turned on in the current environment, the flash of the current camera is set to the off state.
S306, receiving a hardware parameter setting instruction sent by the third component, wherein the hardware parameter setting instruction is generated according to the setting of the hardware parameter by the user, and the hardware parameter setting instruction comprises a fourth hardware parameter set by the user;
in particular implementations, the hardware parameter setting instruction may employ setParameter ().
In a specific implementation, the fourth hardware parameter may include a plurality of hardware parameters, and among the plurality of hardware parameters, the flash parameter indicates that the flash is in an off state.
S307, updating the fourth hardware parameter to a unique hardware parameter instance stored in advance;
in particular, the hardware parameters may be updated in an incremental manner, i.e., only the status parameters of the flash lamp are updated, or in a total update manner, i.e., all the hardware parameters sent by the component are used to replace all the parameters in the hardware parameter instance.
S308, sending the updated hardware parameter instance to a Framework interface;
s309, the Framework interface sets the camera according to the fourth hardware parameter in the hardware parameter instance.
In specific implementation, in order to ensure that the hardware parameters stored in the hardware parameter instance are consistent with the current hardware parameters of the camera, after step 310, the Framework interface may be further triggered to read the current hardware parameters of the camera; and updating the current hardware parameter to the unique hardware parameter instance.
By adopting the camera hardware parameter setting method in the embodiment of the application, the hardware parameters called by the components can be ensured to be consistent with the hardware parameters of the camera hardware, and the hardware parameters called by a plurality of components can be ensured to be consistent.
Based on the same inventive concept, the embodiment of the present application further provides a device for setting hardware parameters of a camera, and as the principle of the device for solving the problems is similar to the method provided in the first embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Example four
Fig. 4 is a schematic structural diagram of a camera hardware parameter setting device according to a fourth embodiment of the present application.
As shown in fig. 4, a camera hardware parameter setting apparatus 400 according to the fourth embodiment of the present application includes: a first receiving module 401, configured to receive a hardware parameter setting instruction of a first component, where the hardware parameter setting instruction includes a first hardware parameter; a saving module 402, configured to update the first hardware parameter to a pre-saved hardware parameter instance, where the hardware parameter instance is unique; a first sending module 403, configured to send the hardware parameter instance to a Framework interface, so as to set the camera hardware as the first hardware parameter.
In specific implementation, the camera hardware parameter setting device according to the fourth embodiment of the present application may further include: the first acquisition module is used for acquiring second camera hardware parameters of the camera; the saving module is further used for replacing the first hardware parameter in the hardware parameter instance with the second camera hardware parameter.
In a specific implementation, the first obtaining module may specifically include: the first triggering submodule is used for triggering the Framework interface to read a second hardware parameter of the camera; and the first receiving submodule is used for receiving the second hardware parameter from the Framework interface.
In specific implementation, the camera hardware parameter setting device according to the fourth embodiment of the present application may further include: the second receiving module is used for receiving a hardware parameter calling instruction of the second component; the second acquisition module is used for acquiring the hardware parameter instance; a second sending module, configured to send the hardware parameter instance to the second component.
In specific implementation, the camera hardware parameter setting apparatus according to the fourth embodiment of the present application may be located between multiple components of the camera application and a Framework interface, where the multiple components include a first component and a second component.
By adopting the camera hardware parameter setting device in the embodiment of the application, when a hardware parameter setting instruction that a component comprises a first hardware parameter is received, the first hardware parameter is updated to a pre-stored unique hardware parameter instance, and then the hardware parameter instance is sent to a Framework interface so as to set the camera hardware as the first hardware parameter; and then when a hardware parameter calling instruction of the component is received, the unique hardware parameter instance is sent to the component, so that the consistency of hardware parameters called by a plurality of components can be ensured. Meanwhile, the hardware parameter setting device in the embodiment of the application can enable the hardware parameter called by the component to be consistent with the current hardware parameter of the camera hardware.
Based on the same inventive concept, the embodiment of the present application further provides a device for invoking hardware parameters of a camera, and since the principle of the device for solving the problem is similar to the method provided in the second embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a camera hardware parameter invoking device according to a fifth embodiment of the present application.
As shown in fig. 5, a camera hardware parameter invoking device 500 according to the fifth embodiment of the present application includes: a third receiving module 501, configured to receive a hardware parameter calling instruction of a second component; a third obtaining module 502, configured to obtain a pre-stored hardware parameter instance, where the hardware parameter instance is unique; a third sending module 503, configured to send the hardware parameter instance to the second component.
In specific implementation, the camera hardware parameter invoking device according to the fifth embodiment of the present application may further include: the fourth acquisition module is used for acquiring a third camera hardware parameter of the camera; and the updating module is used for updating the hardware parameter of the third camera to the hardware parameter instance.
In a specific implementation, the fourth obtaining module specifically includes: the second triggering submodule is used for triggering the Framework interface to read a third hardware parameter of the camera; and the second receiving submodule is used for receiving the third hardware parameter from the Framework interface.
By adopting the camera hardware parameter calling device in the embodiment of the application, when a hardware parameter calling instruction of the component is received, a pre-stored unique hardware parameter instance is obtained, and then the hardware parameter instance is returned to the component; because the hardware parameter instance is unique, the hardware parameters called by a plurality of components can be ensured to be consistent. Meanwhile, the hardware parameter calling device in the embodiment of the application is adopted, so that the hardware parameter called by the component is consistent with the hardware parameter of the camera hardware.
Based on the same inventive concept, the embodiment of the present application further provides a camera application system, and as the principle of solving the problem of the system is similar to the methods provided in the first and second embodiments of the present application, the implementation of the system can refer to the implementation of the method, and repeated details are not repeated.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a camera application system according to a sixth embodiment of the present application.
As shown in fig. 6, a camera application system 600 according to a sixth embodiment of the present application includes: a plurality of components 601a, 601b, 601c for sending a hardware parameter setting instruction or a hardware parameter calling instruction to a camera hardware parameter setting or calling device, where the hardware parameter setting instruction includes a first hardware parameter; the camera hardware parameter setting or calling device 602 is configured to store a unique hardware parameter instance, update a first hardware parameter to the hardware parameter instance when receiving a hardware parameter setting instruction, and send the hardware parameter instance to a Framework interface; when a hardware parameter calling instruction is received, sending a hardware parameter instance to a corresponding component; the Framework interface 603 is configured to receive a hardware parameter instance sent by the camera hardware parameter setting or calling apparatus, and set the camera hardware as the first hardware parameter; the camera hardware 604a, 604b, 604c is configured to adjust parameters according to the first hardware parameter.
In specific implementation, the camera hardware parameter setting or calling device 602 in the embodiment of the present application may include the camera hardware parameter setting device in the fourth embodiment of the present application; and/or the camera hardware parameter calling device in the fifth embodiment of the present application.
In particular implementations, the camera hardware may include a flash, a viewfinder, a lens, and the like.
In specific implementation, the camera hardware parameter setting or calling device is further configured to trigger the Framework interface to read a second hardware parameter of the camera after the camera is adjusted according to the first hardware parameter; and replacing the first hardware parameter in the hardware parameter instance with the second camera hardware parameter.
By adopting the camera application system in the embodiment of the application, when a hardware parameter setting instruction that a component comprises a first hardware parameter is received, the first hardware parameter is updated to a unique hardware parameter instance which is stored in advance, and then the hardware parameter instance is sent to a Framework interface so as to set the camera hardware as the first hardware parameter; and then when a hardware parameter calling instruction of the component is received, the unique hardware parameter instance is sent to the component, so that the consistency of hardware parameters called by a plurality of components can be ensured. Meanwhile, by adopting the camera application system in the embodiment of the application, the hardware parameters called by the components can be kept consistent with the current hardware parameters of the camera hardware.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (17)

1. A camera hardware parameter setting method is characterized by comprising the following steps:
receiving a hardware parameter setting instruction of a first component, wherein the hardware parameter setting instruction comprises a first hardware parameter;
updating the first hardware parameter to a pre-saved hardware parameter instance, wherein the hardware parameter instance is unique;
and sending the hardware parameter instance to a Framework interface so as to set the camera hardware as a first hardware parameter.
2. The method of claim 1, further comprising, after setting the camera hardware to the first hardware parameter:
acquiring a second camera hardware parameter of the camera;
replacing the first hardware parameter in the hardware parameter instance with the second camera hardware parameter.
3. The method of claim 2, wherein obtaining second camera hardware parameters of the camera specifically comprises:
triggering the Framework interface to read a second hardware parameter of the camera;
and receiving a second hardware parameter from the Framework interface.
4. The method according to any one of claims 1-3, wherein after sending the hardware parameter instance to a Framework interface, further comprising:
receiving a hardware parameter calling instruction of a second component;
acquiring the hardware parameter instance;
sending the hardware parameter instance to the second component.
5. A camera hardware parameter calling method is characterized by comprising the following steps:
receiving a hardware parameter calling instruction of a second component;
acquiring a pre-stored hardware parameter instance, wherein the hardware parameter instance is unique;
sending the hardware parameter instance to the second component.
6. The method of claim 5, wherein after receiving the hardware parameter call instruction of the second component, before obtaining the pre-saved hardware parameter instance, further comprising:
acquiring a third camera hardware parameter of the camera;
updating the third camera hardware parameter to the hardware parameter instance.
7. The method of claim 6, wherein obtaining third camera hardware parameters of the camera specifically comprises:
triggering a Framework interface to read a third hardware parameter of the camera;
and receiving a third hardware parameter from the Framework interface.
8. A camera hardware parameter setting device, comprising:
the first receiving module is used for receiving a hardware parameter setting instruction of a first component, wherein the hardware parameter setting instruction comprises a first hardware parameter;
the saving module is used for updating the first hardware parameter to a pre-saved hardware parameter instance, wherein the hardware parameter instance is unique;
and the first sending module is used for sending the hardware parameter instance to a Framework interface so as to set the camera hardware as a first hardware parameter.
9. The apparatus of claim 8, further comprising:
the first acquisition module is used for acquiring second camera hardware parameters of the camera after the camera hardware is set as the first hardware parameters, and replacing the first hardware parameters in the hardware parameter instance with the second camera hardware parameters.
10. The apparatus of claim 9, wherein the first obtaining module specifically comprises:
the first triggering submodule is used for triggering the Framework interface to read a second hardware parameter of the camera;
and the first receiving submodule is used for receiving the second hardware parameter from the Framework interface.
11. The apparatus of any one of claims 8-10, further comprising:
the second receiving module is used for receiving a hardware parameter calling instruction of the second component;
the second acquisition module is used for acquiring the hardware parameter instance;
a second sending module, configured to send the hardware parameter instance to the second component.
12. The apparatus of claim 11, wherein the apparatus is located between a plurality of components of the camera application and a Framework interface, the plurality of components comprising a first component and a second component.
13. A camera hardware parameter calling device is characterized by comprising:
the third receiving module is used for receiving a hardware parameter calling instruction of the second component;
the third acquisition module is used for acquiring a pre-stored hardware parameter instance, and the hardware parameter instance is unique;
a third sending module, configured to send the hardware parameter instance to the second component.
14. The apparatus of claim 13, further comprising:
and the fourth obtaining module is used for obtaining a third camera hardware parameter of the camera after receiving the hardware parameter calling instruction of the second component and before obtaining a pre-stored hardware parameter instance, and updating the third camera hardware parameter to the hardware parameter instance.
15. The apparatus according to claim 14, wherein the fourth obtaining module specifically includes:
the second triggering submodule is used for triggering a Framework interface to read a third hardware parameter of the camera;
and the second receiving submodule is used for receiving the third hardware parameter from the Framework interface.
16. A camera application system, comprising:
the camera hardware parameter setting or calling device is used for storing a unique hardware parameter instance, updating a first hardware parameter to the hardware parameter instance when receiving the hardware parameter setting instruction sent by a component to the camera hardware parameter setting or calling device, and sending the hardware parameter instance to a Framework interface; when the hardware parameter calling instruction sent by the component to the camera hardware parameter setting or calling device is received, the hardware parameter instance is sent to the corresponding component; wherein the hardware parameter setting instruction comprises a first hardware parameter;
and the camera hardware is used for receiving the hardware parameter instance sent by the camera hardware parameter setting or calling device at the Framework interface, and adjusting parameters according to the first hardware parameter when the camera hardware is set as the first hardware parameter.
17. The system according to claim 16, wherein the camera hardware parameter setting or invoking means is further configured to trigger the Framework interface to read a second hardware parameter of the camera adjusted according to the first hardware parameter; and replacing the first hardware parameter in the hardware parameter instance with the second hardware parameter.
CN201510955246.9A 2015-12-17 2015-12-17 Camera hardware parameter calling and setting method and device and camera application system Active CN106899795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510955246.9A CN106899795B (en) 2015-12-17 2015-12-17 Camera hardware parameter calling and setting method and device and camera application system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510955246.9A CN106899795B (en) 2015-12-17 2015-12-17 Camera hardware parameter calling and setting method and device and camera application system

Publications (2)

Publication Number Publication Date
CN106899795A CN106899795A (en) 2017-06-27
CN106899795B true CN106899795B (en) 2020-06-09

Family

ID=59189581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510955246.9A Active CN106899795B (en) 2015-12-17 2015-12-17 Camera hardware parameter calling and setting method and device and camera application system

Country Status (1)

Country Link
CN (1) CN106899795B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179369B (en) * 2021-04-08 2023-03-21 重庆传音通讯技术有限公司 Shot picture display method, mobile terminal and storage medium
CN113327428A (en) * 2021-06-21 2021-08-31 深圳腾达智能科技有限公司 Method for rapidly acquiring data of vehicles entering and leaving parking lot

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647848A (en) * 2013-12-24 2014-03-19 Tcl通讯(宁波)有限公司 Method and system for processing Android mobile phone parameters
US9167169B1 (en) * 2014-11-05 2015-10-20 Duelight Llc Image sensor apparatus and method for simultaneously capturing multiple images

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8228413B2 (en) * 2009-09-01 2012-07-24 Geovector Corp. Photographer's guidance systems
JP6034401B2 (en) * 2011-12-28 2016-11-30 ノキア テクノロジーズ オーユー Providing an open instance of the application
CN103442172B (en) * 2013-08-15 2017-09-19 Tcl集团股份有限公司 A kind of camera image quality adjusting method, system and mobile terminal based on Android platform
CN104375857B (en) * 2014-10-22 2016-06-01 腾讯科技(深圳)有限公司 A kind of application program runs the method for Multi-instance, device and terminating unit
CN105141946B (en) * 2015-08-10 2017-06-27 深圳市高斯贝尔家居智能电子有限公司 The test system and method for a kind of monitoring camera

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647848A (en) * 2013-12-24 2014-03-19 Tcl通讯(宁波)有限公司 Method and system for processing Android mobile phone parameters
US9167169B1 (en) * 2014-11-05 2015-10-20 Duelight Llc Image sensor apparatus and method for simultaneously capturing multiple images

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
第七章 Android Camera框架;ailimao2010;《百度文库》;20120106;全文 *

Also Published As

Publication number Publication date
CN106899795A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
EP3200446A1 (en) Method and apparatus for generating high dynamic range image
US10659675B2 (en) Terminal, shooting method thereof and computer storage medium
JP6475339B2 (en) Image sharing method and apparatus, and terminal device
EP3166079A1 (en) Augmented reality method and system based on wearable device
CN105872350A (en) Adjusting method and device for photographing parameter of camera
CN106657757B (en) Image preview method and device for camera application and camera application system
CN104333703A (en) Method and terminal for photographing by virtue of two cameras
CN104735348B (en) Double-camera photographing method and system
CN103078924A (en) Visual field sharing method and equipment
CN111569426B (en) Game scene editing method and device, storage medium and electronic device
CN104486558A (en) Video processing method and device for simulating shooting scene
CN106899795B (en) Camera hardware parameter calling and setting method and device and camera application system
US20170331997A1 (en) Brightness compensation method and device, and computer storage medium
CN109167936A (en) A kind of image processing method, terminal and storage medium
CN104424333A (en) Method and system for loading table data
CN105550181A (en) File classification storage method and apparatus and terminal
CN105338564A (en) Client adaption method, server and system, and client
CN104935709A (en) Method and device for achieving lens compatibility
CN105227597A (en) A kind of method, Apparatus and system obtaining terminal equipment screen-picture
CN105589616A (en) Method and apparatus for combining multiple application operations on terminal and terminal
CN105430292A (en) Method and device for improving effect of photographing against light
US11622078B2 (en) Method and apparatus for image formation using preview images
CN111131707A (en) Shooting method and device based on raspberry pie
CN106303558B (en) A kind of live broadcasting method and device
CN104580932A (en) Image information modification method and device

Legal Events

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

Effective date of registration: 20201214

Address after: Room 603, 6 / F, Roche Plaza, 788 Cheung Sha Wan Road, Kowloon, China

Patentee after: Zebra smart travel network (Hong Kong) Limited

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right